Video account recommendation method, device, equipment, storage medium and program product
By constructing a heterogeneous graph and an improved Graphsage model, the feature representation capability of account nodes is enhanced, solving the problem of inaccurate video account recommendations in existing technologies and achieving higher recommendation accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TENCENT TECHNOLOGY (SHENZHEN) CO LTD
- Filing Date
- 2022-04-02
- Publication Date
- 2026-05-19
AI Technical Summary
Existing technologies that recommend video accounts to users based on isomorphic graphs are not very accurate and cannot accurately recommend video accounts that users like.
By constructing a heterogeneous graph, we obtain the feature embedding vectors of account nodes and neighbor nodes in the heterogeneous graph. We then use an improved Graphsage model to enhance the feature representation capability of account nodes and recommend video accounts with high similarity based on the feature embedding vectors of account nodes.
It improves the accuracy of video account recommendations, accurately expresses the characteristic information of account nodes, and enhances the accuracy of recommended video accounts.
Smart Images

Figure CN116932873B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and more specifically, to a method, apparatus, device, storage medium, and program product for recommending video accounts. Background Technology
[0002] With the development of mobile internet, short videos are increasingly gaining user favor. Various short video platforms, such as Kandian, Weishi, and Video Accounts, are emerging in large numbers. A massive number of users shoot and upload short videos to these platforms, resulting in hundreds of millions of new short videos being generated daily. When users actually use and watch videos, they often follow and like videos posted by certain types of video accounts. For example, users who like variety shows will follow variety show video accounts, and users who like games will follow game video accounts. Current technologies that recommend video accounts to users based on isomorphic graphs suffer from low accuracy because all nodes in the isomorphic graph are of the same type. Summary of the Invention
[0003] This application addresses the shortcomings of existing methods by proposing a method, apparatus, device, computer-readable storage medium, and computer program product for recommending video accounts, aiming to solve the problem of how to improve the accuracy of recommended video accounts.
[0004] Firstly, this application provides a method for recommending video accounts, including:
[0005] Obtain a heterogeneous graph, which is used to represent the association relationships between at least two types of nodes;
[0006] Determine the first feature embedding vector of any account node in the heterogeneous graph, and the first feature embedding vectors of multiple neighboring nodes of any account node, wherein the multiple neighboring nodes are nodes of at least two types in the heterogeneous graph; the nodes of at least two types include account nodes.
[0007] Based on the first feature embedding vector of any account node and the first feature embedding vectors of multiple neighboring nodes, determine the second feature embedding vector of any account node.
[0008] Based on the second feature embedding vector of any account node, recommend video accounts corresponding to at least one account node other than any account node in the heterogeneous graph.
[0009] In one embodiment, obtaining a heterogeneous graph includes:
[0010] Obtain at least two types of nodes, including account nodes, and at least one of video nodes, tag nodes, media nodes, object feature information nodes, account category nodes, and account registration region nodes;
[0011] Identify heterogeneous edges between at least two types of nodes;
[0012] A heterogeneous graph is determined based on heterogeneous edges between at least two types of nodes.
[0013] In one embodiment, determining the first feature embedding vector of any account node in the heterogeneous graph includes:
[0014] Determine the one-hot encoded feature vectors of multiple neighboring nodes for any account node in the heterogeneous graph. The one-hot encoded feature vectors of multiple neighboring nodes are used to characterize the initial features of multiple neighboring nodes.
[0015] The one-hot encoded feature vectors of each neighbor node in a plurality of neighbor nodes are concatenated to obtain the first feature embedding vector of any account node.
[0016] In one embodiment, determining the second feature embedding vector of any account node based on the first feature embedding vector of any account node and the first feature embedding vectors of multiple neighboring nodes includes:
[0017] Based on the first feature embedding vector of any type of node, the weight corresponding to the first feature embedding vector of any type of node, the first feature embedding vector of at least one neighboring node of the node of that type, and the weight corresponding to the first feature embedding vector of at least one neighboring node, the third feature embedding vector of any type of node is obtained.
[0018] Based on the third feature embedding vector of any type of node and the third feature embedding vector of the neighboring nodes of any type of node, the fourth feature embedding vector of any type of node is obtained.
[0019] The fourth feature embedding vector of any account node and the fourth feature embedding vectors of multiple neighboring nodes of any account node are aggregated to obtain the second feature embedding vector of any account node.
[0020] In one embodiment, any type of node is an account node, and the weight corresponding to the first feature embedding vector of any type of node is determined in the following way:
[0021] Based on the first feature embedding vector of any account node, the first feature embedding vector of at least one neighbor node, and a preset first parameter, the weight corresponding to the first feature embedding vector of any account node is determined. The first parameter is used to obtain the association relationship between any account node and at least one neighbor node.
[0022] In one embodiment, any type of node is an account node. Based on the third feature embedding vector of any type of node and the third feature embedding vectors of the neighboring nodes of any type of node, a fourth feature embedding vector of any type of node is obtained, including:
[0023] The third feature embedding vector of any account node and the third feature embedding vectors of each of the multiple neighboring nodes are concatenated to obtain the concatenated feature embedding vector.
[0024] Based on the concatenated feature embedding vector and the preset second parameter, the fourth feature embedding vector of any account node is obtained. The second parameter is used to obtain the association relationship between any account node and multiple neighboring nodes.
[0025] In one embodiment, the fourth feature embedding vector of any account node and the fourth feature embedding vectors of multiple neighboring nodes of any account node are aggregated to obtain the second feature embedding vector of any account node, including:
[0026] Based on the fourth feature embedding vector of any type of node, the weight corresponding to the fourth feature embedding vector of any type of node, the fourth feature embedding vector of at least one neighboring node, and the weight corresponding to the fourth feature embedding vector of at least one neighboring node, the fifth feature embedding vector of any type of node is obtained.
[0027] Based on the fifth feature embedding vector of any account node and the fifth feature embedding vectors of each of the multiple neighboring nodes, the second feature embedding vector of any account node is obtained.
[0028] In one embodiment, based on the second feature embedding vector of any account node, video accounts corresponding to at least one account node other than any account node in the heterogeneous graph are recommended, including:
[0029] If the second feature embedding vector of any account node has a similarity greater than a preset similarity threshold with the preset second feature embedding vector of at least one account node in the heterogeneous graph other than any account node, then the video account corresponding to at least one account node will be recommended.
[0030] Secondly, this application provides a video account recommendation device, comprising:
[0031] The first processing module is used to obtain heterogeneous graphs;
[0032] The second processing module is used to determine the first feature embedding vector of any account node in the heterogeneous graph, and the first feature embedding vectors of multiple neighboring nodes of any account node, wherein the multiple neighboring nodes are at least two types of nodes in the heterogeneous graph; the at least two types of nodes include account nodes.
[0033] The third processing module is used to determine the second feature embedding vector of any account node based on the first feature embedding vector of any account node and the first feature embedding vectors of multiple neighboring nodes.
[0034] The fourth processing module is used to recommend video accounts corresponding to at least one account node in the heterogeneous graph, other than any account node, based on the second feature embedding vector of any account node.
[0035] Thirdly, this application provides an electronic device, including: a processor, a memory, and a bus;
[0036] A bus is used to connect the processor and memory;
[0037] Memory, used to store operation instructions;
[0038] A processor for executing the recommended method for video accounts according to the first aspect of this application by invoking operation instructions.
[0039] Fourthly, this application provides a computer-readable storage medium storing a computer program that is used to execute the video account recommendation method of the first aspect of this application.
[0040] Fifthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the video account recommendation method in the first aspect of this application.
[0041] The technical solution provided in this application has at least the following beneficial effects:
[0042] A heterogeneous graph is obtained, which represents the association between at least two types of nodes. A first feature embedding vector of any account node in the heterogeneous graph is determined, along with the first feature embedding vectors of multiple neighboring nodes of that account node. These neighboring nodes represent at least two types of nodes in the heterogeneous graph, including account nodes. Based on the first feature embedding vector of any account node and the first feature embedding vectors of its multiple neighboring nodes, a second feature embedding vector of that account node is determined. Thus, by using at least two types of nodes in the heterogeneous graph, the feature representation capability of any account node is enhanced, enabling accurate expression of its feature information. Specifically, the second feature embedding vector of any account node accurately expresses its feature information. Based on the second feature embedding vector of any account node, video accounts corresponding to at least one account node other than the account node in the heterogeneous graph are recommended, thereby improving the accuracy of recommending video accounts corresponding to at least one account node. Attached Figure Description
[0043] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments of this application will be briefly introduced below.
[0044] Figure 1 This is a schematic diagram of the operation flow of the Graphsage model in the existing technology;
[0045] Figure 2 This is a schematic diagram of the video account recommendation system architecture provided in an embodiment of this application;
[0046] Figure 3 A flowchart illustrating a video account recommendation method provided in this application embodiment;
[0047] Figure 4 A schematic diagram of a heterogeneous diagram provided in an embodiment of this application;
[0048] Figure 5 A schematic diagram of the structure of the improved Graphsage model provided in the embodiments of this application;
[0049] Figure 6 A flowchart illustrating another video account recommendation method provided in this application embodiment;
[0050] Figure 7 A schematic diagram of the structure of a video account recommendation device provided in an embodiment of this application;
[0051] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0052] The embodiments of this application are described below with reference to the accompanying drawings. It should be understood that the embodiments described below with reference to the accompanying drawings are exemplary descriptions for explaining the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions of the embodiments of this application.
[0053] Those skilled in the art will understand that, unless otherwise stated, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the terms “comprising” and “including” as used in embodiments of this application mean that the corresponding feature can be implemented as the presented feature, information, data, step, operation, element, and / or component, but do not exclude implementation as other features, information, data, step, operation, element, component, and / or combinations thereof supported by the art. It should be understood that when we say that an element is “connected” or “coupled” to another element, the one element can be directly connected or coupled to the other element, or it can mean that the one element and the other element establish a connection relationship through an intermediate element. Furthermore, “connected” or “coupled” as used herein can include wireless connection or wireless coupling. The term “and / or” as used herein indicates at least one of the items defined by the term; for example, “A and / or B” indicates implementation as “A,” or implementation as “B,” or implementation as “A and B.”
[0054] It is understood that in the specific implementation of this application, data related to the recommendation of video accounts is involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0055] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0056] This application provides a method for recommending video accounts within a video account recommendation system. This method relates to fields such as artificial intelligence, cloud technology, and mapping. For example, the improved Graphsage model involved in this application is an artificial neural network within the field of artificial intelligence. Application scenarios for this video account recommendation method include, but are not limited to, recommending video accounts.
[0057] Artificial intelligence (AI) is the theory, methods, technology, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use 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 a new kind of intelligent machine 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 the functions of perception, reasoning, and decision-making.
[0058] 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, as well as machine learning / deep learning, autonomous driving, and intelligent transportation.
[0059] Natural Language Processing (NLP) is an important field within computer science and artificial intelligence. It studies the theories and methods for enabling effective communication between humans and computers using natural language. NLP is a science that integrates linguistics, computer science, and mathematics. Therefore, research in this field involves natural language—the language people use in daily life—and thus it has a close relationship with linguistic research. NLP techniques typically include text processing, semantic understanding, machine translation, question answering, and knowledge graphs.
[0060] Machine Learning (ML) is a multidisciplinary field involving probability theory, statistics, approximation theory, convex analysis, and algorithm complexity theory. It specifically studies how computers can simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to endow computers with intelligence; its applications span all areas of artificial intelligence. Machine learning and deep learning typically include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and instructional learning.
[0061] Intelligent Traffic Systems (ITS), also known as Intelligent Transportation Systems, effectively integrate advanced science and technology (information technology, computer technology, data communication technology, sensor technology, electronic control technology, automatic control theory, operations research, artificial intelligence, etc.) into transportation, service control, and vehicle manufacturing. This strengthens the connection between vehicles, roads, and users, thereby forming a comprehensive transportation system that ensures safety, improves efficiency, enhances the environment, and saves energy.
[0062] To better understand and explain the solutions of the embodiments of this application, some technical terms involved in the embodiments of this application will be briefly explained below.
[0063] Graph / Network structured data naturally expresses the connections between objects and is ubiquitous in daily life and work; for example, microblogs constitute social networks between people; thousands of pages on the Internet form a web link network; and transportation between cities and countries constitutes a logistics network. As a typical non-Euclidean data type, the analysis of graph-structured data mainly focuses on node classification, link prediction, and clustering. For graph-structured data, graph embedding and graph neural networks (GNNs) are two similar research areas. Graph embedding aims to represent the nodes of a graph as a low-dimensional vector space while preserving the network's topology and node information, so that existing machine learning algorithms can be directly used in subsequent graph analysis tasks. A node in a graph neural network (GNN) can be defined by its features and related nodes. The goal of GNN is to learn a state embedding to represent the neighbor information of each node. Graph convolutional networks (GCNs), as an important branch of graph neural networks, apply convolution operations from traditional data (such as images) to graph-structured data.
[0064] Graph-structured data: A data structure that describes various complex data objects through the characteristics of entity nodes and the relationships between them. It can be represented as G = (V, E), where V is the set of nodes (vertical nodes) and E is the set of edges (horizontal nodes). Each edge contains two endpoints u and v, where u, v ∈ V. Common examples of graph-structured data include knowledge graphs, social networks, and communication networks.
[0065] Graphsage Model: The Graphsage model is a type of GCN (Graph Convolutional Network). The core idea of the Graphsage model is not to learn the embeddings (feature embedding vectors) of all nodes in a graph, but rather to learn a mapping that generates an embedding for each node. Specifically, instead of training a separate embedding vector for each vertex, the Graphsage model trains a set of aggregator functions that learn how to aggregate feature information (such as features from a vertex's local neighbors)... Figure 1 (As shown). Each aggregation function aggregates information from different hops or different search depths of a vertex. During testing or inference, the trained system uses the learned aggregation functions to generate embeddings for completely unseen vertices. The Graphsage model's operation flow is as follows: Figure 1 As shown, it can be divided into three steps: 1. Neighbor vertex sampling: Sample the neighbor vertices of each vertex in the isomorphic graph. Since the degree of each node is not consistent, a fixed number of neighbors are sampled for each node in order to achieve computational efficiency; 2. Aggregate the feature information of neighbor vertices: Aggregate the information contained in the neighbor vertices according to the aggregation function; 3. Use the aggregated features to predict the graph node information and obtain the vector representation of each vertex in the isomorphic graph for use by downstream tasks.
[0066] One-hot encoding: One-hot encoding is typically used to handle features where there is no size relationship between categories. For example, a feature has four categories (A, B, AB, O); using one-hot encoding, this feature can be transformed into a 4-dimensional sparse vector, where A is represented as (1,0,0,0), B as (0,1,0,0), AB as (0,0,1,0), and O as (0,0,0,1).
[0067] ReLU function: Linear rectification function, also known as modified linear unit, is a commonly used activation function in artificial neural networks. It usually refers to nonlinear functions represented by the ramp function and its variants.
[0068] Vertical category: Vertical category refers to a specific field or industry term in the internet sector, which provides specific services to a limited group of people; for example, a certain platform is for art and literature users, and another platform is for male sports users.
[0069] The solutions provided in this application relate to artificial intelligence technology. The technical solutions of this application will be described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will be described below with reference to the accompanying drawings.
[0070] To better understand the solution provided in the embodiments of this application, the solution will be described below in conjunction with a specific application scenario.
[0071] In one embodiment, Figure 2 The diagram illustrates the architecture of a video account recommendation system applicable to embodiments of this application. It is understood that the video account recommendation method provided in this application can be applied to, but is not limited to, applications such as... Figure 2 In the application scenarios shown.
[0072] In this example, as Figure 2 As shown, the architecture of the video account recommendation system in this example may include, but is not limited to, terminal 10, server 20, network 30, and database 40. Terminal 10, server 20, and database 40 can interact via network 30. Server 20 obtains a heterogeneous graph, which represents the association relationships between at least two types of nodes; server 20 determines the first feature embedding vector of any account node in the heterogeneous graph, and the first feature embedding vectors of multiple neighboring nodes of any account node, wherein the multiple neighboring nodes are nodes of at least two types in the heterogeneous graph; the at least two types of nodes include account nodes; server 20 determines the second feature embedding vector of any account node based on the first feature embedding vector of any account node and the first feature embedding vectors of multiple neighboring nodes; server 20 recommends the video accounts corresponding to at least one account node other than any account node in the heterogeneous graph to terminal 10 based on the second feature embedding vector of any account node, and sends the video accounts corresponding to at least one account node to database 40.
[0073] It is understood that the above is only one example, and this embodiment is not limited here.
[0074] The terminal can be a smartphone (such as an Android phone, iOS phone, etc.), a mobile phone emulator, a tablet computer, a laptop computer, a digital broadcast receiver, a MID (Mobile Internet Device), a PDA (Personal Digital Assistant), etc. The server can be a standalone physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server or server cluster that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.
[0075] Cloud computing is a computing model that distributes computing tasks across a large pool of computers, enabling various application systems to access computing power, storage space, and information services as needed. The network providing these resources is called the "cloud." From the user's perspective, resources in the "cloud" appear infinitely scalable, readily available, on-demand, and expandable, with payment based on usage.
[0076] As a provider of fundamental cloud computing capabilities, a cloud resource pool (referred to as a cloud platform, generally called an IaaS (Infrastructure as a Service) platform) is established. Various types of virtual resources are deployed in the resource pool for external customers to choose from. The cloud resource pool mainly includes: computing devices (virtualized machines containing operating systems), storage devices, and network devices.
[0077] Based on logical function, a PaaS (Platform as a Service) layer can be deployed on top of the IaaS (Infrastructure as a Service) layer, and a SaaS (Software as a Service) layer can be deployed on top of the PaaS layer. Alternatively, SaaS can be deployed directly on top of IaaS. PaaS is a platform for running software, such as databases and web containers. SaaS refers to various types of business software, such as web portals and bulk SMS senders. Generally speaking, SaaS and PaaS are upper layers compared to IaaS.
[0078] Artificial intelligence cloud services are generally also known as AIaaS (AI as a Service). This is currently a mainstream service model for artificial intelligence platforms. Specifically, AIaaS platforms break down several common AI services and provide them as independent or packaged services in the cloud. This service model is similar to opening an AI-themed marketplace: all developers can access and use one or more AI services provided by the platform through API interfaces. Some experienced developers can also use the AI framework and AI infrastructure provided by the platform to deploy and maintain their own dedicated cloud AI services.
[0079] The aforementioned networks may include, but are not limited to, wired networks and wireless networks. Wired networks include local area networks (LANs), metropolitan area networks (MANs), and wide area networks (WANs). Wireless networks include Bluetooth, Wi-Fi, and other networks that enable wireless communication. Specific details can be determined based on actual application scenario requirements and are not limited here.
[0080] See Figure 3 , Figure 3 This illustration shows a flowchart of a video account recommendation method provided in an embodiment of this application. This method can be executed by any electronic device, such as a server. As an optional implementation, the method can be executed by a server. For ease of description, the following descriptions of some optional embodiments will use a server as the execution subject of the method. Figure 3 As shown in the embodiments of this application, the method for recommending video accounts includes the following steps:
[0081] S201, Obtain a heterogeneous graph, which is used to represent the association between at least two types of nodes.
[0082] Specifically, heterogeneous graphs can be graph-structured data, and can include various types of nodes, such as account nodes, video nodes, tag nodes, media nodes, object feature information nodes, account category nodes, account registration region nodes, etc. Two nodes in a heterogeneous graph can form a heterogeneous edge. For example, ... Figure 4 As shown, the heterogeneous graph includes account node A, account node B, video node, tag node and media node. The neighboring nodes of account node A are account node B, video node, tag node and media node.
[0083] S202, determine the first feature embedding vector of any account node in the heterogeneous graph, and the first feature embedding vectors of multiple neighboring nodes of any account node, wherein the multiple neighboring nodes are nodes of at least two types in the heterogeneous graph; the nodes of at least two types include account nodes.
[0084] Specifically, the neighboring nodes of any account node are the nodes directly connected to that account node. Multiple neighboring nodes can be of various types, such as account nodes, video nodes, tag nodes, and media nodes. The multiple neighboring nodes of any account node can be a subset of all its neighboring nodes.
[0085] S203, based on the first feature embedding vector of any account node and the first feature embedding vectors of multiple neighboring nodes, determine the second feature embedding vector of any account node.
[0086] Specifically, the first feature embedding vector of any account node can be used to represent the content features of the account corresponding to that account node. The content features of the account can include videos posted by the account, account tags, account categories, etc. Aggregating the first feature embedding vector of any account node and the first feature embedding vectors of multiple neighboring nodes enhances the feature representation capability of any account node, enabling accurate expression of the feature information of any account node. That is, the second feature embedding vector of any account node accurately expresses the feature information of any account node.
[0087] S204, based on the second feature embedding vector of any account node, recommend video accounts corresponding to at least one account node other than any account node in the heterogeneous graph.
[0088] Specifically, in addition to any single account node, the heterogeneous graph can also include multiple account nodes. To determine the similarity between any single account node and multiple account nodes, the similarities can be sorted from highest to lowest. The account node corresponding to the highest similarity in the sorted graph is then considered a similar account node to that single account node, and the video account corresponding to that at least one similar account node is recommended.
[0089] In this embodiment, a heterogeneous graph is obtained, which is used to represent the association between at least two types of nodes. A first feature embedding vector of any account node in the heterogeneous graph and first feature embedding vectors of multiple neighboring nodes of any account node are determined, wherein the multiple neighboring nodes are nodes of at least two types in the heterogeneous graph; the at least two types of nodes include account nodes. Based on the first feature embedding vector of any account node and the first feature embedding vectors of multiple neighboring nodes, a second feature embedding vector of any account node is determined. In this way, by using at least two types of nodes in the heterogeneous graph, the feature representation capability of any account node is enhanced, and the feature information of any account node is accurately expressed. That is, the feature information of any account node is accurately expressed by the second feature embedding vector of any account node. Based on the second feature embedding vector of any account node, the video accounts corresponding to at least one account node other than any account node in the heterogeneous graph are recommended, thereby improving the accuracy of recommending video accounts corresponding to at least one account node.
[0090] In one embodiment, obtaining the heterogeneous graph includes steps A1-A3:
[0091] Step A1: Obtain at least two types of nodes, including account nodes, and at least one of video nodes, tag nodes, media nodes, object feature information nodes, account category nodes, and account registration region nodes.
[0092] Specifically, the video node corresponds to video content posted by the account; the tag node corresponds to tags that are video tag information; the media node corresponds to media that is the source of the account; the account category node corresponds to account category that is the account's category; and the account registration region node corresponds to account registration region that is the account's registered region. Each account has an audience that likes a certain direction or aspect. For example, the audience that follows a certain account is mostly women who like cosmetics. The characteristic information of this type of user is the object characteristic information corresponding to the object characteristic information node.
[0093] Step A2: Identify heterogeneous edges between at least two types of nodes.
[0094] Specifically, heterogeneous edges between various types of nodes are identified. These heterogeneous edges can be account-to-account, account-to-video, account-to-tag, account-to-media, etc.
[0095] Heterogeneous edges can be account-to-account, for example, the two nodes that make up a heterogeneous edge are account A and account B. Account-to-account can be constructed by the user's behavior of following account A and account B. For example, if a user follows account A 100 times and follows account B 50 times, a heterogeneous edge is constructed through account A and account B.
[0096] Heterogeneous edges can be account-video pairs. For example, the two nodes that make up a heterogeneous edge are account C and video D. An account-video pair can be constructed from the video content published by account C.
[0097] Heterogeneous edges can be account-tag pairs. For example, the two nodes that make up a heterogeneous edge are account E and tag F. We can collect and summarize the tag information of the videos posted by account E, select the tags that are ranked first, and construct an account-tag pair.
[0098] Heterogeneous edges can be account-media pairs. For example, the two nodes that make up a heterogeneous edge are account G and media H. An account-media pair can be constructed from the source (media H) to which account G belongs.
[0099] Step A3: Determine the heterogeneous graph based on the heterogeneous edges between at least two types of nodes.
[0100] Specifically, a heterogeneous graph is constructed using multiple heterogeneous edges.
[0101] In one embodiment, determining the first feature embedding vector of any account node in the heterogeneous graph includes steps B1-B2:
[0102] Step B1: Determine the one-hot encoded feature vectors of multiple neighboring nodes of any account node in the heterogeneous graph. The one-hot encoded feature vectors of multiple neighboring nodes are used to characterize the initial features of multiple neighboring nodes.
[0103] Specifically, for example, if an account node A connects to 10 neighboring nodes, the one-hot encoded feature vectors of the four neighboring nodes with the highest weights (these four neighboring nodes are account node B, video node C, tag node D, and media node E) can be concatenated to obtain the first feature embedding vector of account node A. The weights can be determined based on the user's attention. For example, if 100 users follow account B, 50 users follow account F, and 10 users follow account G, then account B has the highest attention among account B, account F, and account G, and the account node B corresponding to account B is the neighboring node with the highest weight.
[0104] Step B2 involves concatenating the one-hot encoded feature vectors of each neighbor node among multiple neighbor nodes to obtain the first feature embedding vector of any account node.
[0105] Specifically, for example, neighboring nodes can be represented as 100-dimensional one-hot encoded feature vectors, which can be represented as [0,0,0,…,1], etc. The one-hot encoded feature vectors of account node B, video node C, tag node D, and media node E are concatenated to obtain the 400-dimensional feature embedding vector of account node A, which is the first feature embedding vector of account node A.
[0106] In one embodiment, determining the second feature embedding vector of any account node based on the first feature embedding vector of any account node and the first feature embedding vectors of multiple neighboring nodes includes steps C1-C3:
[0107] Step C1: Based on the first feature embedding vector of any type of node, the weight corresponding to the first feature embedding vector of any type of node, the first feature embedding vector of at least one neighboring node of the node of that type, and the weight corresponding to the first feature embedding vector of at least one neighboring node, the third feature embedding vector of any type of node is obtained.
[0108] Specifically, for example Figure 5 As shown, the improved Graphsage model consists of three layers. The first layer is the input layer, which is used to construct a heterogeneous graph. The input of the first layer consists of heterogeneous edges between nodes of various types, such as account-account, account-video, account-tag, and account-media. The output of the first layer is a heterogeneous graph, which includes account nodes (puin field), video nodes (video field), tag nodes (tag field), and media nodes (media field).
[0109] The second of these three layers is the first aggregation layer, and the third of these three layers is the second aggregation layer. The second aggregation layer has the same structure as the first aggregation layer. The first aggregation layer includes a Field-level Func module and a Full connection and ReLU module.
[0110] The first feature embedding vector of any account node, the weight corresponding to the first feature embedding vector of any account node, the first feature embedding vector of at least one neighboring node whose node type is account node, and the weight corresponding to the first feature embedding vector of at least one neighboring node are used to calculate the third feature embedding vector of any account node through the Field-level Func module in the first aggregation layer. calculate As shown in formula (1):
[0111]
[0112] Where k=1 represents the first aggregation layer, p represents an account node, l represents the sum of the number of any account node and at least one neighbor node of type account node, and the first feature embedding vector of any account node is p. h The first feature embedding vector p of any account node h The corresponding weight is The first feature embedding vectors of at least one neighboring node of the node type "account node" are p1, p2, ..., p1, respectively. l The weights corresponding to the first feature embedding vectors of at least one neighboring node are respectively The number of at least one neighboring node is l-1.
[0113] For example, if any account node is connected to 100 nodes, meaning these 100 nodes are multiple neighbor nodes, and 20 of these 100 nodes are of the account node type, then l-1 nodes can be selected from these 20 nodes as at least one neighbor node of the account node type.
[0114] In one embodiment, the first feature embedding vector of any video node, the weight corresponding to the first feature embedding vector of any video node, the first feature embedding vectors of at least one neighboring node whose node type is video node, and the weights corresponding to the first feature embedding vectors of at least one neighboring node are used to calculate the third feature embedding vector of any account node through the Field-levelFunc module in the first aggregation layer. In this context, at least one neighboring node of a video node is a neighboring node of any video node, k=1 represents the first aggregation layer, and v represents a video node.
[0115] The third feature embedding vector of any video node is calculated using the Field-level Func module in the first aggregation layer. calculate As shown in formula (2):
[0116]
[0117] Where k=1 represents the first aggregation layer, v represents the label, l represents the sum of the number of any video node and at least one neighboring node of type video node, and the first feature embedding vector of any video node is v. h The first feature embedding vector v of any video node h The corresponding weight is The first feature embedding vectors of at least one neighboring node of the node type being video node are v1, v2, ... v l The weights corresponding to the first feature embedding vectors of at least one neighboring node are respectively The number of at least one neighboring node is l-1.
[0118] In one embodiment, the first feature embedding vector of any label node, the weight corresponding to the first feature embedding vector of any label node, the first feature embedding vectors of at least one neighboring node whose node type is label node, and the weights corresponding to the first feature embedding vectors of at least one label node are used to calculate the third feature embedding vector of any label node through the Field-levelFunc module in the first aggregation layer. In this context, at least one neighboring node of the node type label node is a neighboring node of any label node, k=1 represents the first aggregation layer, and t represents the label node.
[0119] The third feature embedding vector of any label node is calculated using the Field-level Func module in the first aggregation layer. calculate As shown in formula (3):
[0120]
[0121] Where k=1 represents the first aggregation layer, t represents the label, l represents the sum of the number of any label node and at least one neighbor node of type label node, and the first feature embedding vector of any label node is t. h The first feature embedding vector t of any label node h The corresponding weight is The first feature embedding vectors of at least one neighbor node of the node type label node are t1, t2…t l The weights corresponding to the first feature embedding vectors of at least one neighboring node are respectively The number of at least one neighboring node is l-1.
[0122] In one embodiment, the first feature embedding vector of any media node, the weight corresponding to the first feature embedding vector of any media node, the first feature embedding vectors of at least one neighboring node whose node type is media node, and the weights corresponding to the first feature embedding vectors of at least one media node are used to calculate the third feature embedding vector of any media node through the Field-levelFunc module in the first aggregation layer. In this context, at least one neighboring node of a node type that is a media node is a neighboring node of any media node, k=1 represents the first aggregation layer, and m represents a media node.
[0123] The third feature embedding vector of any media node is calculated using the Field-level Func module in the first aggregation layer. calculate As shown in formula (4):
[0124]
[0125] Where k=1 represents the first aggregation layer, m represents the media, l represents the sum of the number of any media node and at least one neighboring node of type media node, and the first feature embedding vector of any media node is m. h The first feature embedding vector m of any media node h The corresponding weight is The first feature embedding vectors of at least one neighboring node of the node type being a media node are m1, m2, ... m l The weights corresponding to the first feature embedding vectors of at least one neighboring node are respectively The number of at least one neighboring node is l-1.
[0126] Step C2: Based on the third feature embedding vector of any type of node and the third feature embedding vector of the neighboring nodes of any type of node, obtain the fourth feature embedding vector of any type of node.
[0127] Specifically, the third feature embedding vector of any account node, and the third feature embedding vectors of each of its multiple neighboring nodes, are used to calculate the fourth feature embedding vector y of any account node through the Full connection and ReLU module in the first aggregation layer. k Calculate y k As shown in formula (5):
[0128]
[0129] Where ReLU is the ReLU function, W n W is the second parameter. n It can be a learnable parameter matrix. This means concatenating the third feature embedding vector of any account node with the third feature embedding vectors of each of the neighboring nodes.
[0130] For example, the learnable parameter matrix has a dimension of 2x3, and the learnable parameter matrix is shown below:
[0131] [[-0.82452497-0.82452497-0.82452497]
[0132] [-0.01143752-0.01143752-0.01143752]].
[0133] For example, any account node is connected to 100 nodes, meaning these 100 nodes are the neighbor nodes of that account node. From these 100 nodes, 20 nodes are selected to represent four types of nodes (account nodes, video nodes, tag nodes, and media nodes). These 20 nodes include 5 account nodes (each of the 5 account nodes corresponds to one...). ), 5 video nodes (each of the 5 video nodes corresponds to 1 ), 5 tag nodes (each of the 5 tag nodes corresponds to 1 ) and 5 media nodes (each of the 5 media nodes corresponds to 1 This involves combining these 20 nodes and 1 account node (any account node), resulting in 21 nodes. Finally, the y-value of any account node is obtained. k .in, and All dimensions are the same, for example, and The dimension can be 100.
[0134] Five video nodes Taking the average, we obtain data with dimension 100: [-0.82452497-0.82452497-0.82452497...-0.01143752-0.01143752]; This is used to analyze the data from the 6 account nodes. Taking the average, we obtain data with dimension 100: [-0.2324673-0.72125972-0.2479342...-0.763237512-0.22246112]. Then, we extract the values from the 5 tag nodes. Taking the average, we obtain data with dimension 100: [0.32479-0.11333452 0.47895341...0.1123690035 0.235462465]. Then, we extract the values from the 5 media nodes. Taking the average, we get a data set with 100 dimensions: [0.68924 -0.111359746 -0.211119397623 ... -0.454363888 -0.11434689]. Concatenating these four 100-dimensional data sets yields a data set with 400 dimensions: [-0.82452497 -0.82452497 -0.82452497 ... -0.01143752 -0.01143752 -0.2324673 -0.72125972 -0.2479342 ... -0.763237512 -0.22246112]. 0.32479-0.113334520.47895341...0.1123690035 0.235462465-0.82452497-0.82452497-0.82452497...-0.454363888-0.11434689).
[0135] Step C3: Aggregate the fourth feature embedding vector of any account node and the fourth feature embedding vectors of multiple neighboring nodes of any account node to obtain the second feature embedding vector of any account node.
[0136] Specifically, the structure of the second clustering layer is exactly the same as that of the first clustering layer. The fourth feature embedding vector y for any account node... k Where k = 1, i.e., y k =y1; The fourth feature embedding vector y1 of any account node, and the fourth feature embedding vectors of multiple neighboring nodes of any account node are used as inputs to the second aggregation layer, and aggregated to obtain the output of the second aggregation layer, which is the second feature embedding vector y1 of any account node. k Where k = 2, i.e., y k =y2.
[0137] In one embodiment, any type of node is an account node, and the weight corresponding to the first feature embedding vector of any type of node is determined in the following way:
[0138] Based on the first feature embedding vector of any account node, the first feature embedding vector of at least one neighbor node, and a preset first parameter, the weight corresponding to the first feature embedding vector of any account node is determined. The first parameter is used to obtain the association relationship between any account node and at least one neighbor node.
[0139] Specifically, the weights corresponding to the first feature embedding vector of any account node are calculated as shown in formula (6):
[0140]
[0141] in, The first parameter is preset. This can be a learnable parameter matrix for account nodes; feature embedding vector p j The corresponding account node is the feature embedding vector p i The neighboring nodes of the corresponding account node, n = l, j ≠ i.
[0142] In one embodiment, any type of node is an account node. Based on the third feature embedding vector of any account node and the third feature embedding vectors of the neighboring nodes of any type of node, a fourth feature embedding vector of any type of node is obtained, including steps D1-D2:
[0143] Step D1: The third feature embedding vector of any account node and the third feature embedding vectors of each neighbor node in the multiple neighbor nodes are concatenated to obtain the concatenated feature embedding vector.
[0144] Specifically, the third feature embedding vector of any account node, and the third feature embedding vectors of each of its multiple neighboring nodes, are used to calculate the fourth feature embedding vector y of any account node through the Full connection and ReLU module in the first aggregation layer. k Calculate y k As shown in formula (5):
[0145]
[0146] Where ReLU is the ReLU function, W n W is the second parameter. n It can be a learnable parameter matrix. This means concatenating the third feature embedding vector of any account node with the third feature embedding vectors of each of the neighboring nodes to obtain the concatenated feature embedding vector.
[0147] Step D2: Based on the concatenated feature embedding vector and the preset second parameter, obtain the fourth feature embedding vector of any account node. The second parameter is used to obtain the association relationship between any account node and multiple neighboring nodes.
[0148] Specifically, based on the concatenated feature embedding vector and the preset second parameter W n The fourth feature embedding vector y of any account node is obtained by using the ReLU function. k .
[0149] In one embodiment, the fourth feature embedding vector of any account node and the fourth feature embedding vectors of multiple neighboring nodes of any account node are aggregated to obtain the second feature embedding vector of any account node, including steps E1-E2:
[0150] Step E1: Based on the fourth feature embedding vector of any type of node, the weight corresponding to the fourth feature embedding vector of any type of node, the fourth feature embedding vector of at least one neighboring node, and the weight corresponding to the fourth feature embedding vector of at least one neighboring node, the fifth feature embedding vector of any type of node is obtained.
[0151] Specifically, based on the same calculation method of formulas (1), (2), (3), (4), and (6), where k = 2, k = 2 represents the second aggregation layer, p h Let y1 be the fourth feature embedding vector of any account node, and p be the fourth feature embedding vector of any account node. h The corresponding weight is The fourth feature embedding vectors of at least one neighbor node of the node type "account node" are p1, p2...p l (p1, p2...p l The values of all are the outputs of the first aggregation layer), and the weights corresponding to the fourth feature embedding vectors of at least one neighboring node are respectively Given that the number of at least one neighboring node is l-1, the fifth feature embedding vector of any account node can be calculated as follows:
[0152] Step E2: Based on the fifth feature embedding vector of any account node and the fifth feature embedding vectors of each of the multiple neighboring nodes, the second feature embedding vector of any account node is obtained.
[0153] Specifically, based on the same calculation method as formula (5), the second feature embedding vector y of any account node is obtained. k Where k = 2, i.e., y k =y2.
[0154] In one embodiment, based on the second feature embedding vector of any account node, video accounts corresponding to at least one account node other than any account node in the heterogeneous graph are recommended, including:
[0155] If the second feature embedding vector of any account node has a similarity greater than a preset similarity threshold with the preset second feature embedding vector of at least one account node in the heterogeneous graph other than any account node, then the video account corresponding to at least one account node will be recommended.
[0156] Specifically, in addition to any single account node, the heterogeneous graph can also include multiple account nodes. To determine the similarity between any single account node and multiple account nodes, the similarities can be sorted from highest to lowest. The account node corresponding to the highest similarity in the sorted graph is then considered a similar account node to that single account node, and the video account corresponding to that at least one similar account node is recommended.
[0157] In one embodiment, during the training of the improved Graphsage model, the output of the third layer of the improved Graphsage model is y. k =y2, if the preset loss function is less than the preset threshold, then the training of the improved Graphsage model is complete; if the preset loss function is greater than or equal to the preset threshold, then the parameters are adjusted, for example... and W n We continued training the improved Graphsage model.
[0158] Applying the embodiments of this application has at least the following beneficial effects:
[0159] Based on the improved Graphsage model, the feature representation capability of any account node is enhanced by using at least two types of nodes in the heterogeneous graph, achieving accurate expression of the feature information of any account node. Specifically, the feature information of any account node is accurately expressed using the second feature embedding vector of any account node. Based on the second feature embedding vector of any account node, video accounts corresponding to at least one account node other than any account node in the heterogeneous graph are recommended, thereby improving the accuracy of recommending video accounts corresponding to at least one account node. Among them, the improved Graphsage model adopts two aggregation layers (first aggregation layer and second aggregation layer), which improves the model performance and increases the model's ability to aggregate neighbors.
[0160] To better understand the methods provided in the embodiments of this application, the solutions of the embodiments of this application will be further explained below with reference to specific application scenarios.
[0161] The method provided in this application embodiment can be applied to scenarios that recommend video accounts, such as scenarios that recommend short video accounts.
[0162] In one embodiment, an evaluation set was constructed from the behavioral sequences of accounts followed by actual users. The training set used sequences of accounts followed by 50 million users, and the test set used sequences of accounts followed by another 5 million users. In actual testing, the improved Graphsage model returned the top N similar accounts (each corresponding to at least one account node) ranked by similarity, using the user's first followed account (which corresponds to any account node) as the retrieval method. The hit rate (HitRate) of these N accounts with the user's actual followed account sequence was calculated. Regarding the performance of the improved Graphsage model, the evaluation set tested both the currently used online DNN (Deep Neural Networks) model and the improved Graphsage model. Compared to the DNN model, the improved Graphsage model increased the HitRate (top50) from 9.21% to 12.93%, an improvement of approximately 3.7 percentage points.
[0163] See Figure 6 , Figure 6 This illustration shows a flowchart of a video account recommendation method provided in an embodiment of this application. This method can be executed by any electronic device, such as a server. As an optional implementation, the method can be executed by a server. For ease of description, the following descriptions of some optional embodiments will use a server as the execution subject of the method. Figure 6 As shown in the embodiments of this application, the method for recommending video accounts includes the following steps:
[0164] S401 retrieves various types of nodes, including account nodes, video nodes, tag nodes, and media nodes.
[0165] S402 constructs heterogeneous edges between various types of nodes.
[0166] S403, input each heterogeneous edge into the input layer of the improved Graphsage model to obtain a heterogeneous graph.
[0167] S404, determine the first feature embedding vector of an account node in the heterogeneous graph, and the first feature embedding vectors of multiple neighboring nodes of the account node.
[0168] S405 uses a two-layer aggregation layer of the improved Graphsage model to aggregate the first feature embedding vector of the account node and the first feature embedding vectors of multiple neighboring nodes to obtain the second feature embedding vector of the account node.
[0169] S406, if the similarity between the second feature embedding vector of the account node and the second feature embedding vectors of multiple account nodes other than the account node in the heterogeneous graph is greater than a preset similarity threshold, then the short video accounts corresponding to the multiple account nodes will be recommended.
[0170] Applying the embodiments of this application has at least the following beneficial effects:
[0171] Based on the improved Graphsage model, the feature representation capability of a certain account node is enhanced by using multiple types of nodes in the heterogeneous graph, so as to accurately express the feature information of the account node. That is, the feature information of the account node is accurately expressed by the second feature embedding vector of the account node. Based on the second feature embedding vector of the account node, the short video accounts corresponding to multiple account nodes in the heterogeneous graph are recommended respectively, thereby improving the accuracy of recommending short video accounts corresponding to multiple account nodes.
[0172] This application also provides a video account recommendation device, the structural schematic diagram of which is shown below. Figure 7 As shown, the video account recommendation device 50 includes a first processing module 501, a second processing module 502, a third processing module 503, and a fourth processing module 504.
[0173] The first processing module 501 is used to acquire heterogeneous graphs;
[0174] The second processing module 502 is used to determine the first feature embedding vector of any account node in the heterogeneous graph, and the first feature embedding vectors of multiple neighboring nodes of any account node, wherein the multiple neighboring nodes are at least two types of nodes in the heterogeneous graph; the at least two types of nodes include account nodes.
[0175] The third processing module 503 is used to determine the second feature embedding vector of any account node based on the first feature embedding vector of any account node and the first feature embedding vectors of multiple neighboring nodes.
[0176] The fourth processing module 504 is used to recommend video accounts corresponding to at least one account node in the heterogeneous graph, other than any account node, based on the second feature embedding vector of any account node.
[0177] In one embodiment, the first processing module 501 is specifically used for:
[0178] Obtain at least two types of nodes, including account nodes, and at least one of video nodes, tag nodes, media nodes, object feature information nodes, account category nodes, and account registration region nodes;
[0179] Identify heterogeneous edges between at least two types of nodes;
[0180] A heterogeneous graph is determined based on heterogeneous edges between at least two types of nodes.
[0181] In one embodiment, the second processing module 502 is specifically configured to include:
[0182] Determine the one-hot encoded feature vectors of multiple neighboring nodes for any account node in the heterogeneous graph. The one-hot encoded feature vectors of multiple neighboring nodes are used to characterize the initial features of multiple neighboring nodes.
[0183] The one-hot encoded feature vectors of each neighbor node in a plurality of neighbor nodes are concatenated to obtain the first feature embedding vector of any account node.
[0184] In one embodiment, the third processing module 503 is specifically used for:
[0185] Based on the first feature embedding vector of any type of node, the weight corresponding to the first feature embedding vector of any type of node, the first feature embedding vector of at least one neighboring node of the node of that type, and the weight corresponding to the first feature embedding vector of at least one neighboring node, the third feature embedding vector of any type of node is obtained.
[0186] Based on the third feature embedding vector of any type of node and the third feature embedding vector of the neighboring nodes of any type of node, the fourth feature embedding vector of any type of node is obtained.
[0187] The fourth feature embedding vector of any account node and the fourth feature embedding vectors of multiple neighboring nodes of any account node are aggregated to obtain the second feature embedding vector of any account node.
[0188] In one embodiment, any type of node is an account node, and the weight corresponding to the first feature embedding vector of any type of node is determined in the following way:
[0189] Based on the first feature embedding vector of any account node, the first feature embedding vector of at least one neighbor node, and a preset first parameter, the weight corresponding to the first feature embedding vector of any account node is determined. The first parameter is used to obtain the association relationship between any account node and at least one neighbor node.
[0190] In one embodiment, any type of node is an account node, and the third processing module 503 is specifically used for:
[0191] The third feature embedding vector of any account node and the third feature embedding vectors of each of the multiple neighboring nodes are concatenated to obtain the concatenated feature embedding vector.
[0192] Based on the concatenated feature embedding vector and the preset second parameter, the fourth feature embedding vector of any account node is obtained. The second parameter is used to obtain the association relationship between any account node and multiple neighboring nodes.
[0193] In one embodiment, the third processing module 503 is specifically used for:
[0194] Based on the fourth feature embedding vector of any type of node, the weight corresponding to the fourth feature embedding vector of any type of node, the fourth feature embedding vector of at least one neighboring node, and the weight corresponding to the fourth feature embedding vector of at least one neighboring node, the fifth feature embedding vector of any type of node is obtained.
[0195] Based on the fifth feature embedding vector of any account node and the fifth feature embedding vectors of each of the multiple neighboring nodes, the second feature embedding vector of any account node is obtained.
[0196] In one embodiment, the fourth processing module 504 is specifically used for:
[0197] If the second feature embedding vector of any account node has a similarity greater than a preset similarity threshold with the preset second feature embedding vector of at least one account node in the heterogeneous graph other than any account node, then the video account corresponding to at least one account node will be recommended.
[0198] Applying the embodiments of this application has at least the following beneficial effects:
[0199] A heterogeneous graph is obtained, which represents the association between at least two types of nodes. A first feature embedding vector of any account node in the heterogeneous graph is determined, along with the first feature embedding vectors of multiple neighboring nodes of that account node. These neighboring nodes represent at least two types of nodes in the heterogeneous graph, including account nodes. Based on the first feature embedding vector of any account node and the first feature embedding vectors of its multiple neighboring nodes, a second feature embedding vector of that account node is determined. Thus, by using at least two types of nodes in the heterogeneous graph, the feature representation capability of any account node is enhanced, enabling accurate expression of its feature information. Specifically, the second feature embedding vector of any account node accurately expresses its feature information. Based on the second feature embedding vector of any account node, video accounts corresponding to at least one account node other than the account node in the heterogeneous graph are recommended, thereby improving the accuracy of recommending video accounts corresponding to at least one account node.
[0200] This application also provides an electronic device, the structural schematic diagram of which is shown below. Figure 8 As shown, Figure 8 The illustrated electronic device 4000 includes a processor 4001 and a memory 4003. The processor 4001 and the memory 4003 are connected, for example, via a bus 4002. Optionally, the electronic device 4000 may further include a transceiver 4004, which can be used for data interaction between the electronic device and other electronic devices, such as sending and / or receiving data. It should be noted that in practical applications, the transceiver 4004 is not limited to one type, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of this application.
[0201] Processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 4001 may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.
[0202] Bus 4002 may include a pathway for transmitting information between the aforementioned components. Bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. Bus 4002 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 8 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0203] The memory 4003 may be ROM (Read Only Memory) or other types of static storage devices capable of storing static information and instructions, RAM (Random Access Memory) or other types of dynamic storage devices capable of storing information and instructions, or EEPROM (Electrically Erasable Programmable Read Only Memory), CD-ROM (Compact Disc Read Only Memory) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media, other magnetic storage devices, or any other medium capable of carrying or storing computer programs and capable of being read by a computer, without limitation herein.
[0204] The memory 4003 stores computer programs that execute embodiments of this application, and its execution is controlled by the processor 4001. The processor 4001 executes the computer programs stored in the memory 4003 to implement the steps shown in the foregoing method embodiments.
[0205] Electronic devices include, but are not limited to, servers.
[0206] Applying the embodiments of this application has at least the following beneficial effects:
[0207] A heterogeneous graph is obtained, which represents the association between at least two types of nodes. A first feature embedding vector of any account node in the heterogeneous graph is determined, along with the first feature embedding vectors of multiple neighboring nodes of that account node. These neighboring nodes represent at least two types of nodes in the heterogeneous graph, including account nodes. Based on the first feature embedding vector of any account node and the first feature embedding vectors of its multiple neighboring nodes, a second feature embedding vector of that account node is determined. Thus, by using at least two types of nodes in the heterogeneous graph, the feature representation capability of any account node is enhanced, enabling accurate expression of its feature information. Specifically, the second feature embedding vector of any account node accurately expresses its feature information. Based on the second feature embedding vector of any account node, video accounts corresponding to at least one account node other than the account node in the heterogeneous graph are recommended, thereby improving the accuracy of recommending video accounts corresponding to at least one account node.
[0208] This application provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it can implement the steps and corresponding content of the aforementioned method embodiments.
[0209] This application also provides a computer program product, including a computer program that, when executed by a processor, can implement the steps and corresponding content of the aforementioned method embodiments.
[0210] Based on the same principles as the methods provided in the embodiments of this application, the embodiments of this application also provide a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in any of the optional embodiments of this application described above.
[0211] It should be understood that although arrows indicate various operation steps in the flowcharts of this application's embodiments, the order in which these steps are implemented is not limited to the order indicated by the arrows. Unless explicitly stated herein, in some implementation scenarios of this application's embodiments, the implementation steps in each flowchart can be executed in other orders as required. Furthermore, some or all steps in each flowchart, based on the actual implementation scenario, may include multiple sub-steps or multiple stages. Some or all of these sub-steps or stages can be executed at the same time, and each sub-step or stage can also be executed at different times. In scenarios where execution times differ, the execution order of these sub-steps or stages can be flexibly configured according to requirements, and this application's embodiments do not limit this.
[0212] The above description is only an optional implementation method for some implementation scenarios of this application. It should be noted that for those skilled in the art, other similar implementation methods based on the technical concept of this application without departing from the technical concept of this application also fall within the protection scope of the embodiments of this application.
Claims
1. A method for recommending video accounts, characterized in that, include: Obtain a heterogeneous graph, which is used to represent the association between at least two types of nodes. The at least two types of nodes include at least one of video nodes, tag nodes, media nodes, object feature information nodes, account category nodes, account registration region nodes, and account nodes. Determine the first feature embedding vector of any account node in the heterogeneous graph, and the first feature embedding vectors of multiple neighboring nodes of the account node, wherein the multiple neighboring nodes are at least two types of nodes in the heterogeneous graph; the first feature embedding vector of any account node is used to characterize the content features of the account corresponding to the account node. Based on the first feature embedding vector of any account node and the first feature embedding vectors of the plurality of neighboring nodes, determine the second feature embedding vector of any account node; Based on the second feature embedding vector of any account node, recommend video accounts corresponding to at least one account node other than the account node in the heterogeneous graph; Determining the second feature embedding vector of any account node based on the first feature embedding vector of any account node and the first feature embedding vectors of the plurality of neighboring nodes includes: Based on the first feature embedding vector of any type of node, the weight corresponding to the first feature embedding vector of any type of node, the first feature embedding vector of at least one neighboring node of the node of that type, and the weight corresponding to the first feature embedding vector of the at least one neighboring node, the third feature embedding vector of any type of node is obtained. Based on the third feature embedding vector of any type of node and the third feature embedding vector of the neighboring nodes of any type of node, the fourth feature embedding vector of any type of node is obtained. The fourth feature embedding vector of any account node and the fourth feature embedding vectors of multiple neighboring nodes of the any account node are aggregated to obtain the second feature embedding vector of the any account node.
2. The method according to claim 1, characterized in that, The acquisition of the heterogeneous graph includes: Get at least two types of nodes; Determine heterogeneous edges between the at least two types of nodes; A heterogeneous graph is determined based on the heterogeneous edges between the at least two types of nodes.
3. The method according to claim 1, characterized in that, Determining the first feature embedding vector of any account node in the heterogeneous graph includes: Determine the one-hot encoded feature vectors of multiple neighboring nodes of any account node in the heterogeneous graph. The one-hot encoded feature vectors of the multiple neighboring nodes are used to characterize the initial features of the multiple neighboring nodes. The one-hot encoded feature vectors of each of the multiple neighboring nodes are concatenated to obtain the first feature embedding vector of any account node.
4. The method according to claim 1, characterized in that, The node of any type is an account node, and the weight corresponding to the first feature embedding vector of the node of any type is determined in the following way: Based on the first feature embedding vector of any account node, the first feature embedding vector of at least one neighbor node, and a preset first parameter, the weight corresponding to the first feature embedding vector of any account node is determined. The first parameter is used to obtain the association relationship between any account node and at least one neighbor node.
5. The method according to claim 1, characterized in that, The node of any type is an account node. The fourth feature embedding vector of the node of any type is obtained based on the third feature embedding vector of the node of any type and the third feature embedding vectors of the neighboring nodes of the node of any type, including: The third feature embedding vector of any account node and the third feature embedding vector of each of the multiple neighbor nodes are concatenated to obtain the concatenated feature embedding vector. Based on the concatenated feature embedding vector and the preset second parameter, a fourth feature embedding vector of any account node is obtained. The second parameter is used to obtain the association relationship between any account node and the multiple neighboring nodes.
6. The method according to claim 1, characterized in that, The step of aggregating the fourth feature embedding vector of any account node and the fourth feature embedding vectors of multiple neighboring nodes of the any account node to obtain the second feature embedding vector of the any account node includes: Based on the fourth feature embedding vector of any type of node, the weight corresponding to the fourth feature embedding vector of any type of node, the fourth feature embedding vector of at least one neighboring node, and the weight corresponding to the fourth feature embedding vector of at least one neighboring node, the fifth feature embedding vector of any type of node is obtained. Based on the fifth feature embedding vector of any account node and the fifth feature embedding vectors of each of the multiple neighboring nodes of the any account node, the second feature embedding vector of the any account node is obtained.
7. The method according to claim 1, characterized in that, The method of recommending video accounts corresponding to at least one account node other than the stated account node in the heterogeneous graph based on the second feature embedding vector of any account node includes: If the second feature embedding vector of any account node has a similarity greater than a preset similarity threshold with the preset second feature embedding vector of at least one account node in the heterogeneous graph other than the account node, then the video account corresponding to the at least one account node will be recommended.
8. A video account recommendation device, characterized in that, include: The first processing module is used to obtain a heterogeneous graph, which is used to represent the association between at least two types of nodes. The at least two types of nodes include at least one of video nodes, tag nodes, media nodes, object feature information nodes, account category nodes, account registration region nodes, and account nodes. The second processing module is used to determine the first feature embedding vector of any account node in the heterogeneous graph, and the first feature embedding vectors of multiple neighboring nodes of the account node, wherein the multiple neighboring nodes are at least two types of nodes in the heterogeneous graph; the first feature embedding vector of any account node is used to characterize the content features of the account corresponding to the account node. The third processing module is used to determine the second feature embedding vector of any account node based on the first feature embedding vector of any account node and the first feature embedding vectors of the plurality of neighboring nodes. The fourth processing module is used to recommend video accounts corresponding to at least one account node in the heterogeneous graph other than the stated account node, based on the second feature embedding vector of any account node. The third processing module is specifically used for: Based on the first feature embedding vector of any type of node, the weight corresponding to the first feature embedding vector of any type of node, the first feature embedding vector of at least one neighboring node of the node of that type, and the weight corresponding to the first feature embedding vector of the at least one neighboring node, the third feature embedding vector of any type of node is obtained. Based on the third feature embedding vector of any type of node and the third feature embedding vector of the neighboring nodes of any type of node, the fourth feature embedding vector of any type of node is obtained. The fourth feature embedding vector of any account node and the fourth feature embedding vectors of multiple neighboring nodes of the any account node are aggregated to obtain the second feature embedding vector of the any account node.
9. The apparatus according to claim 8, characterized in that, The first processing module is specifically used for: Get at least two types of nodes; Determine heterogeneous edges between the at least two types of nodes; A heterogeneous graph is determined based on the heterogeneous edges between the at least two types of nodes.
10. The apparatus according to claim 8, characterized in that, The second processing module is specifically used for: Determine the one-hot encoded feature vectors of multiple neighboring nodes of any account node in the heterogeneous graph. The one-hot encoded feature vectors of the multiple neighboring nodes are used to characterize the initial features of the multiple neighboring nodes. The one-hot encoded feature vectors of each of the multiple neighboring nodes are concatenated to obtain the first feature embedding vector of any account node.
11. The apparatus according to claim 8, characterized in that, The node of any type is an account node, and the weight corresponding to the first feature embedding vector of the node of any type is determined by the third processing module in the following way: Based on the first feature embedding vector of any account node, the first feature embedding vector of at least one neighbor node, and a preset first parameter, the weight corresponding to the first feature embedding vector of any account node is determined. The first parameter is used to obtain the association relationship between any account node and at least one neighbor node.
12. The apparatus according to claim 8, characterized in that, When any node of a given type is an account node, the third processing module, in obtaining the fourth feature embedding vector of any given type of node based on the third feature embedding vector of the node of that type and the third feature embedding vectors of the neighboring nodes of the node of that type, specifically performs the following: The third feature embedding vector of any account node and the third feature embedding vector of each of the multiple neighbor nodes are concatenated to obtain the concatenated feature embedding vector. Based on the concatenated feature embedding vector and the preset second parameter, a fourth feature embedding vector of any account node is obtained. The second parameter is used to obtain the association relationship between any account node and the multiple neighboring nodes.
13. The apparatus according to claim 8, characterized in that, When the third processing module aggregates the fourth feature embedding vector of any account node and the fourth feature embedding vectors of multiple neighboring nodes of the any account node to obtain the second feature embedding vector of the any account node, it is specifically used for: Based on the fourth feature embedding vector of any type of node, the weight corresponding to the fourth feature embedding vector of any type of node, the fourth feature embedding vector of at least one neighboring node, and the weight corresponding to the fourth feature embedding vector of at least one neighboring node, the fifth feature embedding vector of any type of node is obtained. Based on the fifth feature embedding vector of any account node and the fifth feature embedding vectors of each of the multiple neighboring nodes of the any account node, the second feature embedding vector of the any account node is obtained.
14. The apparatus according to claim 8, characterized in that, The fourth processing module is specifically used for: If the second feature embedding vector of any account node has a similarity greater than a preset similarity threshold with the preset second feature embedding vector of at least one account node in the heterogeneous graph other than the account node, then the video account corresponding to the at least one account node will be recommended.
15. An electronic device comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the steps of the method according to any one of claims 1-7.
16. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-7.
17. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-7.