Account feature acquisition method and device, computer device, and storage medium
By acquiring the registration information of the target account and the type tags of different application servers, and combining this with machine learning to train a feature extraction model, the problem of poor accuracy of account features in existing technologies has been solved, and more accurate account feature acquisition has been achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TENCENT TECHNOLOGY (SHENZHEN) CO LTD
- Filing Date
- 2022-03-24
- Publication Date
- 2026-06-09
AI Technical Summary
In existing technologies, the accuracy of features obtained based on account data is poor because the amount of account data used is limited.
Obtain the registration information of the target account and the type tags associated with different application servers. By integrating the features of the registration information and type tags, the account features are enriched. Machine learning technology is used to train the feature extraction model to improve feature accuracy.
By integrating the features of registration information and type tags, the accuracy of account characteristics is improved, enabling accounts to be better represented and meeting practical application needs.
Smart Images

Figure CN116861209B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, computer device, and storage medium for obtaining account features. Background Technology
[0002] With the development of computer technology, account data has become increasingly complex and diverse. To accurately describe an account, features are typically extracted from the account data and used to describe the account. In related technologies, after obtaining the account data corresponding to any given account, features are extracted from that data using a feature extraction model to obtain account features. However, the above methods for obtaining account features use relatively little account data, resulting in poor accuracy of the obtained features. Summary of the Invention
[0003] This application provides a method, apparatus, computer device, and storage medium for obtaining account features, which can improve the accuracy of the obtained features. The technical solution is as follows:
[0004] On the one hand, a method for obtaining account characteristics is provided, the method comprising:
[0005] Obtain the first account data corresponding to the target account, wherein the first account data includes the registration information of the target account and at least one first type tag associated with the target account;
[0006] Obtain second account data corresponding to the target account. The second account data includes at least one second type tag associated with the target account. The first type tag and the second type tag indicate the type to which the target account belongs. The first account data and the second account data are determined by different application servers.
[0007] Based on the registration information of the target account, obtain the characteristics of the target account;
[0008] The features of the target account are fused with the features of each type tag associated with the target account to obtain the updated features of the target account.
[0009] In one possible implementation, the step of fusing the node features corresponding to the j-th layer associated node directly connected to the j-1 layer associated node with the node features corresponding to the j-1 layer associated node, and determining the fused features as the updated node features of the j-1 layer associated node, includes:
[0010] The node features corresponding to multiple j-th layer associated nodes that are directly connected to the j-1-th layer associated nodes are fused, and the fused features are concatenated with the node features corresponding to the j-1-th layer associated nodes to obtain the second concatenated feature.
[0011] The second spliced feature is transformed, and the transformed feature is determined as the updated node feature of the associated node of the (j-1)th layer.
[0012] In another possible implementation, the sample node includes positive sample nodes and negative sample nodes, and the sample indication information includes positive sample indication information and negative sample indication information. The positive sample indication information indicates that the sample account node is connected to the positive sample node, and the negative sample indication information indicates that the sample account node is not connected to the negative sample node.
[0013] The step of obtaining prediction indication information based on the updated node features of the sample account nodes and the updated node features of the sample nodes includes:
[0014] Based on the updated node features of the sample account node and the updated node features of the positive sample node, a first prediction indication information is obtained, which indicates the predicted possibility of a connection between the sample account node and the positive sample node.
[0015] Based on the updated node features of the sample account node and the updated node features of the negative sample node, a second prediction indication information is obtained, which indicates the predicted probability of a connection between the sample account node and the negative sample node.
[0016] The step of training the feature extraction model based on the prediction indication information and the sample indication information includes:
[0017] The feature extraction model is trained based on the first prediction indication information, the second prediction indication information, the positive sample indication information, and the negative sample indication information.
[0018] In another possible implementation, training the feature extraction model based on the number of shared nodes corresponding to each pair of sample account nodes and the corresponding first similarity includes:
[0019] For any two groups of sample account nodes that contain the same sample account node, determine the difference between the first similarity corresponding to the first group of sample account nodes and the first similarity corresponding to the second group of sample account nodes. The two groups of sample account nodes include the first group of sample account nodes and the second group of sample account nodes. The number of shared nodes corresponding to the first group of sample account nodes is greater than the number of shared nodes corresponding to the second group of sample account nodes. Each group of sample account nodes includes two sample account nodes.
[0020] The feature extraction model is trained based on a number of determined differences.
[0021] In another possible implementation, training the feature extraction model based on the number of shared nodes corresponding to each pair of sample account nodes and the corresponding first similarity includes:
[0022] Based on the relationship between the number of shared nodes corresponding to each pair of sample account nodes and the node number threshold, a second similarity is determined for each pair of sample account nodes. The second similarity indicates whether the sample accounts referred to by the two sample account nodes are similar.
[0023] The feature extraction model is trained based on the first similarity and second similarity between each pair of sample account nodes.
[0024] In another possible implementation, the method further includes:
[0025] Obtain a sample heterogeneity graph, which includes multiple nodes, including sample account nodes, type nodes, and multiple sample resource nodes, and any two nodes with an association relationship are connected.
[0026] Based on the connection relationships between nodes in the sample heterogeneous graph, the number of shared nodes between every two sample resource nodes in the sample heterogeneous graph is obtained, and the number of shared nodes indicates the number of nodes that the two sample resource nodes are jointly connected to.
[0027] For each sample resource node in the sample heterogeneous graph, based on the feature extraction model, the node features corresponding to the sample resource node are fused with the node features corresponding to the fourth associated node to obtain the updated node features of the sample resource node. The fourth associated node is a node in the sample heterogeneous graph that is directly or indirectly connected to the sample resource node.
[0028] Based on the updated node features of every two sample resource nodes, a third similarity is obtained, which indicates the degree of similarity between the sample resources referred to by the two sample resource nodes.
[0029] The feature extraction model is trained based on the number of shared nodes corresponding to each pair of sample resource nodes and the corresponding third similarity.
[0030] In another possible implementation, obtaining resources matching the similar accounts includes:
[0031] Based on the historical behavior data of the similar accounts, resources in which the similar accounts have performed the target operation are identified as resources that match the similar accounts.
[0032] In another possible implementation, obtaining similar accounts based on the updated characteristics of the target account includes:
[0033] Obtain the similarity between the updated features of the target account and the features of multiple candidate accounts;
[0034] Based on the similarity of the multiple candidate accounts, a similar account to the target account is determined from the multiple candidate accounts, wherein the similarity of the similar account is greater than the similarity of the other candidate accounts in the multiple candidate accounts.
[0035] In another possible implementation, the step of obtaining similar accounts for the target account based on the updated features of the target account is performed by a retrieval model; the method further includes:
[0036] The features of multiple sample accounts and at least one fourth similarity score are obtained, where each fourth similarity score indicates whether any two sample accounts among the multiple sample accounts are similar.
[0037] Based on the retrieval model, the features of each pair of sample accounts are processed to obtain at least one fifth similarity, and each fifth similarity indicates the degree of similarity between any two sample accounts among the predicted plurality of sample accounts;
[0038] The retrieval model is trained based on the at least one fourth similarity and the at least one fifth similarity.
[0039] On the other hand, an account feature acquisition device is provided, the device comprising:
[0040] The acquisition module is used to acquire first account data corresponding to the target account, wherein the first account data includes the registration information of the target account and at least one first type tag associated with the target account;
[0041] The acquisition module is further configured to acquire second account data corresponding to the target account. The second account data includes at least one second type tag associated with the target account. The first type tag and the second type tag indicate the type to which the target account belongs. The first account data and the second account data are determined by different application servers.
[0042] The acquisition module is further configured to acquire the characteristics of the target account based on the registration information of the target account;
[0043] The fusion module is used to fuse the features of the target account with the features of each type tag associated with the target account to obtain the updated features of the target account.
[0044] In one possible implementation, the acquisition module is further configured to acquire at least one piece of object data associated with each type tag associated with the target account, wherein the object data includes at least one of the following: account data corresponding to other accounts different from the target account, resource data corresponding to resources, or other type tags different from the type tag;
[0045] The fusion module is used to fuse the features of the target account, the features of the type tags associated with the target account, and the features corresponding to each piece of object data to obtain the updated features of the target account.
[0046] In another possible implementation, the acquisition module is used to acquire object data directly associated with the type tag, and determine the currently acquired object data as the first-level object data. The object data directly associated with the type tag includes at least one of the following: account data corresponding to other accounts belonging to the type tag, resource data corresponding to resources belonging to the type tag, or similar type tags of the type tag; acquire object data directly associated with the i-th level object data, and determine the currently acquired object data as the (i+1)-th level object data, until the n-th level object data is acquired, where i is an integer greater than 0 and less than n, and n is an integer greater than 1.
[0047] In another possible implementation, the i-th layer object data is account data corresponding to other accounts different from the target account. The object data directly associated with the i-th layer object data includes at least one of the type tag belonging to other accounts different from the target account or resource data corresponding to the target resource. Other accounts different from the target account have performed the target operation on the target resource; or...
[0048] The i-th layer object data is the resource data corresponding to the resource, and the object data directly associated with the i-th layer object data includes at least one of the following: the type tag to which the resource belongs or the account data corresponding to the account that has performed the target operation on the resource; or...
[0049] The i-th layer object data is a third type tag. The object data directly associated with the i-th layer object data includes at least one of the following: account data corresponding to an account belonging to the third type tag, resource data corresponding to a resource belonging to the third type tag, or a similar type tag to the third type tag. The third type tag is different from both the first type tag and the second type tag.
[0050] In another possible implementation, the device further includes:
[0051] A creation module is used to create the target account node corresponding to the target account, the type node corresponding to each type tag associated with the target account, and the object node corresponding to each piece of object data.
[0052] The connection module is used to connect the target account node with each type node, connect each type node with the object node corresponding to the directly associated object data, and connect the object nodes corresponding to every two object data with a direct relationship to obtain a heterogeneous graph.
[0053] The fusion module is used to fuse the node features corresponding to the target account node in the heterogeneous graph with the node features corresponding to the first associated node to obtain the updated node features of the target account node. The node features corresponding to the target account are the features of the target account. The first associated node is a node in the heterogeneous graph that is directly or indirectly connected to the target account node. The updated node features of the target account node are used to represent the updated features of the target account.
[0054] In another possible implementation, the fusion module includes:
[0055] The splicing unit is used to fuse the node features corresponding to multiple first associated nodes, and splice the fused features with the node features corresponding to the target account node to obtain the first spliced feature;
[0056] The determining unit is used to perform feature transformation on the first splicing feature and determine the transformed feature as the updated node feature of the target account node.
[0057] In another possible implementation, the plurality of first associated nodes include m-level associated nodes, each j-th level associated node is directly connected to a j-1-th level associated node, and each 1-th level associated node is directly connected to the target account node, where j is an integer greater than 1 and not greater than m, and m is an integer greater than 1.
[0058] The splicing unit is used to, for each (j-1)th layer associated node, fuse the node features corresponding to the j-th layer associated node directly connected to the (j-1)th layer associated node with the node features corresponding to the (j-1)th layer associated node, and determine the fused feature as the updated node feature of the (j-1)th layer associated node, until the updated node features of each (j-1)th layer associated node are obtained; fuse the updated node features of the (j-1)th layer associated nodes, and splice the fused feature with the node features corresponding to the target account node to obtain the first spliced feature.
[0059] In another possible implementation, the splicing unit is used to fuse the node features corresponding to multiple j-th layer associated nodes that are directly connected to the j-1-th layer associated nodes, splice the fused features with the node features corresponding to the j-1-th layer associated nodes to obtain a second spliced feature; perform feature transformation on the second spliced feature, and determine the transformed feature as the updated node feature of the j-1-th layer associated nodes.
[0060] In another possible implementation, the fusion module is used to fuse the node features corresponding to the target account node in the heterogeneous graph with the node features corresponding to the first associated node based on a feature extraction model, so as to obtain the updated node features of the target account node.
[0061] In another possible implementation, the device further includes:
[0062] The acquisition module is also used to acquire a sample heterogeneity graph, which includes multiple nodes, including sample account nodes and type nodes, and any two nodes with an association relationship are connected.
[0063] The determination module is used to determine any type of node in the sample heterogeneous graph as a sample node, and obtain sample indication information, wherein the sample indication information indicates whether there is a connection between the sample account node and the sample node;
[0064] The fusion module is further configured to fuse the node features corresponding to the sample account node in the sample heterogeneous graph with the node features corresponding to the second associated node based on the feature extraction model, so as to obtain the updated node features of the sample account node, wherein the second associated node is a node in the sample heterogeneous graph that is directly or indirectly connected to the sample account node.
[0065] The fusion module is further configured to fuse the node features corresponding to the sample node in the sample heterogeneous graph with the node features corresponding to the third associated node based on the feature extraction model, so as to obtain the updated node features of the sample node, wherein the third associated node is a node in the sample heterogeneous graph that is directly or indirectly connected to the sample node.
[0066] The acquisition module is further configured to acquire prediction indication information based on the updated node features of the sample account node and the updated node features of the sample node, wherein the prediction indication information indicates the predicted probability of a connection between the sample account node and the sample node.
[0067] The training module is used to train the feature extraction model based on the prediction indication information and the sample indication information.
[0068] In another possible implementation, the sample node includes positive sample nodes and negative sample nodes, and the sample indication information includes positive sample indication information and negative sample indication information. The positive sample indication information indicates that the sample account node is connected to the positive sample node, and the negative sample indication information indicates that the sample account node is not connected to the negative sample node.
[0069] The acquisition module is further configured to acquire first prediction indication information based on the updated node features of the sample account node and the updated node features of the positive sample node, wherein the first prediction indication information indicates the probability of a connection between the predicted sample account node and the positive sample node; and acquire second prediction indication information based on the updated node features of the sample account node and the updated node features of the negative sample node, wherein the second prediction indication information indicates the probability of a connection between the predicted sample account node and the negative sample node.
[0070] The training module is used to train the feature extraction model based on the first prediction indication information, the second prediction indication information, the positive sample indication information, and the negative sample indication information.
[0071] In another possible implementation, the device further includes:
[0072] The acquisition module is also used to acquire a sample heterogeneity graph, which includes multiple nodes, including multiple sample account nodes and type nodes, and any two nodes with an association relationship are connected.
[0073] The determining module is further configured to determine, based on the connection relationships between nodes in the sample heterogeneous graph, the number of shared nodes between every two sample account nodes in the sample heterogeneous graph, wherein the number of shared nodes indicates the number of nodes jointly connected to the two sample account nodes;
[0074] The fusion module is further configured to, for each sample account node in the sample heterogeneous graph, based on the feature extraction model, fuse the node features corresponding to the sample account node with the node features corresponding to the second associated node to obtain the updated node features of the sample account node, wherein the second associated node is a node in the sample heterogeneous graph that is directly or indirectly connected to the sample account node.
[0075] The acquisition module is further configured to acquire a first similarity based on the updated node features of every two sample account nodes, wherein the first similarity indicates the degree of similarity between the sample accounts referred to by the two sample account nodes as predicted.
[0076] The training module is used to train the feature extraction model based on the number of shared nodes corresponding to each pair of sample account nodes and the corresponding first similarity.
[0077] In another possible implementation, the training module is used to determine, for any two groups of sample account nodes containing the same sample account node, the difference between the first similarity corresponding to the first group of sample account nodes and the first similarity corresponding to the second group of sample account nodes, wherein the two groups of sample account nodes include the first group of sample account nodes and the second group of sample account nodes, the number of shared nodes corresponding to the first group of sample account nodes is greater than the number of shared nodes corresponding to the second group of sample account nodes, and each group of sample account nodes includes two sample account nodes; and the feature extraction model is trained based on the determined multiple differences.
[0078] In another possible implementation, the training module is used to determine a second similarity between each pair of sample account nodes based on the relationship between the number of shared nodes corresponding to each pair of sample account nodes and a node number threshold. The second similarity indicates whether the sample accounts referred to by the two sample account nodes are similar. The feature extraction model is then trained based on the first and second similarities between each pair of sample account nodes.
[0079] In another possible implementation, the device further includes:
[0080] The acquisition module is also used to acquire a sample heterogeneous graph, which includes multiple nodes, including sample account nodes, type nodes, and multiple sample resource nodes, and any two nodes with an association relationship are connected.
[0081] The determining module is further configured to determine, based on the connection relationships between nodes in the sample heterogeneous graph, the number of shared nodes between every two sample resource nodes in the sample heterogeneous graph, wherein the number of shared nodes indicates the number of nodes commonly connected to the two sample resource nodes;
[0082] The fusion module is further configured to, for each sample resource node in the sample heterogeneous graph, based on the feature extraction model, fuse the node features corresponding to the sample resource node with the node features corresponding to the fourth associated node to obtain the updated node features of the sample resource node, wherein the fourth associated node is a node in the sample heterogeneous graph that is directly or indirectly connected to the sample resource node.
[0083] The acquisition module is further configured to acquire a third similarity based on the updated node features of every two sample resource nodes, wherein the third similarity indicates the degree of similarity between the sample resources referred to by the two sample resource nodes as predicted.
[0084] The training module is used to train the feature extraction model based on the number of shared nodes corresponding to each pair of sample resource nodes and the corresponding third similarity.
[0085] In another possible implementation, the device further includes:
[0086] The acquisition module is further configured to acquire similar accounts of the target account based on the updated features of the target account; and acquire resources that match the similar accounts.
[0087] The recommendation module is used to recommend the resources to the target account.
[0088] In another possible implementation, the acquisition module is used to determine the resources in which the similar accounts have performed target operations as resources that match the similar accounts, based on the historical behavior data of the similar accounts.
[0089] In another possible implementation, the acquisition module is used to acquire the similarity between the updated features of the target account and the features of multiple candidate accounts; based on the similarity corresponding to the multiple candidate accounts, to determine a similar account to the target account from the multiple candidate accounts, wherein the similarity corresponding to the similar account is greater than the similarity corresponding to other candidate accounts among the multiple candidate accounts excluding the similar account.
[0090] In another possible implementation, the step of obtaining similar accounts for the target account based on the updated features of the target account is performed by a retrieval model; the apparatus further includes:
[0091] The acquisition module is also used to acquire features of multiple sample accounts and at least one fourth similarity, each fourth similarity indicating whether any two sample accounts among the multiple sample accounts are similar;
[0092] The processing module is used to process the features of each pair of sample accounts based on the retrieval model to obtain at least one fifth similarity, wherein each fifth similarity indicates the degree of similarity between any two sample accounts among the predicted plurality of sample accounts;
[0093] A training module is used to train the retrieval model based on the at least one fourth similarity and the at least one fifth similarity.
[0094] On the other hand, a computer device is provided, the computer device including a processor and a memory, the memory storing at least one computer program, the at least one computer program being loaded and executed by the processor to perform the operations performed by the account feature acquisition method as described above.
[0095] On the other hand, a computer-readable storage medium is provided, wherein at least one computer program is stored therein, the at least one computer program being loaded and executed by a processor to perform the operations performed by the account feature acquisition method as described above.
[0096] In another aspect, a computer program product is provided, comprising a computer program that, when executed by a processor, performs the operations performed by the account feature acquisition method described above.
[0097] In the solution provided in this application embodiment, account data determined by different application servers is obtained. The obtained account data includes the account's registration information on one application server and the type tags associated with the account on different application servers. Using the account's registration information and associated type tags, the characteristics of the account are obtained. This ensures that the characteristics of the account not only incorporate the characteristics corresponding to the account's registration information but also the characteristics of the associated type tags. Furthermore, the associated type tags also include the type tags associated with the account on different application servers. In other words, the type tags of the account on multiple application servers are taken into account, enriching the information contained in the account's characteristics. This makes the updated characteristics of the account more representative of the account, thereby ensuring the accuracy of the updated characteristics of the account. Attached Figure Description
[0098] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0099] Figure 1 This is a schematic diagram of the structure of an implementation environment provided in an embodiment of this application;
[0100] Figure 2 This is a flowchart of an account feature acquisition method provided in an embodiment of this application;
[0101] Figure 3 This is a schematic diagram illustrating the relationship between a user and multiple applications, provided in an embodiment of this application.
[0102] Figure 4 This is a flowchart of another method for obtaining account features provided in an embodiment of this application;
[0103] Figure 5 This is a flowchart illustrating how to obtain object data associated with a type label, as provided in an embodiment of this application.
[0104] Figure 6 This is a flowchart illustrating how to obtain the updated features of a target account, as provided in an embodiment of this application.
[0105] Figure 7 This is another flowchart of obtaining the updated features of the target account provided in this application embodiment;
[0106] Figure 8 This is a flowchart of a training feature extraction model provided in an embodiment of this application;
[0107] Figure 9 This is a schematic diagram of a sample heterogeneity diagram provided in an embodiment of this application;
[0108] Figure 10 This is a flowchart of another training feature extraction model provided in the embodiments of this application;
[0109] Figure 11 This is a flowchart of another training feature extraction model provided in the embodiments of this application;
[0110] Figure 12 This is a schematic diagram illustrating the relationship between sample account nodes provided in an embodiment of this application;
[0111] Figure 13 This is a flowchart of another training feature extraction model provided in the embodiments of this application;
[0112] Figure 14 This is a schematic diagram illustrating the relationship between sample resource nodes provided in an embodiment of this application;
[0113] Figure 15 This is a flowchart of another training feature extraction model provided in the embodiments of this application;
[0114] Figure 16 This is a flowchart illustrating how resources can be recommended to a target account, as provided in an embodiment of this application.
[0115] Figure 17 This is a flowchart illustrating a resource recommendation method provided in an embodiment of this application;
[0116] Figure 18 This is a flowchart illustrating another resource recommendation provided in an embodiment of this application;
[0117] Figure 19 This is a schematic diagram of the structure of an account feature acquisition device provided in an embodiment of this application;
[0118] Figure 20 This is a schematic diagram of another account feature acquisition device provided in an embodiment of this application;
[0119] Figure 21 This is a schematic diagram of the structure of a terminal provided in an embodiment of this application;
[0120] Figure 22 This is a schematic diagram of the structure of a server provided in an embodiment of this application. Detailed Implementation
[0121] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.
[0122] The terms “first,” “second,” “third,” etc., used in this application may be used to describe various concepts, but unless otherwise stated, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of this application, a first similarity may be referred to as a second similarity, and similarly, a second similarity may be referred to as a first similarity.
[0123] As used in this application, the terms "at least one", "multiple", "each", and "any" have the following meanings: at least one includes one, two, or more; multiple includes two or more; each refers to each of the corresponding multiple; and any refers to any one of the multiple. For example, multiple nodes include three nodes, where each refers to each of the three nodes, and any refers to any one of the three nodes, which could be the first node, the second node, or the third node.
[0124] It should be noted that the embodiments of this application involve data such as account data, resource data, behavioral data, and type tags. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions.
[0125] Artificial intelligence (AI) is the theory, methods, technology, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a comprehensive technology within computer science that attempts to understand the essence of intelligence and produce a new kind of intelligent machine that can react in a way similar to human intelligence. AI studies the design principles and implementation methods of various intelligent machines, enabling them to possess the functions of perception, reasoning, and decision-making.
[0126] Artificial intelligence (AI) is a comprehensive discipline encompassing a wide range of fields, including both hardware and software technologies. Fundamental AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies primarily include computer vision, speech processing, natural language processing, and machine learning / deep learning.
[0127] Machine learning (ML) is a multidisciplinary field involving probability theory, statistics, approximation theory, convex analysis, and algorithm complexity theory. It specifically studies how computers can simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to endow computers with intelligence; its applications span all areas of artificial intelligence. Machine learning and deep learning typically include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and learn-by-doing.
[0128] The solution provided in this application embodiment is based on artificial intelligence machine learning technology, which can train a feature extraction model and use the trained feature extraction model to obtain the features of the account.
[0129] The account feature acquisition method provided in this application is executed by a computer device, which may be a terminal or an application server. Alternatively, the account feature acquisition method provided in this application may be executed jointly by a terminal and an application server; this application does not limit this approach. It should be noted that the multiple embodiments provided in this application are illustrated using the example of the account feature acquisition method being executed by an application server. Optionally, the application server may be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms; this application does not limit this approach.
[0130] In some embodiments, the computer program involved in the present application embodiments may be deployed and executed on a computer device, or executed on multiple computer devices located in one location, or executed on multiple computer devices distributed in multiple locations and interconnected through a communication network. Multiple computer devices distributed in multiple locations and interconnected through a communication network may constitute a blockchain system.
[0131] Figure 1 This is a schematic diagram of an implementation environment provided in an embodiment of this application. See also... Figure 1 The implementation environment includes a terminal 101 and an application server 102. The terminal 101 and the application server 102 are connected via a wireless or wired network, which is not limited in this application.
[0132] A target application, provided by application server 102, is installed on terminal 101. Terminal 101 can perform functions such as data transmission and resource viewing through this target application. Optionally, terminal 101 can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, smart voice interaction device, smart home appliance, vehicle terminal, or aircraft, but is not limited to these. Optionally, the target application can be a target application within the operating system of terminal 101, or a target application provided by a third party. For example, the target application can be a resource sharing application with resource sharing functionality. Users can view resources within the resource sharing application and share resources with other users for them to view. Of course, the resource sharing application can also have other functions, such as shopping, navigation, and gaming functions.
[0133] Terminal 101 is used to log in to the target application based on an account. Application server 102 is used to determine the characteristics of the account by using the account data corresponding to the account logged in by the terminal, so as to determine the resource matching the account based on the characteristics of the account and recommend the resource to terminal 101.
[0134] Figure 2 This is a flowchart of an account feature acquisition method provided in an embodiment of this application. The method is executed by an application server, such as... Figure 2 As shown, the method includes:
[0135] 201. The application server obtains the first account data corresponding to the target account. The first account data includes the registration information of the target account and at least one first type tag associated with the target account.
[0136] The application server is used to provide services for any application, and the target account is any account registered on the application server. The first account data is the data generated by the target account on the application server, and the first account data is used to describe the account.
[0137] The registration information in the first account data describes the user represented by the target account, and this registration information includes attribute information. This registration information is generated when the target account is registered on the application server. For example, when a user registers an account through a device, they need to enter their attribute information. With the user's permission, the device obtains the attribute information entered by the user, registers the account, and uses the user's attribute information as the account's registration information.
[0138] Each first type tag indicates a type. The target account being associated with a first type tag means that the target account belongs to the type indicated by that first type tag. For example, if the first type tag associated with the target account is the video type tag, it means that the target account belongs to the video type, that is, the user represented by the target account likes to watch video resources; or, if the first type tag associated with the target account is the novel type tag, it means that the target account belongs to the novel type, that is, the user represented by the target account likes to watch novel resources.
[0139] 202. The application server obtains the second account data corresponding to the target account. The second account data includes at least one second type tag associated with the target account. The first type tag and the second type tag indicate the type to which the target account belongs. The first account data and the second account data are determined by different application servers.
[0140] Each second-type tag indicates a type, such as a news tag or a sports tag. Associating a target account with a second-type tag means that the target account belongs to that second-type tag, meaning the user represented by the target account prefers to watch resources belonging to that second-type tag.
[0141] In this embodiment, different application servers are used to provide services for different applications. The user referred to by the target account will also register accounts on other application servers different from the target account, and will generate second account data on other application servers different from the target account. The second account data is determined by the other application servers different from the target account. Since the same user generates account data on different application servers, the account data on these different application servers belongs to the same user. Therefore, the second account data generated by the user of the target account on other application servers different from the target account can also be determined as the second account data corresponding to the target account. Figure 3 As shown, user 301 has registered accounts in application 1, application 2 and application 3. User 301 generates account data in the application servers corresponding to application 1, application 2 and application 3. Taking the account registered by user 301 in application 1 as the target account, the account data generated by user 301 in the application servers corresponding to application 2 and application 3 is also the account data corresponding to the target account.
[0142] 203. The application server obtains the characteristics of the target account based on the registration information of the target account.
[0143] In this embodiment of the application, the registration information is used to describe the user referred to by the target account. Based on the registration information, the characteristics of the target account are determined, and the characteristics of the target account are used to describe the user referred to by the target account.
[0144] 204. The application server fuses the characteristics of the target account with the characteristics of each type tag associated with the target account to obtain the updated characteristics of the target account.
[0145] The features of the type tag are used to characterize the type tag. In this embodiment, the features of the target account are only obtained based on the registration information of the target account, while the target account is also associated with a type tag. By fusing the features of the target account and the features of the type tag associated with the target account, the information contained in the features of the target account can be enriched, making the updated features of the target account more representative of the target account, thereby ensuring the accuracy of the updated features of the target account.
[0146] In the solution provided in this application embodiment, account data determined by different application servers is obtained. The obtained account data includes the account's registration information on one application server and the type tags associated with the account on different application servers. Using the account's registration information and associated type tags, the characteristics of the account are obtained. This ensures that the characteristics of the account not only incorporate the characteristics corresponding to the account's registration information but also the characteristics of the associated type tags. Furthermore, the associated type tags also include the type tags associated with the account on different application servers. In other words, the type tags of the account on multiple application servers are taken into account, enriching the information contained in the account's characteristics. This makes the updated characteristics of the account more representative of the account, thereby ensuring the accuracy of the updated characteristics of the account.
[0147] exist Figure 2 Based on the illustrated embodiment, when obtaining the characteristics of the target account, the object data associated with the type tag of the target account is also utilized to enrich the information contained in the characteristics of the target account. For details of the process, please refer to the following embodiment.
[0148] Figure 4 This is a flowchart of an account feature acquisition method provided in an embodiment of this application. The method is executed by an application server, such as... Figure 4 As shown, the method includes:
[0149] 401. The application server obtains the first account data corresponding to the target account.
[0150] The first account data is determined by the application server and includes the registration information of the target account and at least one first type tag associated with the target account. Optionally, the first type tag includes a primary type tag or a secondary type tag, and any secondary type tag belongs to a primary type tag. For example, the primary type tag (Gate) is a video type tag, and the secondary type tags (Tags) belonging to this video type tag include action movie type tags, comedy movie type tags, etc.
[0151] In one possible implementation, the application server stores the registration information of the target account and the historical behavior data corresponding to the target account. The process of obtaining the first account data includes: the application server determines the first type tag associated with the target account based on the historical behavior data corresponding to the target account, and the determined first type tag and registration information constitute the first account data.
[0152] In this embodiment, the application server, with the authorization of the user to which each account belongs, stores the registration information of each account and the historical behavior data corresponding to each account. This historical behavior data records the account's historical behavior; for example, it includes behavior data instructing the account to watch a certain resource, or behavior data instructing the account to perform actions such as liking or following a multimedia resource. Since this historical behavior data records the target account's historical behavior, the recorded historical behavior can reflect the target account's preferences. Therefore, based on the historical behavior data corresponding to the target account, the type of the target account can be determined, i.e., the first type tag associated with the target account can be determined.
[0153] Optionally, the process of determining the first type of label includes the following two methods.
[0154] The first method: Identify the resources in the historical behavior data where the target account performed the target operation, and assign the type tag to the identified resources as the first type tag.
[0155] In this context, a target action is an action that indicates an account's interest in a resource. For example, a target action might be liking, saving, sending a gift, or following. In this embodiment, each resource has a corresponding type tag. For instance, if a resource is a video, its type tag is "video"; if a resource is a movie video, its type tag is "movie"; or if a resource is a comedy movie, its type tag is "comedy movie". When a target account performs a target action on any resource, it indicates that the target account is interested in that resource. Therefore, the type tag to which that resource belongs is the type tag of interest for the target account.
[0156] The second method is to identify multiple resources in the historical behavior data where the target account has performed the target operation, and based on the number of times these multiple resources appear in the historical behavior data, identify the target resource from among the multiple resources, and determine the type label to which the target resource belongs as the first type label.
[0157] Among them, the number of times the target resource appears is greater than the number of times other resources besides the target resource appear.
[0158] In this embodiment, for any resource in which the target account has performed the target operation, the higher the frequency of the resource's appearance in historical behavior data, the more interested the target account is in that resource, and also the more interested the target account is in resources belonging to the same type tag as that resource. Therefore, from multiple resources in which the target account has performed the target operation, the type tag to which the resource with the highest frequency of appearance belongs is selected as the type tag of interest to the target account, thus determining the first type tag associated with the target account.
[0159] Optionally, the method for determining the target resource from multiple resources includes: determining the target resource from multiple resources based on the occurrence count and occurrence threshold of the multiple resources, wherein the occurrence count of the target resource is not less than the occurrence threshold; or, sorting the multiple resources in descending order of the occurrence count of the multiple resources, and selecting at least one resource that ranks first in the sorted multiple resources as the target resource.
[0160] The number of times threshold can be any value, for example, 5 or 3.
[0161] 402. The application server obtains the second account data corresponding to the target account.
[0162] The second account data is determined by an application server different from the first application server. This second account data includes at least one second type tag associated with the target account. The first and second type tags indicate the type to which the target account belongs. Optionally, the second type tag includes a primary type tag or a secondary type tag, where any secondary type tag belongs to a primary type tag.
[0163] In one possible implementation, step 402 includes: the application server obtaining the second account data corresponding to the target account from the central server.
[0164] The central server stores type tags associated with accounts from multiple application servers. In this embodiment, with authorization from the user to which an account belongs, each application server determines a type tag associated with the registered account and reports the account and associated type tag to the central server for storage. It should be noted that the process by which other application servers, different from the central server, determine the type tag associated with the account is the same as the process by which the application server determines the first type tag in step 401 above, and will not be repeated here.
[0165] Optionally, the application server sends a data retrieval request to the central server, which carries the target account. Upon receiving the data retrieval request, the central server queries the data reported by other application servers (different from the application server) that match the target account, identifies the type tag associated with the queried account as the second account data, and sends the second account data to the application server. The application server receives the second account data sent by the central server.
[0166] Optionally, the central server also stores the registration information of each account. The central server compares the registration information of the accounts reported by other application servers that are different from the application server with the registration information of the target account, so as to determine the account that matches the target account, that is, to determine the account that refers to the same user as the target account.
[0167] 403. For each type tag associated with the target account, the application server retrieves at least one object data associated with that type tag.
[0168] The object data includes at least one of the following: account data corresponding to other accounts different from the target account, resource data corresponding to a resource, or other type tags different from the type tag. Other accounts different from the target account are accounts registered on the application server. The resource can be of any type, such as a video, image, or text, and the resource (Item) is a resource on the application server. The resource data corresponding to the resource is used to describe the resource; for example, the resource data includes at least one of the following: a brief description of the resource or a type tag associated with the resource. In this embodiment, any two type tags are associated, indicating that the two type tags are similar. For example, short videos belong to the category of videos, and the video tag is associated with the short video tag. As another example, for any two type tags, if the first type tag is a primary type tag and the second type tag is a secondary type tag belonging to the primary type tag, then the first type tag is associated with the second type tag.
[0169] In this embodiment of the application, after determining the type tag associated with the target account, the object data associated with the type tag is obtained. Then the target account is directly associated with the type tag, and the object data directly associated with the type tag is indirectly associated with the target account. By obtaining the object data associated with the type tag, the amount of data associated with the target account is enriched.
[0170] 404. The application server obtains the characteristics of the target account based on the registration information of the target account.
[0171] The features of the target account can be represented in any form; for example, the features of the target account can be represented in the form of a feature vector.
[0172] In one possible implementation, step 404 includes: extracting features from the registration information to obtain the features of the target account.
[0173] 405. The application server merges the characteristics of the target account, the characteristics of the type tags associated with the target account, and the characteristics corresponding to each piece of object data to obtain the updated characteristics of the target account.
[0174] The updated features of the target account are used to characterize the target account. Since the type tags are directly associated with the target account and the object data is indirectly associated with the target account, the features of the target account, the features of the associated type tags, and the features corresponding to each piece of object data are fused to enrich the information contained in the updated features of the target account, thereby ensuring the accuracy of the updated features of the target account.
[0175] It should be noted that in this embodiment, the example is to obtain the type tags associated with the target account and the object data associated with the type tags. The characteristics of the target account are updated based on the characteristics of the type tags and the characteristics corresponding to the object data. In another embodiment, it is not necessary to perform the above steps 403 and 405. Instead, other methods are adopted to fuse the characteristics of the target account with the characteristics of each type tag associated with the target account to obtain the updated characteristics of the target account.
[0176] In the solution provided in this application embodiment, account data determined by different application servers is obtained. The obtained account data includes the account's registration information on one application server and the type tags associated with the account on different application servers. Using the account's registration information and associated type tags, the characteristics of the account are obtained. This ensures that the characteristics of the account not only incorporate the characteristics corresponding to the account's registration information but also the characteristics of the associated type tags. Furthermore, the associated type tags also include the type tags associated with the account on different application servers. In other words, the type tags of the account on multiple application servers are taken into account, enriching the information contained in the account's characteristics. This makes the updated characteristics of the account more representative of the account, thereby ensuring the accuracy of the updated characteristics of the account.
[0177] Furthermore, after determining the type tags associated with the account, the object data associated with the type tags is also obtained. The object data is indirectly associated with the account. By combining the characteristics of the account, the characteristics of the type tags, and the characteristics corresponding to the object data associated with the type tags, the characteristics of the account are updated to enrich the information contained in the updated characteristics of the account, thereby ensuring the accuracy of the updated characteristics of the account.
[0178] It should be noted that the above Figure 4 The illustrated embodiment is based on the method being executed by an application server, while in another embodiment, the method can be executed by a terminal.
[0179] In one possible implementation, the terminal retrieves account data from different application servers based on the target login account. Then, for the type tag associated with the target account, it retrieves the object data associated with that type tag from the application server where the first account data was retrieved. For example, the terminal retrieves the first account data corresponding to the target account from the first application server, the second account data corresponding to the target account from the second application server, and the object data associated with the type tag from the first application server. Then, the terminal combines the retrieved data and proceeds according to the above... Figure 4 The illustrated embodiment obtains the updated characteristics of the target account.
[0180] Optionally, the terminal has a target application installed. The terminal logs into the target application based on the target account. The target application server provides services to the target application. The terminal obtains first account data from the target application server through the target application. The terminal interacts with the target application server through the target application, and the target application server obtains second account data corresponding to the target account from the central server and returns the second account data to the terminal, i.e., the terminal obtains the second account data. Furthermore, for the type tag associated with the target account, the terminal obtains the object data associated with that type tag from the target application server. For example, the object data includes account data, resource data, or other type tags different from the type tag associated with the target account. The account data is the account data corresponding to the account registered in the target application server, the resource data is the resource data corresponding to the resource in the target application server, and other type tags different from the type tag associated with the target account are type tags in the target application server. Then, based on the target application and the obtained data, the terminal proceeds according to the above... Figure 4 The illustrated embodiment obtains the updated characteristics of the target account.
[0181] In the above Figure 4 Based on the illustrated embodiment, for each type tag associated with the target account, the object data associated with that type tag includes object data directly associated with that type tag, and may also include object data indirectly associated with that type tag, such as... Figure 5 As shown, the process of retrieving object data associated with a type label includes:
[0182] 501. The application server retrieves the object data directly associated with this type of tag and determines the currently retrieved object data as the first-level object data.
[0183] The object data directly associated with this type tag includes at least one of the following: account data corresponding to other accounts belonging to this type tag, resource data corresponding to resources belonging to this type tag, or similar type tags to this type tag. In this embodiment, other accounts belonging to this type tag are accounts that belong to this type tag but are different from the target account.
[0184] In this embodiment of the application, when the target account is associated with multiple type tags, for each type tag among the multiple type tags, the object data directly associated with each type tag can be obtained by following the above step 501, and the object data directly associated with the multiple type tags is determined as the first-level object data.
[0185] In one possible implementation, step 501 includes: the application server obtains object data directly associated with the type label based on the relationship path, and determines the currently obtained object data as the first-level object data.
[0186] This metapath indicates the order in which accounts, type tags, and objects are associated. For example, if the metapath is "Account → Type Tag → Account," then when retrieving object data associated with a type tag of a target account, only the account data corresponding to other accounts associated with that type tag that are different from the target account will be retrieved. As another example, if the metapath is "Account → Type Tag → Resource," then when retrieving object data associated with a type tag of a target account, only the resource data corresponding to the resource associated with that type tag will be retrieved.
[0187] Optionally, the relationship path specifies the level of the type label. For example, the relationship path could be "Account → Second-level type label → Account"; or "Account → First-level type label"; or "Account → Second-level type label → Resource". According to these three relationship paths, for any type label associated with the target account, if the type label is a first-level type label, it is not necessary to retrieve the object data associated with that type label; if the type label is a second-level type label, the account data corresponding to the account directly associated with that type label or the resource data corresponding to the resource directly associated with that type label is retrieved as the object data directly associated with that type label.
[0188] In one possible implementation, the process by which the application server obtains object data directly associated with the type tag includes: the application server querying the data correspondence relationship to determine the object data directly associated with the type tag.
[0189] The data mapping relationship includes at least one of the following: a mapping relationship between type tags and accounts, a mapping relationship between type tags and resources, or an object relationship between type tags. This data mapping relationship can be represented in any form, such as a table. In this data mapping relationship, an account, resource, or other type tag different from that type tag that is associated with any type tag indicates that the account, resource, or other type tag different from that type tag is directly associated with that type tag. Optionally, the data mapping relationship also includes resource data corresponding to resources or account data corresponding to accounts. For each type tag associated with a target account, the application server queries this data mapping relationship based on the type tag to determine the object data directly associated with each type tag.
[0190] Optionally, the data correspondence is stored in the application server, or the data correspondence is stored in another application server different from the application server. The application server can obtain the data correspondence from the other application server different from the application server. This application does not limit this.
[0191] 502. The application server obtains the object data directly associated with the i-th level object data, and determines the currently obtained object data as the (i+1)-th level object data, until the n-th level object data is obtained.
[0192] Where i is an integer greater than 0 and less than n, n is an integer greater than 1, and n is a pre-set value, such as n being 3 or 2.
[0193] In this embodiment, for each object data, there may also be other object data that are different from that object data. After determining the type tag associated with the target account, the object data directly associated with each type tag is obtained, and the currently obtained object data is determined as the first-level object data; then, the object data directly associated with the first-level object data is obtained, and the currently obtained object data is determined as the second-level object data. Following the above steps, the next level of object data is obtained until the nth level of object data is obtained.
[0194] In this embodiment, when the i-th layer object data includes multiple object data items, for each of these multiple object data items, the object data directly associated with each object data item can be obtained according to step 502 described above. This directly associated object data is then determined as the (i+1)-th layer object data. The process of obtaining the next layer object data is the same as the process of obtaining the (i+1)-th layer object data described above, and will not be repeated here. It should be noted that the process of obtaining the (i+1)-th layer object data in step 502 is the same as the process of obtaining the first layer object data described above, and will not be repeated here.
[0195] In one possible implementation, the data directly associated with the i-th layer object data includes the following three types.
[0196] The first type: The object data of the i-th layer is the account data corresponding to other accounts that are different from the target account. The object data directly associated with the object data of the i-th layer includes at least one of the type tags of other accounts that are different from the target account or the resource data corresponding to the target resource.
[0197] Among them, other accounts different from the target account have performed the target operation on the target resource. The fact that these other accounts have performed the target operation on the target resource indicates that they are interested in the target resource, meaning they are directly associated with it. In this embodiment, when the object data at the i-th layer is account data corresponding to other accounts different from the target account, these other accounts may have associated type tags or resources they are interested in. Both the type tags and the resources that these other accounts are interested in are determined to be object data directly associated with them.
[0198] The second type: The i-th layer object data is the resource data corresponding to the resource, and the object data directly associated with the i-th layer object data includes at least one of the following: the type label to which the resource belongs or the account data corresponding to the account that has performed the target operation on the resource.
[0199] In this embodiment, the resource is directly associated with its type tag, and the resource is also associated with an account that is interested in that resource. Therefore, when it is determined that the i-th layer object data is the resource data corresponding to the resource, the type tag to which the resource belongs and the account data corresponding to the account that is interested in the resource are taken as the object data directly associated with the i-th layer object data.
[0200] The third type: The object data of the i-th layer is a third type label, and the object data directly associated with the object data of the i-th layer includes account data corresponding to the account belonging to the third type label, resource data corresponding to the resource belonging to the third type label, or at least one of the similar type labels of the third type label.
[0201] In this embodiment, the third type of tag is different from both the first and second type of tags. Each type of tag is directly associated with a resource or account belonging to that type of tag, and the type of tag is also associated with similar type tags. Therefore, when the i-th layer object data is determined to be a third type of tag, the account or resource belonging to that third type of tag, or a similar type tag to that third type of tag, is taken as the object data directly associated with the i-th layer object data.
[0202] In one possible implementation, the process of obtaining the object data of the (i+1)th layer includes: the application server obtains the object data directly associated with the object data of the i-th layer based on the relational path, and determines the currently obtained object data as the object data of the (i+1)th layer.
[0203] For example, if the relationship path is "Account → Type Tag → Account → Type Tag", and the currently obtained layer i object data is account data corresponding to other accounts that are different from the target account and are associated with a type tag, then according to this relationship path, the third type tag associated with the other account that is different from the target account will be used as the layer i+1 object data. As another example, if the relationship path is "Account → Type Tag → Account → Resource", and the currently obtained layer i object data is account data corresponding to other accounts that are different from the target account and are associated with a type tag, then according to this relationship path, the resource data corresponding to the resource associated with the other account that is different from the target account will be used as the layer i+1 object data.
[0204] It should be noted that the above method can obtain the object data of the (i+1)th layer based on multiple relationship paths.
[0205] In the solution provided in this application embodiment, object data that is directly or indirectly associated with the type tag is obtained layer by layer according to the association relationship between the account, type tag and object, so as to ensure that the obtained object data is directly or indirectly associated with the target account, thereby ensuring the accuracy of the obtained object data.
[0206] In addition, in the above Figure 4 and Figure 5 Based on the illustrated embodiment, the application server obtains the updated features of the target account by adopting a layer-by-layer fusion approach, following the order from the nth-level object data to the 1st-level object data, such as... Figure 6 As shown, the process by which the application server obtains the updated characteristics of the target account includes:
[0207] 601. The application server obtains the characteristics corresponding to the object data of each layer.
[0208] In this system, the features corresponding to each layer of object data are used to characterize the corresponding object, which may include resources, type tags, or accounts that are different from the target account. These features can be represented in any form; for example, the features corresponding to object data can be represented as feature vectors.
[0209] 602. For the i-th layer object data, the application server merges the features corresponding to the (i+1)-th layer object data that are directly associated with the i-th layer object data with the features corresponding to the i-th layer object data, and determines the merged features as the updated features of the i-th layer object data, until the updated features of the 1-th layer object data are obtained.
[0210] Where i is an integer greater than 0 and less than n, and n is an integer greater than 1. In this embodiment, when multiple layers of object data are determined, according to the association relationship between the multiple object data, starting from the nth layer of object data, when i is n-1, the features corresponding to the nth layer of object data are fused with the features corresponding to the associated (n-1)th layer of object data. The fused features are used as the updated features of the (n-1)th layer of object data. Following the above steps, the updated features of the (n-1)th layer of object data can be obtained. Then, when i is n-2, the updated features of the (n-1)th layer of object data are fused with the features corresponding to the associated (n-2)th layer of object data to obtain the updated features of the (n-2)th layer of object data. Repeating the above steps, the updated features of the first layer of object data can be obtained.
[0211] In one possible implementation, the process of obtaining the updated features of the i-th layer object data includes: fusing the features corresponding to the (i+1)-th layer object data directly associated with the i-th layer object data; concatenating the fused features with the features corresponding to the i-th layer object data to obtain a third concatenated feature; performing feature transformation on the third concatenated feature; and determining the transformed feature as the updated features of the i-th layer object data.
[0212] In the embodiments of this application, methods such as Mean Pooling, Sum Pooling, or Attention can be used to fuse the features corresponding to the (i+1)th layer object data directly associated with the i-th layer object data. This application does not limit the specific methods used.
[0213] When updating the features corresponding to the i-th layer object data, a method of first fusing and then concatenating is adopted. First, the features corresponding to the (i+1)-th layer object data directly associated with the i-th layer object data are fused. Then, the fused features are concatenated with the features corresponding to the i-th layer object data. The concatenated third feature is then transformed to ensure that the features corresponding to the i-th layer object data and the features corresponding to the (i+1)-th layer object data are fully fused, thus guaranteeing the accuracy of the updated features of the i-th layer object data.
[0214] Optionally, the features corresponding to the i-th layer object data, the features corresponding to the (i+1)-th layer object data directly related to the i-th layer object data, and the updated features of the i-th layer object data satisfy the following relationship:
[0215]
[0216]
[0217] in, This represents the set of object data at level i+1 directly associated with the v-th object data in level i, where u is the set of object data at level i+1. The sequence number of the object data in the middle. Used to indicate any, Used to represent the data set of objects at level i+1 The u-th object data in the array; AGGREGATE() is used to represent the fusion function. Used to represent the collection of object data at level i+1 The feature after feature fusion corresponding to the object data in the middle, h v Used to represent the feature corresponding to the v-th object data in the i-th layer of object data. Used to represent concatenation functions; W (i+1) The weights δ(·) represent the feature transformation function when updating the features corresponding to the i-th layer object data from the (i+1)-th layer object data. v Used to represent the updated features of the vth object data in the i-th layer of object data.
[0218] In one possible implementation, the i-th layer object data includes multiple object data. For each object data, the feature corresponding to the i+1-th layer object data directly associated with the object data is fused with the feature corresponding to the object data, and the fused feature is determined as the updated feature of the object data.
[0219] In this embodiment of the application, the i-th layer object data includes multiple object data. Among these multiple object data, the i+1-th layer object data directly associated with different object data may be different. Therefore, for each object data in the i-th layer object data, the i+1-th layer object data directly associated with each object data is used to update the features corresponding to each object data, so as to enrich the information contained in the updated features of each object data and improve the accuracy of the updated features of each object data.
[0220] 603. For each type tag associated with the target account, the application server merges the updated features of the first-level object data directly associated with that type tag with the features of that type tag, and determines the merged features as the updated features of that type tag.
[0221] This step is the same as step 602 above, and will not be repeated here.
[0222] 604. The application server merges the updated features of each type tag, concatenates the merged features with the features of the target account to obtain a fourth concatenated feature, performs feature transformation on the fourth concatenated feature, and determines the transformed feature as the updated feature of the target account.
[0223] When updating the features of the target account, a method of first fusing and then concatenating and transforming is adopted. First, the updated features of each type tag are fused. Then, the fused features are concatenated with the features of the target account. The fourth concatenated feature is then transformed, which ensures that the updated features of each type tag are fully integrated with the features of the target account, enriches the information contained in the updated features, and ensures the accuracy of the updated features of the target account.
[0224] The method provided in this application, when determining the multi-layer object data associated with the type tag of the target account, adopts a layer-by-layer fusion approach in the order from the nth layer object data to the 1st layer object data to obtain the updated features of the target account. This allows the updated features of each layer object data to incorporate the association relationships between the layers of object data, thus fully integrating the features of the target account with the features of the type tag and the features of each layer object data. This enriches the information contained in the updated features and ensures the accuracy of the updated features of the target account.
[0225] It should be noted that, in the above Figure 4 Based on the illustrated embodiment, the updated characteristics of the target account are obtained by constructing a heterogeneous graph using type tags associated with the target account and object data associated with those type tags. For example... Figure 7 As shown, the process of obtaining the updated characteristics of the target account includes:
[0226] 701. The application server obtains the first account data corresponding to the target account.
[0227] 702. The application server obtains the second account data corresponding to the target account.
[0228] 703. For each type tag associated with the target account, the application server retrieves at least one object data associated with that type tag.
[0229] 704. The application server obtains the characteristics of the target account based on the registration information of the target account.
[0230] Steps 701-704 are the same as steps 401-404, and will not be repeated here.
[0231] 705. The application server creates the target account node corresponding to the target account, the type node corresponding to each type tag associated with the target account, and the object node corresponding to each piece of object data.
[0232] In this embodiment of the application, the created target account node is used to represent the target account, the type node is used to represent the corresponding type label, and the object node is used to represent the corresponding object data.
[0233] In one possible implementation, if the obtained object data includes at least one of the following: account data corresponding to other accounts different from the target account, resource data corresponding to resources, or other type tags different from the type tag, then the created object node includes at least one of the following: other account nodes corresponding to other accounts different from the target account, resource nodes, or other type tag nodes corresponding to other type tags different from the type tag.
[0234] 706. The application server connects the target account node to each type node, connects each type node to the object node corresponding to the directly associated object data, and connects the object nodes corresponding to every two directly associated object data to obtain a heterogeneous graph.
[0235] In this heterogeneous graph, any two nodes connected together indicate a direct association between them. In this embodiment, the target account is directly associated with multiple type tags, each type tag is directly associated with object data, and each piece of object data may be directly associated with other object data different from that object data. Based on the obtained associations between the target account, type tags, and object data, any two nodes with a direct association are connected to obtain the heterogeneous graph.
[0236] 707. The application server fuses the node features corresponding to the target account node in the heterogeneous graph with the node features corresponding to the first associated node to obtain the updated node features of the target account node.
[0237] In this context, the node features corresponding to the target account are the characteristics of the target account, and the updated node features of the target account node are used to represent the updated characteristics of the target account. The first associated node is a node in the heterogeneous graph that is directly or indirectly connected to the target account node, and the node features corresponding to the first associated node are used to characterize the data referred to by the first associated node. For example, if the first associated node is a type node, the node features corresponding to the type node are the characteristics of the type label referred to by the type node; or, if the first associated node is a resource node, the node features corresponding to the resource node are the characteristics of the resource data corresponding to the resource; or, if the first associated node is another account node different from the target account node, the node features corresponding to this other account node are, in other words, the characteristics of the account data corresponding to this other account.
[0238] In one possible implementation, step 707 includes the following steps 7071-7072 (not shown in the figure):
[0239] 7071. The application server merges the node features corresponding to multiple first associated nodes, and concatenates the merged features with the node features corresponding to the target account node to obtain the first concatenated feature.
[0240] In this embodiment, each node in the heterogeneous graph has initial node features. Since multiple first associated nodes are all associated with the target account node, the node features corresponding to the multiple first associated nodes are fused, and then the fused features are concatenated with the node features corresponding to the target account node to enrich the information contained in the first concatenated features.
[0241] In one possible implementation, the plurality of first associated nodes include m-level associated nodes, each j-th level associated node is directly connected to a (j-1)-th level associated node, and each 1-th level associated node is directly connected to the target account node. Then, step 7071 includes: for each (j-1)-th level associated node, fusing the node features corresponding to the j-th level associated node directly connected to the j-th level associated node with the node features corresponding to the j-1-th level associated node, and determining the fused feature as the updated node feature of the j-1-th level associated node, until the updated node features of each 1-th level associated node are obtained; fusing the updated node features of the 1-th level associated node, and concatenating the fused feature with the node features corresponding to the target account node to obtain the first concatenated feature.
[0242] Where j is an integer greater than 1 and not greater than m, and m is a preset value, where m is an integer greater than 1, for example, m is 2 or 3, etc. In the embodiments of this application, the first-level associated nodes include type tags directly connected to the target account node, the second-level associated nodes include object nodes directly associated with each type node, and so on, with the m-th level associated nodes including object nodes directly associated with the (m-1)-th level associated nodes.
[0243] Optionally, the process of obtaining the updated node features of the (j-1)th layer associated nodes includes: the application server fusing the node features corresponding to multiple j-th layer associated nodes directly connected to the (j-1)th layer associated node, concatenating the fused features with the node features corresponding to the (j-1)th layer associated node to obtain a second concatenated feature; performing feature transformation on the second concatenated feature, and determining the transformed feature as the updated node feature of the (j-1)th layer associated node.
[0244] It should be noted that the process of obtaining the first splicing feature based on the node features corresponding to the target account node and the node features corresponding to the m-level associated nodes is the same as step 602 above, and will not be repeated here.
[0245] 7072. The application server performs feature transformation on the first spliced feature and determines the transformed feature as the updated node feature of the target account node.
[0246] After concatenating the node features corresponding to the target account node with the node features corresponding to the associated nodes, feature transformation is performed on the first concatenated feature to fully integrate the node features corresponding to the target account node with the node features corresponding to the associated nodes. This enriches the information contained in the updated node features of the target account node and ensures the accuracy of the updated node features of the target account node.
[0247] In the solution provided in this application embodiment, after obtaining the type tag associated with the target account and the object data associated with the type tag, a heterogeneous graph is used to represent the relationship between the obtained account, type tag and object data. The connection relationship between each node in the heterogeneous graph is used to obtain the updated node features of the target account node, so as to ensure the accuracy of the updated node features of the target account node obtained by fusion.
[0248] It should be noted that, in the above Figure 7Based on the illustrated embodiment, after obtaining the heterogeneous graph, the updated node features of the target account node are obtained using a feature extraction model and the heterogeneous graph. That is, the process of obtaining the updated node features of the target account node includes: based on the feature extraction model, fusing the node features corresponding to the target account node in the heterogeneous graph with the node features corresponding to the first associated node to obtain the updated node features of the target account node.
[0249] The feature extraction model can be any network model, such as a GNN (Convolutional Neural Network). Optionally, if the heterogeneous graph is centered on the target account node, the feature extraction model processes the heterogeneous graph to obtain the updated node features of the central node, which is also the updated node features of the target account node.
[0250] Optionally, based on the feature extraction model, the updated node features of the target account node are obtained according to steps 601-604 above.
[0251] For example, the feature extraction model includes a fully connected layer. After obtaining the fourth concatenated feature according to step 604 above, the fourth concatenated feature is transformed based on the fully connected layer in the feature extraction model, and the transformed feature is determined as the updated feature of the target account.
[0252] In addition, before using the feature extraction model to process heterogeneous graphs, the feature extraction model needs to be trained. The process of training the feature extraction model provides, for example... Figure 8 , Figure 11 and Figure 13 Three options are available.
[0253] Figure 8 This is a flowchart of a training feature extraction model provided in an embodiment of this application, such as... Figure 8 As shown, the process includes:
[0254] 801. The application server obtains the sample heterogeneity graph.
[0255] The sample heterogeneous graph consists of multiple nodes, including sample account nodes and type nodes. Any two related nodes are connected. Sample account nodes represent sample accounts, and type nodes represent type labels.
[0256] In one possible implementation, the sample heterogeneous graph also includes resource nodes or other sample account nodes that are different from the sample account node, where the resource node refers to a resource.
[0257] 802. The application server identifies any type of node in the heterogeneous graph of the sample as a sample node and obtains sample indication information.
[0258] The sample indication information indicates whether there is a connection between the sample account node and the sample node. The sample indication information can be represented in any form. For example, the sample indication information contains 0 or 1. When the sample indication information contains 0, the sample indication information indicates that there is no connection between the sample account node and the sample node; when the sample indication information contains 1, the sample indication information indicates that there is a connection between the sample account node and the sample node.
[0259] In one possible implementation, the sample heterogeneous graph also includes resource nodes. The process of determining the sample node includes: the application server determining any type of node or any resource node in the sample heterogeneous graph as a sample node.
[0260] In this embodiment of the application, the heterogeneous graph contains three types of nodes: account nodes, resource nodes, and type nodes. When training the feature extraction model, any node other than the account node is used as a sample node. The sample node may be a type node or a resource node.
[0261] 803. Based on the feature extraction model, the application server fuses the node features corresponding to the sample account node in the heterogeneous graph of the sample with the node features corresponding to the second associated node to obtain the updated node features of the sample account node.
[0262] In this context, the second associated node is a node in the heterogeneous graph of the sample that is directly or indirectly connected to the sample account node. The node feature corresponding to the sample account node is the feature of the sample account, which is obtained based on the account data corresponding to the sample account. The node feature corresponding to the second associated node is used to characterize the data it refers to. For example, if the second associated node is a type node, the node feature corresponding to the type node is the feature of the type label that the type node refers to; or, if the second associated node is a resource node, the node feature corresponding to the resource node is the feature of the resource data corresponding to the resource; or, if the second associated node is another account node different from the sample account node, the node feature corresponding to the other account node different from the sample account node is, that is, the feature of the account data corresponding to the other account different from the sample account. The process of obtaining the updated node feature of the sample account node is the same as step 707 above, and will not be repeated here.
[0263] 804. Based on the feature extraction model, the application server fuses the node features corresponding to the sample node in the heterogeneous graph with the node features corresponding to the third associated node to obtain the updated node features of the sample node.
[0264] The third associated node is a node in the heterogeneous graph of samples that is directly or indirectly connected to the sample node. The node features corresponding to the sample node are used to characterize the corresponding sample. If the sample node is a type node, the node features corresponding to it are the features of the type label it represents; if the sample node is a resource node, the node features corresponding to it are the features of the resource it represents. The process of obtaining the updated node features of the sample node is the same as step 707 above and will not be repeated here.
[0265] 805. The application server obtains prediction indication information based on the updated node features of the sample account node and the updated node features of the sample node.
[0266] The prediction indication information indicates the predicted probability of a connection between the sample account node and the sample node. This prediction indication information can be represented in any form; for example, it can be represented as a probability.
[0267] In one possible implementation, cosine similarity or Euclidean distance is used to obtain the similarity between the updated node features of the sample account node and the updated node features of the sample node, and the obtained similarity is used as the prediction indication information. It should be noted that similarity can also be obtained in other ways, and this application does not limit it.
[0268] 806. The application server trains the feature extraction model based on the prediction indication information and the sample indication information.
[0269] Since the sample indication information indicates whether the sample account node is connected to the sample node in the sample heterogeneous graph, and the prediction indication information indicates the probability of a connection between the sample account node and the sample node, and the prediction indication information is predicted using features extracted by the feature extraction model, the difference between the prediction indication information and the sample indication information can reflect the accuracy of the feature extraction model. Therefore, based on the prediction indication information and the sample indication information, the feature extraction model is trained to improve the accuracy of the feature extraction model.
[0270] In one possible implementation, step 806 includes: determining a first loss value based on the prediction indication information and the sample indication information, and training the feature extraction model based on the first loss value.
[0271] The first loss value reflects the accuracy of the feature extraction model.
[0272] It should be noted that in this embodiment, the feature extraction model is trained using one sample account node and one sample node. In another embodiment, the feature extraction model can be trained using one sample account node and multiple sample nodes, that is, by using the sample indication information and prediction indication information corresponding to each sample node to train the feature extraction model. This application does not limit this.
[0273] It should be noted that the embodiments in this application are only used as an example to illustrate one iteration of the feature extraction model training. In another embodiment, according to the above... Figure 8 The embodiment shown performs multiple iterations of training on the feature extraction model. Training of the feature extraction model is stopped when the number of iterations reaches a threshold or when the obtained first loss value is less than a loss value threshold.
[0274] In the solution provided in this application embodiment, a sample account node and a sample node are determined from the sample heterogeneous graph, and the sample account node and the sample indication information corresponding to the sample node are determined. Using the sample account node, sample node and sample indication information, the feature extraction model is trained in a supervised manner to improve the accuracy of the feature extraction model.
[0275] Based on the above Figure 8 The illustrated embodiment uses a sample node as an example, such as... Figure 9 As shown, Figure 9 The left and right images in the diagram are schematic representations of partial node connections in the heterogeneous graph of the same sample, as shown below. Figure 9 As shown in the left figure, the sample account node is connected to three type nodes: type 1, type 2, and type 3. Type 1 node is also connected to account 1 node, type 2 node is also connected to resource 1 node, and type 3 node is also connected to account 2 node. Figure 9 The relationships between nodes in the left-middle diagram are used to obtain the updated features of the sample account node by utilizing the type node associated with the sample account node and other nodes associated with the type node; for example... Figure 9 As shown in the right figure, the sample resource node is connected to three types of nodes: type 4, type 5, and type 6. Type 4 is also connected to resource 1, type 5 is connected to resource 2, and type 6 is connected to account 1. Figure 9 The right-hand diagram shows the relationships between nodes. By using the type nodes associated with the sample resource node and other nodes associated with the type nodes, the updated features of the sample resource node are obtained. Then, the obtained features are used to train the feature extraction model.
[0276] It should be noted that, in the above Figure 8Based on the illustrated embodiment, taking the example of sample nodes including positive sample nodes and negative sample nodes, and sample indication information including positive sample indication information and negative sample indication information, the training process of the feature extraction model is explained, such as... Figure 10 As shown, the process of training the feature extraction model includes:
[0277] 1001. The application server obtains the sample heterogeneity graph.
[0278] This step is the same as step 801 above, and will not be repeated here.
[0279] 1002. The application server determines the positive and negative sample nodes from the sample heterogeneous graph and obtains positive and negative sample indication information.
[0280] Specifically, the positive sample indication information indicates that the sample account node is connected to the positive sample node, and the negative sample indication information indicates that the sample account node is not connected to the negative sample node. When the sample heterogeneous graph only includes account nodes and type nodes, the positive sample node is any type node in the sample heterogeneous graph that is connected to the sample account node, and the negative sample node is any type node in the sample heterogeneous graph that is not connected to the sample account node.
[0281] In one possible implementation, the sample heterogeneous graph also includes resource nodes. In the case that the sample heterogeneous graph only includes account nodes, type nodes, and resource nodes, the positive sample node is any type node or resource node in the sample heterogeneous graph that is connected to the sample account node, and the negative sample node is any type node or resource node in the sample heterogeneous graph that is not connected to the sample account node.
[0282] 1003. The application server, following steps 803 or 804 above, obtains the updated node features of the sample account node, the updated node features of the positive sample node, and the updated node features of the negative sample node.
[0283] 1004. The application server obtains the first prediction indication information based on the updated node features of the sample account node and the updated node features of the positive sample node.
[0284] The first prediction indication information indicates the probability of a connection between the predicted sample account node and the positive sample node.
[0285] 1005. The application server obtains the second prediction indication information based on the updated node features of the sample account node and the updated node features of the negative sample node.
[0286] The second prediction indication information indicates the probability of a connection between the predicted sample account node and the negative sample node.
[0287] It should be noted that steps 1004-1005 are the same as step 805 above, and will not be repeated here.
[0288] 1006. The application server trains the feature extraction model based on the first prediction indication information, the second prediction indication information, the positive sample indication information, and the negative sample indication information.
[0289] The positive sample indication information indicates that the sample account node is connected to the positive sample node. The first prediction indication information indicates the probability of a connection between the sample account node and the positive sample node. The negative sample indication information indicates that the sample account node is not connected to the negative sample node. The second prediction indication information indicates the probability of a connection between the sample account node and the negative sample node. Both the first and second prediction indication information are predicted using features extracted by the feature extraction model. The difference between the positive sample indication information and the first prediction indication information reflects the accuracy of the feature extraction model. The difference between the negative sample indication information and the second prediction indication information also reflects the accuracy of the feature extraction model. Therefore, based on the first prediction indication information, the second prediction indication information, the positive sample indication information, and the negative sample indication information, the feature extraction model is trained to improve its accuracy.
[0290] In one possible implementation, step 1006 includes: determining a second loss value based on the first prediction indication information and the positive sample indication information; determining a third loss value based on the second prediction information and the negative sample indication information; and training the feature extraction model based on the second loss value and the third loss value.
[0291] In the solution provided in this application embodiment, a sample account node, a positive sample node, and a negative sample node are determined from the sample heterogeneous graph, and positive sample indication information and negative sample indication information are determined. Using the sample account node, sample node, and sample indication information, the feature extraction model is trained in a supervised manner, which enriches the data used to train the feature extraction model and ensures the accuracy of the trained feature extraction model.
[0292] Figure 11 This is a flowchart of a training feature extraction model provided in an embodiment of this application, such as... Figure 11 As shown, the process includes:
[0293] 1101. The application server obtains the sample heterogeneity graph.
[0294] The sample heterogeneous graph includes multiple nodes, including multiple sample account nodes and type nodes, and any two nodes with an association relationship are connected.
[0295] In one possible implementation, the sample heterogeneous graph also includes resource nodes, which refer to resources.
[0296] 1102. Based on the connection relationships between nodes in the heterogeneous graph of this sample, the application server obtains the number of shared nodes between every two sample account nodes in the heterogeneous graph of this sample.
[0297] The number of shared nodes indicates the number of nodes that two sample account nodes are connected to. In this embodiment, for any two sample account nodes in the sample heterogeneous graph, the larger the number of shared nodes between the two sample account nodes, the more similar the two sample account nodes are; the smaller the number of shared nodes between the two sample account nodes, the less similar the two sample account nodes are.
[0298] 1103. For each sample account node in the heterogeneous graph, the application server, based on the feature extraction model, fuses the node features corresponding to the sample account node with the node features corresponding to the second associated node to obtain the updated node features of the sample account node.
[0299] The second associated node is a node in the heterogeneous graph of the sample that is directly or indirectly connected to the sample account node. Step 1103 is the same as step 707 above, and will not be repeated here.
[0300] 1104. The application server obtains the first similarity based on the updated node features of every two sample account nodes.
[0301] The first similarity indicates the degree of similarity between the sample accounts referred to by the two predicted sample account nodes.
[0302] In one possible implementation, a method such as cosine similarity or Euclidean distance is used to obtain the first similarity based on the updated node features of every two sample account nodes. This application does not limit this method.
[0303] 1105. The application server trains the feature extraction model based on the number of shared nodes corresponding to each pair of sample account nodes and the corresponding first similarity.
[0304] In this embodiment, the goal of training the feature extraction model is to reduce the distance between features of similar sample accounts and increase the distance between features of dissimilar sample accounts in the feature space. Based on the number of shared nodes corresponding to each pair of sample account nodes and the first similarity between each pair of sample account nodes, the feature extraction model is trained so that two sample account nodes with a larger number of shared nodes are more similar, and two sample account nodes with a smaller number of shared nodes are less similar, thereby improving the accuracy of the feature extraction model. Figure 12 As shown, the sample heterogeneous graph 1201 includes multiple nodes and the connection relationships between them. Taking three sample account nodes in the sample heterogeneous graph 1201 as an example, according to the connection relationships between the nodes in the sample heterogeneous graph 1201, the number of nodes directly connected to each of the three sample account nodes is determined. The number of nodes directly connected to sample account node 1202 is 7, the number of nodes directly connected to sample account node 1203 is 5, and the number of nodes directly connected to sample account node 1204 is 6. Furthermore, the number of shared nodes between sample account node 1202 and sample account node 1203 is 5, and the number of shared nodes between sample account node 1202 and sample account node 1204 is 1. That is, the number of shared nodes between sample account 1202 and sample account 1203 is greater than the number of shared nodes between sample account 1202 and sample account 1204. Therefore, the similarity between sample account 1202 and sample account 1203 is greater than the similarity between sample account 1202 and sample account 1204.
[0305] In one possible implementation, step 1105 includes the following two methods:
[0306] The first approach is to determine the difference between the first similarity between the first group of sample account nodes and the first similarity between the second group of sample account nodes for any two groups of sample account nodes that contain the same sample account node, and then train the feature extraction model based on the determined differences.
[0307] The two groups of sample account nodes include a first group of sample account nodes and a second group of sample account nodes. The number of shared nodes corresponding to the first group of sample account nodes is greater than the number of shared nodes corresponding to the second group of sample account nodes. Each group of sample account nodes includes two sample account nodes.
[0308] In this embodiment, for a heterogeneous graph comprising multiple sample account nodes, a first similarity is determined between every two sample account nodes. Each pair of sample account nodes is then considered as a group of sample account nodes, resulting in multiple groups of sample account nodes and their corresponding first similarity. Following the method described above for the difference between the first and second groups of sample account nodes, the difference between every two groups of sample account nodes is obtained, resulting in multiple difference values.
[0309] This difference reflects the accuracy of the feature extraction model. For any given difference, the larger the difference, the higher the accuracy of the node features extracted by the feature extraction model; the smaller the difference, the lower the accuracy of the node features extracted by the feature extraction model. Therefore, based on a number of determined differences, the feature extraction model is trained to improve its accuracy.
[0310] Optionally, a third loss value is determined based on the determined multiple differences, and the feature extraction model is trained based on the third loss value.
[0311] Optionally, multiple differences and a third loss value satisfy the following relationship:
[0312]
[0313] Among them, L ω The third loss value is used to represent the set of multiple sample account nodes, where O represents the set of multiple sample account nodes, and a and b represent the indices of any two sets of sample account nodes in set O. a S is used to represent the first similarity between the account nodes of the first group of samples. b The first similarity is used to represent the first similarity of the account nodes in the second group of samples. The number of shared nodes in the first group of sample accounts is greater than the number of shared nodes in the second group of sample accounts. sigmoid(·) is used to represent the activation function, and log(·) is used to represent the logarithmic function.
[0314] The second approach is to determine the second similarity between each pair of sample account nodes based on the relationship between the number of shared nodes and the node number threshold, and then train the feature extraction model based on the first and second similarities between each pair of sample account nodes.
[0315] The node count threshold can be any value, such as 3 or 4. The second similarity indicates whether the sample accounts referred to by the two sample account nodes are similar. Optionally, the second similarity includes 0 or 1. If the number of shared nodes corresponding to any two sample account nodes is not less than the node count threshold, the second similarity is 1; if the number of shared nodes corresponding to the two sample account nodes is less than the node count threshold, the second similarity is 0.
[0316] For any two sample account nodes, the difference between the first similarity and the second similarity between them reflects the accuracy of the features extracted by the feature extraction model. The closer the first and second similarities are, i.e., the smaller the difference, the more accurate the features extracted by the model. For the same set of sample account nodes, the feature extraction model is trained based on the difference between the first and second similarities to improve its accuracy.
[0317] In the solution provided in this application embodiment, considering that the number of shared nodes between any two sample account nodes in the sample heterogeneous graph can reflect the similarity between the two sample account nodes, an unsupervised approach is adopted. Based on the number of shared nodes between every two sample account nodes in the sample heterogeneous graph and the first similarity between every two sample account nodes predicted by the feature extraction model, the feature extraction model is trained so that the two sample account nodes with a larger number of shared nodes are more similar, and the two sample account nodes with a smaller number of shared nodes are less similar, thereby improving the accuracy of the feature extraction model.
[0318] Figure 13 This is a flowchart of a training feature extraction model provided in an embodiment of this application, such as... Figure 13 As shown, the process includes:
[0319] 1301. The application server obtains the sample heterogeneity graph.
[0320] The sample heterogeneous graph includes multiple nodes, including sample account nodes, type nodes, and multiple sample resource nodes, with any two nodes having an association relationship being connected.
[0321] 1302. Based on the connection relationships between nodes in the heterogeneous graph of this sample, the application server obtains the number of shared nodes between every two sample resource nodes in the heterogeneous graph of this sample.
[0322] The number of shared nodes indicates the number of nodes that the two sample resource nodes are connected to.
[0323] 1303. For each sample resource node in the heterogeneous graph, the application server, based on the feature extraction model, fuses the node features corresponding to the sample resource node with the node features corresponding to the fourth associated node to obtain the updated node features of the sample resource node.
[0324] The fourth associated node is a node in the heterogeneous graph of the sample that is directly or indirectly connected to the resource node of the sample.
[0325] 1304. The application server obtains the third similarity based on the updated node features of every two sample resource nodes.
[0326] The third similarity indicates the degree of similarity between the sample resources referred to by the two predicted sample resource nodes.
[0327] 1305. The application server trains the feature extraction model based on the number of shared nodes corresponding to each pair of sample resource nodes and the corresponding third similarity.
[0328] Steps 1301-1305 are the same as steps 1101-1105 above, and will not be repeated here.
[0329] Based on the number of shared nodes between any two sample resource nodes and the first similarity between any two sample resource nodes, the feature extraction model is trained to make two sample resource nodes with a larger number of shared nodes more similar, and two sample resource nodes with a smaller number of shared nodes less similar, thereby improving the accuracy of the feature extraction model. Figure 14 As shown, the sample heterogeneous graph 1401 includes multiple nodes and the connection relationships between them. Taking three sample resource nodes in the sample heterogeneous graph 1401 as an example, according to the connection relationships between the nodes in the sample heterogeneous graph 1401, the number of nodes directly connected to each of the three sample resource nodes is determined. The number of nodes directly connected to sample resource node 1402 is 8, the number of nodes directly connected to sample resource node 1403 is 6, and the number of nodes directly connected to sample resource node 1404 is 7. Furthermore, the number of shared nodes between sample resource node 1402 and sample resource node 1403 is 5, and the number of shared nodes between sample resource node 1402 and sample resource node 1404 is 2. That is, the number of shared nodes between sample resource 1402 and sample resource 1403 is greater than the number of shared nodes between sample resource 1402 and sample resource 1404. Therefore, the similarity between sample resource 1402 and sample resource 1403 is greater than the similarity between sample resource 1402 and sample resource 1404.
[0330] In the solution provided in this application embodiment, considering that the number of shared nodes between any two sample resource nodes in the sample heterogeneous graph can reflect the similarity between the two sample resource nodes, an unsupervised approach is adopted. Based on the number of shared nodes between every two sample resource nodes in the sample heterogeneous graph and the first similarity between every two sample resource nodes predicted by the feature extraction model, the feature extraction model is trained so that the two sample resource nodes with a larger number of shared nodes are more similar, and the two sample resource nodes with a smaller number of shared nodes are less similar, thereby improving the accuracy of the feature extraction model.
[0331] It should be noted that the above Figure 8 , Figure 11 and Figure 13 The three embodiments shown can be combined arbitrarily, for example... Figure 8 and Figure 11 The illustrated embodiments are combined, Figure 11 and Figure 13 The examples shown are combined, Figure 8 and Figure 13 In conjunction with the examples shown, or Figure 8 , Figure 11 and Figure 13 The examples shown are combined. Taking the combination of the above three embodiments as an example, such as... Figure 15 As shown, the process of training the feature extraction model includes:
[0332] 1501. The application server obtains the sample heterogeneity graph.
[0333] The sample heterogeneous graph includes multiple nodes, which include multiple sample account nodes, type nodes, and multiple sample resource nodes. Any two nodes with a relationship are connected.
[0334] 1502. For any sample account node, the application server identifies any type of node or resource node in the sample heterogeneous graph as a sample node and obtains sample indication information.
[0335] The sample indication information indicates whether there is a connection between the sample account node and the sample node.
[0336] 1503. For each sample account node in the heterogeneous graph, the application server, based on the feature extraction model, fuses the node features corresponding to the sample account node with the node features corresponding to the second associated node to obtain the updated node features of the sample account node.
[0337] The second associated node is a node in the heterogeneous graph of the sample that is directly or indirectly connected to the sample account node.
[0338] 1504. For each sample resource node in the heterogeneous graph, the application server, based on the feature extraction model, fuses the node features corresponding to the sample resource node with the node features corresponding to the fourth associated node to obtain the updated node features of the sample resource node.
[0339] The fourth associated node is a node in the heterogeneous graph of the sample that is directly or indirectly connected to the resource node of the sample.
[0340] 1505. Based on the feature extraction model, the application server fuses the node features corresponding to the sample node in the heterogeneous graph of the sample with the node features corresponding to the third associated node to obtain the updated node features of the sample node.
[0341] The third associated node is a node in the heterogeneous graph of the sample that is directly or indirectly connected to the sample node.
[0342] 1506. The application server determines the first loss value based on the prediction indication information and the sample indication information.
[0343] 1507. The application server determines the third loss value based on the number of shared nodes corresponding to each pair of sample account nodes and the corresponding first similarity.
[0344] 1508. The application server determines the fourth loss value based on the number of shared nodes corresponding to each pair of sample resource nodes and the corresponding third similarity.
[0345] 1509. The application server trains the feature extraction model based on the first loss value, the third loss value, and the fourth loss value.
[0346] It should be noted that, in the above Figures 2 to 15 Based on the illustrated embodiment, taking a resource recommendation scenario as an example, resources are recommended for the target account by utilizing the updated features of the target account. For example... Figure 16 As shown, the process of recommending resources to this target account includes:
[0347] 1601. The application server obtains similar accounts to the target account based on the updated characteristics of the target account.
[0348] Among them, similar accounts to the target account are those registered on the application server that are similar to the target account.
[0349] In one possible implementation, step 1601 includes: obtaining the similarity between the updated features of the target account and the features of multiple candidate accounts; and determining similar accounts of the target account from among the multiple candidate accounts based on the similarity corresponding to the multiple candidate accounts.
[0350] Among multiple candidate accounts, the similarity score of a similar account is greater than the similarity scores of other candidate accounts. These candidate accounts are accounts registered on the application server. Optionally, accounts meeting the target criteria are selected from the application server as candidate accounts. The target criteria are used to filter active accounts; for example, the target criteria might be watching videos for more than 15 days in the past 30 days and playing more than 50 videos.
[0351] Optionally, the similarity between the updated features of the target account and the features of the candidate account can be obtained by means of cosine similarity or Euclidean distance, but this application does not limit this.
[0352] Optionally, the application server stores the features of multiple candidate accounts. After obtaining the updated features of the target account, the server can use the features of the multiple candidate accounts stored to obtain the similarity between the multiple candidate accounts and the target account.
[0353] Among them, the characteristics of these multiple alternative accounts are determined by the application server according to the above... Figure 4 The method described in the embodiment is to obtain the characteristics of each candidate account and store them for later use.
[0354] Optionally, the application server updates the characteristics of multiple candidate accounts stored at target intervals. The target interval can be any length. Since the type tags, accounts, or resources stored in the application server change over time, updating the characteristics of the multiple candidate accounts at target intervals ensures the accuracy of the stored account characteristics.
[0355] Optionally, the application server stores the updated characteristics of the target account. After obtaining the updated characteristics of the target account, the application server stores the updated characteristics so that it can subsequently use the target account as a backup account for other accounts that are different from the target account.
[0356] 1602. The application server retrieves resources that match the similar account.
[0357] In this embodiment, each account in the application server has a matching resource, which may be a video, image, or text. A resource matching a similar account indicates that the similar account is interested in that resource.
[0358] In one possible implementation, step 1602 includes: based on the historical behavior data of the similar account, identifying the resources in which the similar account has performed the target operation as resources that match the similar account.
[0359] If a similar account performs a target operation on any resource, it indicates that the similar account is interested in that resource, and that resource can be considered a resource matched with that similar account.
[0360] Optionally, multiple resources in the historical behavior data of similar accounts that have had the target operation performed are identified. Based on the number of times the multiple resources appear in the historical behavior data, the target resource is identified from the multiple resources and the target resource is identified as the resource that matches the similar account.
[0361] Among them, the number of times the target resource appears is greater than the number of times other resources besides the target resource appear.
[0362] 1603. The application server recommends resources that match similar accounts to the target account.
[0363] It should be noted that the embodiments of this application employ collaborative filtering (CF) to recommend resources of interest to the target account by utilizing resources of similar accounts that share similar interests with the target account, thereby ensuring the accuracy of resource recommendations.
[0364] In the solution provided in this application embodiment, the resources that similar accounts of the target account are interested in may also be resources that the target account is interested in. By using the updated features of the target account, similar accounts of the target account are determined, and the resources matched by the similar accounts are recommended to the target account to ensure the accuracy of the recommended resources.
[0365] In the above Figure 16 Based on the embodiments shown, this application also provides a resource recommendation process, such as... Figure 17 As shown, the process includes:
[0366] 1701. The terminal sends a data retrieval request to the application server based on the target account it has logged in with, and the data retrieval request carries the target account.
[0367] 1702. The application server receives the data retrieval request and proceeds as described above. Figure 4 The embodiment shown determines the characteristics of the target account and, following steps 1601-1602 above, determines and obtains resources that match similar accounts to the target account.
[0368] 1703. The application server sends resources to the terminal that match similar accounts to the target account.
[0369] 1704. The terminal receives resources from the application server that match similar accounts to the target account, and displays the received resources for the user to view.
[0370] In the above Figure 16 Based on the embodiment shown, a retrieval model can also be used to obtain similar accounts of the target account. That is, step 1601 includes: processing the updated features of the target account and the features of multiple candidate accounts based on the retrieval model to obtain similar accounts of the target account.
[0371] The retrieval model can be any model, for example, Faiss (Facebook AISimilarity Search, an open-source retrieval method).
[0372] In addition, before using the retrieval model to obtain similar accounts to the target account, the retrieval model needs to be trained. The process of training the retrieval model includes: obtaining the features of multiple sample accounts and at least one fourth similarity; processing the features of each pair of sample accounts based on the retrieval model to obtain at least one fifth similarity; and training the retrieval model based on at least one fourth similarity and at least one fifth similarity.
[0373] Each fourth similarity indicates whether any two sample accounts are similar among multiple sample accounts, and each fifth similarity indicates the degree of similarity between any two sample accounts among the predicted multiple sample accounts. Since the fifth similarity is based on the retrieval model, the accuracy of the retrieval model can be determined by comparing the fourth and fifth similarities. The retrieval model is trained using at least one fourth similarity and at least one fifth similarity to improve its accuracy.
[0374] Optionally, the difference between the fourth and fifth similarities corresponding to the same group of sample accounts in multiple sample accounts is determined, and the retrieval model is trained based on the determined multiple differences.
[0375] Each sample account group consists of two sample accounts. This difference reflects the accuracy of the retrieval model. The retrieval model is trained using these multiple differences to improve its accuracy.
[0376] Based on the above Figures 2-17 As shown in the embodiments, this application also provides a flowchart of a resource recommendation method, such as... Figure 18 As shown, this method is executed by the application server and includes:
[0377] 1801. The application server obtains the type tags associated with the account in multiple application servers and the attribute information of the account in the current application server, and obtains the resources and associated type tags in the current application server, and obtains the account's historical behavior data.
[0378] Among them, multiple application servers include the current application server.
[0379] 1802. The application server constructs a heterogeneous graph based on the acquired data.
[0380] 1803. The application server uses the constructed heterogeneous graph and combines it with the account's attribute information in the current application server to train the feature extraction model.
[0381] 1804. The application server utilizes the trained feature extraction model, combined with the attribute information of each account in the current application server, and follows the above... Figure 7 The example shown obtains the updated characteristics of each account in the current application server.
[0382] 1805. The application server filters out active accounts from the registered accounts according to the set filtering criteria.
[0383] 1806. The application server uses the characteristics of active accounts to train the retrieval model.
[0384] 1807. The application server uses the retrieval model and the updated features of each account in the current application server to select K similar accounts for each account from the selected active accounts.
[0385] 1808. For each account, the application server determines T resources that the K similar accounts are interested in based on their historical behavior data, and recommends these T resources to the account. Here, K is any positive integer, and T is any positive integer.
[0386] Figure 19 This is a schematic diagram of the structure of an account feature acquisition device provided in an embodiment of this application, such as... Figure 19 As shown, the device includes:
[0387] The acquisition module 1901 is used to acquire the first account data corresponding to the target account. The first account data includes the registration information of the target account and at least one first type tag associated with the target account.
[0388] The acquisition module 1901 is also used to acquire second account data corresponding to the target account. The second account data includes at least one second type tag associated with the target account. The first type tag and the second type tag indicate the type to which the target account belongs. The first account data and the second account data are determined by different application servers.
[0389] The acquisition module 1901 is also used to acquire the characteristics of the target account based on the registration information of the target account;
[0390] The fusion module 1902 is used to fuse the features of the target account with the features of each type tag associated with the target account to obtain the updated features of the target account.
[0391] In one possible implementation, the acquisition module 1901 is further configured to acquire at least one piece of object data associated with each type tag associated with the target account, wherein the object data includes at least one of the following: account data corresponding to other accounts different from the target account, resource data corresponding to resources, or other type tags different from the type tag.
[0392] The fusion module 1902 is used to fuse the features of the target account, the features of the type tags associated with the target account, and the features corresponding to each piece of object data to obtain the updated features of the target account.
[0393] In another possible implementation, the acquisition module 1901 is used to acquire object data directly associated with the type label, and to determine the currently acquired object data as the first-level object data. The object data directly associated with the type label includes account data corresponding to other accounts belonging to the type label, resource data corresponding to resources belonging to the type label, or at least one of similar type labels of the type label; acquire object data directly associated with the i-th level object data, and determine the currently acquired object data as the (i+1)-th level object data, until the n-th level object data is acquired, where i is an integer greater than 0 and less than n, and n is an integer greater than 1.
[0394] In another possible implementation, the i-th layer object data consists of account data corresponding to other accounts different from the target account. The object data directly associated with the i-th layer object data includes at least one of the type tag belonging to the other account different from the target account or the resource data corresponding to the target resource. The other account different from the target account has performed the target operation on the target resource; or...
[0395] The i-th layer object data is the resource data corresponding to the resource. The object data directly associated with the i-th layer object data includes at least one of the following: the type label to which the resource belongs or the account data corresponding to the account that has performed the target operation on the resource; or...
[0396] The object data at layer i is a third type label. The object data directly associated with the object data at layer i includes at least one of the following: account data corresponding to an account belonging to the third type label, resource data corresponding to a resource belonging to the third type label, or similar type labels of the third type label. The third type label is different from both the first type label and the second type label.
[0397] In another possible implementation, such as Figure 20 As shown, the device also includes:
[0398] Create module 1903, which is used to create the target account node corresponding to the target account, the type node corresponding to each type tag associated with the target account, and the object node corresponding to each piece of object data;
[0399] The connection module 1904 is used to connect the target account node with each type node, connect each type node with the object node corresponding to the directly associated object data, and connect the object nodes corresponding to every two object data with direct association to obtain a heterogeneous graph.
[0400] The fusion module 1902 is used to fuse the node features corresponding to the target account node in the heterogeneous graph with the node features corresponding to the first associated node to obtain the updated node features of the target account node. The node features corresponding to the target account are the features of the target account, and the first associated node is a node in the heterogeneous graph that is directly or indirectly connected to the target account node. The updated node features of the target account node are used to represent the updated features of the target account.
[0401] In another possible implementation, such as Figure 20 As shown, the fusion module 1902 includes:
[0402] The splicing unit 1921 is used to fuse the node features corresponding to multiple first associated nodes, and splice the fused features with the node features corresponding to the target account node to obtain the first spliced feature.
[0403] The determination unit 1922 is used to perform feature transformation on the first splicing feature and determine the transformed feature as the node feature after the target account node is updated.
[0404] In another possible implementation, the multiple first-level associated nodes include m-level associated nodes, each j-th level associated node is directly connected to a j-1-th level associated node, and each first-level associated node is directly connected to the target account node, where j is an integer greater than 1 and not greater than m, and m is an integer greater than 1.
[0405] The splicing unit 1921 is used to, for each (j-1)th layer associated node, fuse the node features corresponding to the j-th layer associated node directly connected to the (j-1)th layer associated node with the node features corresponding to the (j-1)th layer associated node, and determine the fused feature as the updated node feature of the (j-1)th layer associated node, until the updated node features of each first layer associated node are obtained; fuse the updated node features of the first layer associated nodes, and splice the fused feature with the node features corresponding to the target account node to obtain the first spliced feature.
[0406] In another possible implementation, the splicing unit 1921 is used to fuse the node features corresponding to multiple associated nodes of the j-th layer that are directly connected to the associated nodes of the j-1 layer, splice the fused features with the node features corresponding to the associated nodes of the j-1 layer to obtain the second spliced feature; perform feature transformation on the second spliced feature, and determine the transformed feature as the updated node feature of the associated nodes of the j-1 layer.
[0407] In another possible implementation, the fusion module 1902 is used to fuse the node features corresponding to the target account node in the heterogeneous graph with the node features corresponding to the first associated node based on the feature extraction model, so as to obtain the updated node features of the target account node.
[0408] In another possible implementation, such as Figure 20 As shown, the device also includes:
[0409] The acquisition module 1901 is also used to acquire a sample heterogeneous graph, which includes multiple nodes, including sample account nodes and type nodes, and any two nodes with an association relationship are connected.
[0410] The determination module 1905 is used to determine any type of node in the sample heterogeneous graph as a sample node, obtain sample indication information, and the sample indication information indicates whether there is a connection between the sample account node and the sample node.
[0411] The fusion module 1902 is also used to fuse the node features corresponding to the sample account node in the sample heterogeneous graph with the node features corresponding to the second associated node based on the feature extraction model, so as to obtain the updated node features of the sample account node. The second associated node is a node in the sample heterogeneous graph that is directly or indirectly connected to the sample account node.
[0412] The fusion module 1902 is also used to fuse the node features corresponding to the sample nodes in the sample heterogeneous graph with the node features corresponding to the third associated node based on the feature extraction model, so as to obtain the updated node features of the sample nodes. The third associated node is a node in the sample heterogeneous graph that is directly or indirectly connected to the sample nodes.
[0413] The acquisition module 1901 is also used to acquire prediction indication information based on the updated node features of the sample account node and the updated node features of the sample node. The prediction indication information indicates the probability of connection between the predicted sample account node and the sample node.
[0414] Training module 1906 is used to train the feature extraction model based on prediction indication information and sample indication information.
[0415] In another possible implementation, the sample node includes positive sample node and negative sample node, and the sample indication information includes positive sample indication information and negative sample indication information. The positive sample indication information indicates that the sample account node is connected to the positive sample node, and the negative sample indication information indicates that the sample account node is not connected to the negative sample node.
[0416] The acquisition module 1901 is further configured to acquire first prediction indication information based on the updated node features of the sample account node and the updated node features of the positive sample node, the first prediction indication information indicating the probability of a connection between the predicted sample account node and the positive sample node; and acquire second prediction indication information based on the updated node features of the sample account node and the updated node features of the negative sample node, the second prediction indication information indicating the probability of a connection between the predicted sample account node and the negative sample node.
[0417] Training module 1906 is used to train the feature extraction model based on the first prediction indication information, the second prediction indication information, the positive sample indication information, and the negative sample indication information.
[0418] In another possible implementation, such as Figure 20 As shown, the device also includes:
[0419] The acquisition module 1901 is also used to acquire a sample heterogeneity graph, which includes multiple nodes, including multiple sample account nodes and type nodes, and any two nodes with an association relationship are connected.
[0420] The determination module 1905 is also used to determine the number of shared nodes between every two sample account nodes in the sample heterogeneous graph based on the connection relationship between nodes in the sample heterogeneous graph. The number of shared nodes indicates the number of nodes that the two sample account nodes are connected to in common.
[0421] The fusion module 1902 is also used to fuse the node features corresponding to the sample account node with the node features corresponding to the second associated node for each sample account node in the sample heterogeneous graph based on the feature extraction model, so as to obtain the updated node features of the sample account node. The second associated node is a node in the sample heterogeneous graph that is directly or indirectly connected to the sample account node.
[0422] The acquisition module 1901 is also used to acquire a first similarity based on the updated node features of every two sample account nodes. The first similarity indicates the degree of similarity between the sample accounts referred to by the two predicted sample account nodes.
[0423] Training module 1906 is used to train the feature extraction model based on the number of shared nodes corresponding to each pair of sample account nodes and the corresponding first similarity.
[0424] In another possible implementation, the training module 1906 is used to determine the difference between the first similarity corresponding to the first group of sample account nodes and the first similarity corresponding to the second group of sample account nodes for any two groups of sample account nodes containing the same sample account node. The two groups of sample account nodes include the first group of sample account nodes and the second group of sample account nodes. The number of shared nodes corresponding to the first group of sample account nodes is greater than the number of shared nodes corresponding to the second group of sample account nodes. Each group of sample account nodes includes two sample account nodes. Based on the determined multiple differences, the feature extraction model is trained.
[0425] In another possible implementation, the training module 1906 is used to determine the second similarity between each pair of sample account nodes based on the relationship between the number of shared nodes corresponding to each pair of sample account nodes and the node number threshold. The second similarity indicates whether the sample accounts referred to by the two sample account nodes are similar. The feature extraction model is trained based on the first similarity and the second similarity between each pair of sample account nodes.
[0426] In another possible implementation, such as Figure 20 As shown, the device also includes:
[0427] The acquisition module 1901 is also used to acquire a sample heterogeneous graph, which includes multiple nodes, including sample account nodes, type nodes, and multiple sample resource nodes, and any two nodes with an association relationship are connected.
[0428] The determination module 1905 is also used to determine the number of shared nodes between every two sample resource nodes in the sample heterogeneous graph based on the connection relationship between nodes in the sample heterogeneous graph. The number of shared nodes indicates the number of nodes that are commonly connected to the two sample resource nodes.
[0429] The fusion module 1902 is also used to fuse the node features corresponding to the sample resource node with the node features corresponding to the fourth associated node for each sample resource node in the sample heterogeneous graph based on the feature extraction model, so as to obtain the updated node features of the sample resource node. The fourth associated node is a node in the sample heterogeneous graph that is directly or indirectly connected to the sample resource node.
[0430] The acquisition module 1901 is also used to acquire a third similarity based on the updated node features of every two sample resource nodes. The third similarity indicates the degree of similarity between the sample resources referred to by the two predicted sample resource nodes.
[0431] Training module 1906 is used to train the feature extraction model based on the number of shared nodes corresponding to each pair of sample resource nodes and the corresponding third similarity.
[0432] In another possible implementation, such as Figure 20 As shown, the device also includes:
[0433] The acquisition module 1901 is also used to acquire similar accounts to the target account based on the updated features of the target account; and to acquire resources that match the similar accounts.
[0434] Recommendation module 1907 is used to recommend resources to target accounts.
[0435] In another possible implementation, the acquisition module 1901 is used to identify resources that have been used by similar accounts to perform target operations based on the historical behavior data of similar accounts, and to identify resources that match similar accounts.
[0436] In another possible implementation, the acquisition module 1901 is used to acquire the similarity between the updated features of the target account and the features of multiple candidate accounts; based on the similarity corresponding to the multiple candidate accounts, the similar account of the target account is determined from the multiple candidate accounts, and the similarity corresponding to the similar account is greater than the similarity corresponding to other candidate accounts among the multiple candidate accounts.
[0437] In another possible implementation, the retrieval of similar accounts based on the updated features of the target account is performed by the retrieval model; such as... Figure 20 As shown, the device also includes:
[0438] The acquisition module 1901 is also used to acquire features of multiple sample accounts and at least one fourth similarity, each fourth similarity indicating whether any two sample accounts among the multiple sample accounts are similar;
[0439] The processing module 1908 is used to process the features of each pair of sample accounts based on the retrieval model to obtain at least one fifth similarity, each fifth similarity indicating the degree of similarity between any two sample accounts among the predicted multiple sample accounts;
[0440] Training module 1906 is used to train the retrieval model based on at least one fourth similarity and at least one fifth similarity.
[0441] It should be noted that the account feature acquisition device provided in the above embodiments is only an example of the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the application server can be divided into different functional modules to complete all or part of the functions described above. In addition, the account feature acquisition device and the account feature acquisition method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process can be found in the method embodiments, which will not be repeated here.
[0442] This application also provides a computer device, which includes a processor and a memory. The memory stores at least one computer program, which is loaded and executed by the processor to implement the operations performed by the account feature acquisition method of the above embodiments.
[0443] Optionally, the computer device is provided as a terminal. Figure 21 A structural block diagram of a terminal 2100 provided in an exemplary embodiment of this application is shown. The terminal 2100 includes a processor 2101 and a memory 2102.
[0444] Processor 2101 may include one or more processing cores, such as a quad-core processor or an octa-core processor. Processor 2101 may be implemented using at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), or PLA (Programmable Logic Array). Processor 2101 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state.
[0445] The memory 2102 may include one or more computer-readable storage media, which may be non-transitory. The memory 2102 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices.
[0446] In some embodiments, the terminal 2100 may also optionally include a peripheral device interface 2103 and at least one peripheral device. The processor 2101, memory 2102, and peripheral device interface 2103 can be connected via a bus or signal line. Each peripheral device can be connected to the peripheral device interface 2103 via a bus, signal line, or circuit board. Specifically, the peripheral device includes at least one of a radio frequency circuit 2104 and a display screen 2105.
[0447] Peripheral device interface 2103 can be used to connect at least one I / O (Input / Output) related peripheral device to processor 2101 and memory 2102. In some embodiments, processor 2101, memory 2102 and peripheral device interface 2103 are integrated on the same chip or circuit board; in some other embodiments, any one or two of processor 2101, memory 2102 and peripheral device interface 2103 can be implemented on separate chips or circuit boards, which is not limited in this embodiment.
[0448] Radio frequency (RF) circuit 2104 is used to receive and transmit RF signals, also known as electromagnetic signals. RF circuit 2104 communicates with communication networks and other communication devices via electromagnetic signals. RF circuit 2104 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals.
[0449] Display screen 2105 is used to display a UI (User Interface). This UI may include graphics, text, icons, video, and any combination thereof. When display screen 2105 is a touch display screen, it also has the ability to collect touch signals on or above its surface. These touch signals can be input as control signals to processor 2101 for processing. In this case, display screen 2105 can also be used to provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard.
[0450] Those skilled in the art will understand that Figure 21 The structure shown does not constitute a limitation on terminal 2100 and may include more or fewer components than shown, or combine certain components, or use different component arrangements.
[0451] Optionally, the computer device is provided as a server. Figure 22 This is a schematic diagram of a server structure provided in an embodiment of this application. The server 2200 can vary significantly due to different configurations or performance. It may include one or more Central Processing Units (CPUs) 2201 and one or more memories 2202. The memories 2202 store at least one computer program, which is loaded and executed by the processor 2201 to implement the methods provided in the above-described method embodiments. Of course, the server may also have wired or wireless network interfaces, a keyboard, and input / output interfaces for input and output. The server may also include other components for implementing device functions, which will not be elaborated upon here.
[0452] This application also provides a computer-readable storage medium storing at least one computer program, which is loaded and executed by a processor to implement the operations performed by the account feature acquisition method of the above embodiments.
[0453] This application also provides a computer program product, including a computer program that, when executed by a processor, performs the operations performed by the account feature acquisition method of the above embodiments.
[0454] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
[0455] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present application should be included within the protection scope of the present application.
Claims
1. A method for obtaining account features, characterized in that, The method includes: Obtain the first account data corresponding to the target account, wherein the first account data includes the registration information of the target account and at least one first type tag associated with the target account; Obtain second account data corresponding to the target account. The second account data includes at least one second type tag associated with the target account. The first type tag and the second type tag indicate the type to which the target account belongs. The first account data and the second account data are determined by different application servers. The target account being associated with the first type tag indicates that the user represented by the target account prefers resources belonging to the first type tag. The target account being associated with the second type tag indicates that the user represented by the target account prefers resources belonging to the second type tag. For each type tag associated with the target account, obtain at least one piece of object data associated with the type tag. The object data includes at least one of the following: account data corresponding to other accounts different from the target account, resource data corresponding to resources, or other type tags different from the type tag. Based on the registration information of the target account, the characteristics of the target account are obtained, and the characteristics of the target account are used to describe the user referred to by the target account; The features of the target account, the features of each type tag associated with the target account, and the features corresponding to each piece of object data are fused to obtain the updated features of the target account; The method further includes: creating a target account node corresponding to the target account, a type node corresponding to each type tag associated with the target account, and an object node corresponding to each piece of object data; connecting the target account node to each type node, connecting each type node to the object node corresponding to the directly associated object data, and connecting the object nodes corresponding to every two pieces of object data with a direct association relationship to obtain a heterogeneous graph; The step of fusing the features of the target account, the features of each type tag associated with the target account, and the features corresponding to each piece of object data to obtain the updated features of the target account includes: fusing the node features corresponding to the target account node in the heterogeneous graph with the node features corresponding to the first associated node to obtain the updated node features of the target account node. The node features corresponding to the target account are the features of the target account, and the first associated node is a node in the heterogeneous graph that is directly or indirectly connected to the target account node. The updated node features of the target account node are used to represent the updated features of the target account.
2. The method according to claim 1, characterized in that, The step of obtaining at least one piece of object data associated with the type label includes: Obtain object data directly associated with the type tag, and determine the currently obtained object data as the first-level object data. The object data directly associated with the type tag includes at least one of the following: account data corresponding to other accounts belonging to the type tag, resource data corresponding to resources belonging to the type tag, or similar type tags of the type tag. Retrieve the object data directly associated with the object data of the i-th level, and determine the currently retrieved object data as the object data of the (i+1)-th level, until the object data of the n-th level is retrieved, where i is an integer greater than 0 and less than n, and n is an integer greater than 1.
3. The method according to claim 2, characterized in that, The i-th layer object data consists of account data corresponding to other accounts different from the target account. The object data directly associated with the i-th layer object data includes at least one of the following: type tags belonging to other accounts different from the target account or resource data corresponding to the target resource. Alternatively, other accounts different from the target account have performed the target operation on the target resource. The i-th layer object data is the resource data corresponding to the resource, and the object data directly associated with the i-th layer object data includes at least one of the following: the type tag to which the resource belongs or the account data corresponding to the account that has performed the target operation on the resource; or... The i-th layer object data is a third type tag. The object data directly associated with the i-th layer object data includes at least one of the following: account data corresponding to an account belonging to the third type tag, resource data corresponding to a resource belonging to the third type tag, or a similar type tag to the third type tag. The third type tag is different from both the first type tag and the second type tag.
4. The method according to claim 1, characterized in that, The step of fusing the node features corresponding to the target account node in the heterogeneous graph with the node features corresponding to the first associated node to obtain the updated node features of the target account node includes: The node features corresponding to multiple first associated nodes are fused together, and the fused features are concatenated with the node features corresponding to the target account node to obtain the first concatenated feature. The first spliced feature is transformed, and the transformed feature is determined as the updated node feature of the target account node.
5. The method according to claim 4, characterized in that, The plurality of first associated nodes include m layers of associated nodes, each j-th layer associated node is directly connected to a j-1-th layer associated node, and each 1-th layer associated node is directly connected to the target account node, where j is an integer greater than 1 and not greater than m, and m is an integer greater than 1; The step of fusing the node features corresponding to multiple first associated nodes and concatenating the fused features with the node features corresponding to the target account node to obtain the first concatenated feature includes: For each (j-1)th layer associated node, the node features corresponding to the j-th layer associated node directly connected to the (j-1)th layer associated node are fused with the node features corresponding to the (j-1)th layer associated node. The fused features are determined as the updated node features of the (j-1)th layer associated node, until the updated node features of each (j-1)th layer associated node are obtained. The updated node features of the first layer of associated nodes are fused together, and the fused features are then concatenated with the node features corresponding to the target account node to obtain the first concatenated feature.
6. The method according to claim 1, characterized in that, The step of fusing the node features corresponding to the target account node in the heterogeneous graph with the node features corresponding to the first associated node to obtain the updated node features of the target account node includes: Based on the feature extraction model, the node features corresponding to the target account node in the heterogeneous graph are fused with the node features corresponding to the first associated node to obtain the updated node features of the target account node.
7. The method according to claim 6, characterized in that, The method further includes: Obtain a sample heterogeneity graph, which includes multiple nodes, including sample account nodes and type nodes, and any two nodes with an association relationship are connected. Any type of node in the sample heterogeneous graph is identified as a sample node, and sample indication information is obtained. The sample indication information indicates whether there is a connection between the sample account node and the sample node. Based on the feature extraction model, the node features corresponding to the sample account node in the sample heterogeneous graph are fused with the node features corresponding to the second associated node to obtain the updated node features of the sample account node. The second associated node is a node in the sample heterogeneous graph that is directly or indirectly connected to the sample account node. Based on the feature extraction model, the node features corresponding to the sample node in the sample heterogeneous graph are fused with the node features corresponding to the third associated node to obtain the updated node features of the sample node. The third associated node is a node in the sample heterogeneous graph that is directly or indirectly connected to the sample node. Based on the updated node features of the sample account node and the updated node features of the sample node, prediction indication information is obtained, which indicates the predicted probability of a connection between the sample account node and the sample node. The feature extraction model is trained based on the prediction indication information and the sample indication information.
8. The method according to claim 6, characterized in that, The method further includes: Obtain a sample heterogeneity graph, which includes multiple nodes, including multiple sample account nodes and type nodes, and any two nodes with an association relationship are connected. Based on the connection relationships between nodes in the sample heterogeneous graph, the number of shared nodes between every two sample account nodes in the sample heterogeneous graph is obtained, and the number of shared nodes indicates the number of nodes that the two sample account nodes are connected to in common. For each sample account node in the sample heterogeneous graph, based on the feature extraction model, the node features corresponding to the sample account node are fused with the node features corresponding to the second associated node to obtain the updated node features of the sample account node. The second associated node is a node in the sample heterogeneous graph that is directly or indirectly connected to the sample account node. Based on the updated node features of every two sample account nodes, a first similarity is obtained, which indicates the degree of similarity between the sample accounts referred to by the two sample account nodes. The feature extraction model is trained based on the number of shared nodes corresponding to each pair of sample account nodes and the corresponding first similarity.
9. The method according to any one of claims 1-8, characterized in that, The method further includes: Based on the updated characteristics of the target account, obtain similar accounts to the target account; Obtain resources that match the similar accounts; The resources are recommended to the target account.
10. An account feature acquisition device, characterized in that, The device includes: The acquisition module is used to acquire first account data corresponding to the target account, wherein the first account data includes the registration information of the target account and at least one first type tag associated with the target account; The acquisition module is further configured to acquire second account data corresponding to the target account, the second account data including at least one second type tag associated with the target account, the first type tag and the second type tag indicating the type to which the target account belongs, the first account data and the second account data being determined by different application servers; the target account being associated with the first type tag indicates that the user represented by the target account likes resources belonging to the first type tag; the target account being associated with the second type tag indicates that the user represented by the target account likes resources belonging to the second type tag; The acquisition module is further configured to acquire the characteristics of the target account based on the registration information of the target account, wherein the characteristics of the target account are used to describe the user referred to by the target account; The acquisition module is further configured to acquire at least one piece of object data associated with each type tag associated with the target account, wherein the object data includes at least one of the following: account data corresponding to other accounts different from the target account, resource data corresponding to resources, or other type tags different from the type tag; The fusion module is used to fuse the features of the target account, the features of each type tag associated with the target account, and the features corresponding to each piece of object data to obtain the updated features of the target account; The device further includes: A creation module is used to create the target account node corresponding to the target account, the type node corresponding to each type tag associated with the target account, and the object node corresponding to each piece of object data. The connection module is used to connect the target account node with each type node, connect each type node with the object node corresponding to the directly associated object data, and connect the object nodes corresponding to every two object data with a direct relationship to obtain a heterogeneous graph. The fusion module is used to fuse the node features corresponding to the target account node in the heterogeneous graph with the node features corresponding to the first associated node to obtain the updated node features of the target account node. The node features corresponding to the target account are the features of the target account. The first associated node is a node in the heterogeneous graph that is directly or indirectly connected to the target account node. The updated node features of the target account node are used to represent the updated features of the target account.
11. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing at least one computer program, which is loaded and executed by the processor to perform the operations performed by the account feature acquisition method as described in any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one computer program, which is loaded and executed by a processor to perform the operations of the account feature acquisition method as described in any one of claims 1 to 9.
13. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it performs the operations of the account feature acquisition method as described in any one of claims 1 to 9.