Label prediction method and device based on label propagation algorithm, equipment and medium

By constructing user relationship graphs and similarity graphs, and combining supervised learning models and label propagation algorithms, the problems of high computational cost and low accuracy in label propagation algorithms in label prediction are solved, and more accurate label prediction is achieved.

CN116976473BActive Publication Date: 2026-11-06CHINA MOBILE GROUP JIANGSU +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210392121.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-14
Publication Date
2026-11-06
Estimated Expiration
2042-04-14

AI Technical Summary

Technical Problem

Existing label propagation algorithms suffer from problems such as non-convergence, high computational cost, high resource consumption, and low label prediction accuracy in label prediction, especially failing to effectively consider non-proximity relationships between users.

Method used

By constructing a user relationship graph and combining first-order and second-order similarity, a user similarity graph is built. Then, a supervised learning model is used for label prediction, taking into account the direct and indirect relationships between users, and a label propagation algorithm is used for label prediction.

Benefits of technology

It improves the accuracy of label prediction, enriches the prediction population, enhances the effectiveness of label propagation, and can propagate to similar vertices rather than simply neighboring vertices, thereby enhancing the model's predictive ability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116976473B_ABST
    Figure CN116976473B_ABST
Patent Text Reader

Abstract

The application relates to the field of graph algorithms and data mining, and provides a label prediction method and device based on a label propagation algorithm, equipment and a medium. The method comprises the following steps: determining each full user data as each graph node; determining the node edge and the edge weight value of each graph node according to the preset data of each full user data, and constructing a user relationship graph; constructing a user similarity graph by combining the first-order similarity and the second-order similarity through the user relationship graph; performing label prediction on each full user data through a trained supervised learning model to obtain the user label value of each full user data; and performing label prediction on each user label value through the user similarity graph combined with the label propagation algorithm to obtain a new group label. The label prediction method based on the label propagation algorithm provided in the application can improve the accuracy of label prediction by combining the prediction result of the supervised learning model with the user similarity graph and the label propagation algorithm.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of graph algorithm and data mining technology, and in particular to a label prediction method, apparatus, device and medium based on label propagation algorithm. Background Technology

[0002] Industry user tag prediction is a crucial task in data mining and machine learning, playing a vital role in business support and industry data mining. Currently, the main methods for industry tag prediction are feature-based prediction methods, which can be categorized into two types based on whether tags are present: supervised learning and unsupervised learning methods. However, both types of methods only consider the user's own feature data, neglecting the impact of the user's relationships with other users.

[0003] To address the problems of feature-based algorithms, graph algorithms have seen increasingly widespread application in recent years, such as the Logistic Propagation of Labels (LPA) algorithm, a semi-supervised learning algorithm. LPA propagates label data to neighboring nodes through the weights of relationships between samples. Each node updates its label by summing the weighted values ​​of its neighbors, iterating this process a specified number of times until a new label group is generated. However, LPA fails to converge during training, requires a specified number of iterations, and is computationally intensive, consuming significant time and resources. Furthermore, LPA only considers the weights of relationships between nodes, neglecting the potential propagation from non-adjacent or distant nodes, leading to low accuracy in label prediction. Summary of the Invention

[0004] This application provides a tag prediction method, apparatus, device, and medium based on a tag propagation algorithm, aiming to improve the accuracy of tag prediction.

[0005] Firstly, this application provides a label prediction method based on a label propagation algorithm, comprising:

[0006] Determine the full user data for each user to be processed, and define each full user data as a graph node;

[0007] Based on the preset data in each of the full user data, determine the node edges and edge weights between each graph node, and construct a user relationship graph;

[0008] A user similarity graph is constructed by combining the first-order and second-order similarity of each graph node with the user relationship graph;

[0009] The trained supervised learning model is used to predict the labels of each of the full user data sets to obtain the user label values ​​of each of the full user data sets.

[0010] By combining the user similarity graph with the tag propagation algorithm, tag prediction is performed on each user's tag value to obtain new group tags.

[0011] In one embodiment, constructing a user similarity graph by combining the first-order and second-order similarities of each graph node in the user relationship graph includes:

[0012] The first-order similarity and second-order similarity of each graph node in the user relationship graph are added together to obtain the node similarity of each graph node;

[0013] The node similarity of each graph node is normalized to obtain the normalized similarity of each graph node, and the target similarity of any two graph nodes is obtained based on the normalized similarity of any two graph nodes.

[0014] The user similarity graph is constructed based on the target similarity between any two graph nodes and a preset similarity threshold.

[0015] The user similarity graph is constructed by using the target similarity and a preset similarity threshold of any two graph nodes, including:

[0016] Using the graph nodes in the user relationship graph as vertex data, construct an undirected user graph without vertex edges and without edge weight values;

[0017] The target similarity between any two graph nodes is compared with the preset similarity threshold to obtain the comparison result;

[0018] Based on the comparison results, determine the final similarities among the target similarities of any two graph nodes that are greater than or equal to the preset similarity threshold;

[0019] Based on the final similarity scores, the vertex edges and their weights between the vertex data in the undirected user graph are determined, and the user similarity graph is constructed.

[0020] Determining the first-order similarity of each of the graph nodes includes:

[0021] Determine all directly connected first graph nodes and second graph nodes in the user relationship graph, and construct the first node vector of each first graph node and the second node vector of each second graph node;

[0022] Based on each of the first node vectors and each of the second node vectors, construct a first joint distribution probability of each of the first graph nodes and each of the second graph nodes;

[0023] Determine the edge weights and values ​​in the user relationship graph, and determine the target edge weight values ​​between each first graph node and each second graph node;

[0024] Based on the target edge weight values ​​and the sum of edge weights, determine the first empirical distribution probability between each first graph node and each second graph node;

[0025] The first-order similarity between each first graph node and each second graph node is obtained by minimizing the KL divergence between the first joint probability distribution and the first empirical probability distribution of each first graph node and each second graph node.

[0026] Determining the second-order similarity of each of the graph nodes includes:

[0027] Construct the third node vector for each graph node in the user relationship graph;

[0028] The conditional distribution probability of each graph node generating a context graph node is determined by combining the vectors of each third node, and each conditional distribution probability is determined as the second joint distribution probability of each graph node;

[0029] Determine the weights and values ​​of all out-degree edges originating from each of the graph nodes, and determine the edge weights between each of the graph nodes and its context graph nodes.

[0030] The second empirical distribution probability of each graph node is determined based on the sum of edge weights and values ​​of each edge weight.

[0031] The second-order similarity of each graph node is obtained by minimizing the KL divergence between the second joint probability and the second empirical probability of each graph node.

[0032] The step of determining the node edges and edge weights between each graph node based on preset data in each of the full user data sets, and constructing a user relationship graph, includes:

[0033] Determine preset data in each of the full user data sets, wherein the preset data includes user call data;

[0034] Each user call data is identified as a node edge between each graph node, and the call frequency or call duration of each user call data is determined.

[0035] The call frequency or call duration of each user's call data is determined as the edge weight value of each node edge, and the user relationship graph is constructed.

[0036] Secondly, this application also provides a tag prediction device based on a tag propagation algorithm, comprising:

[0037] The determination module is used to determine the full user data of each user to be processed, and to determine each full user data as a graph node;

[0038] The first construction module is used to determine the node edges and edge weights between each graph node based on preset data in each of the full user data, and to construct a user relationship graph.

[0039] The second construction module is used to construct a user similarity graph by combining the first-order similarity and second-order similarity of each graph node with the user relationship graph;

[0040] The first prediction module is used to predict the labels of each of the full user data sets using a trained supervised learning model, so as to obtain the user label values ​​of each of the full user data sets.

[0041] The second prediction module is used to predict the labels of each user's label value by combining the user similarity graph with the label propagation algorithm, so as to obtain new group labels.

[0042] In one embodiment, the second building module is further configured to:

[0043] The first-order similarity and second-order similarity of each graph node in the user relationship graph are added together to obtain the node similarity of each graph node;

[0044] The node similarity of each graph node is normalized to obtain the normalized similarity of each graph node, and the target similarity of any two graph nodes is obtained based on the normalized similarity of any two graph nodes.

[0045] The user similarity graph is constructed based on the target similarity between any two graph nodes and a preset similarity threshold.

[0046] Thirdly, this application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the tag prediction method based on the tag propagation algorithm described in the first aspect.

[0047] Fourthly, this application also provides a computer-readable storage medium comprising a computer program that, when executed by the processor, implements the tag prediction method based on the tag propagation algorithm described in the first aspect.

[0048] Fifthly, this application also provides a computer program product, which includes a computer program that, when executed by the processor, implements the label prediction method based on the label propagation algorithm described in the first aspect.

[0049] The label prediction method, apparatus, device, and medium based on the label propagation algorithm provided in this application not only consider the direct connections between users during the label prediction process, but also take user similarity as a criterion. A user similarity graph is constructed based on the user relationship graph. At the same time, label prediction is performed by combining the user similarity graph and the label propagation algorithm with the prediction results of the supervised learning model. This allows the label to be effectively propagated to similar vertices rather than simply neighboring vertices during the label propagation process. Furthermore, the prediction results of the user similarity graph and the supervised learning model complement each other, enriching the prediction group and improving the accuracy of label prediction. Attached Figure Description

[0050] To more clearly illustrate the technical solutions in this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0051] Figure 1 This is one of the flowcharts of the label prediction method based on the label propagation algorithm proposed in this paper;

[0052] Figure 2 This is the second flowchart of the label prediction method based on the label propagation algorithm proposed by this application;

[0053] Figure 3 This is a schematic diagram of the tag prediction device based on the tag propagation algorithm proposed by this invention;

[0054] Figure 4 This is a schematic diagram of the structure of the electronic device provided in this application. Detailed Implementation

[0055] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0056] Combination Figures 1 to 4 This application describes the tag prediction method, apparatus, device, and medium based on the tag propagation algorithm. Figure 1 This is one of the flowcharts of the label prediction method based on the label propagation algorithm proposed in this paper; Figure 2This is the second flowchart of the label prediction method based on the label propagation algorithm proposed by this application; Figure 3 This is a schematic diagram of the tag prediction device based on the tag propagation algorithm proposed by this invention; Figure 4 This is a schematic diagram of the structure of the electronic device provided in this application.

[0057] This application provides an embodiment of a label prediction method based on a label propagation algorithm. It should be noted that although the logical order is shown in the flowchart, under certain data conditions, the steps shown or described may be performed in a different order than that shown here.

[0058] This application uses an electronic device as the execution subject for example. This application uses a tag prediction system as one of the manifestations of the electronic device, but it does not limit it.

[0059] Specifically, refer to Figure 1 , Figure 1 This is one of the flowcharts of the label prediction method based on the label propagation algorithm of this application. The label prediction method based on the label propagation algorithm provided in the embodiments of this application includes:

[0060] Step S10: Determine the full user data of each user to be processed, and determine each full user data as a graph node;

[0061] Step S20: Determine the node edges and edge weights between each graph node based on the preset data in each of the full user data sets, and construct a user relationship graph.

[0062] It should be noted that each user carries, but is not limited to, full user data and basic user data. In this embodiment, obtaining the full user data of each user is taken as an example. Therefore, the label prediction system obtains and determines the full user data of each user to be processed. The full user data is recorded in the encrypted user number data in the cluster, but is not limited to mobile user number data. Next, the label prediction system determines the full user data of each user to be processed as each graph node.

[0063] Furthermore, the label prediction system identifies a basic data point (preset data) within the full user data set and defines this basic data point as the edge connections between graph nodes. Simultaneously, the label prediction system determines the quantitative data point of this basic data point and defines the quantitative data point as the edge weights between graph nodes. Therefore, the label prediction system constructs a user relationship graph based on each graph node, the edge connections between graph nodes, and the edge weights between graph nodes, as described in steps S201 to S203. Following this, a graph embedding method is used to update node attributes based on the user relationship graph, thereby comprehensively describing the relationships between the characteristics of each graph node and the graph structure.

[0064] Further, steps S201 to S203 are described as follows:

[0065] Step S201: Determine preset data in each of the full user data sets, wherein the preset data includes user call data;

[0066] Step S202: Determine each user call data as a node edge between each graph node, and determine the call frequency or call duration of each user call data.

[0067] Step S203: Determine the call frequency or call duration of each user call data as the edge weight value of each node edge, and construct the user relationship graph.

[0068] Specifically, the tag prediction system determines preset data in each full set of user data. In this embodiment, user call data is used as the preset data for example. Therefore, it can be understood that the tag prediction system determines user call data in each full set of user data and identifies each user call data as a node edge between graph nodes.

[0069] Furthermore, the label prediction system determines the call frequency or call duration of each user's call data, and uses this frequency or duration as the edge weight value for each node. Therefore, the label prediction system constructs a user relationship graph based on each graph node, the nodes between graph nodes, and the edge weight values ​​between graph nodes.

[0070] This application embodiment constructs a user relationship graph using user call data from the full user data, as well as the call frequency or call duration of the user call data. The user relationship graph clearly describes the relationship between each user to be processed.

[0071] Step S30: Construct a user similarity graph by combining the first-order similarity and second-order similarity of each graph node with the user relationship graph.

[0072] Furthermore, the label prediction system identifies each graph node in the user relationship graph that is directly connected to each other, and calculates the first-order similarity between each graph node and each of its directly connected graph nodes, as described in steps S301 to S305.

[0073] Furthermore, the label prediction system identifies each non-directly connected neighboring graph node in the user relationship graph and calculates the second-order similarity between each graph node and its neighboring graph nodes, as described in steps S306 to S3010.

[0074] Furthermore, the label prediction system constructs a user similarity graph by combining the first-order and second-order similarity of each graph node through the user relationship graph, as described in steps S3011 to S3013.

[0075] Step S40: Predict the labels of each of the full user data sets using the trained supervised learning model to obtain the user label values ​​of each of the full user data sets.

[0076] Step S50: Using the user similarity graph and the label propagation algorithm, label prediction is performed on each user label value to obtain new group labels.

[0077] Furthermore, the label prediction system utilizes user-provided data sample labels for supervised learning training, establishing a supervised learning model, such as a random forest, based on existing user feature data. Next, the label prediction system uses the trained supervised learning model to predict labels on the entire set of user data, obtaining user label values ​​for all user data. The sample label values ​​of the user-provided data sample labels have a weight of 1, while the label values ​​of the user labels predicted by the supervised learning model are weighted according to the model score, with a weight range of 0 to 1.

[0078] Furthermore, the label prediction system inputs user label values ​​into the constructed user similarity graph. Using the user similarity graph and a label propagation algorithm, it predicts labels for each user's label value to obtain new group labels. This can be further understood as follows: in the user similarity graph, a label propagation algorithm is used to propagate labels. After a specified number of iterations, the nodes and their labels are output after each iteration, resulting in new group labels. The number of iterations is set according to the actual situation. It should be noted that the rules for each iteration are as follows: initialize sample label values, set sample labels and model predicted labels; for each graph node, update itself by taking a weighted average of the label values ​​of surrounding graph nodes according to similarity; reset the sample labels and model predicted labels to their initial states; exit the calculation after reaching the required number of iterations and output the new group labels.

[0079] In one embodiment, among individuals with mortgages, those with mortgages can be identified using feature-based models based on communication-related feature data such as IPR SMS messages and user spending data. This information can then be used as tag data for subsequent business analysis, allowing for selective removal or retention. However, for a given family member, mortgage payments are typically shared by both spouses, sometimes further involving the financial situation of parents or children. Yet, bank contact information and repayment methods are usually concentrated on only one person. Therefore, when performing business model analysis, spouses or other family members should also be included in the identification scope of those with mortgages. This increases model accuracy and is logically more reasonable. However, current feature-based machine learning algorithms struggle to achieve this, primarily for two reasons: spouses or other family members lack loan-related feature data such as IPR SMS messages or bank SMS messages; and spouses or other family members use different carrier numbers, making it impossible to obtain their information.

[0080] The label propagation algorithm based on relational data effectively addresses two key issues: First, relational data does not require users to possess these characteristics; label propagation only requires the relational data to meet certain conditions. Second, by utilizing user samples, even numbers from non-operator numbers can be effective in model prediction. Based on past experience, only about 60% of the samples provided by industry users are from their own operator, with the remaining samples being unusable, leading to further sample gaps. Therefore, combining these two approaches can leverage their respective strengths to achieve more comprehensive model prediction results.

[0081] This embodiment provides a label prediction method based on a label propagation algorithm. In the label prediction process, not only are the direct connections between users considered, but user similarity is also taken into account. A user similarity graph is constructed based on the user relationship graph. At the same time, label prediction is performed by combining the user similarity graph and the label propagation algorithm with the prediction results of the supervised learning model. This allows the label to be effectively propagated to similar vertices rather than simply neighboring vertices. Furthermore, the prediction results of the user similarity graph and the supervised learning model complement each other, enriching the prediction population and improving the accuracy of label prediction.

[0082] Further, the first-order similarity is determined as described in steps S301 to S305:

[0083] Step S301: Determine all directly connected first graph nodes and second graph nodes in the user relationship graph, and construct the first node vector of each first graph node and the second node vector of each second graph node.

[0084] Step S302: Construct a first joint distribution probability of each first graph node and each second graph node based on each first node vector and each second node vector;

[0085] Step S303: Determine the edge weights and values ​​in the user relationship graph, and determine the target edge weight values ​​between each first graph node and each second graph node;

[0086] Step S304: Determine the first empirical distribution probability between each first graph node and each second graph node based on each target edge weight value and the sum of edge weights.

[0087] Step S305: Minimize the KL divergence between the first joint distribution probability and the first empirical distribution probability of each first graph node and each second graph node to obtain the first-order similarity between each first graph node and each second graph node.

[0088] It should be noted that for two directly connected graph nodes, the result of normalizing the edge weights between the two nodes is determined as the first-order similarity between the two graph nodes. For two non-directly connected graph nodes, the first-order similarity between the two graph nodes is 0.

[0089] Specifically, for the case of two directly connected graph nodes, the label prediction system determines all directly connected first graph nodes v in the user relationship graph. i and each second graph node v j And construct each first graph node v i and each second graph node v j The low-dimensional vector representation, that is, constructing each first graph node v i First node vector and construct each second graph node v j The second node vector Furthermore, the label prediction system combines the probability function with the vectors of each first node. and each second node vector Construct each first graph node and each second graph node v j The first joint probability p1(v i ,v j The first joint probability distribution p1(v) i ,v j ) can be represented as

[0090] Furthermore, in order to perform supervised learning, it is necessary to determine the empirical probability of the occurrence of two graph nodes, that is, to determine the true distribution of the two graph nodes. In this embodiment, the edge weight distribution in the user relationship graph is used as the true distribution of the two graph nodes; that is, the larger the weight, the greater the probability of the two graph nodes.

[0091] This can be further understood as the tag prediction system determining the edge weights and values ​​W in the user relationship graph, which can be expressed as W = ∑ (vi,vj)∈E w ij Where E represents the edges between graph nodes, and w ij Here are the weights of the edges for each graph node. Next, the label prediction system determines the weights of each first graph node v. i and each second graph node v j The target edge weight w between ij Next, the label prediction system will assign each node v in the first graph to a label. i and each second graph node v j target edge weight w ij Divide the result by the sum of the edge weights W, and use the result as the value for each node v in the first graph. i and each second graph node v j The first empirical distribution probability between First empirical distribution probability It can be represented as

[0092] Furthermore, the label prediction system calculates the probability p1(v) of each first joint distribution. i ,v j ) and the probabilities of each first empirical distribution The distribution distance between two probability distributions is measured by KL divergence in this embodiment. KL divergence is the relative entropy, which is also known as information gain.

[0093] This can be further understood as the label prediction system calculating the probability p1(v) of each first joint distribution. i ,v j ) and the probabilities of each first empirical distribution The KL divergence, and minimizing the first joint probability p1(v i ,v j ) and the probabilities of each first empirical distribution The KL divergence is used to obtain the v values ​​of each node in the first graph.i and each second graph node v j The first-order similarity O1 between them can be expressed as:

[0094] This application embodiment uses the LINE method to combine all directly connected first graph nodes and second graph nodes to accurately determine the first-order similarity between each first graph node and each second graph node, providing a data foundation for constructing a user similarity graph, and enabling labels to be effectively propagated to similar vertices rather than simply neighboring vertices.

[0095] Further, the second-order similarity is determined as described in steps S306 to S3011:

[0096] Step S306: Construct the third node vector of each graph node in the user relationship graph;

[0097] Step S307: Combine each of the third node vectors to determine the conditional distribution probability of each graph node generating a context graph node, and determine each of the conditional distribution probabilities as the second joint distribution probability of each graph node;

[0098] Step S308: Determine the weights and values ​​of all out-degree edges starting from each of the graph nodes, and determine the edge weight values ​​between each graph node and its context graph nodes.

[0099] Step S309: Determine the second empirical distribution probability of each graph node based on the sum of edge weights and values ​​of each edge weight.

[0100] Step S3010: Minimize the KL divergence between the second joint distribution probability and the second empirical distribution probability of each graph node to obtain the second-order similarity of each graph node.

[0101] It should be noted that for two directly connected graph nodes, their second-order similarity is 0. For two non-directly connected graph nodes, if there are no neighboring graph nodes connecting them, their second-order similarity is 0. If there is at least one neighboring graph node connecting them, the normalized edge weights between the two nodes are used to determine their second-order similarity. In one embodiment, graph node 1 and graph node 2 are non-directly connected, connected by neighboring graph node a. Therefore, the normalized edge weights of graph node 1 and graph node 2 are used to determine their second-order similarity. If there are no neighboring graph nodes connecting them, their second-order similarity is 0.

[0102] Specifically, for two non-directly connected graph nodes, where at least one neighboring graph node connects the two nodes, the label prediction system determines all graph nodes v in the user relationship graph. i And construct all graph nodes v i The third node vector Next, the label prediction system uses the vectors of each third node... Determine each graph node v i Generate context graph node v j The conditional distribution probability, and the conditional distribution probability of each graph node v. i The conditional distribution probability is determined for each graph node v i The second joint distribution probability p2(v j |v i The second joint distribution probability p2(v) j |v i ) can be represented as Where V is the number of nodes in the context graph. For context graph node v j The node vector.

[0103] Furthermore, for supervised learning, it is necessary to determine the second joint distribution probability p2(v). j |v i The empirical distribution of ), that is, determining the second joint distribution probability p2(v) j |v i The true distribution of the graph nodes v is needed, that is, to determine the distribution of the graph nodes v. i The weights of edges to its neighbors are normalized. This can be further understood as the label prediction system determining the weights of edges to each graph node v. i The sum of edge weights d for all out-degree edges originating from the origin. i Edge weights and values ​​d i It can be represented as d i =∑ k∈N(i) w ik Next, the label prediction system determines the values ​​of each graph node v. i Its various context graph nodes v j edge weight value w ij .

[0104] Furthermore, the label prediction system will assign each graph node v i Its various context graph nodes v j edge weight value w ij , and each graph node v i The sum of edge weights d for all out-degree edges originating from the origin. i The results are obtained by division. Then, the label prediction system assigns the results to each graph node v.i Second empirical distribution probability Second empirical distribution probability It can be represented as

[0105] Furthermore, the label prediction system calculates v for each graph node. i The second joint distribution probability p2(v i |v j ) and second empirical distribution probability The distribution distance between two probability distributions is measured by KL divergence in this embodiment. KL divergence is the relative entropy, which is also the information gain.

[0106] This can be further understood as the label prediction system calculating the value of each graph node v. i The second joint distribution probability p2(v i |v j ) and second empirical distribution probability The KL divergence is calculated, and the individual graph node v is minimized. i The second joint distribution probability p2(v i |v j ) and second empirical distribution probability The KL divergence is used to obtain the v values ​​of each graph node. i The second-order similarity O2 can be expressed as:

[0107] This application embodiment uses the LINE method to combine each graph node to accurately determine the second-order similarity between each graph node, providing a data foundation for constructing a user similarity graph, so that labels are effectively propagated to similar vertices rather than simply neighboring vertices.

[0108] Specifically, refer to Figure 2 , Figure 2 This is the second flowchart of the label prediction method based on the label propagation algorithm proposed in this application. Step S30 includes steps S3011 to S3013:

[0109] Step S3011: Add the first-order similarity and second-order similarity of each graph node in the user relationship graph to obtain the node similarity of each graph node;

[0110] Step S3012: Normalize the node similarity of each graph node to obtain the normalized similarity of each graph node, and obtain the target similarity of any two graph nodes based on the normalized similarity of any two graph nodes.

[0111] Step S3013: Construct the user similarity graph based on the target similarity of any two graph nodes and the preset similarity threshold.

[0112] Specifically, the label prediction system adds the first-order similarity and second-order similarity of each graph node in the user relationship graph to obtain the node similarity of each graph node. Next, the label prediction system normalizes the node similarity of each graph node to obtain the normalized similarity of each graph node. Then, the label prediction system takes any two graph nodes, determines the normalized similarity between them, and performs a dot product on the normalized similarity of the two graph nodes. The result of this dot product is determined as the target similarity between the two graph nodes.

[0113] In one embodiment, any two graph nodes are graph node 1 and graph node 2. The first-order similarity of graph node 1 is a1 and the second-order similarity is a2. After adding the first-order similarity a1 and the second-order similarity a2 of graph node 1 and normalizing them, the normalized similarity A of graph node 1 is obtained. The first-order similarity of graph node 2 is b1 and the second-order similarity is b2. After adding the first-order similarity b1 and the second-order similarity b2 of graph node 2 and normalizing them, the normalized similarity B of graph node 2 is obtained. Then, the target similarity between graph node 1 and graph node 2 is S = A·B.

[0114] Furthermore, the label prediction system determines a preset similarity threshold for label propagation and compares the target similarity of any two graph nodes with the preset similarity threshold to obtain a comparison result. Finally, the label prediction system constructs the user similarity graph based on the comparison result, as described in steps S30131 to S30134. The comparison result can be either a target similarity greater than or equal to the preset similarity threshold, or no target similarity greater than or equal to the preset similarity threshold.

[0115] It should be noted that the above algorithm borrows the idea of ​​dot product similarity. However, dot product similarity is easily affected by a vector value that is too large or too small. Therefore, before multiplying the node vectors of any two graph nodes, it is necessary to normalize the node vectors of any two graph nodes in order to eliminate the influence of a vector value that is too large or too small.

[0116] In this embodiment, a user similarity graph is constructed based on the first-order and second-order similarity of any two graph nodes. This allows the label to be effectively propagated to similar vertices rather than neighboring vertices during the label propagation process. Furthermore, the user similarity graph and the prediction results of the supervised learning model complement each other, enriching the prediction population and improving the accuracy of label prediction.

[0117] Further, steps S30131 to S30134 are described as follows:

[0118] Step S30131: Using the graph nodes in the user relationship graph as vertex data, construct an undirected user graph without vertex edges and without edge weight values.

[0119] Step S30132: Compare the target similarity of any two graph nodes with the preset similarity threshold to obtain the comparison result;

[0120] Step S30133: Based on the comparison results, determine the final similarities among the target similarities of any two graph nodes that are greater than or equal to the preset similarity threshold.

[0121] Step S30134: Determine the vertex edges and their weights between the vertex data in the undirected user graph based on the final similarity scores, and construct the user similarity graph.

[0122] Specifically, the label prediction system uses graph nodes in the user relationship graph as vertex data to construct an undirected user graph without vertex edges and edge weights. Next, the label prediction system compares the target similarity of any two graph nodes with a preset similarity threshold to obtain a comparison result. The preset similarity threshold is set according to the actual situation; the comparison result can be either that there is a target similarity greater than or equal to the preset similarity threshold, or that there is no target similarity greater than or equal to the preset similarity threshold.

[0123] Furthermore, the label prediction system determines the final similarities among the target similarities of any two graph nodes that are greater than or equal to a preset similarity threshold, based on the comparison results. Simultaneously, it sets the target similarities of any two graph nodes that are less than the preset similarity threshold to 0. Therefore, the label prediction system constructs a similarity list based on each final similarity and each similarity value of 0. It then iterates through the similarity list; if the iteration result is a similarity of 0, the label prediction system skips it. If the iteration result is each final similarity, the label prediction system determines the two vertex data corresponding to each final similarity in the undirected user graph and constructs the vertex edge between these two vertex data. Simultaneously, the label prediction system determines the edge weight value between the vertex edges of the two vertex data corresponding to each final similarity in the undirected user graph, constructing a user similarity graph.

[0124] In one embodiment, the node vectors are u1, u2, ..., u n, the preset similarity threshold a=0.5, the constructed undirected user graph without vertex edges and edge weight values is g=zeros(n, n), and the construction process of the user similarity graph is as follows: For any two graph nodes i and graph node j, For i in range(n); For j in range(n); calculate the similarity between any two graph nodes i and graph node j, where u i and u j are the node vectors of any two graph nodes i and graph node j, and the target similarity s of any two graph nodes i and graph node j is u i @u j ; compare the numerical values of the target similarity s of the two graph nodes i and graph node j with the preset similarity threshold a, among the target similarities of any two graph nodes i and graph node j, for each similarity that is less than the preset similarity threshold, If s<a, set G[i][j]=0; among the target similarities of any two graph nodes i and graph node j, for each final similarity that is greater than or equal to the preset similarity threshold, If s>a, set G[i][j]=s; construct the user similarity graph Output G.

[0125] In the embodiments of the present application, by constructing the user similarity graph, in the label propagation process, labels can not only be effectively propagated to similar vertices instead of adjacent vertices, but also the user similarity graph and the prediction result of the supervised learning model can complement each other, enriching the prediction group and improving the accuracy of label prediction.

[0126] Further, the label prediction apparatus based on the label propagation algorithm provided in the present application is described as follows, and the label prediction apparatus based on the label propagation algorithm and the label prediction method based on the label propagation algorithm may be referred to in correspondence with each other.

[0127] As shown in Figure 3 , Figure 3 is a schematic structural diagram of the label prediction apparatus based on the label propagation algorithm of the present application, and the label prediction apparatus based on the label propagation algorithm includes:

[0128] A determination module 301, configured to determine the full amount of user data of each to-be-processed user, and determine each said full amount of user data as each graph node;

[0129] A first construction module 302, configured to determine node edges and edge weight values between each said graph node according to preset data in each said full amount of user data, so as to construct a user relationship graph;

[0130] A second construction module 303, configured to construct a user similarity graph by combining the user relationship graph with the first-order similarity and the second-order similarity of each said graph node;

[0131] The first prediction module 304 is used to predict the labels of each of the full user data through a trained supervised learning model to obtain the user label values ​​of each full user data.

[0132] The second prediction module 305 is used to predict the labels of each user's label value by combining the user similarity map with the label propagation algorithm, so as to obtain new group labels.

[0133] Furthermore, the second building module 303 is also used for:

[0134] The first-order similarity and second-order similarity of each graph node in the user relationship graph are added together to obtain the node similarity of each graph node;

[0135] The node similarity of each graph node is normalized to obtain the normalized similarity of each graph node, and the target similarity of any two graph nodes is obtained based on the normalized similarity of any two graph nodes.

[0136] The user similarity graph is constructed based on the target similarity between any two graph nodes and a preset similarity threshold.

[0137] Furthermore, the second building module 303 is also used for:

[0138] Using the graph nodes in the user relationship graph as vertex data, construct an undirected user graph without vertex edges and without edge weight values;

[0139] The target similarity between any two graph nodes is compared with the preset similarity threshold to obtain the comparison result;

[0140] Based on the comparison results, determine the final similarities among the target similarities of any two graph nodes that are greater than or equal to the preset similarity threshold;

[0141] Based on the final similarity scores, the vertex edges and their weights between the vertex data in the undirected user graph are determined, and the user similarity graph is constructed.

[0142] Furthermore, module 301 is also used for:

[0143] Determine all directly connected first graph nodes and second graph nodes in the user relationship graph, and construct the first node vector of each first graph node and the second node vector of each second graph node;

[0144] Based on each of the first node vectors and each of the second node vectors, construct a first joint distribution probability of each of the first graph nodes and each of the second graph nodes;

[0145] Determine the edge weights and values ​​in the user relationship graph, and determine the target edge weight values ​​between each first graph node and each second graph node;

[0146] Based on the target edge weight values ​​and the sum of edge weights, determine the first empirical distribution probability between each first graph node and each second graph node;

[0147] The first-order similarity between each first graph node and each second graph node is obtained by minimizing the KL divergence between the first joint probability distribution and the first empirical probability distribution of each first graph node and each second graph node.

[0148] Furthermore, module 301 is also used for:

[0149] Construct the third node vector for each graph node in the user relationship graph;

[0150] The conditional distribution probability of each graph node generating a context graph node is determined by combining the vectors of each third node, and each conditional distribution probability is determined as the second joint distribution probability of each graph node;

[0151] Determine the weights and values ​​of all out-degree edges originating from each of the graph nodes, and determine the edge weights between each of the graph nodes and its context graph nodes.

[0152] The second empirical distribution probability of each graph node is determined based on the sum of edge weights and values ​​of each edge weight.

[0153] The second-order similarity of each graph node is obtained by minimizing the KL divergence between the second joint probability and the second empirical probability of each graph node.

[0154] Furthermore, the first building module 302 is also used for:

[0155] Determine preset data in each of the full user data sets, wherein the preset data includes user call data;

[0156] Each user call data is identified as a node edge between each graph node, and the call frequency or call duration of each user call data is determined.

[0157] The call frequency or call duration of each user's call data is determined as the edge weight value of each node edge, and the user relationship graph is constructed.

[0158] The embodiments of the tag prediction device based on the tag propagation algorithm provided in this application are basically the same as the embodiments of the tag prediction method based on the tag propagation algorithm described above, and will not be repeated here.

[0159] Figure 4 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 4 As shown, the electronic device may include: a processor 410, a communication interface 420, a memory 430, and a communication bus 440, wherein the processor 410, the communication interface 420, and the memory 430 communicate with each other through the communication bus 440. The processor 410 can call logical instructions in the memory 430 to execute a tag prediction method based on a tag propagation algorithm, the method including:

[0160] Determine the full user data for each user to be processed, and define each full user data as a graph node;

[0161] Based on the preset data in each of the full user data, determine the node edges and edge weights between each graph node, and construct a user relationship graph;

[0162] A user similarity graph is constructed by combining the first-order and second-order similarity of each graph node with the user relationship graph;

[0163] The trained supervised learning model is used to predict the labels of each of the full user data sets to obtain the user label values ​​of each of the full user data sets.

[0164] By combining the user similarity graph with the tag propagation algorithm, tag prediction is performed on each user's tag value to obtain new group tags.

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

[0166] On the other hand, this application also provides a computer program product, which includes a computer program stored on a computer-readable storage medium. The computer program includes program instructions, and when the program instructions are executed by a computer, the computer is able to execute the label prediction method based on the label propagation algorithm provided by the above methods. The method includes:

[0167] Determine the full user data for each user to be processed, and define each full user data as a graph node;

[0168] Based on the preset data in each of the full user data, determine the node edges and edge weights between each graph node, and construct a user relationship graph;

[0169] A user similarity graph is constructed by combining the first-order and second-order similarity of each graph node with the user relationship graph;

[0170] The trained supervised learning model is used to predict the labels of each of the full user data sets to obtain the user label values ​​of each of the full user data sets.

[0171] By combining the user similarity graph with the tag propagation algorithm, tag prediction is performed on each user's tag value to obtain new group tags.

[0172] In another aspect, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform the label prediction methods based on the label propagation algorithms provided above, the method comprising:

[0173] Determine the full user data for each user to be processed, and define each full user data as a graph node;

[0174] Based on the preset data in each of the full user data, determine the node edges and edge weights between each graph node, and construct a user relationship graph;

[0175] A user similarity graph is constructed by combining the first-order and second-order similarity of each graph node with the user relationship graph;

[0176] The trained supervised learning model is used to predict the labels of each of the full user data sets to obtain the user label values ​​of each of the full user data sets.

[0177] By combining the user similarity graph with the tag propagation algorithm, tag prediction is performed on each user's tag value to obtain new group tags.

[0178] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0179] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0180] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A label prediction method based on a label propagation algorithm, characterized in that, include: Determine the full user data for each user to be processed, and define each full user data as a graph node; Determine preset data in each of the full user data sets, wherein the preset data includes user call data; Each user call data is identified as a node edge between each graph node, and the call frequency or call duration of each user call data is determined. The call frequency or call duration of each user's call data is determined as the edge weight value of each node edge, and a user relationship graph is constructed. A user similarity graph is constructed by combining the first-order and second-order similarity of each graph node with the user relationship graph; The trained supervised learning model is used to predict the labels of each of the full user data sets to obtain the user label values ​​of each of the full user data sets. By combining the user similarity graph with the tag propagation algorithm, tag prediction is performed on the tag values ​​of each user to obtain new group tags; The determination of the first-order similarity includes: determining all directly connected first graph nodes and second graph nodes in the user relationship graph, and constructing a first node vector for each first graph node and a second node vector for each second graph node; constructing a first joint distribution probability for each first graph node and each second graph node based on the first node vector and the second node vector; determining the edge weights and values ​​in the user relationship graph, and determining the target edge weight values ​​between each first graph node and each second graph node; determining a first empirical distribution probability between each first graph node and each second graph node based on the target edge weight values ​​and the edge weights and values; minimizing the KL divergence between the first joint distribution probability and the first empirical distribution probability of each first graph node and each second graph node to obtain the first-order similarity between each first graph node and each second graph node. The determination of the second-order similarity includes: constructing a third node vector for each graph node in the user relationship graph; determining the conditional distribution probability of each graph node generating a context graph node by combining the third node vectors, and determining the conditional distribution probability as the second joint distribution probability of each graph node; determining the sum of edge weights of all out-degrees from each graph node, and determining the edge weight values ​​of each graph node and its context graph nodes; determining the second empirical distribution probability of each graph node based on the sum of edge weights and the individual edge weight values ​​of each graph node; and minimizing the KL divergence between the second joint distribution probability and the second empirical distribution probability of each graph node to obtain the second-order similarity of each graph node.

2. The label prediction method based on the label propagation algorithm according to claim 1, characterized in that, The step of constructing a user similarity graph by combining the first-order and second-order similarity of each graph node in the user relationship graph includes: The first-order similarity and second-order similarity of each graph node in the user relationship graph are added together to obtain the node similarity of each graph node; The node similarity of each graph node is normalized to obtain the normalized similarity of each graph node, and the target similarity of any two graph nodes is obtained based on the normalized similarity of any two graph nodes. The user similarity graph is constructed based on the target similarity between any two graph nodes and a preset similarity threshold.

3. The label prediction method based on the label propagation algorithm according to claim 2, characterized in that, Based on the target similarity and a preset similarity threshold of any two graph nodes, the user similarity graph is constructed, including: Using the graph nodes in the user relationship graph as vertex data, construct an undirected user graph without vertex edges and without edge weight values; The target similarity between any two graph nodes is compared with the preset similarity threshold to obtain the comparison result; Based on the comparison results, determine the final similarities among the target similarities of any two graph nodes that are greater than or equal to the preset similarity threshold; Based on the final similarity scores, the vertex edges and their weights between the vertex data in the undirected user graph are determined, and the user similarity graph is constructed.

4. A tag prediction device based on a tag propagation algorithm, characterized in that, include: The determination module is used to determine the full user data of each user to be processed, and to determine each full user data as a graph node; The first construction module is used to determine preset data in each of the full user data sets, wherein the preset data includes user call data; determine each of the user call data sets as node edges between each of the graph nodes, and determine the call frequency or call duration of each of the user call data sets; determine the call frequency or call duration of each of the user call data sets as the edge weight value of each of the node edges, and construct a user relationship graph. The second construction module is used to construct a user similarity graph by combining the first-order similarity and second-order similarity of each graph node with the user relationship graph; The first prediction module is used to predict the labels of each of the full user data sets using a trained supervised learning model, so as to obtain the user label values ​​of each of the full user data sets. The second prediction module is used to predict the labels of each user's label value by combining the user similarity map with the label propagation algorithm, so as to obtain new group labels; The determination of the first-order similarity includes: determining all directly connected first graph nodes and second graph nodes in the user relationship graph, and constructing a first node vector for each first graph node and a second node vector for each second graph node; constructing a first joint distribution probability for each first graph node and each second graph node based on the first node vector and the second node vector; determining the edge weights and values ​​in the user relationship graph, and determining the target edge weight values ​​between each first graph node and each second graph node; determining a first empirical distribution probability between each first graph node and each second graph node based on the target edge weight values ​​and the edge weights and values; minimizing the KL divergence between the first joint distribution probability and the first empirical distribution probability of each first graph node and each second graph node to obtain the first-order similarity between each first graph node and each second graph node. The determination of the second-order similarity includes: constructing a third node vector for each graph node in the user relationship graph; determining the conditional distribution probability of each graph node generating a context graph node by combining the third node vectors, and determining the conditional distribution probability as the second joint distribution probability of each graph node; determining the sum of edge weights of all out-degrees from each graph node, and determining the edge weight values ​​of each graph node and its context graph nodes; determining the second empirical distribution probability of each graph node based on the sum of edge weights and the individual edge weight values ​​of each graph node; and minimizing the KL divergence between the second joint distribution probability and the second empirical distribution probability of each graph node to obtain the second-order similarity of each graph node.

5. The tag prediction device based on the tag propagation algorithm according to claim 4, characterized in that, The second building module is also used for: The first-order similarity and second-order similarity of each graph node in the user relationship graph are added together to obtain the node similarity of each graph node; The node similarity of each graph node is normalized to obtain the normalized similarity of each graph node, and the target similarity of any two graph nodes is obtained based on the normalized similarity of any two graph nodes. The user similarity graph is constructed based on the target similarity between any two graph nodes and a preset similarity threshold.

6. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the label prediction method based on the label propagation algorithm as described in any one of claims 1 to 3.

7. A computer-readable storage medium comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the label prediction method based on the label propagation algorithm as described in any one of claims 1 to 3.

Citation Information

Patent Citations

  • User tag determination method and device, computer equipment and storage medium

    CN110162692A

  • Graph data processing method and device based on label propagation algorithm

    CN111241297A