Target object recognition method and device

By performing random walks and determining embedded vectors in the network graph, the problem of dependence on a large number of accurate label data in the prior art is solved, and the accuracy and computing efficiency of target object recognition are improved.

CN112199600BActive Publication Date: 2025-06-10TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202011184205.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-10-29
Publication Date
2025-06-10
Estimated Expiration
2040-10-29

AI Technical Summary

Technical Problem

In the prior art, the accuracy of target object recognition depends on the scale of the training data and the accuracy of the label, resulting in a low accuracy of object recognition in the absence of a large amount of accurate label data.

Method used

By constructing a network graph based on different types of objects, random walks are performed using transfer parameters, recent transfer number, maximum walk length and metapath, the sequence of walk nodes is obtained and the embedding vector of nodes is determined, thereby identifying target nodes whose similarity to seed nodes is less than the threshold.

Benefits of technology

This method can more accurately capture the context information of nodes in the graph, improve the accuracy of target object recognition, and avoid dependence on a large amount of accurate label data, saving computing overhead.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112199600B_ABST
    Figure CN112199600B_ABST
Patent Text Reader

Abstract

Describes a target object recognition method, including: obtaining a network graph constructed based on different types of objects, which includes nodes corresponding to the objects and edges between the nodes, and the weight of the edge represents the degree of association between the objects corresponding to the nodes; determining random walk parameters including a transfer parameter, a recent transfer number, a maximum walk length, and a meta-path, where the transfer parameter controls the transfer probability from the current node to a neighbor node, the recent transfer number controls the node type of the next-hop node so that it is different from the node types of the recent transfer number of nodes, the maximum walk length controls the maximum number of nodes in the random walk node sequence, and the meta-path defines the node types of the nodes passed through during the random walk; obtaining a random walk node sequence based on the random walk parameters and the weight of the edge; determining an embedding vector of the node based on the random walk node sequence; determining a target node whose similarity to the seed node is less than a threshold according to the embedding vector of the node; and recognizing the object corresponding to the target node as the target object.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for target object recognition. Background Art

[0002] With the rapid development of Internet technologies and artificial intelligence, target object recognition technologies are widely used. For example, in a scenario of recommending an object to a user (e.g., a scenario of recommending a product or content to a user), it is crucial to accurately recommend an object to different users, which directly affects the user experience. For another example, in a scenario of recognizing objects with similar properties (e.g., scenarios of recognizing malicious users, vulgar articles, new users, etc.), it is crucial to accurately recognize an object similar to an object with known properties, which is related to the accuracy rate of object recognition. The key in all these scenarios is the target object recognition technology.

[0003] In related technologies, a machine learning model is usually trained to recognize a target object in a network. For example, objects with labeled tags are collected in advance, and then a machine learning model is trained based on the objects with labeled tags; in the recognition phase, the trained machine learning model is used to recognize the tag of an object to be recognized, and whether the object to be recognized is a desired target object is determined through the tag. However, in related technologies, the recognition accuracy of the machine learning model depends on the scale of training data and the accuracy of the tags of the training data. Since it is usually difficult to collect a large amount of training data with accurate tags, the accuracy of object recognition using the trained machine learning model is relatively low. Summary of the Invention

[0004] In view of this, the present disclosure provides a method and an apparatus for target object recognition, expecting to overcome some or all of the above-mentioned defects and other possible defects.

[0005] According to a first aspect of the present disclosure, there is provided an object recognition method, including: obtaining a network graph constructed based on a plurality of objects of different types, where the network graph includes a plurality of nodes corresponding to the plurality of objects and edges connecting the nodes, the node type of a node corresponding to the type of the object, and each edge having a weight to represent the degree of association between the objects corresponding to the two nodes connected by each edge; determining a random walk parameter, where the random walk parameter includes a transition parameter, a recent transition number, a maximum random walk length, and a meta-path, where the transition parameter controls the transition probability from the currently randomly walked node in the network graph to a neighbor node, the recent transition number controls the node type of the next-hop node of the current node so that it is different from the node types of the recent transition number of nodes that have been recently randomly walked to, the maximum random walk length controls the maximum number of nodes in the random walk node sequence obtained by random walk, and the meta-path defines the node types of the nodes that will be sequentially passed through during random walk; performing random walk in the network graph based on the random walk parameter and the weights of the edges in the network graph to obtain a random walk node sequence; determining an embedding vector of the nodes in the network graph based on the random walk node sequence; determining, from the network graph, a target node whose similarity to a seed node among the nodes is less than a similarity threshold according to the embedding vectors of the nodes in the network graph; and identifying the object corresponding to the target node as the target object for the object corresponding to the seed node.

[0006] In some embodiments, performing random walk in the network graph based on the random walk parameter and the weights of the edges in the network graph to obtain a random walk node sequence includes: selecting a starting node for random walk from the network graph and adding it as the current node to the random walk node sequence; iteratively performing the following steps until the number of nodes in the random walk node sequence reaches the maximum number of nodes: determining a set of candidate node types of the next-hop node of the current node based on the meta-path and the recent transition number in the random walk parameter; sampling a next-hop candidate node from the neighbor nodes of the current node according to the set of candidate node types of the next-hop node and the weights of the edges between the current node and the neighbor nodes in the network graph; in response to the next-hop candidate node being a candidate for the second node in the random walk node sequence, determining the next-hop candidate node as the next-hop node of the current node to be added to the random walk node sequence and using it as the current node; in response to the next-hop candidate node not being a candidate for the second node in the random walk node sequence, when it is determined that the next-hop candidate node is an acceptable next-hop candidate node, determining the next-hop candidate node as the next-hop node of the current node to be added to the random walk node sequence and using it as the current node.

[0007] In some embodiments, determining a set of candidate node types of the next-hop node based on a meta-path and the number of recent transitions in the walk parameters includes: in response to the meta-path in the walk parameters being an empty set, determining a first set of node types that are outside the node types of the number of nodes that have been most recently walked to among the node types of the nodes in the network graph, and: when the first set of node types is an empty set, determining the universal set of the node types of the nodes in the network graph as the set of candidate node types of the next-hop node; when the first set of node types is not an empty set, determining the first set of node types as the set of candidate node types of the next-hop node; and, in response to the meta-path in the walk parameters not being an empty set, determining the set of candidate node types of the next-hop node as including the corresponding node types in the meta-path.

[0008] In some embodiments, sampling a next-hop candidate node from the neighbor nodes of the current node according to the set of candidate node types of the next-hop node and the weights of the edges between the current node and the neighbor nodes in the network graph includes: determining a set of valid node types of the next-hop node, where the set of valid node types includes the node types that exist both in the node types of the neighbor nodes of the current node and in the set of candidate node types of the next-hop node; selecting a node type from the set of valid node types with a selection probability, where the selection probability of the corresponding node type in the set of valid node types is positively correlated with the ratio of the weight corresponding to the corresponding node type to the total weight of the valid node types, the weight corresponding to the corresponding node type includes the sum of the weights of the edges between the nodes with the corresponding node type among the neighbor nodes and the current node, and the total weight of the valid node types includes the sum of the weights of the edges between the nodes with each node type in the set of valid node types among the neighbor nodes and the current node; sampling a next-hop candidate node from the neighbor nodes with the selected node type.

[0009] In some embodiments, sampling a next-hop candidate node from the neighbor nodes with the selected node type includes: sampling a next-hop candidate node from the neighbor nodes with the selected node type with a sampling probability, where the sampling probability of the next-hop candidate node is positively correlated with the ratio of the weight corresponding to the next-hop candidate node to the total weight of the neighbor nodes, the weight corresponding to the next-hop candidate node includes the weight of the edge between the next-hop candidate node and the current node, and the total weight of the neighbor nodes includes the sum of the weights of the edges between the neighbor nodes with the selected node type and the current node.

[0010] In some embodiments, the transfer parameters include a first acceptance coefficient, a second acceptance coefficient, and a third acceptance coefficient, where the first acceptance coefficient is used to control the transfer probability of moving from the current node to the previous node of the current node among the neighbor nodes, the second acceptance coefficient is used to control the transfer probability of moving from the current node to a node that is not adjacent to the previous node of the current node among the neighbor nodes, and the third acceptance coefficient is used to control the transfer probability of moving from the current node to a node that is adjacent to the previous node of the current node among the neighbor nodes.

[0011] In some embodiments, the method further includes: in response to the next-hop candidate node not being a candidate node that is the second node in the walk node sequence, and the values of the first acceptance coefficient, the second acceptance coefficient, and the third acceptance coefficient being the same, determining that the next-hop candidate node is an acceptable next-hop candidate node.

[0012] In some embodiments, the method further includes: in response to the next-hop candidate node not being a candidate node that is the second node in the walk node sequence, and at least one of the first acceptance coefficient or the second acceptance coefficient being different from the value of the third acceptance coefficient, then: determining the maximum value among the first acceptance coefficient, the second acceptance coefficient, and the third acceptance coefficient and taking a random number between zero and the maximum value; in response to determining that the next-hop candidate node is the previous node of the current node and the random number being less than the value of the first acceptance coefficient, determining that the next-hop candidate node is an acceptable next-hop candidate node; in response to determining that the next-hop candidate node is a node that is not adjacent to the previous node of the current node and the random number being less than the value of the second acceptance coefficient, determining that the next-hop candidate node is an acceptable next-hop candidate node; in response to determining that the next-hop candidate node is a node that is adjacent to the previous node of the current node and the random number being less than the value of the third acceptance coefficient, determining that the next-hop candidate node is an acceptable next-hop candidate node.

[0013] In some embodiments, the nodes in the network diagram have node identifiers, and the node identifiers identify the number of the node and the number of the node type of the node.

[0014] In some embodiments, the multiple objects of different types include objects of user type and objects of content type, where the degree of association between the node representing the object of user type and the node representing the object of content type is determined based on the attention of the user corresponding to the object of user type to the content corresponding to the object of content type.

[0015] In some embodiments, the seed nodes include nodes representing objects of user type, and the target nodes include nodes representing objects of content type.

[0016] According to a second aspect of the present disclosure, there is provided an object recognition apparatus, including: a network graph acquisition module configured to acquire a network graph constructed based on a plurality of objects of different types, wherein the network graph includes a plurality of nodes corresponding to the plurality of objects and edges connecting between the nodes, the node type of a node corresponding to the type of the object, and each edge has a weight to represent the degree of association between the objects corresponding to the two nodes connected by each edge; a parameter determination module configured to determine a random walk parameter, the random walk parameter including a transition parameter, a recent transition number, a maximum walk length, and a meta-path, wherein the transition parameter controls the transition probability from a currently randomly walked node in the network graph to a neighbor node, the recent transition number controls the node type of the next-hop node of the current node to be different from the node types of the recent transition number of nodes that have been recently walked, the maximum walk length controls the maximum number of nodes in a walked node sequence obtained by random walk, and the meta-path defines the node types of the nodes that will be sequentially passed through during random walk; a sequence acquisition module configured to perform random walk in the network graph based on the random walk parameter and the weights of the edges in the network graph to obtain a walked node sequence; an embedding vector determination module configured to determine an embedding vector of a node in the network graph based on the walked node sequence; a target node determination module configured to determine, according to the embedding vector of the node in the network graph, a target node in the network graph whose similarity to a seed node among the nodes is less than a similarity threshold; and a target object recognition module configured to recognize the object corresponding to the target node as a target object for the object corresponding to the seed node.

[0017] According to a third aspect of the present disclosure, there is provided a computing device, including a processor; and a memory configured to store computer-executable instructions thereon, and when the computer-executable instructions are executed by the processor, the methods described above are executed.

[0018] According to a fourth aspect of the present disclosure, there is provided a computer-readable storage medium storing computer-executable instructions, and when the computer-executable instructions are executed, the methods described above are executed.

[0019] In the object recognition method and apparatus claimed in the present disclosure, by using a network graph constructed based on a plurality of objects of different types and obtaining a walked node sequence in the network graph based on random walk parameters such as a transition parameter, a recent transition number, a maximum walk length, and a meta-path, the hidden information (also called context information) of the nodes in the graph is captured more accurately, so that the embedding vectors of the nodes in the network graph are determined more accurately, thereby making the accuracy of the recognized target object for the object corresponding to the seed node higher. Moreover, the technical solution of the present invention avoids the need for the scale of training data and a large amount of training data with accurate labels, saving a large amount of computational overhead.

[0020] These and other advantages of the present disclosure will become apparent in light of the embodiments described below, and these and other advantages of the present disclosure will be elucidated with reference to the embodiments described below. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings, in which:

[0022] Figure 1 illustrates an exemplary application scenario in which the technical solution according to an embodiment of the present disclosure can be implemented;

[0023] Figure 2 illustrates a schematic flowchart of a method for identifying a target object according to an embodiment of the present disclosure;

[0024] Figure 3 illustrates a schematic diagram of a skip-gram neural network according to an embodiment of the present disclosure;

[0025] Figure 4 illustrates, according to an embodiment of the present disclosure, in Figure 2 the method of performing a random walk based on a walk parameter and the weights of the edges in the network graph in the described network graph to obtain a sequence of walk nodes;

[0026] Figure 5 illustrates a schematic diagram of determining information about neighbor nodes of a node in a network graph according to an embodiment of the present disclosure;

[0027] Figure 6 illustrates an exemplary flowchart of a method for sampling a next-hop candidate node according to an embodiment of the present disclosure;

[0028] Figure 7 illustrates a schematic diagram of a first acceptance coefficient, a second acceptance coefficient, and a third acceptance coefficient according to an embodiment of the present disclosure;

[0029] Figure 8 shows an exemplary structural block diagram of a target object recognition device according to an embodiment of the present disclosure;

[0030] Figure 9 illustrates an example system that includes an example computing device representative of one or more systems and / or devices that can implement the various technologies described herein. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0031] The following description provides specific details of various embodiments of the present disclosure so that those skilled in the art can fully understand and implement various embodiments of the present disclosure. It should be understood that the technical solutions of the present disclosure can be implemented without some of these details. In some cases, the present disclosure does not show or describe in detail some well-known structures or functions to avoid obscuring the description of the embodiments of the present disclosure with these unnecessary descriptions. The terms used in the present disclosure should be understood in the broadest reasonable manner, even if they are used in combination with specific embodiments of the present disclosure.

[0032] First, some terms involved in the embodiments of the present application are described to facilitate the understanding of those skilled in the art.

[0033] Random walk: It is a mathematical statistical model composed of a series of trajectories, where each time is random. Random walk can be used to represent irregular variation forms and can be carried out in various spaces. In this article, it mainly refers to the random walk on a graph. Given a graph and a starting node, a neighbor node is randomly selected, and after reaching there, another neighbor is randomly selected, repeating a specified number of times.

[0034] Uniform walk strategy: When selecting the next-hop node, a node in the neighbor nodes is selected as the next-hop node with equal probability to obtain a random walk sequence.

[0035] Frequency walk strategy: When selecting the next-hop node, the probability of each node in the neighbor nodes being selected is positively correlated with the weight value of the edge to obtain a random walk sequence.

[0036] node2vec walk strategy: When selecting the next-hop node, the information of the current node and the visited nodes is comprehensively considered for selection. The return parameter and the in-out parameter can be preset. The return parameter controls the probability of repeatedly visiting the just-visited vertex, and the in-out parameter controls the direction of the walk so that the walk is biased towards breadth-first or depth-first. By controlling the two parameters, a random walk sequence is obtained.

[0037] Metapath walk strategy: When selecting the next-hop node, according to the node types of each node in the preset random walk sequence, a neighbor node is randomly selected as the next-hop node.

[0038] The technical solutions provided by the embodiments of this application relate to technologies such as artificial intelligence and machine learning. Artificial Intelligence (AI) is the theory, method, technology, and application system that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can react in a way similar to human intelligence. Artificial intelligence also studies the design principles and implementation methods of various intelligent machines, enabling the machines to have the functions of perception, reasoning, and decision-making. Artificial intelligence technology is an interdisciplinary subject with a wide range of fields, including both hardware-level technologies and software-level technologies. The basic technologies of artificial intelligence generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, and mechatronics. The software technologies of artificial intelligence mainly include several major directions such as computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0039] Machine Learning (ML) is an interdisciplinary subject that involves multiple disciplines such as probability theory, statistics, approximation theory, convex analysis, and algorithm complexity theory. It specifically studies how computers simulate or implement human learning behaviors to acquire new knowledge or skills and reorganize the existing knowledge structure to continuously improve their own performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent, and its applications cover all fields of artificial intelligence. Machine learning and deep learning usually include technologies such as artificial neural networks, belief networks, reinforcement learning, transfer learning, and inductive learning.

[0040] Figure 1 FIG. illustrates an exemplary application scenario 100 in which the technical solutions according to embodiments of the present disclosure may be implemented. As Figure 1 shown, the application scenario 100 includes a server 110, terminals 120, 130, and a network 140. The terminals 120, 130 are communicatively coupled to the server 110 via the network 140. As an example, users A and B can view content through applications or clients on the terminals 120, 130, and the content can be, for example, videos, audios, graphics, and texts. Only two terminals are shown here, but in fact, there can be three or more terminals.

[0041] As an example, the server 110 may collect the viewing history or click history of users on various types of content on each terminal. Then, the server 110 may construct a network graph with the users and content involved in the viewing history or click history as objects. The network graph includes a plurality of nodes corresponding to the plurality of objects and edges connecting the nodes. The node type of each node corresponds to the type of the object (such as a user or content). Each edge has a weight to represent the degree of association between the objects corresponding to the two nodes connected by each edge. The degree of association can be determined, for example, according to the viewing duration or click-through rate of the user on the content.

[0042] The server 110 may further determine the random walk parameters, which include the transition parameter, the number of recent transitions, the maximum walk length, and the meta-path. The transition parameter controls the transition probability from the current node randomly walked to in the network graph to each neighbor node. The number of recent transitions controls the node type of the next-hop node of the current node so that it is different from the node types of the number of recent transitions nodes that have been recently walked to. The maximum walk length controls the maximum number of nodes in the walk node sequence obtained by random walk. And the meta-path defines the node types of the nodes that will be sequentially passed through during random walk. Then, the server 110 may perform random walk in the network graph based on the random walk parameters and the weights of the edges in the network graph to obtain a walk node sequence, and determine the embedding vectors of the nodes in the network graph based on the walk node sequence. For example, the server may input the walk node sequence into a Word2vec model for training to obtain the embedding vectors of the nodes in the network graph.

[0043] Based on this, the server 110 determines, from the network graph, target nodes whose similarity to the seed nodes among the nodes in the network graph is less than the similarity threshold, and then identifies the objects corresponding to the target nodes as target objects for the objects corresponding to the seed nodes. As an example, the object corresponding to the seed node is a user, and the object corresponding to the target node is content. In this case, it is very likely that the content corresponding to the target node is the content that the user corresponding to the seed node is interested in or concerned about. Therefore, the content can be recommended to the user. That is to say, the server can recommend the target object to the object corresponding to the seed node. As another example, the object corresponding to the seed node is content, and the object corresponding to the target node is also content. In this case, it is very likely that the content corresponding to the target node has the same nature as the content corresponding to the seed node. If the content corresponding to the seed node is vulgar content, it can be determined that the content corresponding to the target node is also vulgar content. As yet another example, the object corresponding to the seed node is a user, and the object corresponding to the target node is also a user. In this case, it is very likely that the user corresponding to the target node has the same nature as the user corresponding to the seed node. If the user corresponding to the seed node is a new user, it can be determined that the user corresponding to the target node is also a new user. Of course, the exemplary application scenarios here are only examples, not an exhaustive list.

[0044] Optionally, the server 110 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It may also be a cloud server 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, as well as big data and artificial intelligence platforms. The above terminals 120 and 130 may include, but are not limited to, at least one of the following: mobile phones, tablet computers, laptop computers, desktop PCs, digital TVs, and other terminals that can present content. The network 140 may be, for example, a wide area network (WAN), a local area network (LAN), a wireless network, a public telephone network, an intranet, and any other type of network well-known to those skilled in the art. It should also be noted that the scenario described above is only one example in which the embodiments of the present disclosure can be implemented, and is not restrictive.

[0045] It should be noted that the scenario described above is only one example in which the embodiments of the present disclosure can be implemented, and is not restrictive. For example, in some exemplary scenarios, target object recognition may also be implemented on a specific terminal.

[0046] Figure 2FIG. illustrates a schematic flowchart of an object recognition method 200 according to an embodiment of the present disclosure. The method 200 can be implemented, for example, on a server 120 such as Figure 1 but this is not restrictive. As Figure 2 shown, the method 200 includes the following steps.

[0047] In step 210, obtain a network graph constructed based on multiple objects of different types. The network graph includes multiple nodes corresponding to the multiple objects and edges connecting the nodes. The node type of a node corresponds to the type of the object. Each edge has a weight to represent the degree of association between the objects corresponding to the two nodes connected by the edge. In other words, the network graph is a heterogeneous graph.

[0048] The multiple objects of different types may include, but are not limited to, user-type objects and content-type objects, etc. The content-type objects are, for example, objects that can be watched or followed by users, such as videos, web pages, products, items, etc. The node type of a node corresponds to the type of the object. That is, if the types of two objects are different, the node types of the nodes corresponding to the two objects are also different. In the network graph, each object can be regarded as or corresponds to a node. An edge connecting two nodes indicates that there is a relationship between the two nodes. The graph composed of each node in the network and the edges between the nodes is the above-mentioned network graph. For example, taking web pages in the network as an example, each web page can be regarded as a node. When a certain web page A contains a link to another web page B, in the network graph, there is an edge between the nodes corresponding to the web page A and the web page B respectively. Another example, taking users in the network as an example, each user can be regarded as a node. When user a and user b are friends in the network, in the network graph, there is an edge between the nodes corresponding to the user a and the user b respectively. Another example, taking users and web pages in the network as an example, each user and web page can be regarded as a node. When user a views the web page C, in the network graph, there is an edge between the nodes corresponding to the user a and the web page C respectively. It should be noted that the above descriptions are only some examples. For example, the object may also include products, videos, etc. When a user pays attention to, likes, purchases, reads, comments on, or shares the product or video, there can be an edge between the node corresponding to the object and the node corresponding to the user.

[0049] Edges between nodes can have different weights respectively, and the weight of an edge between nodes represents the degree of association between the objects corresponding to the two nodes connected by the edge. As an example, the degree of association between a node representing an object of user type and a node representing an object of content type can be determined based on the attention of the user corresponding to the object of user type to the content corresponding to the object of content type. For example, the more times or the longer the time user a views the web page C, it indicates that user a has a higher attention to web page C or a higher degree of association between the two. Therefore, the weight of the edge between the nodes corresponding to user a and web page C respectively is higher. For another example, when user a and user b are friends in the network and have more common friends, it indicates that the degree of association between user a and user b is higher. Therefore, in the network graph, the weight of the edge between the nodes corresponding to user a and user b respectively is higher. The specific determination method of the weight value can be any suitable method and is not limited here.

[0050] In some embodiments, the nodes in the network graph have node identifiers, and the node identifiers identify the number of the node and the number of the node type of the node. In the related art, the adjacency list method is usually used to store the connection relationship between nodes on the network graph. The adjacency list of a heterogeneous graph includes the following three types of information: the neighbor node numbers, where the storage positions of the numbers of the same type of nodes are consecutive; the set of edge weights, where the order of the edges corresponds one-to-one with the numbers of the nodes; and the node type index, which is used to record the position where the node corresponding to the node type first appears in the set of neighbor node numbers. In the embodiments of the present disclosure, by using a node identifier that simultaneously identifies the number of the node and the number of the node type, the need to separately store the node type index can be saved, thereby saving a large amount of storage space.

[0051] As an example, the high 16 bits of the node identifier can be used to represent the number of the node type, and the low 48 bits can be used to represent the number of the node. The encoding formula of the node identifier can be expressed as: node identifier = (number of node type << 48) | (number of node & 0x0000ffffffffffff).

[0052] In step 220, the random walk parameters are determined. The random walk parameters include a transfer parameter, a recent transfer count, a maximum random walk length, and a meta-path. The transfer parameter controls the transfer probability from the current node randomly walked to in the network graph to each neighbor node. The recent transfer count controls the node type of the next-hop node of the current node so that it is different from the node types of the recent transfer count of the most recently walked nodes. The maximum random walk length controls the maximum number of nodes in the random walk node sequence obtained by random walk, and the meta-path defines the node types of the nodes that will be sequentially passed through during random walk.

[0053] As an example, the most recent transfer quantity can be set to a positive integer N, which can control the node type of the next-hop node selected when performing a random walk such that it is different from the node types of the N most recently walked nodes. As an example, a meta-path can be represented as a sequence composed of types M(0), M(1), M(2), …, M(|M|−1), M(0), M(1)…, where the length of the sequence is |M|, that is, there are |M| node types in the sequence. The meta-path defines that the node types of the nodes that will be sequentially passed through during the random walk are M(0), M(1), M(2), …, M(|M|−1), M(0), M(1)…, that is, it specifies that the sequence of node types in the generated walk node sequence is this sequence. For example, the meta-path can be the sequence (user, content, user), which specifies that the node types in the generated walk node sequence need to be user, content, user.

[0054] In step 230, a random walk is performed in the network graph based on the walk parameters and the weights of the edges in the network graph to obtain a walk node sequence. It should be understood that the walk node sequence is a sequence of some nodes in the network graph. In this document, the walk node sequence and the random walk sequence can be used interchangeably. As an example, any suitable strategy can be used to obtain the walk node sequence based on the walk parameters and the weights of the edges in the network graph. As an example, multiple walk node sequences of the network graph can be obtained such that the multiple walk node sequences include or cover all nodes in the network graph. Optionally, the walk node sequence can be obtained with each node in the network graph as the starting point (that is, traversing the nodes in the network graph), which can make the embedding vectors of the subsequent determined nodes more accurate. Of course, this is not restrictive. The following will refer to Figure 4 an exemplary method for performing a random walk in the network graph based on the walk parameters and the weights of the edges in the network graph to obtain a walk node sequence will be further described.

[0055] In step 240, the embedding vectors of the nodes in the network graph are determined based on the walk node sequence. In the embodiments of the present disclosure, the Word2vec model can be used to process the walk node sequence. Word2vec is a method for converting words into embedding vectors. Similar words should have similar embedding vectors. Word2vec is trained using a skip-gram neural network with only one hidden layer, as Figure 3 shown. The training objective is to predict the adjacent words of the current word in the sentence. Since such a task only appears in the training stage, the context word prediction of skip-gram is also called a pseudo-task. The input of the network is a word, and the neural network weights are optimized to maximize the probability of the word's adjacent words in the sentence. The skip-gram neural network consists of an input layer, a hidden layer, and an output layer. AsFigure 3 As shown, the input layer inputs the one-hot encoding of the current word (the one-hot encoding is a vector with the length of the number of words in the dictionary, where except for the position of the current word being 1, the rest of the positions are 0); the hidden layer has no activation function, and the output of this layer represents the embedding vector of the word; the output layer outputs the predicted probability of the neighboring words through a softmax classifier. Through such training, two words with similar meanings are very likely to have similar neighboring words, and thus obtain similar embedding vectors. In the present disclosure, the node sequence obtained by random walk can be analogized to a sentence in word2vec, and the nodes are analogized to the words in the sentence. The skip-gram neural network takes the one-hot vector of a node in the node sequence obtained by random walk as the input and maximizes the predicted probability of its adjacent nodes. The output of the hidden layer of the trained neural network is the embedding vector of the node.

[0056] In step 250, according to the embedding vectors of the nodes in the network graph, target nodes with a similarity less than the similarity threshold to the seed nodes among the nodes are determined from the network graph. As an example, the similarity between two nodes can be represented by the Euclidean distance or cosine similarity between the embedding vectors of the two nodes. For example, the smaller the Euclidean distance, the higher the similarity between the two nodes. As an example, by traversing the nodes other than the seed nodes, all target nodes with a similarity less than the similarity threshold to the seed nodes can be determined. Specifically, calculating the similarity using the embedding vector of the seed node and the embedding vectors of other nodes can be used as the similarity between the object corresponding to the seed node and the object corresponding to the other nodes. In some embodiments, according to the embedding vectors of the nodes in the network graph, target nodes with a similarity greater than the similarity threshold to the seed nodes among the nodes and having a predetermined node type can be determined.

[0057] In step 260, the object corresponding to the target node is identified as the target object for the object corresponding to the seed node. Identifying the object corresponding to the target node as the object corresponding to the seed node indicates that the target object has a high degree of association with the object corresponding to the seed node. For example, the target object is an object that the object corresponding to the seed node is interested in or concerned about, or the target object has the same or similar properties as the object corresponding to the seed node. As an example, the object corresponding to the seed node is an object of user type, and the object corresponding to the target node is an object of content type. In this case, it is very likely that the object of content type is of interest or concern to the user corresponding to the seed node, so the object of content type can be recommended to the user. That is, the server can recommend the target object to the object of the seed node. As another example, the object corresponding to the seed node is content, and the object corresponding to the target node is also content. In this case, it is very likely that the content corresponding to the target node has the same properties as the content corresponding to the seed node. If the content corresponding to the seed node is vulgar content, it can be determined that the content corresponding to the target node is also vulgar content. As yet another example, the object corresponding to the seed node is a user, and the object corresponding to the target node is also a user. In this case, it is very likely that the user corresponding to the target node has the same properties as the user corresponding to the seed node. If the user corresponding to the seed node is a new user, it can be determined that the user corresponding to the target node is also a new user.

[0058] In the target object recognition method 200 described in the embodiments of the present disclosure, by using a network graph constructed by multiple objects of different types and based on random walk parameters such as transition parameters, recent transition counts, maximum walk lengths, and meta-paths to obtain a random walk node sequence in the network graph, the hidden information of the nodes in the graph (referred to as context information, which is similar to the context information of words in a sentence) is captured more accurately, so that the embedding vectors of the nodes in the network graph are determined more accurately, thereby making the accuracy of the target object recognized for the object corresponding to the seed node higher. Moreover, the technical solution of the present invention avoids the need for the scale of training data and a large amount of training data with accurate labels, saving a large amount of computational overhead.

[0059] Figure 4 Illustrated in accordance with an embodiment of the present disclosure in Figure 2 the network graph described in to obtain a random walk node sequence based on the random walk parameters and the weights of the edges in the network graph. The method 400 can be implemented, for example, with reference to Figure 2 the steps described in. As Figure 4 shown, the method 400 includes the following steps.

[0060] In step 410, a starting node for the random walk is selected from the network graph and added as the current node to the sequence of walked nodes. As an example, the starting node can be randomly selected from the network graph or can be the starting node selected by traversal.

[0061] In step 420, it is determined whether the number of nodes in the sequence of walked nodes has reached the maximum number of nodes. The maximum number of nodes is determined by the maximum walk length in the walk parameters. If the number of nodes in the sequence of walked nodes is less than the maximum number of nodes, go to step 430. If the number of nodes in the sequence of walked nodes has reached the maximum number of nodes, go to step 480, and in step 480, the obtained sequence of walked nodes is output to end the walk process.

[0062] In step 430, a set of candidate node types for the next-hop node of the current node is determined based on the meta-path in the walk parameters and the number of recent transitions. The meta-path defines the node types of the nodes that will be sequentially passed through during the random walk, and the number of recent transitions controls the node type of the next-hop node of the current node to be different from the node types of the most recently walked number of nodes.

[0063] In some embodiments, if the meta-path in the walk parameters is an empty set, first a first set composed of node types other than the node types of the most recently walked number of nodes among the node types of the nodes in the network graph is determined, and if the first set of node types is an empty set, the entire set of node types of the nodes in the network graph is determined as the set of candidate node types for the next-hop node; while if the first set of node types is not an empty set, the first set of node types is determined as the set of candidate node types for the next-hop node. If the meta-path in the walk parameters is not an empty set, the set of candidate node types for the next-hop node is determined to include the corresponding node types in the meta-path.

[0064] As an example, assume that the meta-path is a sequence composed of types M(0), M(1), M(2), …, M(|M|−1), M(0), M(1)…, where the length of the sequence is |M|, that is, there are |M| node types in the sequence. If M is not an empty set, the set T of candidate node types of the next-hop node is determined to include the corresponding node types in the meta-path. For example, if the meta-path type of the current node is M(1), the set T of candidate node types of the next-hop node is M(2). As an example, the number of recent transitions is k, and the set of node types of the recent k accessed nodes S(i), S(i−1)…S(i−k + 1) is H. If the meta-path in the walk parameter is an empty set, first determine the first set (A\H) composed of node types other than the node types of the recent k nodes that are recently walked to among all node types A of the nodes in the network graph, and if the first set of node types is an empty set, the set T of candidate node types of the next-hop node can be determined to be all node types A of the nodes in the network graph; if the first set of node types is not an empty set, the set T of candidate node types of the next-hop node can be determined to be the first set (A\H).

[0065] In step 440, sample the next-hop candidate node from the neighbor nodes of the current node according to the set of candidate node types of the next-hop node and the weights of the edges between the current node and the neighbor nodes in the network graph. The sampling here is hierarchical sampling, that is, first sample the candidate node types of the next-hop node, and then sample the next-hop candidate node from the nodes corresponding to the candidate node types of the next-hop node. During the sampling process, a higher sampling probability can be assigned to the node types and nodes of the nodes with higher weights of the edges to the current node. As an example, the following combines Figure 6 Describes an exemplary flowchart of a method for sampling the next-hop candidate node, which is of course not restrictive.

[0066] In step 450, determine whether the next-hop candidate node is a candidate node for the second node in the walk node sequence. The second node in the walk node sequence is the node immediately following the start node in the walk node sequence. This step mainly determines whether the next-hop candidate node is intended to be the second node in the walk node sequence. If it is determined in step 450 that the next-hop candidate node is a candidate node for the second node in the walk node sequence, then in step 460, the next-hop candidate node is determined to be the next-hop node of the current node to be added to the walk node sequence and used as the current node.

[0067] If it is determined in step 450 that the next-hop candidate node is not a candidate node for the second node in the walk node sequence, then in step 470, it is determined whether the next-hop candidate node is an acceptable next-hop candidate node. In some embodiments, it may be determined whether the next-hop candidate node is an acceptable next-hop candidate node according to a transition parameter. The transition parameter may include a first acceptance coefficient, a second acceptance coefficient, and a third acceptance coefficient. The first acceptance coefficient is used to control a first transition probability of walking from the current node to the previous node of the current node among the neighbor nodes. The second acceptance coefficient is used to control a second transition probability of walking from the current node to a node that is not adjacent to the previous node of the current node among the neighbor nodes. The third acceptance coefficient is used to control a third transition probability of walking from the current node to a node that is adjacent to the previous node of the current node among the neighbor nodes. Optionally, the first transition probability depends on the first acceptance coefficient and the weight of the edge between the current node and the previous node; the second transition probability depends on the second acceptance coefficient and the weight of the edge between the current node and the non-adjacent node; and the third transition probability depends on the third acceptance coefficient and the weight of the edge between the current node and the adjacent node.

[0068] As an example, Figure 7 shows a schematic diagram of the first acceptance coefficient, the second acceptance coefficient, and the third acceptance coefficient according to an embodiment of the present disclosure. As Figure 7 shown, node v is the current node, node t is the previous node of node v in the walk node sequence of the random walk, and the neighbor nodes of node v include node t, node x1, node x2, and node x3. When transferring from node v to the next-hop node x of node v (which may be node t, node x1, node x2, or node x3), there are different transition probabilities to each neighbor node. The transition probability π vx from node v to node x is calculated as π vx =α pq (t, x)*Ω vx , where Ω vx is the normalized value of the weight of the edge between node v and node x, and the acceptance coefficient α pq (t, x) is defined as follows:

[0069]

[0070] where d tx is the shortest path distance between node t and node x. For example, d tx= 0 indicates that node t coincides with node x, i.e., they are the same node, and the corresponding first acceptance coefficient is 1 / p; if t and x are not connected (i.e., not adjacent), the corresponding second acceptance coefficient is 1 / q; if t and x are connected (i.e., adjacent), the corresponding third acceptance coefficient is the reference value 1. The values of the first acceptance coefficient and the second acceptance coefficient can be determined by setting the values of the return parameter p and the input / output parameter q.

[0071] In some embodiments, in response to the next-hop candidate node not being the candidate node that is the second node in the walk node sequence, and the values of the first acceptance coefficient, the second acceptance coefficient, and the third acceptance coefficient being the same (e.g., Figure 7 the values of the acceptance coefficients are all 1), it is determined that the next-hop candidate node is an acceptable next-hop candidate node. In some embodiments, in response to the next-hop candidate node not being the candidate node that is the second node in the walk node sequence, and at least one of the first acceptance coefficient or the second acceptance coefficient being different from the value of the third acceptance coefficient (e.g., Figure 7 at least one of 1 / p and 1 / q is not 1), then: determine the maximum value among the first acceptance coefficient, the second acceptance coefficient, and the third acceptance coefficient and take a random number between zero and the maximum value. In response to determining that the next-hop candidate node is the previous node of the current node and the random number is less than the value of the first acceptance coefficient, it is determined that the next-hop candidate node is an acceptable next-hop candidate node; in response to determining that the next-hop candidate node is a node not adjacent to the previous node of the current node and the random number is less than the value of the second acceptance coefficient, it is determined that the next-hop candidate node is an acceptable next-hop candidate node; in response to determining that the next-hop candidate node is a node adjacent to the previous node of the current node and the random number is less than the value of the third acceptance coefficient, it is determined that the next-hop candidate node is an acceptable next-hop candidate node. Otherwise, it can be determined that the next-hop candidate node is not an acceptable next-hop candidate node.

[0072] When it is determined in step 470 that the next-hop candidate node is an acceptable next-hop candidate node, go to step 460, i.e., determine the next-hop candidate node as the next-hop node of the current node to be added to the walk node sequence and use it as the current node. When it is determined in step 470 that the next-hop candidate node is not an acceptable next-hop candidate node, return to step 440, i.e., sample the next-hop candidate node from the neighbor nodes of the current node according to the set of candidate node types of the next-hop node and the weights of the edges between the current node and the neighbor nodes in the network graph. Optionally, at this time in step 440, the previously determined candidate node type of the next-hop node can be used to resample the next-hop candidate node only from the nodes corresponding to the candidate node type of the next-hop node.

[0073] In some embodiments, the method 400 may further include step 405 before step 410. At step 405, information about the neighbor nodes of the nodes in the network graph is determined. This may include determining the neighbor nodes of each node in the network and determining the weights of the edges between each node and its neighbor nodes, which is beneficial for the implementation of subsequent steps because it saves a large amount of computing resources compared to determining the information of neighbor nodes each time it is needed. If the number of neighbor nodes of a node is n, the time complexity of constructing a set of neighbor nodes of a node is O(nlogn).

[0074] Optionally, in step 405, it may further include sorting the neighbor nodes of the nodes according to the node type and constructing a partial sum array of neighbor nodes based on the weights of the edges between the nodes and their neighbor nodes. Optionally, the neighbor nodes may be further sorted according to the node numbers of the neighbor nodes. As an example, Figure 5 FIG. shows a schematic diagram of determining information about the neighbor nodes of the nodes in the network graph, in which a schematic diagram of constructing a partial sum array of neighbor nodes is shown, where the neighbor nodes are sorted according to the node type, as shown in the set of neighbor nodes. For the sake of simplicity of description, in Figure 5 the node identifier is represented as x-y, where x represents the node type number of the node and y represents the node number of the node. The numbers on the edges connecting the nodes represent the weights of the edges. For example, the node identifier 3-4 indicates that the node type number of the node is 3 and the node number is 4. Figure 5 As shown, the neighbor nodes of the node with the node identifier 0-1 include 8 nodes of 4 types. The constructed partial sum array C of neighbor nodes is shown in the figure, where E j represents the weight of the edge corresponding to the jth node in the set of neighbor nodes of the node, as shown by the weight E of the edge in the figure. The time and space complexities of constructing a partial sum array C of a node are both O(n). Sorting the neighbor nodes and constructing the partial sum array of neighbor nodes can avoid the complexity of searching each time the relevant information of the neighbor nodes is needed, saving the computational amount during the implementation of subsequent steps.

[0075] Through the method 400 provided by the embodiments of the present disclosure, a novel random walk mechanism is provided, which performs random walks based on walk parameters and the weights of the edges in the network graph to obtain a sequence of walked nodes, making the random walk process flexible and efficient. By setting different walk parameters, different random walk strategies can be used to adapt to different application scenarios. For example, when the number of recent transfers is set to 0 and the meta-path is an empty set, the technical solution can degenerate into a node2vec walk strategy. When the values of the first acceptance coefficient, the second acceptance coefficient, and the third acceptance coefficient are the same (for example, Figure 7When both 1 / p and 1 / q are 1), the number of near transfers is set to 0 and the meta-path is an empty set, then this technical solution degenerates into a frequency random walk strategy, and if the weights of the edges between nodes in the network graph are all the same, it is further equivalent to a uniform random walk strategy. When the values of the first acceptance coefficient, the second acceptance coefficient, and the third acceptance coefficient are the same (for example, Figure 7 When both 1 / p and 1 / q are 1), the number of nearest transfers is set to 0 and the meta-path is not an empty set, then this technical solution can degenerate into a metapath random walk strategy. It can be seen that this technical solution is not only flexible and efficient in the random walk process, but also can be compatible with various random walk strategies in related technologies.

[0076] Figure 6 FIG. illustrates an exemplary flowchart of a method 600 for sampling a next-hop candidate node according to an embodiment of the present disclosure. The method 600 can be implemented, for example, with reference to Figure 4 the steps 440 described. As Figure 6 shown, the method 600 includes the following steps.

[0077] In step 610, a set of valid node types of the next-hop node is determined. The set of valid node types includes the node types that exist simultaneously in the node types of the neighbor nodes of the current node and the set of candidate node types of the next-hop node. Taking the example of sorting the neighbor nodes of the node by node type and constructing a neighbor node partial sum array C as shown in Figure 5 FIG., the set of valid node types V can be initialized to be empty, the valid node partial sum array PartialSum is empty, and the valid node partial sum Sum is 0. Then, traverse the candidate node type t in the set T of candidate node types of the next-hop node, and determine whether there is a node with the candidate node type t in the neighbor node set of the current node; if not, ignore it; if so, return the start and end positions Pt_start and Pt_end of the node with the node type t in it, and add t to V, update Sum = Sum + C[Pt_end] - C[pt_start - 1], and add the current sum value to PartialSum, where C[-1] is preset to 0.

[0078] In step 620, a node type is selected from the set of valid node types with a selection probability. The selection probability of the corresponding node type in the set of valid node types is positively correlated with the ratio of the weight corresponding to the corresponding node type to the total weight of the valid node types. The weight corresponding to the corresponding node type includes the sum of the weights of the edges between the nodes with the corresponding node type among the neighbor nodes and the current node, and the total weight of the valid node types includes the sum of the weights of the edges between the nodes with each node type in the set of valid node types among the neighbor nodes and the current node. In particular, the "positively correlated" mentioned here can be a directly proportional relationship.

[0079] As an example, the following simplified calculation method can be used. It can first be determined whether the set V of valid node types is an empty set. If it is an empty set, the process can be directly ended, although this is not restrictive. If V is not an empty set, a number can be randomly generated from [0, sum), and the selected node type can be determined according to the position where the number falls in PartialSum. Refer to Figure 5 Figure, if the set V of valid node types includes node types 1, 2, 3, and 4, then PartialSum as shown in Figure 5 Figure can be determined, and the value of sum is 23. If the randomly generated number is 4 (within the range of the PartialSum value from 0 to 8), then node type 1 can be selected from the set of valid node types.

[0080] In step 630, a next-hop candidate node is sampled from the neighbor nodes with the selected node type. As an example, a next-hop candidate node can be randomly sampled from the nodes numbered 2, 7, and 5 among the nodes of the selected node type 1. In some embodiments, a next-hop candidate node can be sampled from the neighbor nodes with the selected node type with a sampling probability, where the sampling probability of the next-hop candidate node is positively correlated with the ratio of the weight corresponding to the next-hop candidate node to the total weight of the neighbor nodes. The weight corresponding to the next-hop candidate node includes the weight of the edge between the next-hop candidate node and the current node, and the total weight of the neighbor nodes includes the sum of the weights of the edges between the neighbor nodes with the selected node type and the current node. In particular, the "positively correlated" mentioned here can be a directly proportional relationship.

[0081] As an example, the following simplified calculation method can be used. The start and end positions P_start and P_end of the nodes of the selected node type in the neighbor node set can be obtained, a number can be randomly generated from [C[p_start - 1], C[p_end]], and the sampled next-hop candidate node can be determined according to the position where the number falls. Refer to Figure 5, if the selected node type is 1, the start and end positions of the nodes of node type 1 in the neighbor node set are 0 and 2. If the randomly generated number is 7 (between the partial sum C values of 5 and 8), the node number of the sampled next-hop candidate node is 5, that is, node 1-5.

[0082] By referring to Figure 6 the method described, the next-hop candidate nodes can be sampled conveniently and efficiently, and the sampled candidate nodes are the most representative nodes, which is also beneficial to making the walk node sequence obtained as above better reflect the context information, thus facilitating the accuracy of the embedding vectors of the determined nodes.

[0083] Figure 8 FIG. shows an exemplary structural block diagram of an object recognition device 800 according to an embodiment of the present disclosure. As Figure 8 shown, the object recognition device 800 includes a network diagram acquisition module 810, a parameter determination module 820, a sequence acquisition module 830, an embedding vector determination module 840, a target node determination module 850, and a target object recognition module 860.

[0084] The network diagram acquisition module 810 is configured to acquire a network diagram constructed based on multiple objects of different types. The network diagram includes multiple nodes corresponding to the multiple objects and edges connecting the nodes. The node type of the node corresponds to the type of the object, and each edge has a weight to represent the association degree between the objects corresponding to the two nodes connected by each edge.

[0085] The parameter determination module 820 is configured to determine the walk parameters. The walk parameters include a transfer parameter, a recent transfer number, a maximum walk length, and a meta-path. The transfer parameter controls the transfer probability from the current node randomly walked to in the network diagram to each neighbor node. The recent transfer number controls the node type of the next-hop node of the current node so that it is different from the node types of the recent transfer number of nodes recently walked to. The maximum walk length controls the maximum number of nodes in the walk node sequence obtained by random walk, and the meta-path defines the node types of the nodes that will be sequentially passed through during random walk;

[0086] The sequence acquisition module 830 is configured to perform random walks in the network graph based on the walk parameters and the weights of the edges in the network graph to obtain a sequence of walked nodes. It should be understood that the sequence of walked nodes is a sequence of some nodes in the network graph. As an example, the sequence acquisition module may be configured to use any suitable strategy to obtain the sequence of walked nodes based on the walk parameters and the weights of the edges in the network graph. As an example, multiple sequences of walked nodes of the network graph may be obtained such that the multiple sequences of walked nodes include or cover all the nodes in the network graph. Optionally, the sequence of walked nodes may be obtained starting from each node in the network graph (i.e., traversing the nodes in the network graph), which may make the embedding vectors of the subsequent determined nodes more accurate.

[0087] The embedding vector determination module 840 is configured to determine the embedding vectors of the nodes in the network graph based on the sequence of walked nodes. In an embodiment of the present disclosure, the embedding vector determination module 840 may be configured to use the Word2vec model to process the sequence of walked nodes to determine the embedding vectors of the nodes in the network graph.

[0088] The target node determination module 850 is configured to determine, from the network graph, target nodes whose similarity to the seed nodes among the nodes is less than a similarity threshold based on the embedding vectors of the nodes in the network graph. In some embodiments, the target node determination module 850 may be configured to determine, from the network graph, target nodes whose similarity to the seed nodes among the nodes is greater than the similarity threshold and have a predetermined node type based on the embedding vectors of the nodes in the network graph.

[0089] The target object recognition module 860 may be configured to recognize the object corresponding to the target node as the target object for the object corresponding to the seed node. Recognizing the object corresponding to the target node as the target object for the object corresponding to the seed node means that the target object has a high degree of association with the object corresponding to the seed node. For example, the target object is an object that the object corresponding to the seed node is interested in or concerned about, or the target object has the same or similar properties as the object corresponding to the seed node.

[0090] Figure 9 An example system 900 is illustrated, which includes an example computing device 910 representing one or more systems and / or devices that may implement the various techniques described herein. The computing device 910 may be, for example, a server of a service provider, a device associated with the server, a system on a chip, and / or any other suitable computing device or computing system. Referring above to Figure 8 The target object recognition device 800 described may take the form of the computing device 910. Alternatively, the target object recognition device 800 may be implemented as a computer program in the form of an application 916.

[0091] The example computing device 910 illustrated in the figure includes a processing system 911, one or more computer-readable media 912, and one or more I / O interfaces 913 that are communicatively coupled to each other. Although not shown, the computing device 910 may also include a system bus or other data and command transfer systems that couple the various components to each other. The system bus may include any one or combination of different bus architectures, such as a memory bus or memory controller, a peripheral bus, a universal serial bus, and / or a processor or local bus using any one of various bus architectures. Various other examples are also contemplated, such as control and data lines.

[0092] The processing system 911 represents the functionality to perform one or more operations using hardware. Accordingly, the processing system 911 is illustrated as including hardware elements 914 that may be configured as a processor, functional blocks, etc. This may include being implemented in hardware as an application specific integrated circuit or other logic device formed using one or more semiconductors. The hardware elements 914 are not limited by the materials from which they are formed or the processing mechanisms employed therein. For example, a processor may be composed of (multiple) semiconductors and / or transistors (e.g., an electronic integrated circuit (IC)). In such a context, the executable instructions of the processor may be electronically executable instructions.

[0093] The computer-readable media 912 is illustrated as including a memory / storage device 915. The memory / storage device 915 represents the memory / storage capacity associated with one or more computer-readable media. The memory / storage device 915 may include volatile media (such as random access memory (RAM)) and / or non-volatile media (such as read-only memory (ROM), flash memory, optical discs, magnetic disks, etc.). The memory / storage device 915 may include fixed media (e.g., RAM, ROM, fixed hard disk drive, etc.) and removable media (e.g., flash memory, removable hard disk drive, optical disc, etc.). The computer-readable media 912 may be configured in various other ways as further described below.

[0094] One or more I / O interfaces 913 represent functionality that allows a user to input commands and information into computing device 910 using various input devices and optionally also allows information to be presented to the user and / or other components or devices using various output devices. Examples of input devices include a keyboard, a cursor control device (e.g., a mouse), a microphone (e.g., for voice input), a scanner, a touch functionality (e.g., a capacitive or other sensor configured to detect physical touch), a camera (e.g., that can detect motion not involving touch as a gesture using visible or invisible wavelengths such as infrared frequencies), and the like. Examples of output devices include a display device (e.g., a monitor or a projector), a speaker, a printer, a network card, a haptic response device, and the like. Thus, computing device 910 can be configured in various ways, as further described below, to support user interaction.

[0095] Computing device 910 also includes an application 916. Application 916 can be, for example, a software instance of target object recognition device 800 and, in combination with other elements in computing device 910, implements the techniques described herein.

[0096] Various techniques may be described herein in the general context of software, hardware elements, or program modules. Generally, these modules include routines, programs, objects, elements, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The terms “module,” “function,” and “component” as used herein generally refer to software, firmware, hardware, or a combination thereof. The features of the techniques described herein are platform-independent, meaning that these techniques can be implemented on various computing platforms having a variety of processors.

[0097] Implementations of the described modules and techniques may be stored on or transmitted across some form of computer-readable medium. Computer-readable media can include various media that are accessible by computing device 910. By way of example and not limitation, computer-readable media may include “computer-readable storage media” and “computer-readable signal media.”

[0098] Contrary to mere signal transmission, carrier, or the signal itself, a "computer-readable storage medium" refers to a medium and / or device that can persistently store information, and / or a tangible storage device. Thus, a computer-readable storage medium refers to a non-signal-bearing medium. Computer-readable storage media include hardware such as volatile and non-volatile, removable and non-removable media and / or storage devices implemented in a method or technology suitable for storing information such as computer-readable instructions, data structures, program modules, logic elements / circuits, or other data. Examples of computer-readable storage media can include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disk (DVD) or other optical storage devices, hard disks, cassette tapes, magnetic tape, magnetic disk storage devices or other magnetic storage devices, or other storage devices, tangible media, or articles of manufacture suitable for storing the desired information and accessible by a computer.

[0099] A "computer-readable signal medium" refers to a signal-bearing medium configured to send instructions to a computing device 910, such as via a network. Signal media typically can embody computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave, data signal, or other transmission mechanism. Signal media also include any information delivery medium. The term "modulated data signal" refers to a signal in which one or more of the characteristics of the signal are set or changed in such a manner as to encode information in the signal. By way of example, and not limitation, communication media include wired media such as a wired network or direct-wired connection, and wireless media such as acoustic, RF, infrared, and other wireless media.

[0100] As previously described, hardware elements 914 and computer-readable media 912 represent instructions, modules, programmable device logic, and / or fixed device logic implemented in hardware, which in some embodiments can be used to implement at least some aspects of the techniques described herein. Hardware elements can include integrated circuits or system-on-a-chip, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), complex programmable logic devices (CPLDs), and components of other hardware devices implemented in silicon or other hardware. In this context, the hardware elements can serve as processing devices that execute program tasks defined by the instructions, modules, and / or logic embodied by the hardware elements, and as hardware devices for storing instructions for execution, e.g., the previously described computer-readable storage media.

[0101] The foregoing combinations can also be used to implement the various techniques and modules described herein. Accordingly, software, hardware, or program modules and other program modules can be implemented as one or more instructions and / or logic embodied on a computer-readable storage medium of some form and / or by one or more hardware elements 914. The computing device 910 can be configured to implement specific instructions and / or functions corresponding to the software and / or hardware modules. Thus, for example, by using the computer-readable storage medium of the processing system and / or the hardware element 914, the implementation of the module as a module executable by the computing device 910 as software can be at least partially implemented in hardware. The instructions and / or functions can be executable / operable by one or more articles of manufacture (e.g., one or more computing devices 910 and / or processing systems 911) to implement the techniques, modules, and examples described herein.

[0102] In various embodiments, the computing device 910 can assume a variety of different configurations. For example, the computing device 910 can be implemented as a computer-like device including a personal computer, a desktop computer, a multi-screen computer, a laptop computer, a netbook, etc. The computing device 910 can also be implemented as a mobile device-like device including mobile devices such as mobile phones, portable music players, portable gaming devices, tablet computers, multi-screen computers, etc. The computing device 910 can also be implemented as a television-like device, which includes a device having or connected to a generally larger screen in a leisure viewing environment. These devices include televisions, set-top boxes, gaming consoles, etc.

[0103] The techniques described herein can be supported by these various configurations of the computing device 910 and are not limited to the specific examples of the techniques described herein. The functionality can also be implemented in whole or in part by using a distributed system, such as on the "cloud" 920 via a platform 922 as described below.

[0104] The cloud 920 includes and / or represents a platform 922 for resources 924. The platform 922 abstracts the underlying functionality of the hardware (e.g., servers) and software resources of the cloud 920. The resources 924 can include applications and / or data that can be used when performing computer processing on servers remote from the computing device 910. The resources 924 can also include services provided via the Internet and / or via a subscriber network such as a cellular or Wi-Fi network.

[0105] The platform 922 can abstract resources and functionality to connect the computing device 910 with other computing devices. The platform 922 can also be used to abstract the hierarchy of resources to provide a corresponding level of hierarchy for the demands encountered for the resources 924 implemented via the platform 922. Thus, in an interconnected device embodiment, the implementation of the functionality described herein can be distributed throughout the system 900. For example, the functionality can be implemented partially on the computing device 910 and via the platform 922 that abstracts the functionality of the cloud 920.

[0106] It should be understood that, for clarity, embodiments of the present disclosure have been described with reference to different functional units. However, it will be apparent that, without departing from the present disclosure, the functionality of each functional unit can be implemented in a single unit, implemented in multiple units, or implemented as part of other functional units. For example, functionality illustrated as being performed by a single unit can be performed by multiple different units. Thus, the reference to a particular functional unit is only considered as a reference to the appropriate unit for providing the described functionality, rather than indicating a strict logical or physical structure or organization. Accordingly, the present disclosure can be implemented in a single unit, or can be physically and functionally distributed among different units and circuits.

[0107] It will be understood that although the terms first, second, third, etc. may be used herein to describe various devices, elements, components or parts, these devices, elements, components or parts should not be limited by these terms. These terms are only used to distinguish one device, element, component or part from another device, element, component or part.

[0108] Although the present disclosure has been described in connection with some embodiments, it is not intended to be limited to the specific forms set forth herein. Rather, the scope of the present disclosure is only limited by the appended claims. Additionally, although individual features may be included in different claims, these may possibly be advantageously combined, and the inclusion in different claims does not imply that a combination of features is not feasible and / or advantageous. The order of features in the claims does not imply that the features must work in any particular order. Further, in the claims, the word "comprising" does not exclude other elements, and the terms "a" or "an" do not exclude a plurality. The reference numerals in the claims are provided only as illustrative examples and should not be construed as limiting the scope of the claims in any way.

Claims

1. A method for identifying a target object, comprising: obtaining a network graph constructed based on multiple objects of different types, wherein the network graph includes multiple nodes corresponding to the multiple objects and edges connecting the nodes, the node type of a node corresponding to the type of an object, and each edge having a weight to represent the degree of association between the objects corresponding to the two nodes connected by each edge, wherein the multiple objects of different types include objects of user type and objects of content type, and wherein the content includes video, audio, or text and graphics; determining a random walk parameter, the random walk parameter including a transition parameter, a recent transition count, a maximum random walk length, and a meta-path, wherein the transition parameter controls the transition probability from the currently randomly walked node in the network graph to a neighbor node, the recent transition count controls the node type of the next-hop node of the current node so that it is different from the node types of the recent transition count of nodes that have been most recently walked to, the maximum random walk length controls the maximum number of nodes in the random walk node sequence obtained by random walk, and the meta-path defines the node types of the nodes that will be sequentially passed through during random walk; performing random walk in the network graph based on the random walk parameter and the weights of the edges in the network graph to obtain a random walk node sequence; determining an embedding vector of a node in the network graph based on the random walk node sequence; determining, from the network graph, a target node whose similarity to a seed node among the nodes is less than a similarity threshold according to the embedding vectors of the nodes in the network graph; identifying the object corresponding to the target node as the target object for the object corresponding to the seed node; wherein the performing random walk in the network graph based on the random walk parameter and the weights of the edges in the network graph to obtain a random walk node sequence includes: selecting a starting node for random walk from the network graph and adding it as the current node to the random walk node sequence; iteratively executing the following steps until the number of nodes in the random walk node sequence reaches the maximum number of nodes: determining a set of candidate node types of the next-hop node of the current node based on the meta-path and the recent transition count in the random walk parameter; sampling a next-hop candidate node from the neighbor nodes of the current node according to the set of candidate node types of the next-hop node and the weights of the edges between the current node and the neighbor nodes in the network graph; in response to the next-hop candidate node being a candidate node for the second node in the random walk node sequence, determining the next-hop candidate node as the next-hop node of the current node to add it to the random walk node sequence and using it as the current node; in response to the next-hop candidate node not being a candidate node for the second node in the random walk node sequence, when it is determined that the next-hop candidate node is an acceptable next-hop candidate node, determining the next-hop candidate node as the next-hop node of the current node to add it to the random walk node sequence and using it as the current node.

2. The method according to claim 1, wherein, the determining a set of candidate node types of the next-hop node of the current node based on the meta-path and the recent transition count in the random walk parameter includes: In response to the meta - path in the walk parameter being an empty set, determine a first set of node types of nodes other than the node types of the nearest transferred number of nodes that were most recently walked to among the node types of nodes in the network graph, and: When the first set of node types is an empty set, determine the entire set of node types of nodes in the network graph as the set of candidate node types for the next - hop node; When the first set of node types is not an empty set, determine the first set of node types as the set of candidate node types for the next - hop node; In response to the meta - path in the walk parameter not being an empty set, determine the set of candidate node types for the next - hop node as including the corresponding node types in the meta - path.

3. The method according to claim 1, wherein, sampling the next - hop candidate node from the neighbor nodes of the current node according to the set of candidate node types for the next - hop node and the weights of the edges between the current node and the neighbor nodes in the network graph includes: Determine a set of valid node types for the next - hop node, where the set of valid node types includes the node types that exist both in the node types of the neighbor nodes of the current node and in the set of candidate node types for the next - hop node; Select a node type from the set of valid node types with a selection probability, where the selection probability of the corresponding node type in the set of valid node types is positively correlated with the ratio of the weight corresponding to the corresponding node type to the total weight of the valid node types. The weight corresponding to the corresponding node type includes the sum of the weights of the edges between the nodes with the corresponding node type in the neighbor nodes and the current node, and the total weight of the valid node types includes the sum of the weights of the edges between the nodes with each node type in the set of valid node types in the neighbor nodes and the current node; Sample the next - hop candidate node from the neighbor nodes having the selected node type.

4. The method according to claim 3, wherein, sampling the next - hop candidate node from the neighbor nodes having the selected node type includes: Sampling the next - hop candidate node from the neighbor nodes having the selected node type with a sampling probability, where the sampling probability of the next - hop candidate node is positively correlated with the ratio of the weight corresponding to the next - hop candidate node to the total weight of the neighbor nodes. The weight corresponding to the next - hop candidate node includes the weight of the edge between the next - hop candidate node and the current node, and the total weight of the neighbor nodes includes the sum of the weights of the edges between the neighbor nodes having the selected node type and the current node.

5. The method according to claim 1, wherein, the transfer parameter includes a first acceptance coefficient, a second acceptance coefficient, and a third acceptance coefficient. The first acceptance coefficient is used to control the transfer probability from the current node to the previous node of the current node among the neighbor nodes. The second acceptance coefficient is used to control the transfer probability from the current node to a node that is not adjacent to the previous node of the current node among the neighbor nodes. The third acceptance coefficient is used to control the transfer probability from the current node to a node that is adjacent to the previous node of the current node among the neighbor nodes.

6. The method according to claim 5, further includes: In response to the next-hop candidate node not being the candidate node of the second node in the roaming node sequence, and the values of the first acceptance coefficient, the second acceptance coefficient, and the third acceptance coefficient being the same, it is determined that the next-hop candidate node is an acceptable next-hop candidate node.

7. The method according to claim 5, further comprising: In response to the next-hop candidate node not being the candidate node of the second node in the roaming node sequence, and at least one of the first acceptance coefficient or the second acceptance coefficient being different from the value of the third acceptance coefficient, then: Determine the maximum value among the first acceptance coefficient, the second acceptance coefficient, and the third acceptance coefficient and take a random number between zero and the maximum value; In response to determining that the next-hop candidate node is the previous node of the current node and the random number is less than the value of the first acceptance coefficient, it is determined that the next-hop candidate node is an acceptable next-hop candidate node; In response to determining that the next-hop candidate node is a node not adjacent to the previous node of the current node, and the random number is less than the value of the second acceptance coefficient, it is determined that the next-hop candidate node is an acceptable next-hop candidate node; In response to determining that the next-hop candidate node is a node adjacent to the previous node of the current node, and the random number is less than the value of the third acceptance coefficient, it is determined that the next-hop candidate node is an acceptable next-hop candidate node.

8. The method according to claim 1, wherein, the nodes in the network diagram have node identifiers, and the node identifiers identify the numbers of the nodes and the numbers of the node types of the nodes.

9. The method according to claim 1, wherein, the association degree between the node representing the object of the user type and the node representing the object of the content type is determined based on the attention degree of the user corresponding to the object of the user type to the content corresponding to the object of the content type.

10. The method according to claim 1, wherein, the seed nodes include nodes representing objects of the user type, and the target nodes include nodes representing objects of the content type.

11. A target object recognition device, comprising: A network diagram acquisition module, configured to acquire a network diagram constructed based on multiple objects of different types, where the network diagram includes multiple nodes corresponding to the multiple objects and edges connecting the nodes, the node types of the nodes correspond to the types of the objects, each edge has a weight to represent the association degree between the objects corresponding to the two nodes connected by each edge, wherein the multiple objects of different types include objects of the user type and objects of the content type, and wherein the content includes video, audio, or text and graphics; A parameter determination module, configured to determine random walk parameters, where the random walk parameters include a transition parameter, a recent transition count, a maximum random walk length, and a meta-path. The transition parameter controls the transition probability from the currently randomly walked node to a neighbor node in the network graph. The recent transition count controls the node type of the next-hop node of the current node to be different from the node types of the recent transition count of nodes that have been recently walked. The maximum random walk length controls the maximum number of nodes in the random walk node sequence obtained by random walk, and the meta-path defines the node types of the nodes that will be sequentially passed through during random walk; A sequence acquisition module, configured to perform random walk in the network graph based on the random walk parameters and the weights of the edges in the network graph to obtain a random walk node sequence; An embedding vector determination module, configured to determine the embedding vectors of the nodes in the network graph based on the random walk node sequence; A target node determination module, configured to determine, according to the embedding vectors of the nodes in the network graph, target nodes in the network graph whose similarity to the seed nodes among the nodes is less than a similarity threshold; A target object recognition module, configured to recognize the object corresponding to the target node as the target object for the object corresponding to the seed node; Among them, the sequence acquisition module is further configured to: Select a starting node for random walk from the network graph and add it to the random walk node sequence as the current node; Iteratively execute the following steps until the number of nodes in the random walk node sequence reaches the maximum number of nodes: Determine a set of candidate node types for the next-hop node of the current node based on the meta-path and the recent transition count in the random walk parameters; Sample a next-hop candidate node from the neighbor nodes of the current node according to the set of candidate node types for the next-hop node and the weights of the edges between the current node and the neighbor nodes in the network graph; In response to the next-hop candidate node being a candidate node for the second node in the random walk node sequence, determine the next-hop candidate node as the next-hop node of the current node to be added to the random walk node sequence and use it as the current node; In response to the next-hop candidate node not being a candidate node for the second node in the random walk node sequence, when it is determined that the next-hop candidate node is an acceptable next-hop candidate node, determine the next-hop candidate node as the next-hop node of the current node to be added to the random walk node sequence and use it as the current node.

12. A computing device, including A memory, configured to store computer-executable instructions; A processor, configured to execute the method according to any one of claims 1-10 when the computer-executable instructions are executed by the processor.

13. A computer-readable storage medium, storing computer-executable instructions, which when executed, execute the method according to any one of claims 1-10.

Citation Information

Patent Citations

  • Object recommendation method and device and related equipment

    CN111222053A