A content recommendation method and related apparatus

By combining graph embedding models and graph convolutional networks, the embedding features of users and content are learned, solving the problem that traditional algorithms cannot capture the topology of graph networks and achieving more accurate content recommendation.

CN115687747BActive Publication Date: 2025-12-02TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110875150.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-30
Publication Date
2025-12-02
Estimated Expiration
2041-07-30

AI Technical Summary

Technical Problem

Traditional graph-based embedded vector learning algorithms cannot fully capture the topology and node relationships of graph networks, resulting in low accuracy of embedded vectors and an inability to accurately represent entity association information, which in turn affects the accuracy of recommending, searching, or delivering entity content.

Method used

By combining graph embedding models and graph convolutional networks, the breadth and depth embedding features of target user nodes and target content nodes are learned. The relevance between users and content is reflected by feature relevance calculation, thereby accurately recommending target content.

Benefits of technology

By combining graph embedding models and graph convolutional networks, the topological structure of heterogeneous graphs can be better captured, improving the accuracy of content recommendation and the ability to obtain content that users are interested in.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115687747B_ABST
    Figure CN115687747B_ABST
Patent Text Reader

Abstract

This application discloses a content recommendation method and related apparatus applied in the field of artificial intelligence, for more accurate content recommendation. The method includes: receiving a content recommendation request; obtaining a first embedding feature corresponding to a target user identifier based on the request; the first embedding feature includes a deep embedding feature and a broad embedding feature of the target user node, wherein the deep and broad embedding features of the target user node are obtained by sequentially processing a heterogeneous graph containing user nodes through a graph embedding model and a graph convolutional network; calculating the relevance between the first and second embedding features to obtain a feature relevance; the second embedding feature includes a deep embedding feature and a broad embedding feature of the target content node, and the target content node has a mapping relationship with the target content; if the feature relevance meets the content recommendation conditions, then pushing the target content to the terminal device corresponding to the target user identifier.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and in particular to a content recommendation method and related apparatus. Background Technology

[0002] With the rapid development of technology, artificial intelligence (AI) is gradually entering all aspects of people's lives. AI has broad practical significance in entity prediction. Entity embedding vectors are crucial information units in recommendation, search, and delivery scenarios, aiming to capture entity association information to better represent entities. The quality of these embedding vectors directly impacts the accuracy of entity recommendations, searches, or delivery.

[0003] Traditional graph-based embedded vector learning algorithms can only rely on depth-first neighborhood exploration, which fails to capture the complete topology of the graph network. Alternatively, because the modeling of relationships between nodes in the graph is relatively simple, it cannot fully consider the impact of node degree on the relationships between nodes, resulting in low accuracy of the obtained node embedding vectors. Consequently, the embedding vectors of nodes with low accuracy cannot effectively capture entity association information and cannot accurately represent entity content, thus leading to low accuracy in recommending, searching, or delivering entity content. Summary of the Invention

[0004] This application provides a content recommendation method and related apparatus, which can fully learn the breadth and depth embedding features corresponding to each node in a heterogeneous graph by combining a graph embedding model and a graph convolutional network. Then, by using the feature correlation between the first embedding feature corresponding to the target user node and the second embedding feature corresponding to the target content node, the degree of correlation between the target user node and the target content node can be intuitively and clearly reflected. Thus, the target content that the user is interested in can be more accurately obtained based on the feature correlation, thereby improving the accuracy of recommending target content to the user.

[0005] In view of this, this application provides a content recommendation method, including:

[0006] Receive content recommendation requests, wherein the content recommendation requests carry target user identifiers, and the target user identifiers have a mapping relationship with target user nodes;

[0007] Based on the content recommendation request, the first embedding feature corresponding to the target user identifier is obtained. The first embedding feature includes the deep embedding feature and the breadth embedding feature of the target user node. The deep embedding feature and the breadth embedding feature of the target user node are obtained by processing the heterogeneous graph containing user nodes sequentially through a graph embedding model and a graph convolutional network.

[0008] The correlation between the first embedding feature and the second embedding feature is calculated to obtain the feature correlation. The second embedding feature includes the deep embedding feature and the broad embedding feature of the target content node. The deep embedding feature and the broad embedding feature of the target content node are obtained by processing the heterogeneous graph containing the content node sequentially through the graph embedding model and the graph convolutional network. The target content node and the target content have a mapping relationship.

[0009] If the feature relevance meets the content recommendation criteria, the target content will be pushed to the terminal device corresponding to the target user identifier.

[0010] Another aspect of this application provides a content recommendation device, comprising:

[0011] The receiving unit is used to receive content recommendation requests, wherein the content recommendation request carries a target user identifier, and the target user identifier has a mapping relationship with the target user node;

[0012] The acquisition unit is used to acquire the first embedding feature corresponding to the target user identifier according to the content recommendation request. The first embedding feature includes the deep embedding feature and the breadth embedding feature of the target user node. The deep embedding feature and the breadth embedding feature of the target user node are obtained by processing the heterogeneous graph containing user nodes sequentially through a graph embedding model and a graph convolutional network.

[0013] The processing unit is used to calculate the correlation between the first embedding feature and the second embedding feature to obtain the feature correlation. The second embedding feature includes the deep embedding feature and the broad embedding feature of the target content node. The deep embedding feature and the broad embedding feature of the target content node are obtained by processing the heterogeneous graph containing the content node sequentially through the graph embedding model and the graph convolutional network. The target content node and the target content have a mapping relationship.

[0014] The processing unit is also used to push target content to the terminal device corresponding to the target user identifier if the feature relevance meets the content recommendation conditions.

[0015] In one possible design, in another implementation of the embodiments of this application,

[0016] The acquisition unit is used to acquire the training data, which is used to generate the first node set and the second node set.

[0017] The generation unit is used to generate a target heterogeneous graph based on the training data, wherein the target heterogeneous graph includes a first set of nodes, a second set of nodes, and a set of node edges;

[0018] The processing unit is also used to obtain the deep embedding features corresponding to each node in the target heterogeneous graph through a graph embedding model. The deep embedding features include a first embedding vector predicted based on the node and a second embedding vector predicted based on the node's neighboring nodes.

[0019] The processing unit is also used to take the deep embedding features corresponding to each node as input to the graph convolutional network, and obtain the wide embedding features corresponding to each node through the graph convolutional network. The wide embedding features are obtained by fusing the deep embedding features of the node with the deep embedding features of the node's neighboring nodes.

[0020] The processing unit is also used to update the model parameters of the graph convolutional network based on the breadth embedding features and the depth embedding features corresponding to each node.

[0021] In one possible design, in another implementation of the embodiments of this application, the generating unit may specifically be used for:

[0022] The first node set and the second node set are obtained based on the training data. The first node set includes a first user node, which is used to record the first user who has an interactive relationship with the content. The second node set includes a content node, a second user node, and a content tag node. The second user node is used to record the second user who generated the content, and the content tag node is used to record the content category tag to which the content belongs.

[0023] Based on the first set of nodes and the second set of nodes, a first heterogeneous graph and a second heterogeneous graph are generated. The first heterogeneous graph is used to represent the relationship structure between the first user, the second user and the content, and the second heterogeneous graph is used to represent the relationship structure between the first user, the content and the content category tags.

[0024] In one possible design, in another implementation of the embodiments of this application,

[0025] The processing unit is further configured to perform node sequence sampling on the first heterogeneous graph to obtain a first heterogeneous node sequence corresponding to the first heterogeneous graph, and to perform node sequence sampling on the second heterogeneous graph to obtain a second heterogeneous node sequence corresponding to the second heterogeneous graph, wherein both the first heterogeneous node sequence and the second heterogeneous node sequence include nodes and the neighboring nodes of the nodes.

[0026] The processing unit is also used to extract multiple window node subsequences from each heterogeneous node sequence based on the first heterogeneous node sequence and the second heterogeneous node sequence, using a graph embedding model and according to the preset length of the sliding window.

[0027] The processing unit is also used to perform vector mapping processing on each node in each window node subsequence to obtain the embedding vector based on node prediction and the embedding vector based on the neighbor node prediction.

[0028] The acquisition unit is also used to acquire the negative sampling node corresponding to each node in each window node subsequence, wherein the negative sampling node comes from other window node subsequences corresponding to the heterogeneous node sequence, and the negative sampling node and the node belong to the same node set;

[0029] The processing unit is also used to perform vector mapping processing on the negative sampling nodes of the nodes to obtain the embedding vector corresponding to the negative sampling nodes;

[0030] The processing unit is also used to update the model parameters of the graph embedding model based on the embedding vectors predicted by the nodes, the embedding vectors predicted by the neighboring nodes of the nodes, and the embedding vectors corresponding to the negative sampling nodes.

[0031] In one possible design, in another implementation of the embodiments of this application, the processing unit may specifically be used for:

[0032] A first meta-path is generated based on the first heterogeneous graph and a preset sampling length, wherein the first meta-path includes node type, sampling order of node types, and sampling length;

[0033] The first heterogeneous graph is sampled based on the first element path to obtain the first heterogeneous node sequence;

[0034] The processing unit can specifically be used for:

[0035] A second meta-path is generated based on the second heterogeneous graph and a preset sampling length. The second meta-path includes the node type, the sampling order of the node types, and the sampling length.

[0036] The second heterogeneous graph is sampled based on the second metapath to obtain the second heterogeneous node sequence.

[0037] In one possible design, in another implementation of the embodiments of this application, the processing unit may specifically be used for:

[0038] Obtain the first weight value corresponding to the node connection edge connecting each node to its neighboring nodes from the first heterogeneous graph;

[0039] The first sampling probability corresponding to each node's neighboring nodes is calculated based on the first weight value;

[0040] Based on the magnitude of the first sampling probability, the node type, the sampling order of the node type, and the sampling length, the node moves between each node and its neighboring nodes in the first heterogeneous graph to generate the first heterogeneous node sequence.

[0041] The processing unit can specifically be used for:

[0042] Obtain the second weight value corresponding to the node connection edge connecting each node to its neighboring nodes from the second heterogeneous graph;

[0043] The second sampling probability corresponding to each node's neighboring nodes is calculated based on the second weight value;

[0044] Based on the magnitude of the second sampling probability, the node type, the sampling order of the node type, and the sampling length, each node in the second heterogeneous graph moves between its neighboring nodes to generate a second heterogeneous node sequence.

[0045] In one possible design, in another implementation of the embodiments of this application, the processing unit may specifically be used for:

[0046] The first heterogeneous graph and the second heterogeneous graph are aggregated through a graph convolutional network to obtain an aggregated heterogeneous graph. The aggregated heterogeneous graph includes K levels of node layers. The neighboring nodes in each level of node layer are connected to the neighboring nodes in the next level of node layer through node edges. K is an integer greater than 1.

[0047] For each node in the aggregated heterogeneous graph, the deep embedding features of the node are fused with the deep embedding features of the neighboring nodes in the corresponding K-level node layer to obtain the breadth embedding features of each node.

[0048] In one possible design, in another implementation of the embodiments of this application, the processing unit may specifically be used for:

[0049] The mean value of the deep embedding features of each K-1 level neighbor node is calculated to obtain the aggregated features of the K-level neighbor nodes corresponding to each node. The K-level neighbor nodes are the nodes connected to the K-1 level neighbor nodes through node connection edges.

[0050] The aggregated features are concatenated with the deep embedding features of the K-level neighbor nodes, and the concatenated embedding features are non-linearly transformed to obtain the breadth embedding features corresponding to the K-level neighbor nodes.

[0051] The wide-area embedding features corresponding to the K-level neighbor nodes and the embedding vectors predicted based on the nodes are concatenated, and the concatenated embedding features are nonlinearly transformed to obtain the wide-area embedding features corresponding to each node.

[0052] In one possible design, in another implementation of the embodiments of this application,

[0053] The processing unit is also used to take the updated target heterogeneous graph as input to the graph embedding model when a new node is added to the target heterogeneous graph, and obtain the deep embedding features corresponding to the new node through the graph embedding model.

[0054] The acquisition unit is also used to acquire the breadth embedding features corresponding to the new node based on the model parameters of the graph convolutional network and the depth embedding features corresponding to the new node.

[0055] Another aspect of this application provides a computer device, including: a memory, a transceiver, a processor, and a bus system;

[0056] The memory is used to store programs;

[0057] The processor implements the methods described above when executing a program in memory;

[0058] Bus systems are used to connect memory and processor to enable communication between them.

[0059] Another aspect of this application provides a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the methods described above.

[0060] Another aspect of this application provides a computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a network device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the network device to perform the methods provided in the above aspects.

[0061] As can be seen from the above technical solutions, the embodiments of this application have the following advantages:

[0062] Based on the received content recommendation request, the system obtains a first embedding feature containing deep and broad embedding features of the target user node corresponding to the target user identifier. The deep and broad embedding features of the target user node are obtained by processing a heterogeneous graph containing user nodes sequentially through a graph embedding model and a graph convolutional network. The system then calculates the correlation between the first embedding feature and a second embedding feature containing deep and broad embedding features of the target content node to obtain the feature correlation. The deep and broad embedding features of the target content node are obtained by processing a heterogeneous graph containing content nodes sequentially through a graph embedding model and a graph convolutional network. The target content node and the target content have a mapping relationship. When the feature correlation meets the content recommendation conditions, the target content is pushed to the terminal device corresponding to the target user identifier. By combining graph embedding models and graph convolutional networks, the complete topology of graph networks in heterogeneous graphs can be better captured. This allows for the full learning of the breadth and depth embedding features corresponding to each node in the heterogeneous graph. Furthermore, by calculating the feature correlation between the first embedding feature containing the depth and breadth embedding features of the target user node and the second embedding feature containing the depth and breadth embedding features of the target content node, the degree of correlation between the target user node and the target content node can be clearly and intuitively reflected. The degree of correlation can also reflect the user's interest in the target content. Therefore, based on the feature correlation, the target content that the user is interested in can be more accurately obtained, thereby improving the accuracy of recommending target content to the user. Attached Figure Description

[0063] Figure 1 This is a schematic diagram of the architecture of the content data control system in an embodiment of this application;

[0064] Figure 2 This is a flowchart of one embodiment of the content recommendation method in this application;

[0065] Figure 3 This is a flowchart of another embodiment of the content recommendation method in this application;

[0066] Figure 4 This is a flowchart of another embodiment of the content recommendation method in this application;

[0067] Figure 5 This is a flowchart of another embodiment of the content recommendation method in this application;

[0068] Figure 6 This is a flowchart of another embodiment of the content recommendation method in this application;

[0069] Figure 7This is a flowchart of another embodiment of the content recommendation method in this application;

[0070] Figure 8 This is a flowchart of another embodiment of the content recommendation method in this application;

[0071] Figure 9 This is a flowchart of another embodiment of the content recommendation method in this application;

[0072] Figure 10 This is a flowchart of another embodiment of the content recommendation method in this application;

[0073] Figure 11 This is a schematic diagram illustrating the principle of the content recommendation method in the embodiments of this application;

[0074] Figure 12(a) is a schematic diagram of a heterogeneous graph of the content recommendation method in an embodiment of this application;

[0075] Figure 12(b) is a schematic diagram of another heterogeneous graph of the content recommendation method in the embodiments of this application;

[0076] Figure 13(a) is a schematic diagram of a heterogeneous node sequence of the content recommendation method in an embodiment of this application;

[0077] Figure 13(b) is a schematic diagram of another heterogeneous node sequence of the content recommendation method in the embodiments of this application;

[0078] Figure 13(c) is a schematic diagram of another heterogeneous node sequence of the content recommendation method in the embodiments of this application;

[0079] Figure 13(d) is a schematic diagram of another heterogeneous node sequence of the content recommendation method in the embodiments of this application;

[0080] Figure 14 This is a schematic diagram illustrating the principle of node sequence sampling in the content recommendation method of this application embodiment;

[0081] Figure 15 This is a schematic diagram illustrating the principle of another node sequence sampling method in the content recommendation method of this application embodiment;

[0082] Figure 16 This is a schematic diagram of a window node sub-sequence of the content recommendation method in the embodiments of this application;

[0083] Figure 17 This is a schematic diagram illustrating the principle of obtaining the deep embedding features of nodes using a graph embedding model in the content recommendation method of this application embodiment;

[0084] Figure 18This is a schematic diagram illustrating the principle of a graph convolutional network in the content recommendation method of this application for obtaining the breadth embedding features of nodes in a heterogeneous graph.

[0085] Figure 19 This is a schematic diagram illustrating the principle of a graph convolutional network for obtaining the embedding features of nodes in the content recommendation method of this application embodiment;

[0086] Figure 20 This is a schematic diagram of one embodiment of the content recommendation device in this application;

[0087] Figure 21 This is a schematic diagram of one embodiment of the computer device described in this application. Detailed Implementation

[0088] This application provides a content recommendation method and related apparatus, which, by combining a graph embedding model and a graph convolutional network, can fully learn the breadth and depth embedding features corresponding to each node in a heterogeneous graph. Then, by using the feature correlation between the first embedding feature corresponding to the target user node and the second embedding feature corresponding to the target content node, the method can intuitively and clearly reflect the degree of correlation between the target user node and the target content node. Based on the feature correlation, the method can more accurately obtain the target content that the user is interested in, thereby improving the accuracy of recommending target content to the user.

[0089] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and drawings of this application 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 application described herein can be implemented, for example, in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “corresponding to,” 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 apparatus.

[0090] With the rapid development of information technology, artificial intelligence (AI) and databases are gradually permeating all aspects of people's lives. AI has broad practical significance in areas such as text translation, intelligent question answering, and sentiment analysis. The emergence of AI has also greatly facilitated people's work and lives. AI, in essence, utilizes mathematical or digital computers to control machines that simulate, extend, and expand human intelligence, perceiving the environment, acquiring knowledge, and using that knowledge to achieve optimal results. In other words, AI is a comprehensive technology within computer science that attempts to understand the essence of intelligence and produce new intelligent machines that can react in a way similar to human intelligence. AI studies the design principles and implementation methods of various intelligent machines, enabling them to possess perception, reasoning, and decision-making capabilities.

[0091] Artificial intelligence (AI) is a comprehensive discipline encompassing a wide range of fields, including both hardware and software technologies. Fundamental AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies primarily include computer vision, speech processing, natural language processing, and machine learning / deep learning. In natural language processing, AI can be used to process text and provide reasonable interpretations of words. Similarly, in machine learning / deep learning, AI can be used to process text and statistically analyze or interpret word frequencies or importance. The content recommendation method provided in this application can be implemented using both natural language processing and machine learning technologies.

[0092] It should be understood that the content recommendation method provided in this application can be applied to scenarios where information or tasks are recommended or delivered through embedded features. For example, video content can be delivered in a video application using the embedded features of video content. Another example is a news application platform that uses the embedded features of news content to recommend information to users. Yet another example is a shopping platform that uses the embedded features of product content to recommend products to users. In these scenarios, existing solutions for content recommendation involve obtaining embedded features through graph-based embedded vector learning algorithms. However, because these algorithms cannot effectively capture the complete topology of the graph network, or because the modeling of relationships between nodes in the graph is too simple and fails to fully consider the influence of node degree on relationships, the accuracy of the obtained embedded features is low. Consequently, the embedded vectors of nodes with low accuracy cannot effectively capture entity association information, and entity content cannot be accurately represented, resulting in low accuracy in recommending, searching, or delivering entity content.

[0093] To address the aforementioned issues, this application proposes a content recommendation method, which is applied to... Figure 1 Please refer to the content data control system shown. Figure 1 , Figure 1 This is a schematic diagram of the architecture of the content data control system in an embodiment of this application, such as... Figure 1 As shown, the server receives a content recommendation request sent by a terminal device and, based on the received request, obtains a first embedding feature containing deep and broad embedding features of the target user node corresponding to the target user identifier. The deep and broad embedding features of the target user node are obtained by processing a heterogeneous graph containing user nodes sequentially through a graph embedding model and a graph convolutional network. The server then calculates the correlation between the first embedding feature and the second embedding feature containing deep and broad embedding features of the target content node to obtain the feature correlation. The deep and broad embedding features of the target content node are obtained by processing a heterogeneous graph containing content nodes sequentially through a graph embedding model and a graph convolutional network. The target content node and the target content have a mapping relationship. When the feature correlation meets the content recommendation conditions, the server pushes the target content to the terminal device corresponding to the target user identifier. By combining graph embedding models and graph convolutional networks, the complete topology of graph networks in heterogeneous graphs can be better captured. This allows for the full learning of the breadth and depth embedding features corresponding to each node in the heterogeneous graph. Furthermore, by calculating the feature correlation between the first embedding feature containing the depth and breadth embedding features of the target user node and the second embedding feature containing the depth and breadth embedding features of the target content node, the degree of correlation between the target user node and the target content node can be clearly and intuitively reflected. The degree of correlation can also reflect the user's interest in the target content. Therefore, based on the feature correlation, the target content that the user is interested in can be more accurately obtained, thereby improving the accuracy of recommending target content to the user.

[0094] Understandable, Figure 1 Only one type of terminal device is shown in the diagram. In real-world scenarios, many more types of terminal devices can participate in the data processing, such as personal computers (PCs). The specific number and types depend on the actual scenario and are not limited here. Additionally, Figure 1 The diagram shows one server, but in real-world scenarios, multiple servers can be involved, especially in scenarios involving multi-model training and interaction. The number of servers depends on the specific scenario and is not limited here.

[0095] It should be noted that in this embodiment, the server 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, content delivery networks (CDNs), and big data and artificial intelligence platforms. The terminal device can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, etc., but is not limited to these. The terminal device and the server can be directly or indirectly connected via wired or wireless communication, and the terminal device and the server can be connected to form a blockchain network; this application does not impose any restrictions.

[0096] To address the aforementioned issues, this application proposes a content recommendation method, which is generally executed by a server or terminal device. Accordingly, the apparatus used for content recommendation is generally located in the server or terminal device.

[0097] It is understood that, as disclosed in this application, the recommendation method, related equipment, and apparatus can comprise a blockchain, with multiple servers / terminal devices forming nodes on the blockchain. In practical applications, data sharing between nodes is required within the blockchain, and each node can store image data, node data, and feature data, etc.

[0098] The content recommendation method used in this application will be described below. Please refer to [link / reference]. Figure 2 One embodiment of the content recommendation method in this application includes:

[0099] In step S101, a content recommendation request is received, wherein the content recommendation request carries a target user identifier, and the target user identifier has a mapping relationship with the target user node;

[0100] Specifically, when a user wants to obtain content that interests them, such as news, advertisements, friend information, live shopping broadcasts, videos, or audio, without any specific restrictions, or when the content they want to obtain is attractive to them, or when the content is highly relevant to their interests, the user can send a content recommendation request to the server through their terminal device. The system or server can then respond to the received content recommendation request, obtaining the target user identifier carried in the request. This allows the system to quickly find the target user node with a mapping relationship to that target user identifier in the database.

[0101] The user identifier, also known as the user identity code (ID), is used to indicate the user's identity or account. It can be represented as an integer (int) string or a string, etc. The user identifier can correspond to the user application account and the target user node, and is used by the server to determine the initiator of the content recommendation request. The user application account is the account of the initiator of the content recommendation request in the virtual content management application, such as the game account, video application account, or sports channel application account of the initiator of the content recommendation request. The target user node can be used to record users who have an interaction relationship with the content. The mapping relationship between the target user identifier, the user application account, and the target user node can be stored on the server side of the system, or it can be stored on both the client side and the server side of the system. More specifically, there is a one-to-one correspondence between the target user identifier and the target user node.

[0102] It should be noted that when a user who generates content wants to promote or promote the content, they can send a content promotion request to the server through their terminal device. The system or server can then respond to the received content promotion request and obtain the content recommendation request carrying the target content identifier. This allows the system to quickly find the target content node that has a mapping relationship with the target content identifier in the database based on the obtained target content identifier.

[0103] The users who generate content can be account owners who create news highlights, bloggers who publish videos and images, or live streamers who communicate through virtual live rooms. There are no specific restrictions here. The target user identifier is used to indicate the target content generated by the user who generates the content. More specifically, there is a one-to-one correspondence between the target content identifier and the target content node.

[0104] For example, in the scenario of traffic package delivery, after creating new content, if an account owner wants to promote or generate buzz for that new content, they can send a content promotion request to the server through their terminal device. At the same time, they can purchase traffic packages of different traffic values ​​provided by the platform server to generate buzz or promote the new content. Before recommending content to terminal devices, the platform server can categorize the content based on existing category tags, which allows the content to be pushed to more users more effectively.

[0105] Understandably, if there is no target content node in the database that matches the target content identifier carried in the content promotion request, then based on the user data of the provider of the target content identifier, the deep embedding features and broad embedding features corresponding to other nodes with mapping relationships to the user data can be obtained in the database. For example, in the first heterogeneous graph of the database shown in Figure 12(a), the deep embedding features and broad embedding features corresponding to the main node corresponding to the provider's user data can be obtained. In the second heterogeneous graph of the database shown in Figure 12(b), the deep embedding features and broad embedding features corresponding to the secondary category node corresponding to the provider's user data, as well as the deep embedding features and broad embedding features corresponding to the primary category can be obtained. Then, the deep embedding features and broad embedding features corresponding to these three nodes can be added together through the latent space to obtain the fused embedding features, which can be used as the target embedding features corresponding to the target content identifier.

[0106] In step S102, according to the content recommendation request, the first embedding feature corresponding to the target user identifier is obtained. The first embedding feature includes the deep embedding feature and the broad embedding feature of the target user node. The deep embedding feature and the broad embedding feature of the target user node are obtained by processing the heterogeneous graph containing user nodes sequentially through a graph embedding model and a graph convolutional network.

[0107] In this embodiment, after obtaining a content recommendation request, the target user node uniquely corresponding to the target user identifier can be quickly indexed in the database based on the mapping relationship between the target user identifier and the target user node carried in the content recommendation request. Then, the deep embedding feature and the broad embedding feature of the target user node, i.e. the first embedding feature, can be obtained. This allows for subsequent processing of the obtained first embedding feature to obtain features that match or are associated with the first embedding feature. Thus, based on the features that match or are associated with the first embedding feature, content that is highly matched or associated with the first embedding feature can be accurately recommended to the user.

[0108] Specifically, this embodiment can process and extract features from a heterogeneous graph containing a series of target user nodes using a trained graph embedding model and graph convolutional network to obtain the deep embedding features and breadth embedding features corresponding to each target user node in the heterogeneous graph in advance. The deep embedding features and breadth embedding features corresponding to each target user node can effectively represent each target user node in the heterogeneous graph. The heterogeneous graph contains nodes of different node types and nodes with different relationships.

[0109] Furthermore, when a content recommendation request is received, the mapping relationship between the target user identifier and the target user node carried in the content recommendation request can be used to quickly index the target user node that uniquely corresponds to the target user identifier in the database. Then, the deep embedding features and broad embedding features that can better represent the target user node can be accurately obtained. This allows the content that is related to the target user node to be effectively obtained through the deep embedding features and broad embedding features of the target user node. As a result, the content can be recommended to the user corresponding to the target user node more accurately, thereby improving the accuracy of recommending target content to users to a certain extent.

[0110] In step S103, the correlation between the first embedding feature and the second embedding feature is calculated to obtain the feature correlation. The second embedding feature includes the deep embedding feature and the broad embedding feature of the target content node. The deep embedding feature and the broad embedding feature of the target content node are obtained by processing the heterogeneous graph containing the content node sequentially through the graph embedding model and the graph convolutional network. The target content node and the target content have a mapping relationship.

[0111] In this embodiment, after obtaining the first embedding feature, the feature correlation between the first embedding feature and the second embedding feature can be calculated by obtaining the deep embedding feature and the broad embedding feature that accurately contain the target content node, i.e., the second embedding feature. This allows the feature correlation to intuitively and clearly reflect the degree of correlation between the target user node and the target content node, and to reflect the user's interest in the target content. Thus, the target content that the user is interested in can be obtained more accurately based on the feature correlation, which can improve the accuracy of recommending target content to the user to a certain extent.

[0112] The feature relevance between the first and second embedded features indicates the degree of correlation between them. It can be used to represent the degree of correlation between the target user node and the target content node, thereby reflecting the user's interest in the target content or the degree of association between the content and the user's interests. The feature relevance can be expressed as a score, probability value, or distance, or other forms, without specific limitations. The target content node can be used to record the target content. The mapping relationship between the target content node and the target content can be stored on the server side of the system, or simultaneously on the client side and the server side of the system. More specifically, there is a one-to-one correspondence between the target content node and the target content.

[0113] Specifically, this embodiment can process and extract features from a heterogeneous graph containing a series of target content nodes by using a trained graph embedding model and graph convolutional network, so as to obtain in advance the deep embedding features and breadth embedding features corresponding to each target content node in the heterogeneous graph. The deep embedding features and breadth embedding features corresponding to each target content node can well represent each target content node in the heterogeneous graph.

[0114] Furthermore, when the first embedded feature is obtained, in order to accurately obtain target content that is suitable for the user or highly relevant to the user, the correlation between the obtained first embedded feature and the second embedded feature corresponding to any target content node can be calculated. Specifically, the first embedded feature and the second embedded feature corresponding to any target content node can be multiplied by a dot to obtain a correlation score that represents the degree of correlation between the first embedded feature and the second embedded feature corresponding to any target content node, i.e., feature correlation. Thus, the degree of correlation between the target user node and each target content node can be intuitively and clearly reflected through feature correlation.

[0115] In step S104, if the feature relevance meets the content recommendation conditions, the target content is pushed to the terminal device corresponding to the target user identifier.

[0116] In this embodiment, when the feature relevance meets the content recommendation conditions, the target content corresponding to the feature relevance can be pushed to the terminal device corresponding to the target user identifier based on the mapping relationship between the target content node and the target content. That is, the target content corresponding to the target content node with high relevance to the target user node can be recommended to the user, and the target content can be pushed to the terminal device corresponding to the target user identifier more accurately, thereby improving the accuracy of recommending target content to the user to a certain extent.

[0117] Specifically, when the feature relevance between the first embedded feature and the second embedded feature corresponding to any target content node is obtained, if the feature relevance is a probability value, the feature relevance can be compared with a preset probability threshold. If the feature relevance is greater than or equal to the preset probability threshold, the feature relevance meets the content recommendation conditions. The preset probability threshold is set according to the actual application requirements and is not specifically limited here.

[0118] For example, in a coin-based video viewing scenario, when a user wants to access content they are interested in and can donate coins or like their favorite content, such as video or audio content, the user can send a content recommendation request to the server through their terminal device. The platform server playing the video content can then calculate the feature relevance between the target user node and the target content node, and combine this with the amount of coins corresponding to the video content, such as 20 coins. According to a preset exchange method, the 20 coins can be exchanged for the corresponding traffic of the video content, such as 50 views. If the feature relevance of the video content reaches a preset threshold, that is, the feature relevance meets the content recommendation conditions, the platform server can forward and distribute the video content accordingly based on the amount of traffic.

[0119] Furthermore, it should be noted that in practical applications, such as in traffic package distribution or promotion scenarios, account owners can purchase traffic packages of different values ​​to pre-heat or promote their video content, enabling the video content to be pushed to more users. Therefore, in order to more accurately recommend video content to users, this embodiment can obtain a relevance score by calculating the product between the feature relevance and a preset relevance coefficient. If the calculated relevance score is greater than or equal to a preset recommendation threshold, that is, the feature relevance meets the content recommendation conditions. Alternatively, the target distribution volume corresponding to the video content can be determined based on the traffic value of the traffic package purchased by the account owner. The target distribution volume is the minimum amount of traffic the platform must forward or distribute to the video content, i.e., guaranteed volume. For example, if the traffic value of the traffic package purchased by the account owner is 5000 times, the corresponding target distribution volume is 4800 times. Then, each target... The actual delivery volume of the target content corresponding to the content node is calculated. Then, the difference between the target delivery volume and the actual delivery volume can be calculated, and the calculated difference is multiplied by a preset delivery coefficient. The resulting product is used as the guaranteed delivery score of the target content. It can be understood that the guaranteed delivery score is positively correlated with the difference between the target delivery volume and the actual delivery volume. Therefore, the importance of each target content in terms of delivery can be represented by calculating the sum of the relevance score and the guaranteed delivery score. If the sum of the relevance score and the guaranteed delivery score is greater than or equal to the preset delivery threshold, that is, the feature relevance meets the content recommendation conditions. The preset relevance coefficient, delivery coefficient, and delivery threshold are all set according to actual application needs and are not specifically restricted here. Then, the target content corresponding to the feature relevance that meets the content recommendation conditions can be pushed to the terminal device corresponding to the target user identifier.

[0120] Furthermore, target content can be pushed to the terminal devices corresponding to the target user identifiers in sequence according to the importance of each target content, so that users can better obtain the target content they are interested in, and can also deliver or promote the target content.

[0121] In this embodiment, a content recommendation method is provided. By combining graph embedding models and graph convolutional networks, the complete topology of the graph network in the heterogeneous graph can be better captured. This method can fully learn the breadth and depth embedding features corresponding to each node in the heterogeneous graph. Then, by calculating the feature correlation between the first embedding feature containing the depth and breadth embedding features of the target user node and the second embedding feature containing the depth and breadth embedding features of the target content node, the correlation between the target user node and the target content node can be clearly and intuitively reflected. The correlation can reflect the user's interest in the target content. Based on the feature correlation, the target content that the user is interested in can be obtained more accurately, thereby improving the accuracy of recommending target content to the user.

[0122] Optionally, in the above Figure 2 Based on the corresponding embodiments, in another optional embodiment of the content recommendation method provided in this application, such as... Figure 3 As shown, the method also includes:

[0123] In step S301, training data is obtained, wherein the training data is used to generate a first node set and a second node set;

[0124] In this embodiment, in order to better and more accurately recommend target content to users or deliver target content to corresponding applications, this embodiment acquires training data so that the acquired training data can be used to train and optimize a model that can acquire high-precision embedding features, thereby improving the accuracy of acquiring embedding features to a certain extent.

[0125] The training data refers to labeled data used to train models that acquire high-precision embedded features and improve accuracy. Specifically, the training data can be business content feature data used to learn the embedded features of different entities. More specifically, different business scenarios correspond to different training data. For example, in a short video distribution scenario, users can like or comment on their favorite short videos. The training data could represent user click or view flow data for short videos, such as interaction flow data like browsing, liking, commenting, or downloading, as well as the short video content and related feature information, such as the creative relationship between the content and the creator, or the hierarchical relationship between the content and its secondary category tag, or the hierarchical relationship between the secondary category tag and the primary category tag. It could also represent other related feature information, without specific limitations. As another example, in a video viewing coin-giving scenario, users can donate coins to their favorite video content. The training data could represent user coin-giving flow data, video content data, and related feature information. As another example, in the scenario of traffic package distribution, after creating new content, creators may purchase traffic packages of varying traffic values ​​to pre-heat or promote the new content. The training data could specifically represent the creator's revenue data for the content, as well as the feature information relating the content data to other content. As yet another example, in the scenario of coin donations and traffic package purchases, there is also the "big account leading small account" scenario. This could specifically represent a platform seeking to support mid-tier accounts (those with lower popularity) by finding similar popular accounts and then using the popular accounts' related behaviors and fan audience characteristics to guide the support activities. The training data could specifically represent the revenue data of popular accounts, their content data, and the feature information relating to the content data; the revenue data of mid-tier accounts, their content data, and the feature information relating to the content data; and the training data could also represent other business data, without specific limitations here.

[0126] Specifically, such as Figure 11As shown, the training data can be obtained by using web crawling technology to crawl data from a big data platform, receiving training data sent by a terminal device, or obtaining pre-stored training data from a server database, depending on the actual application or business needs. This allows for subsequent processing of the acquired training data. Specifically, the training data can be replaced with a first set of nodes and a second set of nodes to prepare for constructing a heterogeneous graph. This data can then be used to train and optimize graph embedding models and graph convolutional networks, enabling them to better capture the complete topology of the graph network in the heterogeneous graph. This improves the model's learning ability and training accuracy, allowing it to fully learn the breadth and depth embedding features corresponding to each node in the heterogeneous graph, thereby improving the accuracy of obtaining embedding features to a certain extent.

[0127] In step S302, a target heterogeneous graph is generated based on the data to be trained, wherein the target heterogeneous graph includes a first set of nodes, a second set of nodes, and a set of node edges;

[0128] In this embodiment, after obtaining the training data, a target heterogeneous graph can be generated based on the training data. The target heterogeneous graph can convert the training data into a first node set and a second node set for presentation, and can intuitively express the relationships between various data in the training data through the node edge set. This can better reflect the graph data objects of multiple data types, and better reflect the diverse interaction or relationship between data. As a result, the target heterogeneous graph can be used to better capture the structural relationships and relationships between various data in the training data, and can better extract the embedded features in the training data, thereby improving the accuracy of obtaining embedded features to a certain extent.

[0129] Specifically, such as Figure 11 As shown, when two sets of training data are obtained, a target heterogeneous graph containing a first set of nodes, a second set of nodes, and a set of node edges can be constructed based on the training data and the relationships between the data in the training data. The training data and the relationships between the data in the training data can be clearly and intuitively reflected through the nodes of various node types in the target heterogeneous graph and the node edges between the nodes.

[0130] For example, the training data obtained includes the transaction records of user clicks on and consumption of content over the past N days, the content clicked and consumed by users, and the feature information associated with the content, such as the account owner data that generated the content clicked and consumed by users, and the category tags of the content clicked and consumed by users in the platform server, such as the secondary category tag being basketball and the corresponding primary category tag being sports. Then, based on the user's click and consumption records of content, the interaction relationship between users and consumed content, and the feature information associated with the content, as shown in Figure 12(a), a heterogeneous graph corresponding to the node set of "user-content-account owner" can be constructed, and as shown in Figure 12(b), a heterogeneous graph corresponding to the node set of "user-content-secondary category-primary category" can be constructed.

[0131] In step S303, for each node in the target heterogeneous graph, the deep embedding features corresponding to each node are obtained through a graph embedding model. The deep embedding features include a first embedding vector predicted based on the node and a second embedding vector predicted based on the node's neighboring nodes.

[0132] In this embodiment, after obtaining the target heterogeneous graph, the deep embedding features corresponding to each node can be obtained through a graph embedding model. The graph embedding model can learn the deep embedding features of each node in the heterogeneous graph, so that the deep embedding features corresponding to each node can be used as input to the graph convolutional network. This allows the graph convolutional network, which cannot learn features in the heterogeneous graph, to learn not only the deep embedding features in the heterogeneous graph, but also the breadth embedding features in the heterogeneous graph, thereby improving the learning ability of embedding features and thus improving the accuracy of obtaining embedding features to a certain extent.

[0133] Specifically, such as Figure 11 As shown, when the target heterogeneous graph is obtained, in order to learn the deep embedding vector representation of each node in the heterogeneous graph, a graph embedding model can be used to obtain deep embedding features containing the first embedding vector predicted based on the node and the second embedding vector predicted based on the node's neighboring nodes. The graph embedding model can be determined according to the actual application requirements. Specifically, it can be a skip-gram model or a continuous bag-of-words model (CBOW model), or other graph embedding models, such as the Hin2vec algorithm. No specific restrictions are made here.

[0134] In step S304, the deep embedding feature corresponding to each node is used as the input of the graph convolutional network, and the wide embedding feature corresponding to each node is obtained through the graph convolutional network. The wide embedding feature is obtained by fusing the deep embedding feature of the node with the deep embedding feature of the node's neighboring nodes.

[0135] In this embodiment, as Figure 11 As shown, after obtaining the deep embedding features corresponding to each node, the deep embedding features corresponding to each node can be used as input to the graph convolutional network. This enables the graph convolutional network, which cannot learn features in heterogeneous graphs, to learn not only deep embedding features in heterogeneous graphs but also broad embedding features in heterogeneous graphs based on the deep embedding features of each node in the heterogeneous graph. This improves the learning ability of embedding features and thus improves the accuracy of obtaining deep and broad embedding features to a certain extent.

[0136] Specifically, such as Figure 19 As shown, when the target heterogeneous graph is obtained, in order to learn the breadth embedding vector representation of each node in the heterogeneous graph and to better capture the complete topology of the graph network in the heterogeneous graph, this embodiment can use the deep embedding features corresponding to each node as input to the graph convolutional network. The graph convolutional network performs feature fusion on the deep embedding features corresponding to each node to obtain the breadth embedding features corresponding to each node. The graph convolutional network can be determined according to the actual application requirements. Specifically, it can be a graph sampling aggregation (GraphSample and aggreGatE, GraphSage) network, or other graph convolutional networks, such as the PinSage algorithm. No specific restrictions are made here.

[0137] Among them, the GraphSage network is a type of inductive graph neural network. In the GraphSage network, the embedding representation of each node changes according to the changes in the node's neighbor relationships.

[0138] In step S305, the model parameters of the graph convolutional network are updated based on the breadth embedding features and the depth embedding features corresponding to each node.

[0139] Specifically, after obtaining the broad embedding features corresponding to each node, the model parameters of the graph convolutional network can be updated based on the broad and deep embedding features corresponding to each node. Specifically, the gradient descent method based on the Adaptive Moment Estimation (Adam) optimizer can be used to update the model parameters of the graph convolutional network. Other update methods can also be used, without specific restrictions, so that the graph convolutional network can converge stably, thereby obtaining a graph convolutional network with good learning ability for the embedding features of nodes in the graph, which can improve the accuracy of obtaining deep and broad embedding features to a certain extent.

[0140] Optionally, in the above Figure 3 Based on the corresponding embodiments, in another optional embodiment of the content recommendation method provided in this application, such as... Figure 4 As shown, the target heterogeneous graph includes a first heterogeneous graph and a second heterogeneous graph; generating the target heterogeneous graph based on the training data includes:

[0141] In step S401, a first node set and a second node set are obtained based on the training data. The first node set includes a first user node, which is used to record the first user who has an interactive relationship with the content. The second node set includes a content node, a second user node, and a content tag node. The second user node is used to record the second user who generated the content, and the content tag node is used to record the content category tag to which the content belongs.

[0142] In step S402, a first heterogeneous graph and a second heterogeneous graph are generated based on the first node set and the second node set. The first heterogeneous graph is used to represent the relationship structure between the first user, the second user and the content, and the second heterogeneous graph is used to represent the relationship structure between the first user, the content and the content category tag.

[0143] In this embodiment, after acquiring the training data, in order to better learn the entity relationships in various business data in real-world application scenarios—for example, in an information flow delivery scenario, it is necessary to learn the relationships between users, content, and account owners—which include various data types and different types of associations. Therefore, a heterogeneous graph can be constructed to more clearly and intuitively reflect the data content and the relationships between data. In this embodiment, the training data can be converted into a first node set and a second node set. Then, based on the first node set including the first user node and the second node set including the content node and the second user node, a relationship representing "first user-content-second user" can be constructed. The first heterogeneous graph of the system structure can also be used to construct a second heterogeneous graph that can represent the relationship structure of "first user-content-content category tag" based on the first node set including the first user node and the second node set including the content node and content tag node. This allows the graph embedding model and graph convolutional network to be trained and optimized based on the first and second heterogeneous graphs, so as to better capture the graph structure of the first and second heterogeneous graphs, as well as the structural relationships and associations between the nodes in the first and second heterogeneous graphs. This also allows for better extraction of the embedding features of each node in the first and second heterogeneous graphs, thereby improving the accuracy of obtaining embedding features to a certain extent.

[0144] Specifically, obtaining the first node set and the second node set based on the training data can be done using techniques such as knowledge graphs, tree nodes, or Abstract Meaning Representation (AMR) to convert the training data into the first node set and the second node set. Other methods can also be used, and no specific restrictions are imposed here.

[0145] Furthermore, generating the first and second heterogeneous graphs based on the first and second node sets can be achieved using the `dgl.heterograph()` function in the Deep Graph Library Tutorials and Documentation (DGL) API. The parameters of `dgl.heterograph()` are dictionaries with keys in the form (srctype, edgetype, dsttype), representing (initial node type, edge type, and terminating node type). This allows subsequent mapping of nodes into the same latent vector space based on the relationships between heterogeneous nodes in the first and second heterogeneous graphs. This enables better training and optimization of graph embedding models and graph convolutional networks, leading to better extraction of embedding features from each node in the first and second heterogeneous graphs, thereby improving the accuracy of deep embedding feature acquisition to some extent.

[0146] For example, in information feed delivery scenarios, there is training data such as users, content, account owners, and content category tags. This training data can be converted into user nodes, content nodes, account owner nodes, and content tag nodes. Based on the "user node-content node" relationship, a relationship between "user nodes and account owner nodes" can be constructed, resulting in a first heterogeneous graph. A relationship between "user nodes and content tag nodes" can also be constructed, resulting in a second heterogeneous graph. The first heterogeneous graph can then be used to measure the relationship between users and account owners for content recommendation or delivery. Furthermore, based on the first and second heterogeneous graphs, the relationships between user nodes, account owner nodes, and content tag nodes can be used to better profile content. This profile can quickly identify users interested in content generated by specific account owners under specific content category tags, and effectively deliver that content to them, thereby improving the accuracy and efficiency of recommended target content to a certain extent.

[0147] Optionally, in the above Figure 4 Based on the corresponding embodiments, in another optional embodiment of the content recommendation method provided in this application, such as... Figure 5 As shown, the method also includes:

[0148] In step S501, node sequence sampling is performed on the first heterogeneous graph to obtain the first heterogeneous node sequence corresponding to the first heterogeneous graph, and node sequence sampling is performed on the second heterogeneous graph to obtain the second heterogeneous node sequence corresponding to the second heterogeneous graph. The first heterogeneous node sequence and the second heterogeneous node sequence both include nodes and the neighboring nodes of the nodes.

[0149] In step S502, based on the first heterogeneous node sequence and the second heterogeneous node sequence, multiple window node subsequences are extracted from each heterogeneous node sequence according to the preset sliding window length using a graph embedding model.

[0150] In step S503, vector mapping is performed on each node in each window node subsequence to obtain the embedding vector based on node prediction and the embedding vector based on neighbor node prediction.

[0151] In step S504, the negative sampling node corresponding to each node in each window node subsequence is obtained, wherein the negative sampling node comes from other window node subsequences corresponding to the heterogeneous node sequence, and the negative sampling node and the node belong to the same node set;

[0152] In step S505, the negative sampling nodes of the node are processed by vector mapping to obtain the embedding vector corresponding to the negative sampling nodes;

[0153] In step S506, the model parameters of the graph embedding model are updated based on the embedding vectors predicted by the nodes, the embedding vectors predicted by the neighboring nodes, and the embedding vectors corresponding to the negative sampling nodes.

[0154] In this embodiment, as Figure 11 As shown, after obtaining the first and second heterogeneous graphs, in order to better learn the deep embedding features of each node in the first and second heterogeneous graphs, the Node2vec algorithm, Metapath2vec algorithm, or Metapath algorithm can be used, or other sampling algorithms can be used. No specific restrictions are placed here. The relevant sequence is sampled for each node in the first and second heterogeneous graphs to obtain the heterogeneous node sequence corresponding to each node. Then, the Skip-gram model can be used to learn the deep embedding features of the heterogeneous node sequence. Then, the model parameters of the graph embedding model can be updated according to the learned deep embedding features, so that the graph embedding model can converge stably, thereby obtaining a graph embedding model with good learning ability for the deep embedding features of the nodes in the graph, which can improve the accuracy of obtaining embedding features to a certain extent.

[0155] Among them, such as Figure 14As shown, the Node2vec algorithm is a sampling algorithm that comprehensively considers both depth-first sampling (DFS) and breadth-first sampling (BFS), aiming to simultaneously model the neighborhood using both DFS and BFS methods. Figure 14 As shown in Part B, when performing the next sampling step based on node v*, the Node2vec algorithm has a 1 / p probability of performing BFS sampling, such as a 1 / p probability of performing BFS sampling from node v* to node v1, node v2, or node v3; or a 1 / q probability of performing DFS sampling, such as a 1 / q probability of performing DFS sampling from node v* to node v4, node v4 to node v5, and node v5 to node v9. Figure 14 In part A, it is shown that by adjusting the hyperparameters p and q, the tendency of the walking strategy to perform BFS sampling and DFS sampling can be changed, and the graph topology around the central node is not constructed. Finally, the sampling can be completed to obtain a heterogeneous node sequence.

[0156] Specifically, after obtaining the first heterogeneous graph and the second heterogeneous graph, different walk sequences can be generated for each node by sampling. Specifically, the meta-path algorithm can be used to sample the node sequences of the first node set and the second node set based on the node connection set, so as to obtain the first heterogeneous node sequence and the second heterogeneous node sequence corresponding to each node.

[0157] For example, by using a path algorithm to sample the node sequence of the first heterogeneous graph shown in Figure 12(a), we can obtain the sequence "u1-r1-a1-r6-u3-r" as shown in Figure 13(c). 31 -a5-r 81 -u 19 "and "u2-r 11 -a1-r8-u5-r 33 -a 15 -r 117 -u 99 "etc., the first heterogeneous node sequence.

[0158] For example, by using a path algorithm to sample the node sequence of the second heterogeneous graph shown in Figure 12(b), we can obtain the “u1-r1-sc1-fc1-sc3-r” shown in Figure 13(d). 19 -u9-r 11 -sc 21 -fc3-sc 25 -r 14 -u 88The second heterogeneous node sequence, and such as "u 13 -r 31 -sc1-fc1-sc5-r 11 -u 91 -r 111 -sc 31 -fc6-sc 35 -r 41 -u 87 The second heterogeneous node sequence, etc.

[0159] Furthermore, the heterogeneous node sequence of each obtained node can be input through the Skip-gram model, and multiple window node subsequences can be extracted from each heterogeneous node sequence according to the preset sliding window length. Specifically, the node sequence can be captured sequentially from the first node of each heterogeneous node sequence according to the preset sliding window length through the sliding window, thus obtaining multiple window node subsequences.

[0160] For example, as shown in Figure 13(c), suppose there is a heterogeneous node sequence "u1-r1-a1-r6-u3-r 31 -a5-r 81 -u 19 If the preset sliding window length is 5, then starting from the first node of the heterogeneous node sequence, the sliding window captures the node sequence, such as... Figure 16 As shown, the window node subsequence "u1-r1-a1-r6-u3" can be obtained. Furthermore, by capturing the node sequence starting from the second node in the sliding window, the sequence "r1-a1-r6-u3-r" can be obtained. 31 Similarly, by capturing the node sequence sequentially through a sliding window, multiple window node subsequences can be obtained.

[0161] Furthermore, such as Figure 16 As shown, a central node a1 can be selected from the window node subsequence "u1-r1-a1-r6-u3", and then, as follows: Figure 17 As shown, the central node a1 is mapped to the corresponding embedding vector. Specifically, node a1 can be embedded into a low-dimensional dense vector space to obtain the embedding vector a1. Similarly, the embedding vector a1 can be used to further predict the embedding vectors of other nodes in the sliding window, resulting in embedding vectors u1, r1, r6, and u3.

[0162] Furthermore, to improve the graph embedding model's ability to learn deep embedding features of nodes, this embodiment obtains the negative sampling nodes corresponding to each node in each window node subsequence to enrich the reference factors for learning deep embedding features. Specifically, in addition to the current window node subsequence, nodes belonging to the same node set as the center node can be randomly sampled from other window node subsequences corresponding to heterogeneous node sequences, i.e., negative sampling nodes. Then, vector mapping processing can be performed on the negative sampling nodes to obtain the embedding vectors corresponding to the negative sampling nodes. The method of performing vector mapping processing on the negative sampling nodes is similar to the method of performing vector mapping processing on each node in each window node subsequence to obtain the embedding vectors based on node prediction and the embedding vectors based on the neighbor nodes of the node, and will not be repeated here.

[0163] Furthermore, after obtaining the embedding vectors predicted by the nodes, the embedding vectors predicted by the neighboring nodes, and the embedding vectors corresponding to the negatively sampled nodes, the loss value can be obtained based on the embedding vectors predicted by the nodes, the embedding vectors predicted by the neighboring nodes, and the embedding vectors corresponding to the negatively sampled nodes. Then, the model parameters of the graph embedding model can be updated based on the loss value using stochastic gradient descent (SGD). Other update methods can also be used, and no specific restrictions are placed here.

[0164] The loss value is obtained based on the embedding vector predicted by the node, the embedding vector predicted by the neighboring nodes, and the embedding vector corresponding to the negative sampling node. Specifically, it can be obtained through the loss function E1 in the following equation (1):

[0165]

[0166] Among them, v c v represents the embedding vector of the central node. t v represents the embedding vector predicted by neighboring nodes. neg N represents the embedding vector corresponding to the negative sampling node. neg σ(*) represents the number of nodes that perform negative sampling, and σ(*) represents the activation function.

[0167] Optionally, in the above Figure 5 Based on the corresponding embodiments, in another optional embodiment of the content recommendation method provided in this application, such as... Figure 6 As shown, node sequence sampling is performed on the first heterogeneous graph to obtain the first heterogeneous node sequence corresponding to the first heterogeneous graph, including:

[0168] In step S601, a first meta-path is generated based on the first heterogeneous graph and a preset sampling length, wherein the first meta-path includes node type, sampling order of node types, and sampling length;

[0169] In step S602, the first heterogeneous graph is sampled according to the first meta-path to obtain the first heterogeneous node sequence;

[0170] Node sequence sampling is performed on the second heterogeneous graph to obtain the second heterogeneous node sequence corresponding to the second heterogeneous graph, including:

[0171] In step S603, a second meta-path is generated based on the second heterogeneous graph and a preset sampling length, wherein the second meta-path includes node type, sampling order of node types, and sampling length;

[0172] In step S604, the second heterogeneous graph is sampled according to the second metapath to obtain the second heterogeneous node sequence.

[0173] Specifically, sampling the node sequence of the first heterogeneous graph to obtain the first heterogeneous node sequence corresponding to the first heterogeneous graph can be based on the metapath in the Metapath2vec algorithm. A first metapath is generated according to the first heterogeneous graph and a preset sampling length. Then, a starting node of the same type can be selected in the first heterogeneous graph according to the starting node type in the first metapath. Next, following the sampling order of node types, the process proceeds sequentially from the starting node to neighboring nodes in the first heterogeneous graph until the number of nodes corresponding to the sampling length has been visited, thus obtaining the first heterogeneous node sequence. Similarly, the sampling method for the node sequence of the second heterogeneous graph to obtain the second heterogeneous node sequence can be similar to that described in steps S601 to S602, and will not be repeated here. This allows the nodes in the heterogeneous graph to be better mapped into the same latent vector space based on the first and second heterogeneous node sequences. This enables the graph embedding model and graph convolutional network to better learn the embedding features of each node in the first and second heterogeneous graphs, thereby improving the accuracy of obtaining deep and broad embedding features to a certain extent.

[0174] For example, such as Figure 15 As shown, assuming a news feed recommendation scenario, there is a heterogeneous graph about research fields constructed based on the publication relationships of papers, using institutions (Org), authors (Author), papers (Paper), and conferences (Venue). For this first heterogeneous graph, the Metapath2vec algorithm can be used for sequence sampling. Specifically, when generating each node sequence, the Metapath2vec algorithm first selects a path type, such as... Figure 15 The algorithm selects APA, APVPA, or OAPVPAO, and then determines a meta-path based on the selected path type. Subsequently, a path sequence consisting of heterogeneous nodes can be generated based on the meta-path, i.e., a heterogeneous node sequence.

[0175] For example, assuming that based on the first heterogeneous graph shown in Figure 12(a) and the preset sampling length of 5, a first meta-path can be generated, as shown in the meta-path "uraru" in Figure 13(a). Alternatively, based on the second heterogeneous graph shown in Figure 12(b) and the preset sampling length of 7, a second meta-path can be generated, as shown in the meta-path "ur-sc-fc-sc-ru" in Figure 13(b). Here, u can represent a user, such as a viewer browsing the content of a work; r can represent the content of the work, such as a video, advertisement, or copywriting; a can represent the creator of the content of the work, such as a content creator who makes news highlights, a blogger who publishes videos or images, or a streamer who communicates through a virtual live broadcast room; sc can represent the secondary category tag to which the content of the work belongs, such as basketball, football, Chinese language, or Cantonese language; and fc can represent the secondary category tag to which the content of the work belongs, such as sports or music.

[0176] Optionally, in the above Figure 6 Based on the corresponding embodiments, in another optional embodiment of the content recommendation method provided in this application, such as... Figure 7 As shown, the first heterogeneous graph is sampled according to the first meta-path to obtain the first heterogeneous node sequence, including:

[0177] In step S701, the first weight value corresponding to the node connection between each node and its neighboring node is obtained from the first heterogeneous graph;

[0178] In step S702, the first sampling probability corresponding to the neighboring nodes of each node is calculated based on the first weight value;

[0179] In step S703, based on the magnitude of the first sampling probability, the node type, the sampling order of the node type, and the sampling length, the node moves between each node and its neighboring nodes in the first heterogeneous graph to generate the first heterogeneous node sequence.

[0180] The second heterogeneous graph is sampled based on the second-order path to obtain the second heterogeneous node sequence, including:

[0181] In step S704, the second weight value corresponding to the node connection between each node and its neighboring node is obtained from the second heterogeneous graph;

[0182] In step S705, the second sampling probability corresponding to the neighboring nodes of each node is calculated based on the second weight value;

[0183] In step S706, based on the magnitude of the second sampling probability, the node type, the sampling order of the node type, and the sampling length, the node moves between each node and its neighboring nodes in the second heterogeneous graph to generate a second heterogeneous node sequence.

[0184] In this embodiment, when generating the first heterogeneous graph and the second heterogeneous graph based on the training data, in order to better express the correlation between the various data in the training data, this embodiment uses the edge weight w of the node connection. ij This can be used to represent the weight value of the node connection between each first user, content node, and main node in the first heterogeneous graph shown in Figure 12(a), or to represent the weight value of the node connection between each first user, content node, secondary category node, and primary category node in the second heterogeneous graph shown in Figure 12(b).

[0185] Furthermore, after obtaining the first meta-path and the second meta-path, in order to better sample nodes, for the first heterogeneous graph, this embodiment can obtain the probability of walking from the starting node to the next node, i.e., the first sampling probability, by using the weight value corresponding to the node connection edge between each node and its neighboring nodes. Then, based on the magnitude of the first sampling probability and the node type and sampling order of the next sampling node, walk from each starting node to the neighboring node that matches the sampling order and node type and has the highest first sampling probability, to generate a different walking sequence for each node, i.e., the first heterogeneous node sequence. Similarly, for the second heterogeneous graph, the sampling method of sampling the second heterogeneous graph according to the second meta-path to obtain the second heterogeneous node sequence can be similar to the method described in steps S701 to S703, and will not be repeated here.

[0186] Specifically, after obtaining the first heterogeneous graph and the second heterogeneous graph, the weight value corresponding to the node edge connecting each node and its neighbor can be obtained based on the node edge set. If there is a one-to-one relationship between a node and its neighbor, the weight value w corresponding to the node edge can be obtained. ij For example, as shown in Figure 12(a), there can be a one-to-one correspondence between the content nodes and the primary nodes in the first heterogeneous graph, that is, the weight value w of the edge connecting these two types of nodes corresponds to the weight value w. ij The weight is 1. If the relationship between a node and its neighboring nodes is not one-to-one, then to avoid the Matthew effect causing the weight value to be extremely large or extremely small, this embodiment can use the following formula (2) to assign the weight value w corresponding to the edge connecting the node to the neighboring node. ij Normalization is performed to obtain weight values ​​that better reflect the relationships between each node and its neighboring nodes:

[0187]

[0188] Where, N u N can represent the number of neighboring nodes that are connected to each node. r This can represent the number of times each neighboring node is connected to another node, where u represents the number of nodes, r represents the number of neighboring nodes that each node has a connection with, and w represents the number of times each node has a connection with another node if there are no nodes connecting a node to its neighbors. ij It is 0.

[0189] Furthermore, after obtaining the first-order path and the second-order path, node sequence sampling is performed based on the first-order path and the second-order path. Specifically, this can be understood as traversing from each node to its next connected neighbor node according to the node type and the sampling order of the node type. This can be understood as sampling the node corresponding to each time t to the node corresponding to the next time (t+1). In this embodiment, the weight value w corresponding to the node connection edge between each node and its neighbor node can be used to determine the connection. ij To calculate the sampling probability p for each ij Specifically, the following equation (3) can be used to obtain the result by normalizing using the Softmax function:

[0190]

[0191] Where e is a constant e, often used as the natural logarithm of the base.

[0192] Wherein, the sampling probability p ij It can be expressed by the following equation (4):

[0193]

[0194] Among them, v i v represents the node at time t. i+1 This indicates that it is the metapath with v. i Adjacent nodes are the nodes from the node at time t to the node at the next time (t+1). For example, the first heterogeneous graph shown in Figure 12(a) can sample sequentially from user nodes to content nodes and main nodes, or the second heterogeneous graph shown in Figure 12(b) can sample from user nodes to content nodes, secondary category nodes, and primary category nodes, etc. E is the number of nodes connected, φ(v i+1 ) = t+1 indicates that the node is the next adjacent node in the graph at the current time t.

[0195] Furthermore, as shown in Figures 13(c) and 13(d), after obtaining the first meta-path and the second meta-path, it can be understood that the larger the weight value of the edge node connecting the node and the neighbor node, the greater the sampling probability of the edge connected to that node. Then, walking from each node to the neighbor node connected to each node will follow the node type, node type sampling order and sampling length in the meta-path, and will prioritize walking from the first heterogeneous graph or the second heterogeneous graph with the sampling probability from large to small. Then, a path sequence composed of the heterogeneous nodes walked to can be generated, namely the first heterogeneous node sequence or the second heterogeneous node sequence. By sampling the relevant sequence of each node in the first heterogeneous graph or the second heterogeneous graph, the obtained heterogeneous node sequence can be used as the input of the graph embedding model, so that the graph embedding model can better learn the deep embedding features in the heterogeneous graph, thereby improving the accuracy of obtaining deep embedding features to a certain extent.

[0196] Optionally, in the above Figure 3 Based on the corresponding embodiments, in another optional embodiment of the content recommendation method provided in this application, such as... Figure 8 As shown, the deep embedding features corresponding to each node are used as input to the graph convolutional network. The graph convolutional network is then used to obtain the broad embedding features corresponding to each node, including:

[0197] In step S801, the first heterogeneous graph and the second heterogeneous graph are aggregated through a graph convolutional network to obtain an aggregated heterogeneous graph. The aggregated heterogeneous graph includes K levels of node layers. The neighboring nodes in each level of node layer are connected to the neighboring nodes in the next level of node layer through node edges. K is an integer greater than 1.

[0198] In step S802, for each node in the aggregated heterogeneous graph, the deep embedding features of the node are fused with the deep embedding features of the neighboring nodes in the K-level node layer corresponding to the node to obtain the breadth embedding features corresponding to each node.

[0199] Specifically, such as Figure 19As shown, after obtaining the deep embedding features corresponding to each node in the target heterogeneous graph, K-hops aggregation can be used in the graph convolutional network to aggregate the first heterogeneous graph and the second heterogeneous graph. The deep association between each node and its neighboring nodes can be aggregated into the breadth connection between hierarchical nodes, so that the graph convolutional network can better capture the graph structure and the breadth embedding features of the nodes in the aggregated heterogeneous graph. Then, K-level fusion is performed on the deep embedding features of the nodes and the deep embedding features of the neighboring nodes in the K-level node layer corresponding to the node. Specifically, multiple aggregators can be learned in the GraphSage network. The aggregator can be learnedable aggregator-1 or learnedable aggregator-2, etc. Each aggregator can aggregate the embedding features of each layer of nodes. Each layer of aggregation is based on the node representation obtained by the previous layer of aggregation. After K-level aggregation, the breadth embedding features corresponding to each node can be obtained. The neighbors of each node are obtained by sampling.

[0200] Optionally, in the above Figure 8 Based on the corresponding embodiments, in another optional embodiment of the content recommendation method provided in this application, such as... Figure 9 As shown, for each node in the aggregated heterogeneous graph, the deep embedding features of the node are fused with the deep embedding features of its neighboring nodes in the corresponding K-level node layer to obtain the breadth embedding features corresponding to each node, including:

[0201] In step S901, the mean value of the deep embedding features of each K-1 level neighbor node is calculated to obtain the aggregated features of the K-level neighbor nodes corresponding to each node, wherein the K-level neighbor nodes are nodes connected to the K-1 level neighbor nodes through node connection edges.

[0202] In step S902, the aggregated features are concatenated with the deep embedding features of the K-level neighbor nodes, and the concatenated embedding features are nonlinearly transformed to obtain the breadth embedding features corresponding to the K-level neighbor nodes.

[0203] In step S903, the wide-area embedding features corresponding to the K-level neighbor nodes and the embedding vectors obtained based on node prediction are concatenated, and the concatenated embedding features are nonlinearly transformed to obtain the wide-area embedding features corresponding to each node.

[0204] In this embodiment, after using the deep embedding features corresponding to each node in the acquired target heterogeneous graph as input to the graph convolutional network, the mean of the deep embedding features of each K-1 level neighbor node is calculated to obtain the aggregated features of the K-level neighbor nodes corresponding to each node. The aggregated features are then concatenated with the deep embedding features of the K-level neighbor nodes, and a nonlinear transformation is performed on the concatenated embedding features to obtain the breadth embedding features corresponding to the K-level neighbor nodes. Furthermore, the breadth embedding features corresponding to the K-level neighbor nodes and the embedding vectors obtained based on node prediction are concatenated, and a nonlinear transformation is performed on the concatenated embedding features. This allows for the layer-by-layer fusion of each node and the K-level nodes connected to it. The breadth embedding features of the node can be predicted using the deep embedding features of the K-level nodes, enabling more accurate learning of the breadth embedding features corresponding to each node. This, in turn, can improve the accuracy of obtaining the deep and breadth embedding features of each node to a certain extent.

[0205] In this context, K-level nodes are nodes connected to each other on the shortest path of each node. That is, K-level neighbor nodes are nodes connected to K-1 level neighbor nodes through node edges. For example, in “u1-r1-a1”, node r1 is a first-level node of node u1, and node a1 is a second-level node of node u1. Similarly, the K-level nodes of node u1 can be obtained.

[0206] Specifically, such as Figure 18 As shown, when the deep embedding features corresponding to each node in the obtained target heterogeneous graph are used as input to the graph convolutional network, the graph convolutional network can use BFS exploration to uniformly aggregate each node and its neighboring nodes, thereby better representing the breadth embedding features of the current node.

[0207] For example, each node in the first heterogeneous graph of "User-Content-Account Owner" shown in Figure 12(a) and the second heterogeneous graph of "User-Content-Secondary Category-Primary Category" shown in Figure 12(b) can be aggregated using the GraphSage algorithm, along with each node and its adjacent nodes, to obtain... Figure 18 The diagram shows the fused polymer heterogeneous structure.

[0208] The GrapSage algorithm uses BFS to treat each node as a source node using a multi-hop (K-hop) approach. It then merges the k-th degree neighbors of the source node into the embedding representation of the source node to obtain the breadth embedding features of the source node. That is, it learns the fusion nodes in the graph structure through K learnable aggregators in the graph neural network to fuse the neighbor nodes of each hop of the source node layer by layer. Finally, it can fuse the k-hop neighbors into the embedding representation of the source node. Specifically, it can fuse the neighbor nodes of each hop of the source node layer by layer through the following equations (5) and (6):

[0209]

[0210]

[0211] in, This represents the vector obtained by aggregating the neighbor nodes of the k-th hop using the average value. This represents the deep embedding feature of the neighboring node of the (k-1)th hop. and The vector representations are obtained by concatenating and non-linearly transforming the neighbor nodes of the source node v at the k-th and (k-1)-th hops, respectively. CONCAT(*,*) represents the concatenation function, and the parameter matrix W... k These are the model parameters that the GraphSage algorithm needs to learn. Furthermore, The initial feature of each node represents the deep embedding feature corresponding to that node.

[0212] Furthermore, the loss value can be obtained based on the breadth embedding features of each node obtained after k hops, the depth embedding features corresponding to each node, and the depth embedding features corresponding to the negative sampling nodes of each node. The model parameters of the graph convolutional network are then updated based on the loss value using stochastic gradient descent. Specifically, the loss value can be obtained using the loss function E2 in the following equation (7):

[0213]

[0214] Among them, h s h represents the breadth embedding feature of each node obtained after k hops. v h represents the deep embedding feature corresponding to each node. neg This represents the deep embedding feature corresponding to the negative sampling node.

[0215] For example, by sequentially passing the first heterogeneous graph shown in Figure 12(a) and the second heterogeneous graph shown in Figure 12(b) through a graph embedding model and a graph convolutional network, the target embedding features corresponding to user nodes, content nodes, account owner nodes, secondary classification nodes, and primary classification nodes in the aggregated heterogeneous graph can be output, respectively. The target embedding features include the breadth embedding features and depth embedding features corresponding to each node, which can be represented as follows: as well as Where l represents the dimension of the vector.

[0216] Optionally, in the above Figure 3 Based on the corresponding embodiments, in another optional embodiment of the content recommendation method provided in this application, such as... Figure 10 As shown, the method also includes:

[0217] In step S1001, when a new node is added to the target heterogeneous graph, the updated target heterogeneous graph is used as the input to the graph embedding model, and the deep embedding features corresponding to the new node are obtained through the graph embedding model.

[0218] In step S1002, the breadth embedding features corresponding to the new node are obtained based on the model parameters of the graph convolutional network and the deep embedding features corresponding to the new node.

[0219] Specifically, when new nodes are added to the target heterogeneous graph, such as when there is a small increase in the number of nodes in the first heterogeneous graph, i.e., new user nodes, content nodes, or account owner nodes are added to the first heterogeneous graph, it can be understood that since there are relationships between the nodes, the nodes connecting the nodes will also increase accordingly. Then, the updated first heterogeneous graph can be input into the graph embedding model to obtain the deep embedding features corresponding to the nodes newly added to the first heterogeneous graph.

[0220] Furthermore, since the relationship between each node in the first heterogeneous graph does not change significantly when there is a small increase in nodes, the deep embedding features learned by the graph embedding model also do not change significantly. Therefore, when the increase in nodes in the first heterogeneous graph is less than the preset increment threshold, this embodiment can use the model parameters of the graph convolutional network and the deep embedding features corresponding to the newly added nodes in the first heterogeneous graph to derive the breadth embedding features of the node. There is no need to input the deep embedding features corresponding to the newly added nodes in the first heterogeneous graph into the graph convolutional network for processing. The breadth embedding features corresponding to the new nodes can be inferred, which can reduce the complexity of obtaining embedding features and thus improve the efficiency of obtaining embedding features to a certain extent. The preset increment threshold is set according to the actual application requirements and is not specifically limited here. Similarly, when there is a small increase in nodes in the second heterogeneous graph, the method of obtaining the deep embedding features and breadth embedding features of the newly added nodes is similar to the method of obtaining the deep embedding features and breadth embedding features of the newly added nodes when there is a small increase in nodes in the first heterogeneous graph, and will not be repeated here.

[0221] The content recommendation device in this application is described in detail below. Please refer to [link / reference]. Figure 20 , Figure 20 This is a schematic diagram of one embodiment of the content recommendation device in this application. The content recommendation device 20 includes:

[0222] The receiving unit 201 is used to receive a content recommendation request, wherein the content recommendation request carries a target user identifier, and the target user identifier has a mapping relationship with a target user node;

[0223] The acquisition unit 202 is used to acquire the first embedding feature corresponding to the target user identifier according to the content recommendation request. The first embedding feature includes the deep embedding feature and the breadth embedding feature of the target user node. The deep embedding feature and the breadth embedding feature of the target user node are obtained by processing the heterogeneous graph containing user nodes sequentially through a graph embedding model and a graph convolutional network.

[0224] The processing unit 203 is used to calculate the correlation between the first embedding feature and the second embedding feature to obtain the feature correlation. The second embedding feature includes the deep embedding feature and the broad embedding feature of the target content node. The deep embedding feature and the broad embedding feature of the target content node are obtained by processing the heterogeneous graph containing the content node sequentially through the graph embedding model and the graph convolutional network. The target content node and the target content have a mapping relationship.

[0225] The processing unit 203 is also used to push target content to the terminal device corresponding to the target user identifier if the feature relevance meets the content recommendation conditions.

[0226] Optionally, in the above Figure 20 Based on the corresponding embodiments, in another embodiment of the content recommendation device provided in this application,

[0227] The acquisition unit 202 is used to acquire the training data, wherein the training data is used to generate the first node set and the second node set;

[0228] The generation unit 204 is used to generate a target heterogeneous graph based on the training data, wherein the target heterogeneous graph includes a first set of nodes, a second set of nodes, and a set of node edges;

[0229] The processing unit 203 is also used to obtain the deep embedding features corresponding to each node in the target heterogeneous graph through a graph embedding model. The deep embedding features include a first embedding vector predicted based on the node and a second embedding vector predicted based on the node's neighboring nodes.

[0230] The processing unit 203 is also used to take the deep embedding feature corresponding to each node as the input of the graph convolutional network, and obtain the wide embedding feature corresponding to each node through the graph convolutional network. The wide embedding feature is obtained by fusing the deep embedding feature of the node with the deep embedding feature of the node's neighboring nodes.

[0231] The processing unit 203 is also used to update the model parameters of the graph convolutional network based on the breadth embedding features corresponding to each node and the depth embedding features corresponding to each node.

[0232] Optionally, in the above Figure 20 Based on the corresponding embodiments, in another embodiment of the content recommendation device provided in this application, the generation unit 204 can specifically be used for:

[0233] The first node set and the second node set are obtained based on the training data. The first node set includes a first user node, which is used to record the first user who has an interactive relationship with the content. The second node set includes a content node, a second user node, and a content tag node. The second user node is used to record the second user who generated the content, and the content tag node is used to record the content category tag to which the content belongs.

[0234] Based on the first set of nodes and the second set of nodes, a first heterogeneous graph and a second heterogeneous graph are generated. The first heterogeneous graph is used to represent the relationship structure between the first user, the second user and the content, and the second heterogeneous graph is used to represent the relationship structure between the first user, the content and the content category tags.

[0235] Optionally, in the above Figure 20Based on the corresponding embodiments, in another embodiment of the content recommendation device provided in this application,

[0236] The processing unit 203 is further configured to perform node sequence sampling on the first heterogeneous graph to obtain a first heterogeneous node sequence corresponding to the first heterogeneous graph, and to perform node sequence sampling on the second heterogeneous graph to obtain a second heterogeneous node sequence corresponding to the second heterogeneous graph, wherein both the first heterogeneous node sequence and the second heterogeneous node sequence include nodes and the neighboring nodes of the nodes.

[0237] The processing unit 203 is also used to extract multiple window node subsequences from each heterogeneous node sequence based on the first heterogeneous node sequence and the second heterogeneous node sequence, using a graph embedding model and according to the preset length of the sliding window.

[0238] The processing unit 203 is also used to perform vector mapping processing on each node in each window node subsequence to obtain the embedding vector based on node prediction and the embedding vector based on neighbor node prediction.

[0239] The acquisition unit 202 is also used to acquire the negative sampling node corresponding to each node in each window node subsequence, wherein the negative sampling node comes from other window node subsequences corresponding to the heterogeneous node sequence, and the negative sampling node and the node belong to the same node set;

[0240] The processing unit 203 is also used to perform vector mapping processing on the negative sampling nodes of the nodes to obtain the embedding vector corresponding to the negative sampling nodes;

[0241] The processing unit 203 is also used to update the model parameters of the graph embedding model based on the embedding vectors predicted by the nodes, the embedding vectors predicted by the neighboring nodes of the nodes, and the embedding vectors corresponding to the negative sampling nodes.

[0242] Optionally, in the above Figure 20 Based on the corresponding embodiments, in another embodiment of the content recommendation device provided in this application, the processing unit 203 may specifically be used for:

[0243] A first meta-path is generated based on the first heterogeneous graph and a preset sampling length, wherein the first meta-path includes node type, sampling order of node types, and sampling length;

[0244] The first heterogeneous graph is sampled based on the first element path to obtain the first heterogeneous node sequence;

[0245] The processing unit can specifically be used for:

[0246] A second meta-path is generated based on the second heterogeneous graph and a preset sampling length. The second meta-path includes the node type, the sampling order of the node types, and the sampling length.

[0247] The second heterogeneous graph is sampled based on the second metapath to obtain the second heterogeneous node sequence.

[0248] Optionally, in the above Figure 20 Based on the corresponding embodiments, in another embodiment of the content recommendation device provided in this application, the processing unit 203 may specifically be used for:

[0249] Obtain the first weight value corresponding to the node connection edge connecting each node to its neighboring nodes from the first heterogeneous graph;

[0250] The first sampling probability corresponding to each node's neighboring nodes is calculated based on the first weight value;

[0251] Based on the magnitude of the first sampling probability, the node type, the sampling order of the node type, and the sampling length, the node moves between each node and its neighboring nodes in the first heterogeneous graph to generate the first heterogeneous node sequence.

[0252] Processing unit 203 can specifically be used for:

[0253] Obtain the second weight value corresponding to the node connection edge connecting each node to its neighboring nodes from the second heterogeneous graph;

[0254] The second sampling probability corresponding to each node's neighboring nodes is calculated based on the second weight value;

[0255] Based on the magnitude of the second sampling probability, the node type, the sampling order of the node type, and the sampling length, each node in the second heterogeneous graph moves between its neighboring nodes to generate a second heterogeneous node sequence.

[0256] Optionally, in the above Figure 20 Based on the corresponding embodiments, in another embodiment of the content recommendation device provided in this application, the processing unit 203 may specifically be used for:

[0257] The first heterogeneous graph and the second heterogeneous graph are aggregated through a graph convolutional network to obtain an aggregated heterogeneous graph. The aggregated heterogeneous graph includes K levels of node layers. The neighboring nodes in each level of node layer are connected to the neighboring nodes in the next level of node layer through node edges. K is an integer greater than 1.

[0258] For each node in the aggregated heterogeneous graph, the deep embedding features of the node are fused with the deep embedding features of the neighboring nodes in the corresponding K-level node layer to obtain the breadth embedding features of each node.

[0259] Optionally, in the above Figure 20 Based on the corresponding embodiments, in another embodiment of the content recommendation device provided in this application, the processing unit 203 may specifically be used for:

[0260] The mean value of the deep embedding features of each K-1 level neighbor node is calculated to obtain the aggregated features of the K-level neighbor nodes corresponding to each node. The K-level neighbor nodes are the nodes connected to the K-1 level neighbor nodes through node connection edges.

[0261] The aggregated features are concatenated with the deep embedding features of the K-level neighbor nodes, and the concatenated embedding features are non-linearly transformed to obtain the breadth embedding features corresponding to the K-level neighbor nodes.

[0262] The wide-area embedding features corresponding to the K-level neighbor nodes and the embedding vectors predicted based on the nodes are concatenated, and the concatenated embedding features are nonlinearly transformed to obtain the wide-area embedding features corresponding to each node.

[0263] Optionally, in the above Figure 20 Based on the corresponding embodiments, in another embodiment of the content recommendation device provided in this application,

[0264] The processing unit 203 is also used to take the updated target heterogeneous graph as the input of the graph embedding model when a new node is added to the target heterogeneous graph, and obtain the deep embedding features corresponding to the new node through the graph embedding model.

[0265] The acquisition unit 202 is also used to acquire the breadth embedding features corresponding to the new node based on the model parameters of the graph convolutional network and the depth embedding features corresponding to the new node.

[0266] This application also provides a schematic diagram of another computer device, such as... Figure 21 As shown, Figure 21This is a schematic diagram of a computer device structure provided in an embodiment of this application. The computer device 300 can vary significantly due to different configurations or performance. It may include one or more central processing units (CPUs) 310 (e.g., one or more processors) and a memory 320, and one or more storage media 330 (e.g., one or more mass storage devices) for storing application programs 331 or data 332. The memory 320 and storage media 330 can be temporary or persistent storage. The program stored in the storage media 330 may include one or more modules (not shown in the diagram), each module including a series of instruction operations on the computer device 300. Furthermore, the CPU 310 may be configured to communicate with the storage media 330 and execute the series of instruction operations in the storage media 330 on the computer device 300.

[0267] Computer device 300 may also include one or more power supplies 340, one or more wired or wireless network interfaces 350, one or more input / output interfaces 360, and / or one or more operating systems 333, such as Windows Server. TM Mac OS X TM Unix TM Linux TM FreeBSD TM etc.

[0268] The aforementioned computer device 300 is also used to perform, for example Figures 2 to 10 The steps in the corresponding embodiments.

[0269] Another aspect of this application provides a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform actions such as... Figures 2 to 10 The steps in the method described in the illustrated embodiment.

[0270] Another aspect of this application provides a computer program product containing instructions that, when run on a computer or processor, cause the computer or processor to perform actions such as Figures 2 to 10 The steps in the method described in the illustrated embodiment.

[0271] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0272] In the several embodiments provided in this application, 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 an indirect coupling or communication connection between apparatuses or units through some interfaces, and may be electrical, mechanical, or other forms.

[0273] 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.

[0274] Furthermore, the functional units in the various embodiments of this application 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.

[0275] 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 application, 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 described in the various embodiments of this application. 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.

Claims

1. A content recommendation method, characterized in that, include: Receive a content recommendation request, wherein the content recommendation request carries a target user identifier, and the target user identifier has a mapping relationship with a target user node; Based on the content recommendation request, the first embedding feature corresponding to the target user identifier is obtained, wherein the first embedding feature includes the deep embedding feature and the broad embedding feature of the target user node, and the deep embedding feature and the broad embedding feature of the target user node are obtained by processing the heterogeneous graph containing user nodes sequentially through a graph embedding model and a graph convolutional network. The correlation between the first embedding feature and the second embedding feature is calculated to obtain the feature correlation. The second embedding feature includes the deep embedding feature and the broad embedding feature of the target content node. The deep embedding feature and the broad embedding feature of the target content node are obtained by processing the heterogeneous graph containing the content node sequentially through the graph embedding model and the graph convolutional network. The target content node and the target content have a mapping relationship. If the feature relevance meets the content recommendation conditions, then the target content is pushed to the terminal device corresponding to the target user identifier; The heterogeneous graph containing user nodes and the heterogeneous graph containing content nodes include: a heterogeneous graph representing the relationship structure between the first user, the second user, and the content, and a heterogeneous graph representing the relationship structure between the first user, the content, and the content category tags; the first user is a user who has an interactive relationship with the content; the second user is a user who generates the content. The deep embedding features and breadth embedding features of the target user node, and the deep embedding features and breadth embedding features of the target content node, are obtained in the following ways: For each node in the corresponding heterogeneous graph, a deep embedding feature corresponding to each node is obtained through a graph embedding model. The deep embedding feature includes an embedding vector predicted based on the node and an embedding vector predicted based on the node's neighboring nodes. The deep embedding features corresponding to each node are used as input to a graph convolutional network. The graph convolutional network is used to obtain the breadth embedding features corresponding to each node. The breadth embedding features are obtained by fusing the deep embedding features of the node with the deep embedding features of the node's neighboring nodes.

2. The method according to claim 1, characterized in that, The method further includes: Obtain training data, wherein the training data is used to generate a first node set and a second node set; A target heterogeneous graph is generated based on the training data, wherein the target heterogeneous graph includes the first node set, the second node set, and the node connection edge set; For each node in the target heterogeneous graph, a deep embedding feature corresponding to each node is obtained through a graph embedding model. The deep embedding feature includes a first embedding vector predicted based on the node and a second embedding vector predicted based on the node's neighboring nodes. The deep embedding features corresponding to each node are used as input to a graph convolutional network, and the wide embedding features corresponding to each node are obtained through the graph convolutional network. The wide embedding features are obtained by fusing the deep embedding features of the node with the deep embedding features of the node's neighboring nodes. The model parameters of the graph convolutional network are updated based on the breadth embedding features and the depth embedding features corresponding to each node.

3. The method according to claim 2, characterized in that, The target heterogeneous graph includes a first heterogeneous graph and a second heterogeneous graph; The step of generating the target heterogeneous graph based on the training data includes: The first node set and the second node set are obtained based on the training data. The first node set includes a first user node, which is used to record the first user who has an interactive relationship with the content. The second node set includes a content node, a second user node, and a content tag node. The second user node is used to record the second user who generated the content, and the content tag node is used to record the content category tag to which the content belongs. Based on the first set of nodes and the second set of nodes, a first heterogeneous graph and a second heterogeneous graph are generated, wherein the first heterogeneous graph is used to represent the relationship structure between the first user, the second user and the content, and the second heterogeneous graph is used to represent the relationship structure between the first user, the content and the content category tags.

4. The method according to claim 3, characterized in that, The method further includes: Node sequence sampling is performed on the first heterogeneous graph to obtain a first heterogeneous node sequence corresponding to the first heterogeneous graph, and node sequence sampling is performed on the second heterogeneous graph to obtain a second heterogeneous node sequence corresponding to the second heterogeneous graph, wherein both the first heterogeneous node sequence and the second heterogeneous node sequence include nodes and neighboring nodes of the nodes. Based on the first heterogeneous node sequence and the second heterogeneous node sequence, multiple window node subsequences are extracted from each heterogeneous node sequence according to the preset sliding window length through the graph embedding model. Perform vector mapping processing on each node in each window node subsequence to obtain the embedding vector based on node prediction and the embedding vector based on neighbor node prediction of the node. Obtain the negative sampling node corresponding to each node in each window node subsequence, wherein the negative sampling node comes from other window node subsequences corresponding to the heterogeneous node sequence, and the negative sampling node and the node belong to the same node set; The negative sampling nodes of the node are subjected to vector mapping processing to obtain the embedding vector corresponding to the negative sampling nodes; The model parameters of the graph embedding model are updated based on the embedding vectors predicted by the nodes, the embedding vectors predicted by the neighboring nodes, and the embedding vectors corresponding to the negative sampling nodes.

5. The method according to claim 4, characterized in that, The step of sampling the node sequence of the first heterogeneous graph to obtain the first heterogeneous node sequence corresponding to the first heterogeneous graph includes: A first meta-path is generated based on the first heterogeneous graph and a preset sampling length, wherein the first meta-path includes node type, sampling order of node types, and sampling length; The first heterogeneous graph is sampled based on the first meta-path to obtain the first heterogeneous node sequence; The step of sampling the node sequence of the second heterogeneous graph to obtain the second heterogeneous node sequence corresponding to the second heterogeneous graph includes: A second meta-path is generated based on the second heterogeneous graph and a preset sampling length, wherein the second meta-path includes node type, sampling order of node types, and sampling length; The second heterogeneous graph is sampled based on the second metapath to obtain the second heterogeneous node sequence.

6. The method according to claim 5, characterized in that, The step of sampling the first heterogeneous graph according to the first meta-path to obtain the first heterogeneous node sequence includes: Obtain the first weight value corresponding to the node connection edge connecting each node to its neighboring node from the first heterogeneous graph; The first sampling probability corresponding to the neighboring nodes of each node is calculated based on the first weight value; Based on the magnitude of the first sampling probability, the node type, the sampling order of the node type, and the sampling length, the first heterogeneous node sequence is generated by traversing between each node and its neighboring nodes in the first heterogeneous graph. The step of sampling the second heterogeneous graph according to the second meta-path to obtain the second heterogeneous node sequence includes: Obtain the second weight value corresponding to the node connection edge connecting each node to its neighboring node from the second heterogeneous graph; The second sampling probability corresponding to the neighboring nodes of each node is calculated based on the second weight value; Based on the magnitude of the second sampling probability, the node type, the sampling order of the node type, and the sampling length, the second heterogeneous node sequence is generated by traversing between each node and its neighboring nodes in the second heterogeneous graph.

7. The method according to claim 3, characterized in that, The step of using the deep embedding features corresponding to each node as input to a graph convolutional network, and obtaining the breadth embedding features corresponding to each node through the graph convolutional network, includes: The first heterogeneous graph and the second heterogeneous graph are aggregated through the graph convolutional network to obtain an aggregated heterogeneous graph. The aggregated heterogeneous graph includes K levels of node layers. The neighboring nodes in each level of node layer are connected to the neighboring nodes in the next level of node layer through node edges. K is an integer greater than 1. For each node in the aggregated heterogeneous graph, the deep embedding feature of the node is fused with the deep embedding features of the neighboring nodes in the K-level node layer corresponding to the node in a K-level fusion to obtain the breadth embedding feature corresponding to each node.

8. The method according to claim 7, characterized in that, For each node in the aggregated heterogeneous graph, the deep embedding features of the node are fused with the deep embedding features of the neighboring nodes in the corresponding K-level node layer to obtain the breadth embedding features corresponding to each node, including: The mean value of the deep embedding features of each K-1 level neighbor node is calculated to obtain the aggregate features of the K-level neighbor nodes corresponding to each node, wherein the K-level neighbor nodes are nodes connected to the K-1 level neighbor nodes through node connection edges; The aggregated feature is concatenated with the deep embedding feature of the K-level neighbor node, and the concatenated embedding feature is non-linearly transformed to obtain the breadth embedding feature corresponding to the K-level neighbor node. The breadth embedding features corresponding to the K-level neighbor nodes and the embedding vectors obtained based on node prediction are concatenated, and the concatenated embedding features are nonlinearly transformed to obtain the breadth embedding features corresponding to each node.

9. The method according to claim 2, characterized in that, After updating the model parameters of the graph convolutional network based on the breadth embedding features and the depth embedding features corresponding to each node, the method further includes: When a new node is added to the target heterogeneous graph, the updated target heterogeneous graph is used as the input to the graph embedding model, and the deep embedding features corresponding to the new node are obtained through the graph embedding model. Based on the model parameters of the graph convolutional network and the deep embedding features corresponding to the new node, the breadth embedding features corresponding to the new node are obtained.

10. A content recommendation device, characterized in that, include: A receiving unit is configured to receive a content recommendation request, wherein the content recommendation request carries a target user identifier, and the target user identifier has a mapping relationship with a target user node; The acquisition unit is configured to acquire the first embedding feature corresponding to the target user identifier according to the content recommendation request, wherein the first embedding feature includes the deep embedding feature and the broad embedding feature of the target user node, and the deep embedding feature and the broad embedding feature of the target user node are obtained by processing the heterogeneous graph containing user nodes sequentially through a graph embedding model and a graph convolutional network. The processing unit is used to calculate the correlation between the first embedding feature and the second embedding feature to obtain the feature correlation. The second embedding feature includes the deep embedding feature and the broad embedding feature of the target content node. The deep embedding feature and the broad embedding feature of the target content node are obtained by processing the heterogeneous graph containing the content node sequentially through a graph embedding model and a graph convolutional network. The target content node and the target content have a mapping relationship. The processing unit is further configured to push the target content to the terminal device corresponding to the target user identifier if the feature relevance meets the content recommendation conditions; The heterogeneous graph containing user nodes and the heterogeneous graph containing content nodes include: a heterogeneous graph representing the relationship structure between the first user, the second user, and the content, and a heterogeneous graph representing the relationship structure between the first user, the content, and the content category tags; the first user is a user who has an interactive relationship with the content; the second user is a user who generates the content. The deep embedding features and breadth embedding features of the target user node, and the deep embedding features and breadth embedding features of the target content node, are obtained in the following ways: For each node in the corresponding heterogeneous graph, a deep embedding feature corresponding to each node is obtained through a graph embedding model. The deep embedding feature includes an embedding vector predicted based on the node and an embedding vector predicted based on the node's neighboring nodes. The deep embedding features corresponding to each node are used as input to a graph convolutional network. The graph convolutional network is used to obtain the breadth embedding features corresponding to each node. The breadth embedding features are obtained by fusing the deep embedding features of the node with the deep embedding features of the node's neighboring nodes.

11. The apparatus according to claim 10, characterized in that, The apparatus further includes: a generation unit; The acquisition unit is used to acquire training data, wherein the training data is used to generate a first node set and a second node set; The generation unit is used to generate a target heterogeneous graph based on the training data, wherein the target heterogeneous graph includes the first node set, the second node set, and the node connection edge set; The processing unit is further configured to obtain deep embedding features corresponding to each node in the target heterogeneous graph through a graph embedding model, wherein the deep embedding features include a first embedding vector predicted based on the node and a second embedding vector predicted based on the node's neighboring nodes. The processing unit is further configured to use the deep embedding features corresponding to each node as input to a graph convolutional network, and obtain the wide embedding features corresponding to each node through the graph convolutional network, wherein the wide embedding features are obtained by fusing the deep embedding features of the node with the deep embedding features of the node's neighboring nodes. The processing unit is further configured to update the model parameters of the graph convolutional network based on the breadth embedding features corresponding to each node and the depth embedding features corresponding to each node.

12. The apparatus according to claim 11, characterized in that, The target heterogeneous graph includes a first heterogeneous graph and a second heterogeneous graph; The generation unit is specifically used for: The first node set and the second node set are obtained based on the training data. The first node set includes a first user node, which is used to record the first user who has an interactive relationship with the content. The second node set includes a content node, a second user node, and a content tag node. The second user node is used to record the second user who generated the content, and the content tag node is used to record the content category tag to which the content belongs. Based on the first set of nodes and the second set of nodes, a first heterogeneous graph and a second heterogeneous graph are generated, wherein the first heterogeneous graph is used to represent the relationship structure between the first user, the second user and the content, and the second heterogeneous graph is used to represent the relationship structure between the first user, the content and the content category tags.

13. The apparatus according to claim 12, characterized in that, The processing unit is further configured to perform node sequence sampling on the first heterogeneous graph to obtain a first heterogeneous node sequence corresponding to the first heterogeneous graph, and to perform node sequence sampling on the second heterogeneous graph to obtain a second heterogeneous node sequence corresponding to the second heterogeneous graph, wherein the first heterogeneous node sequence and the second heterogeneous node sequence both include nodes and neighboring nodes of the nodes. The processing unit is further configured to, based on the first heterogeneous node sequence and the second heterogeneous node sequence, extract multiple window node subsequences from each heterogeneous node sequence according to the preset length of the sliding window through the graph embedding model. The processing unit is further configured to perform vector mapping processing on each node in each window node subsequence to obtain the embedding vector based on node prediction and the embedding vector based on neighbor node prediction of the node. The acquisition unit is further configured to acquire the negative sampling node corresponding to each node in each window node subsequence, wherein the negative sampling node originates from other window node subsequences corresponding to the heterogeneous node sequence, and the negative sampling node and the node belong to the same node set; The processing unit is further configured to perform vector mapping processing on the negative sampling nodes of the node to obtain the embedding vector corresponding to the negative sampling node; The processing unit is further configured to update the model parameters of the graph embedding model based on the node-based prediction embedding vector, the node-based neighbor node prediction embedding vector, and the embedding vector corresponding to the negative sampling node.

14. The apparatus according to claim 13, characterized in that, The processing unit is specifically used for: A first meta-path is generated based on the first heterogeneous graph and a preset sampling length, wherein the first meta-path includes node type, sampling order of node types, and sampling length; The first heterogeneous graph is sampled based on the first meta-path to obtain the first heterogeneous node sequence; The step of sampling the node sequence of the second heterogeneous graph to obtain the second heterogeneous node sequence corresponding to the second heterogeneous graph includes: A second meta-path is generated based on the second heterogeneous graph and a preset sampling length, wherein the second meta-path includes node type, sampling order of node types, and sampling length; The second heterogeneous graph is sampled based on the second metapath to obtain the second heterogeneous node sequence.

15. The apparatus according to claim 14, characterized in that, The processing unit is specifically used for: Obtain the first weight value corresponding to the node connection edge connecting each node to its neighboring node from the first heterogeneous graph; The first sampling probability corresponding to the neighboring nodes of each node is calculated based on the first weight value; Based on the magnitude of the first sampling probability, the node type, the sampling order of the node type, and the sampling length, the first heterogeneous node sequence is generated by traversing between each node and its neighboring nodes in the first heterogeneous graph. The processing unit is specifically used for: Obtain the second weight value corresponding to the node connection edge connecting each node to its neighboring node from the second heterogeneous graph; The second sampling probability corresponding to the neighboring nodes of each node is calculated based on the second weight value; Based on the magnitude of the second sampling probability, the node type, the sampling order of the node type, and the sampling length, the second heterogeneous node sequence is generated by traversing between each node and its neighboring nodes in the second heterogeneous graph.

16. The apparatus according to claim 12, characterized in that, The processing unit is specifically used for: The first heterogeneous graph and the second heterogeneous graph are aggregated through the graph convolutional network to obtain an aggregated heterogeneous graph. The aggregated heterogeneous graph includes K levels of node layers. The neighboring nodes in each level of node layer are connected to the neighboring nodes in the next level of node layer through node edges. K is an integer greater than 1. For each node in the aggregated heterogeneous graph, the deep embedding feature of the node is fused with the deep embedding features of the neighboring nodes in the K-level node layer corresponding to the node in a K-level fusion to obtain the breadth embedding feature corresponding to each node.

17. The apparatus according to claim 16, characterized in that, The processing unit is specifically used for: The mean value of the deep embedding features of each K-1 level neighbor node is calculated to obtain the aggregate features of the K-level neighbor nodes corresponding to each node, wherein the K-level neighbor nodes are nodes connected to the K-1 level neighbor nodes through node connection edges; The aggregated feature is concatenated with the deep embedding feature of the K-level neighbor node, and the concatenated embedding feature is non-linearly transformed to obtain the breadth embedding feature corresponding to the K-level neighbor node. The breadth embedding features corresponding to the K-level neighbor nodes and the embedding vectors obtained based on node prediction are concatenated, and the concatenated embedding features are nonlinearly transformed to obtain the breadth embedding features corresponding to each node.

18. The apparatus according to claim 11, characterized in that, The processing unit is further configured to: after updating the model parameters of the graph convolutional network according to the breadth embedding features corresponding to each node and the depth embedding features corresponding to each node, when a new node is added to the target heterogeneous graph, use the updated target heterogeneous graph as the input of the graph embedding model, and obtain the depth embedding features corresponding to the new node through the graph embedding model. The acquisition unit is further configured to acquire the breadth embedding features corresponding to the new node based on the model parameters of the graph convolutional network and the depth embedding features corresponding to the new node.

19. A computer device, characterized in that, include: Memory, transceiver, processor, and bus system; The memory is used to store programs; When the processor executes a program in the memory, it implements the content recommendation method as described in any one of claims 1-9; The bus system is used to connect the memory and the processor to enable communication between the memory and the processor.

20. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed on a computer, cause the computer to perform the content recommendation method as described in any one of claims 1-9.

21. A computer program product, characterized in that, The method includes computer instructions stored in a computer-readable storage medium; a processor of a network device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the network device to perform the content recommendation method as described in any one of claims 1-9.

Citation Information

Patent Citations

  • Social network user group classification method based on network node breadth and depth capture

    CN110163288A

  • Method and device for realizing graph embedding, computer storage medium and terminal

    CN111581442A