Recommended video determination method and apparatus, electronic device, and storage medium

By constructing a relational time decay term and fusing video features with a graph neural network, the problem of low accuracy in recommended videos in existing technologies is solved, and the timeliness and accuracy of personalized video recommendations are achieved.

CN123178704APending Publication Date: 2026-11-27TENCENT TECH (BEIJING) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510688842.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-27
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

In existing technologies, when determining recommended videos by analyzing the similarity between accounts, it is difficult to accurately reflect the interests and preferences of the target account, resulting in low accuracy of recommended videos.

Method used

A relational time decay term is constructed, and the features of video nodes and neighboring nodes are updated based on the association time. The video features and account features are fused through a graph neural network to generate personalized video recommendations.

Benefits of technology

It improves the accuracy of recommended videos, and can capture the real-time interests and preferences of target accounts in the semantic space to generate timely and personalized video recommendations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123178704A_ABST
    Figure CN123178704A_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure disclose a method and device for determining a recommended video, an electronic device and a storage medium. The method comprises: obtaining an association time between a video node and a neighbor node in a knowledge graph, and constructing a relationship time decay term based on the association time; obtaining an initial video feature of the video node, obtaining an initial node feature of the neighbor node and a relationship weight matrix of a relationship edge, updating the initial video feature based on a fusion result of the relationship time decay term, the relationship weight matrix and the initial node feature to obtain an updated video feature; updating the knowledge graph based on the updated video feature, obtaining an updated node feature of the neighbor node in the updated knowledge graph, and fusing the initial video feature and the updated node feature to obtain a target video feature; obtaining an account feature of a target account, and determining a recommended video in a candidate video based on a fusion result of the account feature and the target video feature. Embodiments of the present disclosure can improve the accuracy of the recommended video.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and in particular to a method, apparatus, electronic device, and storage medium for determining recommended video. Background Technology

[0002] With the continuous development of video recommendation technology, personalized video recommendations have become a key means to improve user experience and user stickiness. Related technologies typically determine recommended videos by analyzing the similarity between accounts. Specifically, this involves identifying similar reference accounts based on the target account's historical viewing history, and then determining recommended videos based on the videos viewed by these reference accounts. However, because the overlap in content viewed by similar accounts is limited, it is difficult to accurately reflect the target account's interests and preferences, resulting in low accuracy in the determined recommended videos. Summary of the Invention

[0003] The following is an overview of the subject matter described in detail in this disclosure. This overview is not intended to limit the scope of the claims.

[0004] This disclosure provides a method, apparatus, electronic device, and storage medium for determining recommended videos, which can improve the accuracy of recommended videos.

[0005] On one hand, embodiments of this disclosure provide a method for determining recommended videos, including:

[0006] Obtain the association time between video nodes and neighboring nodes in the knowledge graph, and construct a relationship time decay term based on the association time, wherein the video node is a node of a candidate video in the knowledge graph, and the neighboring node is a node that has a relationship edge with the video node;

[0007] The initial video features of the video node are obtained, the initial node features of the neighboring nodes and the relation weight matrix of the relation edges are obtained, and the initial video features are updated based on the fusion result of the relation time decay term, the relation weight matrix and the initial node features to obtain the updated video features.

[0008] The knowledge graph is updated based on the updated video features, and the updated node features of the neighboring nodes in the updated knowledge graph are obtained. The initial video features and the updated node features are then fused to obtain the target video features.

[0009] Obtain the account features of the target account, and determine the recommended video from the candidate videos based on the fusion result of the account features and the target video features.

[0010] On the other hand, embodiments of this disclosure also provide a recommended video determination device, including:

[0011] The acquisition module is used to acquire the association time between video nodes and neighboring nodes in the knowledge graph, and construct a relationship time decay term based on the association time. The video node is a node of a candidate video in the knowledge graph, and the neighboring node is a node that has a relationship edge with the video node.

[0012] The update module is used to obtain the initial video features of the video node, the initial node features of the neighboring nodes and the relation weight matrix of the relation edges, and update the initial video features based on the fusion result of the relation time decay term, the relation weight matrix and the initial node features to obtain the updated video features.

[0013] The fusion module is used to update the knowledge graph based on the updated video features, obtain the updated node features of the neighboring nodes in the updated knowledge graph, and fuse the initial video features and the updated node features to obtain the target video features.

[0014] The recommendation module is used to obtain the account features of the target account and determine the recommended video from the candidate videos based on the fusion result of the account features and the target video features.

[0015] Furthermore, the video node has self-looping edges, and the update module is specifically used for:

[0016] The relationship time decay term, the relationship weight matrix, and the initial node features are fused to obtain the first message feature;

[0017] Obtain the self-loop time decay term and self-loop weight matrix of the self-loop connection, and fuse the self-loop time decay term, the self-loop weight matrix and the initial video features to obtain the second message feature;

[0018] The updated video features are obtained based on the sum of the first message features and the second message features.

[0019] Furthermore, the aforementioned update module is specifically used for:

[0020] Based on the relation weight matrix, the initial node features are linearly transformed to obtain the transformed node features;

[0021] The relation time decay term is normalized, and the transformation node features are adjusted based on the normalized relation time decay term to obtain the first message features.

[0022] Furthermore, the aforementioned update module is specifically used for:

[0023] The candidate video is acquired, and the candidate video is sampled frame by frame to obtain image frame temporal data. The temporal features and optical flow features of the image frame temporal data are extracted, and the temporal features and optical flow features are fused to obtain visual features.

[0024] Obtain the relevant text of the candidate video, and extract features from the relevant text to obtain text features;

[0025] Obtain the original audio of the candidate video, and extract features from the original audio to obtain audio features;

[0026] The initial video features of the video node are obtained by fusing the visual features, the text features, and the audio features.

[0027] Furthermore, the aforementioned update module is specifically used for:

[0028] The visual features, text features, and audio features are projected separately to obtain modal projection results corresponding to each of the visual features, text features, and audio features, wherein the dimensions of each modal projection result are the same;

[0029] The attention weights of each modal projection result are obtained, and the modal projection results are weighted and fused based on the attention weights to obtain the initial video features of the video node.

[0030] Furthermore, the aforementioned recommended video determination device also includes a feature determination module, which is specifically used for:

[0031] Obtain the historical interaction events of the target account, and update the pre-cached interaction event feature sequence based on the historical interaction events;

[0032] Add positional encoding to the updated interaction event feature sequence, and perform one-way masking and attention processing on the interaction event feature sequence after adding positional encoding to obtain the first memory feature;

[0033] The historical interaction events are input into the neural Turing machine, which updates the readable and writable matrix. The second memory features are then extracted based on the updated readable and writable matrix.

[0034] By fusing the first memory feature and the second memory feature, the account features of the target account are obtained.

[0035] Furthermore, the aforementioned feature determination module is specifically used for:

[0036] The first memory feature and the second memory feature are concatenated and input into the weight prediction model for prediction to obtain the first weight of the first memory feature.

[0037] The second weight of the second memory feature is determined based on the first weight and the preset weight threshold.

[0038] Based on the first weight and the second weight, the first memory feature and the second memory feature are weighted and summed to obtain the account features of the target account.

[0039] Furthermore, the aforementioned fusion module is specifically used for:

[0040] Mapping the relation weight matrix yields relation type features;

[0041] Enhanced node features are obtained by fusing the updated node features and the relationship type features;

[0042] The target video features are obtained by fusing the initial video features and the enhanced node features.

[0043] Furthermore, the aforementioned fusion module is specifically used for:

[0044] Query features are generated based on the initial video features, and key and value features are generated based on the enhanced node features.

[0045] Cross-attention is applied to the query features, the key features, and the value features to obtain the target video features.

[0046] Furthermore, the aforementioned fusion module is specifically used for:

[0047] The degree of association is obtained by multiplying the query feature with the transposed key feature;

[0048] An attention score is obtained based on the sum of the degree of association and the relationship time decay term;

[0049] The target video features are obtained by multiplying the attention score and the value feature.

[0050] Furthermore, the aforementioned fusion module is specifically used for:

[0051] Based on the topological structure of the knowledge graph, the graph structure features of the neighboring nodes are determined;

[0052] The graph structure features and the enhanced node features are concatenated to obtain the concatenated features;

[0053] Key features and value features are generated based on the splicing features.

[0054] On the other hand, embodiments of this disclosure also provide an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the above-described recommended video determination method.

[0055] On the other hand, embodiments of this disclosure also provide a computer-readable storage medium storing a computer program that is executed by a processor to implement the above-described recommended video determination method.

[0056] On the other hand, this disclosure also provides a computer program product comprising a computer program stored in a computer-readable storage medium. A processor of an electronic device reads the computer program from the computer-readable storage medium and executes the computer program, causing the electronic device to perform the recommended video determination method described above.

[0057] The embodiments of this disclosure include at least the following beneficial effects: By obtaining the association time between video nodes and neighboring nodes in the knowledge graph, and then constructing a relation time decay term based on the association time, the timeliness of the relationship edges between video nodes and neighboring nodes can be represented by the relation time decay term. Then, the initial video features of the video nodes, the initial node features of the neighboring nodes, and the relation weight matrix of the relation edges are obtained. Based on the fusion result of the relation time decay term, the relation weight matrix, and the initial node features, the initial video features are updated, which can obtain updated video features with structure awareness and time-series awareness. Then, the knowledge graph is updated based on the updated video features, which can construct a knowledge graph with time-series awareness capabilities. Dynamic knowledge graphs enable them to simultaneously capture the temporal evolution of node features and relational edges. Then, updated node features of neighboring nodes in the updated knowledge graph are obtained. By fusing initial video features and updated node features, structured contextual information of the updated node features is introduced, resulting in semantically richer target video features that are timely. Next, account features of the target account are obtained. Based on the fusion of account features and target video features, recommended videos are determined from candidate videos. This allows the recommendation process to accurately capture the real-time interests and preferences of the target account in the semantic space, generating timely and personalized video recommendations, thus improving the accuracy of recommended videos.

[0058] Other features and advantages of this disclosure will be set forth in the following description and will be apparent in part from the description or may be learned by practicing this disclosure. Attached Figure Description

[0059] The accompanying drawings are provided to further understand the technical solutions of this disclosure and constitute a part of the specification. They are used together with the embodiments of this disclosure to explain the technical solutions of this disclosure and do not constitute a limitation on the technical solutions of this disclosure.

[0060] Figure 1 A schematic diagram illustrating an optional implementation environment provided for an embodiment of this disclosure;

[0061] Figure 2 A schematic flowchart of an optional recommended video determination method provided in an embodiment of this disclosure;

[0062] Figure 3 This is a schematic diagram of an optional structure of the knowledge graph provided in an embodiment of the present disclosure;

[0063] Figure 4 A schematic diagram of an optional process for determining a recommendation score provided in an embodiment of this disclosure;

[0064] Figure 5 A schematic diagram of an optional process for determining visual features provided in an embodiment of this disclosure;

[0065] Figure 6 A schematic diagram of an optional process for determining text features provided in an embodiment of this disclosure;

[0066] Figure 7 A schematic diagram of an optional process for determining audio features provided in an embodiment of this disclosure;

[0067] Figure 8 This is a schematic diagram of an optional process for fusing multimodal features provided in an embodiment of this disclosure;

[0068] Figure 9 A schematic diagram of an optional process for determining account characteristics provided in an embodiment of this disclosure;

[0069] Figure 10 A schematic diagram of an optional architecture for the recommended video determination method provided in this embodiment of the disclosure;

[0070] Figure 11 A schematic diagram of an optional timing sequence for the video recommendation method provided in this embodiment of the present disclosure;

[0071] Figure 12 This is a schematic diagram of an optional interface of a video client provided in an embodiment of this disclosure;

[0072] Figure 13 Another optional interface diagram of the video client provided in this disclosure embodiment;

[0073] Figure 14A schematic diagram of an optional structure of the recommended video determination device provided in the embodiments of this disclosure;

[0074] Figure 15 This is a partial structural block diagram of a terminal provided in an embodiment of the present disclosure;

[0075] Figure 16 This is a partial structural block diagram of a server provided in an embodiment of this disclosure. Detailed Implementation

[0076] To make the objectives, technical solutions, and advantages of this disclosure clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and are not intended to limit the scope of this disclosure.

[0077] It should be noted that in the various specific embodiments of this disclosure, when processing is required based on data related to the characteristics of the target object, such as target object attribute information or a set of attribute information, the permission or consent of the target object will be obtained first. Furthermore, the collection, use, and processing of this data will comply with relevant laws, regulations, and standards. The target object can be a user. In addition, when embodiments of this disclosure require obtaining target object attribute information, separate permission or consent from the target object will be obtained through pop-ups or redirection to a confirmation page. Only after obtaining the target object's separate permission or consent will the necessary target object-related data for the normal operation of the embodiments of this disclosure be obtained.

[0078] In this disclosure, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.

[0079] To facilitate understanding of the technical solutions provided in the embodiments of this disclosure, some key terms used in the embodiments of this disclosure will be explained below:

[0080] A knowledge graph can be understood as a visualization of a knowledge domain or a mapping map of a knowledge domain. It is a series of different graphics that show the development process and structural relationships of knowledge. It uses visualization technology to describe knowledge resources and their carriers, and can show different knowledge and their interrelationships.

[0081] With the continuous development of video recommendation technology, personalized video recommendations have become a key means to improve user experience and user stickiness. Related technologies typically determine recommended videos by analyzing the similarity between accounts. Specifically, this involves identifying similar reference accounts based on the target account's historical viewing history, and then determining recommended videos based on the videos viewed by these reference accounts. However, because the overlap in content viewed by similar accounts is limited, it is difficult to accurately reflect the target account's interests and preferences, resulting in low accuracy in the determined recommended videos.

[0082] Based on this, embodiments of this disclosure provide a method, apparatus, electronic device, and storage medium for determining recommended videos, which can improve the accuracy of recommended videos.

[0083] Reference Figure 1 , Figure 1 This is a schematic diagram of an optional implementation environment provided by an embodiment of the present disclosure. The implementation environment includes a terminal 101 and a server 102, wherein the terminal 101 and the server 102 are connected through a communication network.

[0084] For example, server 102 can obtain the association time between video nodes and neighboring nodes in the knowledge graph, construct a relationship time decay term based on the association time, where video nodes are nodes of candidate videos in the knowledge graph, and neighboring nodes are nodes that have relationship edges with video nodes; obtain the initial video features of video nodes, obtain the initial node features of neighboring nodes and the relationship weight matrix of relationship edges, update the initial video features based on the fusion result of relationship time decay term, relationship weight matrix and initial node features to obtain updated video features; update the knowledge graph based on updated video features, obtain the updated node features of neighboring nodes in the updated knowledge graph, fuse the initial video features and updated node features to obtain target video features; obtain the account features of target accounts, determine recommended videos from candidate videos based on the fusion result of account features and target video features; server 102 responds to the video recommendation request of terminal 101 by pushing the recommendation results generated based on the recommended videos to terminal 101.

[0085] Server 102 obtains the association time between video nodes and neighboring nodes in the knowledge graph, and then constructs a relation time decay term based on the association time. This relation time decay term can represent the timeliness of the relationship edges between video nodes and neighboring nodes. Next, it obtains the initial video features of the video nodes, the initial node features of the neighboring nodes, and the relation weight matrix of the relation edges. Based on the fusion result of the relation time decay term, the relation weight matrix, and the initial node features, the initial video features are updated to obtain updated video features with structure awareness and time-series awareness. The knowledge graph is then updated based on the updated video features, thus constructing a dynamic knowledge graph with time-series awareness capabilities. This approach enables the knowledge graph to simultaneously capture node features and the temporal evolution of relational edges. Then, it obtains the updated node features of neighboring nodes in the updated knowledge graph. By fusing the initial video features and the updated node features, it introduces structured contextual information into the updated node features, resulting in semantically richer target video features and ensuring their timeliness. Next, it obtains the account features of the target account and, based on the fusion of the account features and the target video features, determines recommended videos from among the candidate videos. This allows the recommendation process to accurately capture the target account's real-time interests and preferences in the semantic space, generating timely and personalized video recommendations, thus improving the accuracy of recommended videos.

[0086] Server 102 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. Additionally, server 102 can also be a node server in a blockchain network.

[0087] Terminal 101 may be a mobile phone, computer, smart voice interaction device, smart home appliance, vehicle terminal, etc., but is not limited to these. Terminal 101 and server 102 can be directly or indirectly connected through wired or wireless communication, and this embodiment of the disclosure does not impose any limitations.

[0088] Reference Figure 2 , Figure 2 This is an optional flowchart illustrating a recommended video determination method provided in an embodiment of the present disclosure. The recommended video determination method can be executed by a server, or by a terminal, or by a server in cooperation with a terminal. The recommended video determination method includes, but is not limited to, the following steps 201 to 204.

[0089] Step 201: Obtain the association time between video nodes and neighboring nodes in the knowledge graph, and construct a relationship time decay term based on the association time.

[0090] Among them, video nodes are candidate video nodes in the knowledge graph, and neighbor nodes are nodes that have relationship edges with video nodes. Relationship edges are used to represent the association between neighbor nodes and video nodes. The knowledge graph can include multiple types of nodes, and the knowledge graph can include relationship edges of multiple relationship types.

[0091] For example, suppose a knowledge graph includes nodes of various types, such as account nodes, video nodes, director nodes, actor nodes, and genre nodes. Each node in the knowledge graph can be configured with a unique node identifier and can have corresponding attribute information. The knowledge graph can include relationship edges of various relationship types, such as interaction, director, lead actor, genre, and collaboration. Account nodes can be connected to video nodes, director nodes, actor nodes, or genre nodes through interaction-type relationship edges. Interaction types can include watching, collecting, liking, and following. Video nodes can be connected to director nodes through director relationship edges, actor nodes can be connected to video nodes through lead actor relationship edges, video nodes can be connected to genre nodes through genre relationship edges, and director nodes can be connected to actor nodes through collaboration relationship edges. Furthermore, since video nodes can have relationship edges with account nodes, director nodes, actor nodes, or other video nodes, neighboring nodes can be nodes of the same type as account nodes, director nodes, actor nodes, or video nodes.

[0092] It's important to note that the association time refers to the time when the edge connecting a video node and its neighboring nodes becomes effective. For example, suppose the knowledge graph contains an account node User1 and a video node MovieA. User1 can be the target account node in the knowledge graph, and MovieA can be the candidate video A node. At time T1, when a user watches candidate video A on the video client using the target account, an edge connecting User1 and MovieA is established in the knowledge graph. User1 can then connect to MovieA through a viewing type edge, i.e., the relationship edge... If the time when the edge takes effect is time T1, then the association time between account node User1 and video node MovieA is time T1. Here, the video client can run on the terminal. The video client refers to an application that interacts with the server. The video client is used to access, play, or manage video content, etc. For example, the association time between the video node and the director node can be the time when the director of the director node directs the video of the video node. The association time between the video node and the theme node can be the time when the video of the video node is marked with the theme tag indicated by the theme node. Similarly, the association time between other nodes can be defined in various ways, and this embodiment of the disclosure is not limited here.

[0093] It is worth noting that knowledge graphs can adopt heterogeneous relational networks. When a new node is added to the knowledge graph, relation completion algorithms such as Translating Embeddings for Modeling Multi-relational Data (TransE) can be used to complete the relation. For example, newly released science fiction films can be automatically associated with science fiction theme nodes that are preferred by the account.

[0094] Understandably, the relation time decay term is a weighting factor used to represent the gradual weakening of the influence of relational edges over time. That is, the relation time decay term decreases as the difference between the association time and the current time increases. Since the association time refers to the time when the relational edge between the video node and its neighboring nodes begins to take effect, constructing the relation time decay term based on the association time can represent the timeliness of the relational edge between the video node and its neighboring nodes.

[0095] For example, refer to Figure 3 , Figure 3This is an optional structural diagram of the knowledge graph provided in this embodiment of the disclosure. The knowledge graph includes an account node User1, a video node MovieA, a theme node SciFi, a director node DirectorX, an actor node ActorY, a video node MovieB, and a theme node Action. The account node User1 is connected to the video node MovieA through a viewing relationship edge. The association time between the account node User1 and the video node MovieA is 20XX-1-1. The video node MovieA is connected to the theme node SciFi through a type relationship edge. The video node MovieA is connected to the director node DirectorX through a director relationship edge. The director node DirectorX is connected to the actor node ActorY through a collaboration relationship edge. The actor node ActorY is connected to the video node MovieB through a starring relationship edge. The video node MovieA is connected to the theme node Action through a type relationship edge.

[0096] In one possible implementation, a relational time decay term is constructed based on the associated time. Specifically, a first time difference is obtained based on the difference between the current time and the associated time, and a first decay index is obtained by multiplying the absolute value of the first time difference with a preset decay coefficient. The negative of the first decay index is then input into the natural exponential function for calculation to obtain the relational time decay term.

[0097] The attenuation coefficient can be a real number greater than 0. The attenuation coefficient can be set according to actual needs or obtained through training. This embodiment of the present disclosure does not limit this. The natural exponential function refers to an exponential function with the natural constant e as its base.

[0098] Based on this, the relational time decay term can accurately represent the gradual decay of relational edges over time, and the decay rate can be precisely adjusted through the decay coefficient, so that the relational time decay term can better fit the actual decay situation and meet the needs of specific scenarios.

[0099] Specifically, any two nodes in a knowledge graph that are connected by a relational edge can construct a relational time decay term, the formula for which is as follows:

[0100] φ(t ij )=exp(-λ|tt ij |)

[0101] Where t is the current time, λ is the decay coefficient, exp() is the natural exponential function, j∈η(i), i is any node in the knowledge graph, and η(i) is the set of other nodes connected to node i and node i; for example, when i is a video node, η(i) is the set of the video node's neighboring nodes and the video node itself; when j≠i, i.e., j is a neighboring node of the video node, t ij Let tt be the association time between video node i and video node j. ij For the first time difference, |tt ij | represents the absolute value of the first time difference, λ|tt ij | represents the first decay exponent, φ(t) ij Let |tt| be the time decay term for the edge connection between video node i and its neighbor node j. Therefore, when the interaction between a neighbor node and a video node is a recent interaction, |tt| ij The value of | is small, φ(t) ij When the value is close to 1, the node characteristics of neighboring nodes have a strong influence during the update process of video nodes. However, when the interaction between neighboring nodes and video nodes is a long-term interaction, |tt ij | is relatively large, φ(t) ij When λ is close to 0, the node characteristics of neighboring nodes have a weak influence during the update process of video nodes. For example, if λ = 0.01, the φ(t) of 30 days ago... ij The value is exp(-0.01×30)≈0.74.

[0102] Step 202: Obtain the initial video features of the video node, obtain the initial node features of the neighboring nodes and the relation weight matrix of the relation edges, and update the initial video features based on the fusion result of the relation time decay term, the relation weight matrix and the initial node features to obtain the updated video features.

[0103] The initial video features are feature information extracted from the original video data of the candidate video. The original video data may include video, text, audio and other data. The initial video features are used to characterize the attribute information of the candidate video. For example, the initial video features may include visual features, text features and audio features.

[0104] The initial node features are feature information extracted from the original node data of neighboring nodes. The initial node features are used to characterize the attribute information of neighboring nodes. The attribute information of neighboring nodes belongs to structured metadata. Assuming that the neighboring node is an account node, the initial node features may include account type, registration time, account activity, number of followers, or statistics of historical account interactions. Assuming that the neighboring node is a director node, the initial node features may include director name, director gender, director age, director nationality, number of directed works, rating of directed works, or preference for the type of directed works. Assuming that the neighboring node is an actor node, the initial node features may include actor name, actor gender, actor age, number of works participated in, popularity of the works participated in, or preference for the type of roles played. Assuming that the neighboring node is a video node, the initial node features may include visual features, text features, and audio features of the original video data.

[0105] Understandably, video features are updated via a graph neural network. Since the semantic categories of edges representing different relation types in a knowledge graph differ, to distinguish the semantic differences between these relation types within the graph neural network—that is, to enable the graph neural network to understand the different impacts of different relation types on node features—it is necessary to configure corresponding relation weight matrices for the edges of different relation types. This means there is a binding relationship between the relation weight matrix and the relation type of the edges. The relation weight matrix is ​​learnable; it is updated during graph neural network training. The relation weight matrix is ​​used to determine the node features of neighboring nodes connected by the relation edges of a given relation type during message passing within the graph neural network. By performing linear transformations on the features and differentially modeling the messages passed by neighbor nodes of different relationship types, semantically perceptive feature updates can be achieved. The graph neural network updates the initial video features based on the fusion result of the relationship time decay term, the relationship weight matrix, and the initial node features. By introducing the relationship weight matrix, the graph neural network can perceive and utilize the semantic information of different relationship types, improve the accuracy and generalization ability of node feature learning in the knowledge graph, realize the use of structured metadata to enhance video representation, and obtain updated video features with high accuracy. At the same time, by introducing the relationship time decay term, the updated video features contain timeliness information, ensuring that the updated video features are timely.

[0106] It should be noted that, similar to the update process of the initial video features, the initial node features also need to be updated. Specifically, while updating the initial video features to updated video features using a graph neural network, the initial node features are also updated node features using a graph neural network. This allows for the updating of node features of each node in the knowledge graph, thereby learning node features that are more semantically expressive and timely. The node features of each node in the knowledge graph can be configured for periodic offline training, for example, the node features of each node in the knowledge graph can be trained offline every day.

[0107] Step 203: Update the knowledge graph based on the updated video features, obtain the updated node features of neighboring nodes in the updated knowledge graph, and fuse the initial video features and updated node features to obtain the target video features.

[0108] It should be noted that updating the knowledge graph based on updated video features can be achieved in various ways. For example, the updated video features and the updated node features of other nodes in the knowledge graph besides video nodes can be input into a relation discrimination model for prediction. This can determine whether a semantic relationship should be established between video nodes and other nodes, thereby achieving a structural update of the knowledge graph. This is equivalent to defining dynamic relationship edges in the knowledge graph, which can enable the association of newly added video nodes with the historical preferences of related account nodes through neighboring nodes such as director nodes, theme nodes, and actor nodes.

[0109] It is understandable that updating the knowledge graph based on updated video features can infer the potential relationships between knowledge graph nodes, thereby completing, removing, or correcting the relationship edges in the knowledge graph, achieving optimization and dynamic evolution of the knowledge graph. This enables the construction of a dynamic knowledge graph with time-aware capabilities, allowing the knowledge graph to simultaneously capture the temporal evolution of node features and relationship edges. Then, by fusing the initial video features and updated node features, the structured contextual information of the updated node features is introduced, resulting in semantically richer target video features and ensuring the timeliness of the target video features.

[0110] Step 204: Obtain the account features of the target account, and determine the recommended video from the candidate videos based on the fusion result of the account features and the target video features.

[0111] In this context, the target account refers to the account used to log in to the video client. The target account is a unique identifier set by the user on the video client. Different users typically log in with different accounts; for example, the account can be a specific username, mobile phone number, or email address. The account can exist in the form of a string, binary data, or decimal data, etc., and this embodiment does not impose any limitations on these formats. Account features are used to characterize the account's attribute information. For example, account features can be extracted through the target account's historical interaction events.

[0112] Specifically, the fusion result of account features and target video features can be determined in various ways, such as by concatenating, weighted summing, or cross-attention processing. Then, based on the fusion result, a recommendation score is determined for each candidate video. In a single-point payment scenario, the recommendation score represents the probability that a candidate video will be purchased; a higher recommendation score indicates a higher probability, while a lower score indicates a lower probability. Candidate videos with high recommendation scores are then designated as recommended videos. For example, the top K candidate videos with the highest recommendation scores are selected as recommended videos, where K is a positive integer.

[0113] For example, refer to Figure 4 , Figure 4 This is a schematic diagram of an optional process for determining a recommendation score provided in an embodiment of the present disclosure, wherein account features u and target video features v are combined. item After concatenation, the data is input into the recommendation score prediction model. The projection layer of the recommendation score prediction model then processes the account feature u and the target video feature v. item The stitched result is projected, then activated by the activation layer of the recommendation score prediction model. The activated result is then mapped by the output layer of the recommendation score prediction model, and finally activated by the sigmoid function of the recommendation score prediction model to obtain the recommendation score for the candidate video. The formula for determining the recommendation score is as follows:

[0114] p y=1 =σ(W2RELU(W1[u;v)) item ]+b1)+b2

[0115] Where, p y=1 For the recommendation score, y=1 represents the label of the positive sample, for example, y=1 represents the label of the target account purchasing recommended videos, u represents the account features, that is, u is the fused long-term and short-term interest features, v item For the target video features, [u; v item [Account feature u and target video feature v] itemThe concatenation result is as follows: W1 is the weight matrix of the projection layer, b1 is the bias term of the projection layer, ReLU is the activation layer (RELU is short for Rectified Linear Unit), W2 is the weight matrix of the output layer, b2 is the bias term of the output layer, and σ is the Sigmoid function, which is used to map the output to the interval (0,1).

[0116] It should be noted that when predicting recommendation scores using the recommendation score prediction model, the initial exposure weight of candidate videos can also be input into the recommendation score prediction model. For example, the initial exposure weight can be determined by parameters such as the influence weight of actors and staff and the timeliness factor. The influence weight of actors and staff can be determined by the rating of the lead actor's historical works, and the timeliness factor can be determined by the decay of the release time. This can dynamically adjust the initial exposure weight of candidate videos, thereby improving the accuracy of recommendation scores.

[0117] Based on this, by obtaining the association time between video nodes and neighboring nodes in the knowledge graph, and then constructing a relation time decay term based on the association time, the time decay term can represent the timeliness of the relationship edges between video nodes and neighboring nodes. Then, the initial video features of the video nodes, the initial node features of the neighboring nodes, and the relation weight matrix of the relation edges are obtained. Based on the fusion result of the relation time decay term, the relation weight matrix, and the initial node features, the initial video features are updated, resulting in updated video features with structure awareness and time-series awareness. Finally, the knowledge graph is updated based on the updated video features, thus constructing a dynamic knowledge graph with time-series awareness capabilities. This approach enables the knowledge graph to simultaneously capture node features and the temporal evolution of relational edges. It then obtains the updated node features of neighboring nodes in the updated knowledge graph. By fusing initial video features and updated node features, structured contextual information of the updated node features is introduced, resulting in semantically richer target video features that are also timely. Next, the account features of the target account are obtained. Based on the fusion of account features and target video features, recommended videos are determined from candidate videos. This allows the recommendation process to accurately capture the real-time interests and preferences of the target account in the semantic space, generating timely and personalized video recommendations, thus improving the accuracy of recommended videos. Furthermore, capturing the real-time interests and preferences of the target account in the semantic space is equivalent to capturing the temporal evolution of the target account's interests, effectively solving the cold start problem for newly added account nodes and video nodes, and improving recommendation performance.

[0118] In one possible implementation, video nodes have self-looping edges. Based on the fusion result of the relation time decay term, relation weight matrix, and initial node features, the initial video features are updated to obtain updated video features. Specifically, the relation time decay term, relation weight matrix, and initial node features are fused to obtain the first message feature; the self-looping time decay term and self-looping weight matrix of the self-looping edges are obtained, and the self-looping time decay term, self-looping weight matrix, and initial video features are fused to obtain the second message feature; the updated video features are obtained based on the sum of the first message feature and the second message feature.

[0119] In this context, a self-loop edge refers to a directed edge where both the starting and ending nodes are the same. A self-loop edge represents a virtual relation type of edge, and each node in the knowledge graph has its own corresponding self-loop edge. The self-loop time decay term is a weighting factor used to represent the gradual weakening of the influence of a self-loop edge over time. That is, the self-loop time decay term decreases as the difference between the self-loop time and the current time increases. The self-loop time can refer to the time when the node was created in the knowledge graph. Therefore, the self-loop time decay term represents the timeliness of the self-loop edges of video nodes. Similar to the calculation formula for relation time decay, the calculation formula for the self-loop time decay term can also be φ(t). ij )=exp(-λ|tt ij |), at this time j = i, that is, t ij Let φ(t) be the self-loop time. ij ) represents the self-loop time decay term, when |tt ij When the value of | is small, φ(t) ij The value close to 1 indicates that the video features of the video node are strongly influenced during the video node update process, while |tt ij When the value of | is large, φ(t) ij The value is close to 0, which has a weak impact on the video features of the video nodes during the update process.

[0120] It should be noted that, in order to distinguish the semantic differences between self-loop edges and relational edges in graph neural networks, and to enable the graph neural network to understand the influence of a node itself on the node's features, it is necessary to configure a corresponding self-loop weight matrix for self-loop edges. The self-loop weight matrix is ​​learnable, that is, it is updated during the training of the graph neural network. The self-loop weight matrix is ​​used to perform linear transformations on the node's own features during the message passing process of the graph neural network, which can realize semantically aware feature updates.

[0121] It is understandable that by fusing the relation time decay term, the relation weight matrix, and the initial node features, we can extract the first message features, which include the semantic, structural, and temporal information of neighboring nodes. Furthermore, by fusing the self-loop time decay term, the self-loop weight matrix, and the initial video features, we can extract the second message features, which include the semantic, structural, and temporal information of the video node itself. Then, based on the sum of the first and second message features, we obtain the updated video features. This achieves the goal of aggregating the feature information of neighboring nodes while retaining the feature information of the video node itself, improving the stability of the feature update process, and further improving the accuracy of updating video features.

[0122] In one possible implementation, the relation time decay term, the relation weight matrix, and the initial node features are fused to obtain the first message feature. Specifically, the initial node features can be linearly transformed based on the relation weight matrix to obtain the transformed node features. The relation time decay term is then normalized, and the transformed node features are adjusted based on the normalized relation time decay term to obtain the first message feature.

[0123] Understandably, performing a linear transformation on the initial node features based on the relation weight matrix can utilize the semantic information of different relation types to improve the accuracy and generalization ability of node feature learning in the knowledge graph, resulting in highly accurate transformed node features. Then, by normalizing the relation time decay term, the feature scale difference caused by different node degrees can be avoided. Finally, the transformed node features are adjusted based on the normalized relation time decay term to ensure the timeliness of the updated first message features.

[0124] It should be noted that, similar to the process of determining the first message feature, the second message feature is also determined in a similar manner. The self-loop time decay term, the self-loop weight matrix, and the initial video features are fused to obtain the second message feature. Specifically, this can be achieved by performing a linear transformation on the initial video features based on the self-loop weight matrix to obtain the transformed video features; then, the self-loop time decay term is normalized, and the transformed video features are adjusted based on the normalized self-loop time decay term to obtain the second message feature. Therefore, performing a linear transformation on the initial video features based on the self-loop weight matrix can improve the accuracy and generalization ability of video feature learning in the knowledge graph, resulting in highly accurate transformed video features. Then, by normalizing the self-loop time decay term, the feature scale differences caused by different node degrees can be avoided. Finally, by adjusting the transformed video features based on the normalized self-loop time decay term, the updated second message feature is ensured to be timely.

[0125] Specifically, when updating the node features of each node in the knowledge graph using a graph neural network, each node in the knowledge graph sequentially passes through L layers of graph convolutions in the graph neural network, where L is a positive integer. The output of the previous graph convolution layer becomes the input of the next graph convolution layer. For any layer in the L layers of graph convolutions, the processing formula for graph convolution is as follows:

[0126]

[0127] Where l is a positive integer less than or equal to L, ReLU() is the activation function, ReLU(x) = max(0,x), i is any node in the knowledge graph, and η(i) is the set of other nodes connected to node i and node i itself. This is the weight matrix for the l-th layer with respect to relation type r. Let Z be the feature representation of node i in the graph convolution at layer l, and Z be the normalization constant, which can be taken as Z = ∑ j∈η(i) φ(t ij This ensures that the weighted sum of the effects of all nodes in η(i) is 1, thus avoiding differences in feature scale caused by different node degrees.

[0128] For example, when i is a video node, Let η(i) be the video feature representation output by the graph convolution of video node i at layer l+1, where η(i) is the set of neighboring nodes of the video node and the set of video nodes; at this time, when j≠i, that is, when j is a neighboring node of the video node, φ(t) ij The term ) represents the time decay term of the edge connection between video node i and its neighbor node j. This is the relation weight matrix for the edges connecting video node i and its neighbor node j. Different relation types use independent weight matrices; for example, the account-video relation r1 uses the relation weight matrix W. r1 The video-director relationship r2 uses the relationship weight matrix W. r2 , Let be the video feature representation of neighbor node j at layer l; at this time, when j = i, that is, when j is a video node, φ(t) ij ) represents the self-loop time decay term of the self-loop connection of video node i. Let be the self-loop weight matrix of the self-loop edges of video node i. Let i be the video feature representation output by the graph convolution at layer l of video node i. Therefore, the initial video features are used as the input of the graph convolution at layer 1 of video node i, and the output of the graph convolution at layer L of video node i is used as the updated video features.

[0129] In one possible implementation, obtaining the initial video features of a video node can specifically involve acquiring candidate videos, performing frame sampling on the candidate videos to obtain image frame temporal data, extracting temporal features and optical flow features from the image frame temporal data, and fusing the temporal features and optical flow features to obtain visual features; acquiring relevant text from the candidate videos, performing feature extraction on the relevant text to obtain text features; acquiring the original audio from the candidate videos, performing feature extraction on the original audio to obtain audio features; and fusing the visual features, text features, and audio features to obtain the initial video features of the video node.

[0130] The candidate video includes dynamic visual information, while the associated text refers to text data related to the candidate video, such as video title, synopsis, subtitles, or tags. The original audio of the candidate video refers to the actual sound data, including background music, dialogue, and the emotional and rhythmic elements of sound effects. When a new video node is added to the knowledge graph, multimodal feature extraction is automatically triggered to determine the initial video features of the new node.

[0131] Understandably, the process involves sampling candidate videos to obtain temporal data of image frames. Then, the dynamic changes in these temporal data are extracted to obtain temporal features characterizing action evolution. Simultaneously, displacement changes in the spatial dimension are extracted to obtain optical flow features characterizing fine-grained motion between frames. By fusing temporal and optical flow features, visual features are obtained, thus encompassing both global temporal semantic information and local fine-grained motion information. Feature extraction from relevant text in the candidate videos yields textual features characterizing video semantic information. Feature extraction from the original audio of the candidate videos provides audio features that enhance video semantic understanding. Finally, the visual, textual, and audio features are fused to obtain initial video features. This fusion of structured multimodal features significantly enhances the semantic expressive power of the initial video features, thereby improving the accuracy and completeness of video understanding and enabling the initial video features to comprehensively depict the semantic information of the video.

[0132] In one possible implementation, the image frame temporal data includes first sampled data and second sampled data. The image frame temporal data is obtained by frame sampling of the candidate video. Temporal features and optical flow features are extracted from the image frame temporal data. Specifically, the candidate video can be sampled at a first frame rate to obtain first sampled data, and then sampled at a second frame rate to obtain second sampled data. The sampling frame rate of the first frame rate sampling is lower than that of the second frame rate sampling. Therefore, the first sampled data is obtained by sampling the candidate video at a low frame rate, and the second sampled data is obtained by sampling the candidate video at a high frame rate. Then, a SlowFast network is used to extract features from the first sampled data and the second sampled data respectively, obtaining feature extraction results for the first sampled data and the second sampled data. The feature extraction results of the first sampled data and the second sampled data are fused to obtain temporal features. Finally, optical flow features are extracted from either the first sampled data or the second sampled data.

[0133] Specifically, the formula for determining the time characteristics is as follows:

[0134] v frame =Concat(f s ,maxpool(f f ))

[0135] Among them, v frame For time features, Concat() is used for concatenation, f s f represents the feature extraction result of the first sampled data. s =ResNet50(F s ResNet50() is a residual network model with a depth of 50 layers. s This is the first sampled data. T is the number of frames sampled at the low frame rate, H is the height of the image frame, W is the width of the image frame, 3 is the number of color channels per pixel in the image frame, maxpool() is the max pooling function, and f f f represents the feature extraction result of the second sampled data. f =ResNet50(F f ), F f This is the second sampled data. αT is the number of frames sampled at the high frame rate.

[0136] Then, the formula for determining visual features is as follows:

[0137] v visual =Concat(v frame_pooled ,v motion )

[0138] Among them, v frame_pooled=GlobalAvgPool3D(v frame GlobalAvgPool3D() is a global average pooling function, v frame_pooled v is the result of global average pooling for time features. motion As optical flow characteristics, by splicing v frame_pooled and v motion Obtain visual features.

[0139] For example, refer to Figure 5 , Figure 5 This is a schematic diagram of an optional process for determining visual features provided in an embodiment of the present disclosure. After frame sampling of the candidate video, the data is input into a SlowFast network for feature extraction to obtain temporal features. Then, the temporal features are fused with optical flow features, which are spatial features, to obtain visual features.

[0140] In one possible implementation, refer to Figure 6 , Figure 6 This is an optional flowchart illustrating the process of determining text features according to an embodiment of the present disclosure. Feature extraction is performed on the relevant text to obtain text features. Specifically, the relevant text can be segmented using a Bidirectional Encoder Representations from Transformers (BERT) word segmenter. Then, positional encoding is added to the BERT word segmentation result, and then the BERT word segmentation result with added positional encoding is subjected to Transformer encoding to obtain text features.

[0141] In one possible implementation, refer to Figure 7 , Figure 7 This is a schematic diagram of an optional process for determining audio features provided in an embodiment of this disclosure. The original audio is subjected to feature extraction to obtain audio features. Specifically, the original audio can be converted into Mel spectrogram, and then the Mel spectrogram is input into a VGGish network for feature extraction to obtain audio semantic features. The audio semantic features are then input into a sentiment classification model for sentiment classification to obtain sentiment categories. Finally, the sentiment categories are concatenated with the audio semantic features to obtain the audio features.

[0142] In one possible implementation, visual features, text features, and audio features are fused to obtain the initial video features of the video node. Specifically, the visual features, text features, and audio features are projected separately to obtain the modal projection results corresponding to each of the visual features, text features, and audio features. The attention weights of each modal projection result are obtained, and the modal projection results are weighted and fused based on the attention weights to obtain the initial video features of the video node.

[0143] In this projected modality, all the modal projection results have the same dimensionality. For example, projecting 512-dimensional visual features yields a 256-dimensional modal projection result, projecting 768-dimensional text features yields a 256-dimensional modal projection result, and projecting 128-dimensional audio features yields a 256-dimensional modal projection result.

[0144] It is understandable that by projecting visual features, text features, and audio features separately, the features of each modality can be projected into a unified feature space, enabling semantic alignment. Then, based on attention weights, the projection results of each modality are weighted and fused to obtain the initial video features of the video node, realizing dynamic weighted fusion of multimodal features, which can further improve the accuracy of the initial video features.

[0145] For example, refer to Figure 8 , Figure 8 This is a schematic diagram of an optional process for fusing multimodal features provided in an embodiment of this disclosure. The original video data of the candidate video includes the candidate video itself, as well as related text and original audio. Multimodal feature extraction is performed on the original video data of the candidate video. Visual features (512 dimensions) are extracted from the candidate video, text features (768 dimensions) are extracted from the related text, and audio features (128 dimensions) are extracted from the original audio. Then, the visual features, text features, and audio features are projected onto each other through a feature alignment layer to obtain their respective modal projection results (256 dimensions). Finally, the initial video features of the video node are obtained by weighted fusion of the various modal projection results.

[0146] Specifically, the formula for determining the modal projection result is as follows:

[0147] h m =W m v m +b m (m∈visual,text,audio)

[0148] in, d can be 256. When m = visual, h m W is the modal projection result of visual features.m d is the modal projection matrix corresponding to the visual features. m v is the dimension of visual features m For visual features, b m For the projection bias term corresponding to the visual features, when m = text, h m W is the modal projection result of text features. m d is the modal projection matrix corresponding to the text features. m v represents the dimension of the text features. m For text features, b m For the projection bias term corresponding to the text features, when m = audio, h m W is the modal projection result of the audio features. m Let d be the modal projection matrix corresponding to the audio features. m v is the dimension of the audio features. m For audio features, b m This is the projection bias term corresponding to the audio features.

[0149] Then, the formula for determining the initial video features is as follows:

[0150] v fused =α visual h visual +α text h text +α audio h audio

[0151] Among them, v fused h is the initial video feature. visual For the modal projection results of visual features, α visual For modal projection result h visual Attention weights, h text For the modal projection results of text features, α text For modal projection result h text Attention weights, h audio For the modal projection results of audio features, α audio For modal projection result h audio Attention weights.

[0152] In one possible implementation, before obtaining the account features of the target account, the recommended video determination method further includes: obtaining the historical interaction events of the target account, updating the pre-cached interaction event feature sequence based on the historical interaction events; adding positional encoding to the updated interaction event feature sequence, performing one-way masking and attention processing on the interaction event feature sequence with added positional encoding to obtain the first memory feature; inputting the historical interaction events into a neural Turing machine, updating the readable and writable matrix through the neural Turing machine, extracting the second memory feature based on the updated readable and writable matrix; and fusing the first memory feature and the second memory feature to obtain the account features of the target account.

[0153] Historical interaction events are events triggered on the video client. These events indicate interactive operations that occur during the user's use of the video client. For example, interactive operations can include interface-based operations such as purchasing videos, clicking to watch videos, liking, commenting, favorited, and forwarding. Therefore, historical interaction events can include video purchase events, video watch events, liking events, commenting events, favorited events, and forwarding events. Interactive operations can also include playback control operations such as play, pause, fast forward, and rewind. Other types of operations are also possible, but this embodiment does not limit the scope of the discussion. Specifically, when an interactive operation is triggered, the video client can collect event information about the interactive operation and then generate historical interaction events based on this information. For example, event information can include the type of interactive operation, video identifier, timestamp, and interaction duration. Users can interact with the video client using a mouse, keyboard, or touch, and the objects of these interactions can include buttons, progress bars, or volume sliders.

[0154] The interaction event feature sequence can be cached on the server. The interaction event feature sequence includes T interaction event features, that is, the interaction event feature sequence is X = [x1,...,x...]. T ], x1 to x T Each represents a different interactive event characteristic, from x1 to x T Any interactive event feature x in t All meet Let x1 be a real number, 1 ≤ t ≤ T. Each time the most recent historical interaction events of the target account are retrieved, the interaction event feature furthest from the current time can be removed from the interaction event feature sequence. Simultaneously, the interaction event features determined by the currently retrieved historical interaction events are added to the interaction event feature sequence, so that the interaction event feature sequence can include the top T interaction event features closest to the current time, i.e., x1 to x2. TThe distance between the timestamp and the current time increases sequentially. Specifically, the interactive event feature sequence can be cached by the server's circular buffer. By configuring the size of the circular buffer, the interactive event feature sequence can include a specified number of interactive event features. For example, the interactive event feature sequence includes the top 20 interactive event features closest to the current time.

[0155] Understandably, by acquiring the target account's historical interaction events, and then updating the pre-cached interaction event feature sequence based on these historical events, the interaction event feature sequence can include interaction event features determined by multiple recent historical interaction events. This sequence is then input into a Transformer model, which adds positional encoding to the updated sequence. This allows the Transformer model to perceive the sequential relationships and relative positions between various historical interaction events within the sequence. Finally, the Transformer model performs one-way masking and attention processing on the positionally encoded interaction event feature sequence to obtain the first memory feature, which captures short-term memory within the interaction event feature sequence. Information, first memory features can serve as short-term interest features for an account, and recent interactions can be automatically weighted through a time-decay attention mechanism. Historical interaction events are input into a neural Turing machine, which updates the readable and writable matrix. Specifically, the controller of the neural Turing machine performs read and write operations on the readable and writable matrix stored in external memory. The readable and writable matrix stores the core interest patterns of the account, such as "a persistent preference for suspense themes." Based on the neural Turing machine, interests are progressively updated, and long-term memory information can be stored and retrieved. Second memory features are extracted based on the updated readable and writable matrix, and these second memory features can serve as long-term interest features for the account. Then, the first memory features and the second memory features are fused, which is equivalent to merging the long-term and short-term interest features of the target account to obtain the account features of the target account.

[0156] In addition, the read-write matrix is ​​equivalent to the long-term memory matrix. It can determine the explainable tags of the target account through the long-term memory matrix. Through the explainable tags and recommended videos, the reason for recommending the videos can be determined. For example, the reason for recommendation is: "Recommended because you often watch the works of this director". This can improve users' trust and acceptance of the recommendation system. In addition, the reason for recommending videos can also be determined by the relationship between the target account and the recommended videos in the knowledge graph.

[0157] It should be noted that the server can determine the first memory feature through the short-term memory network and the second memory feature through the long-term memory network. That is, the server determines the first and second memory features through a dual-channel memory network. When the video client generates historical interaction events, it can write the historical interaction events into a Flink stream in real time. The streaming processing platform processes the events sequentially according to their time order to achieve temporal reconstruction and analysis of the historical interaction events. The processed historical interaction events are then sent to the server for the server to retrieve. The server can determine the interaction event features based on the historical interaction events. The interaction event features can include the type of historical interaction event, timestamp, interaction duration, and video identifier, etc. The parameters of the dual-channel memory network are then updated based on the interaction event features. The parameters of the dual-channel memory network can be configured to be updated periodically, for example, every 5 minutes. Incremental learning and model warm-up can also be performed on the dual-channel memory network to effectively improve its prediction performance.

[0158] Specifically, the formula for location coding is as follows:

[0159]

[0160] Where t is the position number of each interactive event feature in the interactive event feature sequence, i is the dimension index in the feature, PE(t,2i) is the position code for even-numbered dimensions, which uses a sine function, PE(t,2i+1) is the position code for odd-numbered dimensions, which uses a cosine function, and d is the dimension of the interactive event feature.

[0161] It should be noted that the first memory feature can be obtained by fusing the outputs of multiple attention heads. Each attention head performs unidirectional masking and attention processing on the interaction event feature sequence after adding positional encoding. The calculation formula for the first memory feature is as follows:

[0162] h short =LayerNorm(X+FFN(Concat(head1,...,head H )))

[0163] Among them, h short The first memory feature is X, which is the sequence of interaction event features after adding position encoding. FFN() is a feedforward neural network, and Concat() is the concatenation process. (head1 to head...) H The outputs of the first attention head to the Hth attention head are represented by LayerNorm(), which performs layer normalization.

[0164] Then, the calculation formula for the output of each attention head is as follows:

[0165]

[0166] Among them, head h For head1 to head H Any attention head in the dataset, where Attention() performs attention processing, and X is the sequence of interaction event features with added positional encoding. For attention head h Learnable query weight matrix For attention head h Learnable key weight matrix For attention head h The learnable value weight matrix.

[0167] Specifically, attention head h The specific formula for calculating the output is as follows:

[0168]

[0169] in, SoftMax() performs normalization, d k Let M be the dimension of K. time M is the time mask matrix. time Used for one-way masks.

[0170] In one possible implementation, the first memory feature and the second memory feature are fused to obtain the account feature of the target account. Specifically, the first memory feature and the second memory feature are concatenated and input into a weighted prediction model for prediction to obtain the first weight of the first memory feature; the second weight of the second memory feature is determined based on the first weight and a preset weight threshold; and the first memory feature and the second memory feature are weighted and summed based on the first weight and the second weight to obtain the account feature of the target account.

[0171] The weight prediction model can employ multilayer perceptron (MLP), long short-term memory (LSTM) network, and gated recurrent unit (GRU), etc., and the embodiments disclosed herein are not limited thereto.

[0172] Understandably, the first and second memory features are concatenated and input into a weighted prediction model for prediction, resulting in the first weight of the first memory feature. This first weight is equivalent to the gating vector of dynamic gating. Then, based on the first weight and the weight threshold, the second weight of the second memory feature is determined. For example, if the value range of the first weight is [0,1], then the weight threshold is 1. Based on the first and second weights, the first and second memory features are weighted and summed to obtain the account features of the target account. This achieves gating attention fusion of the first and second memory features, dynamically adjusting the importance of the first and second memory features, automatically adjusting the contribution ratio of short-term and long-term interests, and effectively improving the expressive power of the account features. In addition, it can also detect abnormal interaction events and trigger progressive memory updates.

[0173] Specifically, the formula for calculating the first weight is as follows:

[0174] g=σ(W g [h short h long ]+b g )

[0175] Where g is the first weight, σ() is the Sigmoid activation function, and W g h is a learnable gated weight matrix. short As the first memory feature, h long As a second memory feature, [h short h long [b] represents the concatenation result of the first and second memory features. g This is a learnable bias term.

[0176] Then, the formula for calculating account characteristics is as follows:

[0177] u=g⊙h short +(1-g)⊙h long

[0178] Where u represents account characteristics, g represents the first weight, and h represents the second weight. short The first memory feature is (1-g), the second weight is h. long ⊙ represents the second memory feature, and ⊙ represents element-by-element processing.

[0179] For example, refer to Figure 9 , Figure 9This is a schematic diagram of an optional process for determining account features provided in an embodiment of this disclosure. Historical interaction events are input into a short-term memory network. The short-term memory network updates a pre-cached sequence of interaction event features based on the historical interaction events. Positional encoding is added to the updated sequence of interaction event features. One-way masking and attention processing are performed on the sequence of interaction event features with added positional encoding to obtain the first memory feature. That is, the short-term memory network obtains the first memory feature through temporal Transformer encoding. In addition, historical interaction events are input into a long-term memory network. The readable and writable matrix is ​​updated by the Neural Turing Machine (NTM) in the long-term memory network. The second memory feature is extracted based on the updated readable and writable matrix. The readable and writable matrix can also be called the NTM memory matrix. That is, the second memory feature is extracted through the NTM memory matrix. Then, through gated attention fusion, the first memory feature and the second memory feature are weighted and summed based on the first weight and the second weight to obtain the account features of the target account.

[0180] In one possible implementation, the target video features are obtained by fusing the initial video features and the updated node features. Specifically, this can be achieved by mapping the relation weight matrix to obtain relation type features; fusing the updated node features and the relation type features to obtain enhanced node features; and fusing the initial video features and the enhanced node features to obtain the target video features.

[0181] It is understandable that by mapping the relation weight matrix, the dimensionality of the relation weight matrix can be transformed, so that the relation type features obtained by mapping are aligned with the updated node features at the dimensional level. Then, by fusing the updated node features and relation type features, structure-aware enhanced node features can be obtained, which improves the contextual expressiveness of the enhanced node features. Then, by fusing the initial video features and enhanced node features, the target video features can be obtained, which can further improve the contextual expressiveness and accuracy of the target video features.

[0182] In one possible implementation, the target video features are obtained by fusing the initial video features and the enhanced node features. Specifically, query features can be generated based on the initial video features, and key and value features can be generated based on the enhanced node features. Cross-attention is then applied to the query features, key features, and value features to obtain the target video features.

[0183] Specifically, generating query features based on initial video features can be achieved by multiplying the initial video features with the query parameter matrix to obtain query features. Generating key features and value features based on enhanced node features can be achieved by multiplying the enhanced node features with the key parameter matrix to obtain key features, and by multiplying the enhanced node features with the value parameter matrix to obtain value features.

[0184] Understandably, initial video features can include structured multimodal features of candidate videos, and enhanced node features include structured contextual information. By performing cross-attention on query features, key features, and value features, information with high semantic relevance can be mined, achieving more accurate feature alignment and context enhancement, further improving the semantic richness of target video features and ensuring the timeliness of target video features.

[0185] In one possible implementation, cross-attention is applied to query features, key features, and value features to obtain target video features. Specifically, the degree of association can be obtained based on the product of query features and transposed key features; an attention score can be obtained based on the sum of the degree of association and the relational time decay term; and the target video features can be obtained based on the product of the attention score and the value features.

[0186] Specifically, the attention score is obtained based on the sum of the degree of association and the relational time decay term. Specifically, the square root of the dimension of the key feature can be calculated to obtain the adjustment factor. The ratio between the sum of the degree of association and the relational time decay term and the adjustment factor is determined to obtain the initial score. The initial score is then activated by the Sigmoid function to obtain the attention score.

[0187] Understandably, the degree of association is obtained based on the product of the query feature and the transposed key feature. The degree of association can indicate the semantic relevance between the query feature and the key feature. Then, the attention score is obtained based on the sum of the degree of association and the relation time decay term. By introducing the relation time decay term, the attention score is ensured to have timeliness. Then, the target video feature is obtained based on the product of the attention score and the value feature, which can further improve the accuracy of the target video feature.

[0188] In one possible implementation, key features and value features are generated based on enhanced node features. Specifically, this can be based on the topological structure of the knowledge graph to determine the graph structure features of neighboring nodes; the graph structure features and enhanced node features are concatenated to obtain concatenated features; and key features and value features are generated based on the concatenated features.

[0189] Among them, graph structure features are used to characterize the topological context information of neighboring nodes in the knowledge graph. Graph structure features can include the number, type and connection method of other nodes connected to the neighboring nodes.

[0190] Understandably, based on the topological structure of the knowledge graph, the graph structure features of neighboring nodes are determined. Then, the graph structure features and enhanced node features are concatenated to obtain concatenated features. This can supplement the deficiencies of the original attributes of neighboring nodes, thereby improving the accuracy and information completeness of node features. Then, key features and value features are generated based on the concatenated features, further improving the quality of key features and value features.

[0191] The following details the complete process of determining the recommended video.

[0192] Reference Figure 10 , Figure 10 This is a schematic diagram of an optional architecture for the recommended video determination method provided in the embodiments of this disclosure.

[0193] First, obtain the raw video data of the candidate videos. The raw video data includes the candidate videos, the relevant text of the candidate videos, and the raw audio of the candidate videos.

[0194] Then, the original video data is input into the multimodal feature extractor 1001. The multimodal feature extractor 1001 performs frame sampling on the candidate video to obtain image frame temporal data. The temporal features and optical flow features of the image frame temporal data are extracted, and the temporal features and optical flow features are fused to obtain visual features. Feature extraction is performed on the relevant text to obtain text features. Feature extraction is performed on the original audio to obtain audio features. The visual features, text features, and audio features are projected respectively to obtain the modal projection results corresponding to the visual features, text features, and audio features, where the dimensions of each modal projection result are the same. The attention weights of each modal projection result are obtained, and based on the attention weights, the modal projection results are weighted and fused to obtain the initial video features of the video node.

[0195] Then, the association time between video nodes and neighboring nodes in the knowledge graph is obtained through the dynamic knowledge graph engine 1002. A relation time decay term is constructed based on the association time, where the video node is the node of the candidate video in the knowledge graph, and the neighboring node is the node with a relational edge to the video node. The initial node features of the neighboring nodes and the relation weight matrix of the relational edges are obtained. The initial node features are linearly transformed based on the relation weight matrix to obtain the transformed node features. The relation time decay term is normalized, and the transformed node features are adjusted based on the normalized relation time decay term to obtain the first message feature. The self-loop time decay term and self-loop weight matrix of the self-loop edges are obtained. The initial video features are linearly transformed based on the self-loop weight matrix to obtain the transformed video features. The self-loop time decay term is normalized, and the transformed video features are adjusted based on the normalized self-loop time decay term to obtain the second message feature. The updated video features are obtained based on the sum of the first message feature and the second message feature.

[0196] Then, the knowledge graph is updated based on the updated video features using the dynamic knowledge graph engine 1002. The updated node features of neighboring nodes in the updated knowledge graph are obtained, and the target video features are obtained by fusing the initial video features and the updated node features.

[0197] Then, the historical interaction events of the target account are obtained through a dual-channel memory network 1006, and the pre-cached interaction event feature sequence is updated based on the historical interaction events. Position encoding is added to the updated interaction event feature sequence, and one-way masking and attention processing are performed on the interaction event feature sequence with added position encoding to obtain the first memory feature. The historical interaction events are input into a neural Turing machine, and the read-write matrix is ​​updated through the neural Turing machine. The second memory feature is extracted based on the updated read-write matrix. The first memory feature and the second memory feature are concatenated and input into a weighted prediction model for prediction to obtain the first weight of the first memory feature. The second weight of the second memory feature is determined according to the first weight and a preset weight threshold. Based on the first weight and the second weight, the first memory feature and the second memory feature are weighted and summed to obtain the account feature of the target account.

[0198] Then, the real-time recommendation decision-maker 1003 obtains the account features of the target account determined by the dual-channel memory network 1006 and the target video features determined by the dynamic knowledge graph engine 1002. Based on the fusion result of the account features and the target video features, the recommended video is determined from the candidate videos.

[0199] Then, the operation strategy linkage system 1004 obtains the discount strategy based on the recommendation results generated by the recommended video. The operation strategy linkage system 1004 returns the recommendation results and the coupons determined by the discount strategy to the recommendation system. The recommendation system pushes the recommendation results and coupons to the video client for the video client to display the recommendation results and coupons. The video client will send the exposure data to the dynamic knowledge graph engine 1002 for the dynamic knowledge graph engine 1002 to update the knowledge graph based on the exposure data.

[0200] Then, when a user interacts with the video client by clicking, purchasing, or performing other interactive actions, historical interaction events are generated. These historical interaction events are then processed by the streaming platform 1005, and the interaction event characteristics determined by the historical interaction events are then processed by the dual-channel memory network 1006 to update the account characteristics of the target account. The streaming architecture supports millisecond-level response, ensuring that the recommendation results adapt to the latest user interactions in real time, reducing the user's decision-making time. When the video client is not operated, the process ends.

[0201] Based on this, by obtaining the association time between video nodes and neighboring nodes in the knowledge graph, and then constructing a relation time decay term based on the association time, the time decay term can represent the timeliness of the relationship edges between video nodes and neighboring nodes. Then, the initial video features of the video nodes, the initial node features of the neighboring nodes, and the relation weight matrix of the relation edges are obtained. Based on the fusion result of the relation time decay term, the relation weight matrix, and the initial node features, the initial video features are updated, resulting in updated video features with structure awareness and time-series awareness. Finally, the knowledge graph is updated based on the updated video features, thus constructing a dynamic knowledge graph with time-series awareness capabilities. This approach enables the knowledge graph to simultaneously capture the temporal evolution of node features and relational edges. It then obtains the updated node features of neighboring nodes in the updated knowledge graph. By fusing the initial video features and the updated node features, structured contextual information of the updated node features is introduced, resulting in semantically richer target video features that are timely. Next, the account features of the target account are obtained. Based on the fusion of account features and target video features, recommended videos are determined from candidate videos. This allows the recommendation process to accurately capture the real-time interests and preferences of the target account in the semantic space, generating timely and personalized video recommendations, thus improving the accuracy of recommended videos.

[0202] It is worth noting that it can be applied to personalized single-video content recommendation, effectively solving the problem of inaccurate single-point payment prediction in Internet smart TV platforms. When new accounts or new videos lack interactive data, it can accurately capture the real-time interests and preferences of target accounts in the semantic space by integrating multimodal feature extraction and knowledge graph reasoning technology, effectively alleviating the cold start problem of new accounts or new videos, predicting accurate recommendation results, and improving the user experience of purchasing single-point payment videos.

[0203] As can be seen, the recommended video determination method provided in this embodiment can be applied to a variety of scenarios.

[0204] For example, in a video recommendation scenario, after the recommended videos are determined using a recommended video determination method, the recommended videos can be displayed through the video client, as shown in the example. Figure 11 , Figure 11 This is an optional timing diagram of the video recommendation method provided in the embodiments of this disclosure. The recommendation method can be executed by a terminal and a server. The terminal runs a video client, and the server deploys a recommendation system, a memory network, a knowledge graph, a decision-maker, and an operation system. The recommendation method includes, but is not limited to, the following steps 1101 to 1108.

[0205] Step 1101: Send a recommendation request. Specifically, when a user logs into the target account in the video client and accesses the recommendation page through the video client, the video client sends a recommendation request carrying the account information of the target account to the recommendation system.

[0206] Step 1102: Query account characteristics. Specifically, in response to the recommendation request, the recommendation system queries account characteristics through the memory network based on the account information.

[0207] Step 1103: Return account features. Specifically, the memory network returns the account features of the target account to the recommendation system.

[0208] Step 1104: Retrieve related videos. Specifically, the recommendation system retrieves related videos using a knowledge graph.

[0209] Step 1105: Return the candidate set. Specifically, the knowledge graph returns a candidate set to the recommendation system. The candidate set may include the initial video features of the candidate videos, and may also include parameters such as the comprehensive association weight of the candidate videos, the path of the candidate videos in the knowledge graph, and the credibility of the path.

[0210] Step 1106: Calculate the recommendation score. Specifically, the recommendation system sends account features and the candidate set to the decision-maker for calculating the recommendation score. For example, an initial recommendation score is predicted using account features and initial video features. The initial recommendation score is then adjusted by considering parameters such as association weights and credibility to obtain the target recommendation score for the candidate videos.

[0211] Step 1107: Obtain the discount strategy. Specifically, the decision-maker can identify the top K candidate videos with the highest target recommendation scores as recommended videos, where K is a positive integer. Then, the decision-maker determines the recommendation result based on the recommended videos, generates a request to obtain the discount strategy based on the recommendation result, and then sends the request to obtain the discount strategy to the operations system.

[0212] Step 1108: Return recommendation results and coupons. Specifically, in response to the request to obtain discount strategies, the operations system determines the coupons for the recommended videos and then returns the recommendation results and coupons to the video client. The video client can then display the recommended videos and coupons on the display interface. This dynamically binds the recommendation system with discount strategies, automatically triggering personalized promotions for high-potential users and increasing users' willingness to pay.

[0213] Based on this, the decision-maker can significantly improve the accuracy of recommended videos by using the aforementioned recommended video determination method. Furthermore, by returning personalized recommendation results and coupons to the video client, it can effectively increase user dwell time and activity on the platform, enhance user stickiness, reduce churn rate, and make it easier for users to find individual videos of interest, thereby improving paid conversion rate.

[0214] It should be noted that video clients can display recommendation results and coupons in various ways, for example, referring to... Figure 12 , Figure 12 This is an optional interface diagram of a video client provided in an embodiment of the present disclosure. The video client is configured with interfaces such as "My", "Home", "TV Series", "Movies", "Variety Shows", "Children's", "Anime", and "Documentaries". The "Home" interface can be considered as a recommendation page. The "Home" interface of the video client displays subscription information 1201 and personalized recommendation area 1202. The personalized recommendation area 1202 displays recommended videos corresponding to the recommendation results, realizing dynamic updates of the content displayed in the personalized recommendation area 1202 based on the viewing history and interest preferences of the target account.

[0215] For example, refer to Figure 13 , Figure 13 This is another optional interface diagram of the video client provided in this embodiment. When a user clicks on a recommended video in the personalized recommendation area, they will enter the recommended video's recommendation interface. The recommendation interface displays content such as a video playback area 1301, a purchase control 1302, a view details control 1303, a recommendation reason control 1304, a recommendation area 1305, and a tag area 1306. Users can preview recommended videos through the video playback area 1301, purchase recommended videos by clicking the purchase control 1302, view related information about recommended videos by clicking the view details control 1303, and view the recommendation reason for recommended videos by clicking the recommendation reason control 1304. The recommendation reason can be determined through interpretable tags or knowledge graphs, making the recommendation results highly interpretable and improving users' trust and acceptance of the recommendation system. By displaying personalized coupons or promotional activities for recommended videos in the recommendation area 1305, users are encouraged to make purchases. By displaying tag information for recommended videos in the tag area 1306, users can better understand the reasons for the recommendation. For example, tag information includes tag 1, tag 2, tag 3, etc.

[0216] It is understood that although the steps in the above flowcharts are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated in this embodiment, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the above flowcharts may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps.

[0217] Reference Figure 14 , Figure 14 This is a schematic diagram of an optional structure of the recommended video determination device 1400 provided in an embodiment of the present disclosure. The recommended video determination device 1400 includes:

[0218] The acquisition module 1401 is used to acquire the association time between video nodes and neighboring nodes in the knowledge graph, and construct a relationship time decay term based on the association time. Here, the video node is the node of the candidate video in the knowledge graph, and the neighboring node is the node that has a relationship edge with the video node.

[0219] The update module 1402 is used to obtain the initial video features of the video node, the initial node features of the neighboring nodes and the relation weight matrix of the relation edges, and update the initial video features based on the fusion result of the relation time decay term, the relation weight matrix and the initial node features to obtain the updated video features.

[0220] The fusion module 1403 is used to update the knowledge graph based on the updated video features, obtain the updated node features of neighboring nodes in the updated knowledge graph, and fuse the initial video features and the updated node features to obtain the target video features.

[0221] The recommendation module 1404 is used to obtain the account features of the target account and determine the recommended video from the candidate videos based on the fusion result of the account features and the target video features.

[0222] Furthermore, since the video nodes have self-looping edges, the update module 1402 is specifically used for:

[0223] The first message feature is obtained by fusing the relation time decay term, the relation weight matrix, and the initial node features;

[0224] Obtain the self-loop time decay term and self-loop weight matrix of the self-loop connection, and fuse the self-loop time decay term, self-loop weight matrix and initial video features to obtain the second message feature;

[0225] The updated video features are obtained based on the sum of the first message features and the second message features.

[0226] Furthermore, the aforementioned update module 1402 is specifically used for:

[0227] The transformed node features are obtained by performing a linear transformation on the initial node features based on the relation weight matrix.

[0228] The relation time decay term is normalized, and the transformation node features are adjusted based on the normalized relation time decay term to obtain the first message features.

[0229] Furthermore, the aforementioned update module 1402 is specifically used for:

[0230] Candidate videos are acquired, and frame sampling is performed on the candidate videos to obtain image frame temporal data. Temporal features and optical flow features of the image frame temporal data are extracted, and the temporal features and optical flow features are fused to obtain visual features.

[0231] Obtain relevant text from candidate videos, extract features from the relevant text, and obtain text features;

[0232] Obtain the original audio of the candidate video, extract features from the original audio, and obtain audio features;

[0233] By fusing visual features, text features, and audio features, the initial video features of the video nodes are obtained.

[0234] Furthermore, the aforementioned update module 1402 is specifically used for:

[0235] Visual features, text features, and audio features are projected separately to obtain the modal projection results corresponding to each of the visual features, text features, and audio features. The dimensions of each modal projection result are the same.

[0236] The attention weights of each modal projection result are obtained. Based on the attention weights, the modal projection results are weighted and fused to obtain the initial video features of the video node.

[0237] Furthermore, the aforementioned recommended video determination device also includes a feature determination module, which is specifically used for:

[0238] Obtain the historical interaction events of the target account, and update the pre-cached interaction event feature sequence based on the historical interaction events;

[0239] Add positional encoding to the updated interactive event feature sequence, and perform one-way masking and attention processing on the interactive event feature sequence after adding positional encoding to obtain the first memory feature;

[0240] Historical interaction events are input into the neural Turing machine, which updates the readable and writable matrix. Second memory features are then extracted based on the updated readable and writable matrix.

[0241] By integrating the first memory features and the second memory features, the account features of the target account are obtained.

[0242] Furthermore, the aforementioned feature determination module is specifically used for:

[0243] The first memory feature and the second memory feature are concatenated and input into the weight prediction model for prediction to obtain the first weight of the first memory feature.

[0244] The second weight of the second memory feature is determined based on the first weight and the preset weight threshold.

[0245] Based on the first weight and the second weight, the first memory feature and the second memory feature are weighted and summed to obtain the account features of the target account.

[0246] Furthermore, the aforementioned fusion module 1403 is specifically used for:

[0247] Mapping the relation weight matrix yields relation type features;

[0248] Enhanced node features are obtained by fusing updated node features and relationship type features;

[0249] The target video features are obtained by fusing the initial video features and the enhanced node features.

[0250] Furthermore, the aforementioned fusion module 1403 is specifically used for:

[0251] Query features are generated based on initial video features, and key and value features are generated based on enhanced node features.

[0252] Cross-attention is applied to query features, key features, and value features to obtain target video features.

[0253] Furthermore, the aforementioned fusion module 1403 is specifically used for:

[0254] The degree of association is obtained by multiplying the query features with the transposed key features.

[0255] The attention score is obtained by summing the degree of association and the relationship time decay term;

[0256] The target video features are obtained by multiplying the attention score and the value feature.

[0257] Furthermore, the aforementioned fusion module 1403 is specifically used for:

[0258] Based on the topological structure of the knowledge graph, determine the graph structure features of neighboring nodes;

[0259] The graph structure features and the enhanced node features are concatenated to obtain the concatenated features;

[0260] Key features and value features are generated based on splicing features.

[0261] The aforementioned recommended video determination device 1400 and recommended video determination method are based on the same inventive concept. They obtain the association time between video nodes and neighboring nodes in a knowledge graph, then construct a relation time decay term based on the association time. This relation time decay term represents the timeliness of the relationship edges between video nodes and neighboring nodes. Next, they obtain the initial video features of the video nodes, the initial node features of the neighboring nodes, and the relation weight matrix of the relation edges. Based on the fusion result of the relation time decay term, the relation weight matrix, and the initial node features, the initial video features are updated, resulting in updated video features with both structure awareness and time sequence awareness. Finally, the knowledge graph is updated based on these updated video features, enabling the construction of a knowledge graph with... Dynamic knowledge graphs with time-sensitivity capabilities can simultaneously capture the temporal evolution of node features and relational edges. Then, updated node features of neighboring nodes in the updated knowledge graph are obtained. By fusing initial video features and updated node features, structured contextual information of the updated node features is introduced, resulting in semantically richer target video features that are timely. Next, account features of the target account are obtained, and based on the fusion of account features and target video features, recommended videos are determined from candidate videos. This allows the recommendation process to accurately capture the real-time interests and preferences of the target account in the semantic space, generating timely and personalized video recommendations, thus improving the accuracy of recommended videos.

[0262] The electronic device provided in this disclosure for performing the above-described recommended video determination method can be a terminal, as shown in the embodiments below. Figure 15 , Figure 15 This is a partial structural block diagram of a terminal provided in an embodiment of the present disclosure. The terminal includes: a camera assembly 1510, a first memory 1520, an input unit 1530, a display unit 1540, a sensor 1550, an audio circuit 1560, a wireless fidelity (WiFi) module 1570, a first processor 1580, and a first power supply 1590, among other components. Those skilled in the art will understand that... Figure 15 The terminal structure shown does not constitute a limitation on the terminal and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0263] The camera assembly 1510 can be used to capture images or videos. Optionally, the camera assembly 1510 includes a front-facing camera and a rear-facing camera. Typically, the front-facing camera is located on the front panel of the terminal, and the rear-facing camera is located on the back of the terminal. In some embodiments, there are at least two rear-facing cameras, which are any one of a main camera, a depth-sensing camera, a wide-angle camera, and a telephoto camera, to achieve background blurring by fusion of the main camera and the depth-sensing camera, panoramic shooting by fusion of the main camera and the wide-angle camera, VR (Virtual Reality) shooting, or other fusion shooting functions.

[0264] The first memory 1520 can be used to store software programs and modules. The first processor 1580 executes various functional applications and data processing of the terminal by running the software programs and modules stored in the first memory 1520.

[0265] The input unit 1530 can be used to receive input numeric or character information, and to generate key signal inputs related to the terminal's settings and function control. Specifically, the input unit 1530 may include a touch panel 1531 and other input devices 1532.

[0266] The display unit 1540 can be used to display input or provided information, as well as various menus of the terminal. The display unit 1540 may include a display panel 1541.

[0267] Audio circuitry 1560, speaker 1561, and microphone 1562 provide an audio interface.

[0268] The first power source 1590 can be AC ​​power, DC power, a disposable battery, or a rechargeable battery.

[0269] The number of sensors 1550 can be one or more, and these sensors 1550 include, but are not limited to: accelerometers, gyroscopes, pressure sensors, optical sensors, etc.

[0270] An accelerometer can detect the magnitude of acceleration along the three axes of a coordinate system established by the terminal. For example, an accelerometer can be used to detect the components of gravitational acceleration along the three axes. The first processor 1580 can control the display unit 1540 to display the user interface in either a horizontal or vertical view based on the gravitational acceleration signal acquired by the accelerometer. The accelerometer can also be used for games or for acquiring user motion data.

[0271] The gyroscope sensor can detect the terminal's orientation and rotation angle. It can work in conjunction with an accelerometer to collect 3D user movements on the terminal. Based on the data collected by the gyroscope sensor, the first processor 1580 can perform the following functions: motion sensing (e.g., changing the UI based on the user's tilt), image stabilization during shooting, game control, and inertial navigation.

[0272] The pressure sensor can be installed on the side bezel of the terminal and / or on the lower layer of the display unit 1540. When the pressure sensor is installed on the side bezel of the terminal, it can detect the user's grip signal on the terminal, and the first processor 1580 can perform left / right hand recognition or quick operation based on the grip signal collected by the pressure sensor. When the pressure sensor is installed on the lower layer of the display unit 1540, the first processor 1580 can control the operable controls on the UI interface based on the user's pressure operation on the display unit 1540. The operable controls include at least one of button controls, scroll bar controls, icon controls, and menu controls.

[0273] An optical sensor is used to collect ambient light intensity. In one embodiment, the first processor 1580 can control the display brightness of the display unit 1540 based on the ambient light intensity collected by the optical sensor. Specifically, when the ambient light intensity is high, the display brightness of the display unit 1540 is increased; when the ambient light intensity is low, the display brightness of the display unit 1540 is decreased. In another embodiment, the first processor 1580 can also dynamically adjust the shooting parameters of the camera assembly 1510 based on the ambient light intensity collected by the optical sensor.

[0274] In this embodiment, the first processor 1580 included in the terminal can execute the recommended video determination method of the previous embodiment.

[0275] The electronic device provided in this disclosure for performing the above-described recommended video determination method can also be a server, see below. Figure 16 , Figure 16 This is a partial structural block diagram of a server provided in an embodiment of the present disclosure. The server can vary significantly due to differences in configuration or performance. It may include one or more second processors 1610 and second memories 1630, and one or more storage media 1640 (e.g., one or more mass storage devices) for storing application programs 1643 or data 1642. The second memories 1630 and storage media 1640 may be temporary or persistent storage. The program stored in the storage media 1640 may include one or more modules (not shown in the diagram), each module including a series of instruction operations on the server. Furthermore, the second processor 1610 may be configured to communicate with the storage media 1640 and execute the series of instruction operations stored in the storage media 1640 on the server.

[0276] The server may also include one or more secondary power supplies 1620, one or more wired or wireless network interfaces 1650, one or more input / output interfaces 1660, and / or one or more operating systems 1641, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.

[0277] The second processor 1610 in the server can be used to execute the recommended video determination method.

[0278] This disclosure also provides a computer-readable storage medium for storing a computer program for executing the recommended video determination method of the foregoing embodiments.

[0279] This disclosure also provides a computer program product comprising a computer program stored in a computer-readable storage medium. A processor of an electronic device reads the computer program from the computer-readable storage medium and executes the computer program, causing the electronic device to perform the recommended video determination method described above.

[0280] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in this disclosure and the foregoing drawings are used to distinguish similar objects and are not necessarily used to describe a particular 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, for example, in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatuses.

[0281] It should be understood that in this disclosure, "at least one item" means one or more, and "more than one" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0282] It should be understood that in the description of the embodiments disclosed herein, "multiple" means two or more, "greater than", "less than", "exceeding" etc. are understood to exclude the number itself, and "above", "below", "within" etc. are understood to include the number itself.

[0283] In the several embodiments provided in this disclosure, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection between apparatuses or units, and may be electrical, mechanical, or other forms.

[0284] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0285] Furthermore, the functional units in the various embodiments of this disclosure can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0286] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this disclosure. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0287] It should also be understood that the various implementation methods provided in this disclosure can be combined arbitrarily to achieve different technical effects.

[0288] The above is a detailed description of the preferred embodiments of this disclosure. However, this disclosure is not limited to the above embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of this disclosure. All such equivalent modifications or substitutions are included within the scope defined by the claims of this disclosure.

Claims

1. A method for determining recommended videos, characterized in that, include: Obtain the association time between video nodes and neighboring nodes in the knowledge graph, and construct a relationship time decay term based on the association time, wherein the video node is a node of a candidate video in the knowledge graph, and the neighboring node is a node that has a relationship edge with the video node; The initial video features of the video node are obtained, the initial node features of the neighboring nodes and the relation weight matrix of the relation edges are obtained, and the initial video features are updated based on the fusion result of the relation time decay term, the relation weight matrix and the initial node features to obtain the updated video features. The knowledge graph is updated based on the updated video features, and the updated node features of the neighboring nodes in the updated knowledge graph are obtained. The initial video features and the updated node features are then fused to obtain the target video features. Obtain the account features of the target account, and determine the recommended video from the candidate videos based on the fusion result of the account features and the target video features.

2. The recommended video determination method according to claim 1, characterized in that, The video nodes have self-looping edges. The initial video features are updated based on the fusion result of the relation time decay term, the relation weight matrix, and the initial node features to obtain updated video features, including: The relationship time decay term, the relationship weight matrix, and the initial node features are fused to obtain the first message feature; Obtain the self-loop time decay term and self-loop weight matrix of the self-loop connection, and fuse the self-loop time decay term, the self-loop weight matrix and the initial video features to obtain the second message feature; The updated video features are obtained based on the sum of the first message features and the second message features.

3. The recommended video determination method according to claim 2, characterized in that, The process of fusing the relation time decay term, the relation weight matrix, and the initial node features to obtain the first message feature includes: Based on the relation weight matrix, the initial node features are linearly transformed to obtain the transformed node features; The relation time decay term is normalized, and the transformation node features are adjusted based on the normalized relation time decay term to obtain the first message features.

4. The recommended video determination method according to claim 1, characterized in that, The step of obtaining the initial video features of the video node includes: The candidate video is acquired, and the candidate video is sampled frame by frame to obtain image frame temporal data. The temporal features and optical flow features of the image frame temporal data are extracted, and the temporal features and optical flow features are fused to obtain visual features. Obtain the relevant text of the candidate video, and extract features from the relevant text to obtain text features; Obtain the original audio of the candidate video, and extract features from the original audio to obtain audio features; The initial video features of the video node are obtained by fusing the visual features, the text features, and the audio features.

5. The recommended video determination method according to claim 4, characterized in that, The process of fusing the visual features, text features, and audio features to obtain the initial video features of the video node includes: The visual features, text features, and audio features are projected separately to obtain modal projection results corresponding to each of the visual features, text features, and audio features, wherein the dimensions of each modal projection result are the same; The attention weights of each modal projection result are obtained, and the modal projection results are weighted and fused based on the attention weights to obtain the initial video features of the video node.

6. The recommended video determination method according to claim 1, characterized in that, Before obtaining the account characteristics of the target account, the recommended video determination method further includes: Obtain the historical interaction events of the target account, and update the pre-cached interaction event feature sequence based on the historical interaction events; Add positional encoding to the updated interaction event feature sequence, and perform one-way masking and attention processing on the interaction event feature sequence after adding positional encoding to obtain the first memory feature; The historical interaction events are input into the neural Turing machine, which updates the readable and writable matrix. The second memory features are then extracted based on the updated readable and writable matrix. By fusing the first memory feature and the second memory feature, the account features of the target account are obtained.

7. The recommended video determination method according to claim 6, characterized in that, The process of fusing the first memory feature and the second memory feature to obtain the account features of the target account includes: The first memory feature and the second memory feature are concatenated and input into the weight prediction model for prediction to obtain the first weight of the first memory feature. The second weight of the second memory feature is determined based on the first weight and the preset weight threshold. Based on the first weight and the second weight, the first memory feature and the second memory feature are weighted and summed to obtain the account features of the target account.

8. The recommended video determination method according to claim 1, characterized in that, The process of fusing the initial video features and the updated node features to obtain the target video features includes: Mapping the relation weight matrix yields relation type features; Enhanced node features are obtained by fusing the updated node features and the relationship type features; The target video features are obtained by fusing the initial video features and the enhanced node features.

9. The recommended video determination method according to claim 8, characterized in that, The process of fusing the initial video features and the enhanced node features to obtain the target video features includes: Query features are generated based on the initial video features, and key and value features are generated based on the enhanced node features. Cross-attention is applied to the query features, the key features, and the value features to obtain the target video features.

10. The recommended video determination method according to claim 9, characterized in that, The process of performing cross-attention on the query features, the key features, and the value features to obtain target video features includes: The degree of association is obtained by multiplying the query feature with the transposed key feature; An attention score is obtained based on the sum of the degree of association and the relationship time decay term; The target video features are obtained by multiplying the attention score and the value feature.

11. The recommended video determination method according to claim 9, characterized in that, The generation of key features and value features based on the enhanced node features includes: Based on the topological structure of the knowledge graph, the graph structure features of the neighboring nodes are determined; The graph structure features and the enhanced node features are concatenated to obtain the concatenated features; Key features and value features are generated based on the splicing features.

12. A recommended video determination device, characterized in that, include: The acquisition module is used to acquire the association time between video nodes and neighboring nodes in the knowledge graph, and construct a relationship time decay term based on the association time. The video node is a node of a candidate video in the knowledge graph, and the neighboring node is a node that has a relationship edge with the video node. The update module is used to obtain the initial video features of the video node, the initial node features of the neighboring nodes and the relation weight matrix of the relation edges, and update the initial video features based on the fusion result of the relation time decay term, the relation weight matrix and the initial node features to obtain the updated video features. The fusion module is used to update the knowledge graph based on the updated video features, obtain the updated node features of the neighboring nodes in the updated knowledge graph, and fuse the initial video features and the updated node features to obtain the target video features. The recommendation module is used to obtain the account features of the target account and determine the recommended video from the candidate videos based on the fusion result of the account features and the target video features.

13. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the recommended video determination method according to any one of claims 1 to 11.

14. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the recommended video determination method according to any one of claims 1 to 11.

15. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the recommended video determination method according to any one of claims 1 to 11.