User behavior analysis method, device, equipment and medium based on graph neural network

By constructing and refining bipartite graphs using graph neural networks, the method addresses noise labels in user behavior analysis, improving the accuracy of recommendation systems by filtering out random clicks and reflecting user interests.

CN114880566BActive Publication Date: 2024-12-06CHINA PING AN PROPERTY INSURANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210542103.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-17
Publication Date
2024-12-06
Estimated Expiration
2042-05-17

AI Technical Summary

Technical Problem

Noise labels from random or accidental user clicks interfere with the convergence of prediction models in user behavior analysis, affecting the accuracy of recommendation systems.

Method used

Construct bipartite graphs from user and item interaction data, perform information propagation using graph convolutional networks, and iteratively refine the model to shield noise labels, resulting in a target network model that accurately reflects user interests.

Benefits of technology

The method reduces the impact of noise labels, enhancing the accuracy of user behavior analysis and enabling more precise recommendations by filtering out random clicks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114880566B_ABST
    Figure CN114880566B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of artificial intelligence technology, and provides a method, device, equipment and medium for user behavior analysis based on graph neural network. The method comprises: dividing an initial bipartite graph into a training set and a validation set, performing information propagation on the training set to obtain user node representation, recommendation item node representation and edge label; inputting the user node representation and recommendation item node representation into a fully connected network to obtain a gradient training network and calculating a shielding value for the validation set; if the shielding value is greater than a preset value, updating the initial bipartite graph, iteratively training the target network model for the updated bipartite graph according to the initial network model, inputting the target bipartite graph into the target network model to obtain a result; inputting the target bipartite graph into the target network model for analysis to obtain a behavior analysis result, and pushing the recommendation item to the user to be tested according to the analysis result. The present invention also relates to the field of blockchain technology, and the above-mentioned user nodes and recommendation item nodes can also be stored in a node of a blockchain.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a user behavior analysis method, device, equipment and medium based on graph neural network. Background Art

[0002] When the recommendation system is applied to a deep learning model, the user and the recommended item are usually used as the initial network model input, and the target network model is obtained by training based on the label of whether the user has a historical click behavior on the recommended item. The target network model is then applied to predict the user's response to the recommended item.

[0003] However, users’ click behaviors are somewhat random or accidental, and click behaviors are not necessarily a reflection of user interests. Click behaviors are usually accompanied by noise labels, which interfere with the convergence of model learning and affect the analysis ability of the target network model, making the recommendation scores given by the target network model unable to truly reflect user interests. Summary of the invention

[0004] In view of the above, the present invention provides a user behavior analysis method, device, equipment and medium based on graph neural network, which aims to solve the technical problems in the prior art that noise labels interfere with the convergence of the prediction model during learning and affect the accuracy of the prediction model in user behavior analysis.

[0005] To achieve the above object, the present invention provides a user behavior analysis method based on graph neural network, the method comprising:

[0006] Acquire multiple initial bipartite graphs from a preset database, wherein the initial bipartite graphs are composed of user nodes of historical users, recommendation item nodes, and connection edges between user nodes and recommendation item nodes, and determine the connection edges of the initial bipartite graphs according to behavior information generated by the user nodes of the initial bipartite graphs on the recommendation item nodes;

[0007] Dividing all the initial bipartite graphs into a training set and a validation set according to the connection edges, performing information propagation on the training set according to the initial network model, and obtaining user node representations, recommendation item node representations, and corresponding edge labels of the training set;

[0008] The user node representation and the recommendation item node representation are concatenated and input into the fully connected network of the initial network model to obtain a gradient training network corresponding to the edge label, and a shielding calculation is performed on the validation set according to the gradient training network to obtain a shielding value of the connection edge of the validation set;

[0009] If the shielding value is greater than a preset value, the initial bipartite graph is updated, and the updated bipartite graph is iteratively trained according to the initial network model until the shielding value is less than the preset value, thereby obtaining a target network model;

[0010] The target bipartite graph consisting of the user node of the user to be tested, the recommendation item node, and the connection edges between the user node and the recommendation item node is input into the target network model for analysis to obtain the behavior analysis result of the user to be tested, and the recommendation item is pushed to the user to be tested according to the analysis result.

[0011] Preferably, the method of dividing all the initial bipartite graphs into a training set and a validation set according to the connecting edges, performing information propagation on the training set according to the initial network model, and obtaining user node representations, recommendation item node representations, and corresponding edge labels of the training set includes:

[0012] Divide all initial bipartite graphs into training sets and validation sets in random proportions according to the connection edges;

[0013] Constructing a feature matrix according to the feature vectors of the user nodes and the recommendation item nodes of the training set;

[0014] Constructing an adjacency matrix according to the edge connection relationship between the user nodes and the recommendation item nodes of the training set;

[0015] The feature matrix and the adjacency matrix are input into the initial network model for information propagation to obtain user node representations, recommendation item node representations, and edge labels corresponding to the user node representations and the recommendation item node representations of the training set.

[0016] Preferably, the initial network model includes more than two graph convolutional network layers, and the inputting of the feature matrix and the adjacency matrix into the initial network model for information propagation to obtain the user node representation, the recommendation item node representation, and the edge labels corresponding to the user node representation and the recommendation item node representation of the training set, respectively, includes:

[0017] According to a preset information propagation formula, the feature vector of any node in each row of the feature matrix and the edge connection relationship of the adjacency matrix are aggregated in each graph convolutional network layer to form a feature vector of the next graph convolutional network layer;

[0018] When the information aggregation of the user node and the recommendation item node is completed in each graph convolutional network layer, the user node representation, the recommendation item node representation, and the edge labels corresponding to the user node representation and the recommendation item node representation of the training set are obtained.

[0019] Preferably, the preset information propagation formula includes:

[0020]

[0021] in, The feature vector of each row of the feature matrix and the edge connection relationship of the adjacency matrix are aggregated in each graph convolutional network layer. is the adjacency matrix of the training set, is the feature matrix of the training set, is a learnable parameter, is the activation function, is the eigenvector of any node in each row of the feature matrix.

[0022] Preferably, the step of concatenating the user node representation and the recommendation item node representation and inputting them into a fully connected network of the initial network model to obtain a gradient training network corresponding to the edge label includes:

[0023] All user node representations and recommendation item node representations of the training set are concatenated in pairs and input into the fully connected network;

[0024] Edge prediction is performed between user nodes and recommendation item nodes of the training set according to the fully connected network to obtain a gradient training network corresponding to edge labels.

[0025] Preferably, performing shielding calculation on the verification set according to the gradient training network to obtain shielding values ​​of connecting edges of the verification set includes:

[0026] Calculating the network relationship between any user node and the recommendation item node in the verification set according to the gradient training network to obtain an edge network relationship value;

[0027] The connection edges of the verification set are shielded and counted according to the edge network relationship values ​​to obtain shielded values ​​of the connection edges of the verification set.

[0028] Preferably, if the shielding value is greater than a preset value, updating the initial bipartite graph includes:

[0029] A1. When the shielding value of the verification set is greater than a preset value, if a connection edge already exists between the user node and the recommendation item node of the initial bipartite graph, the connection edge is retained;

[0030] A2. If there is no connecting edge between the user node and the recommended item node of the initial bipartite graph, connect the user node and the recommended item node of the initial bipartite graph with an edge;

[0031] A3. Repeat A1-A2 until the edge relationships between all user nodes and recommendation item nodes in the initial bipartite graph are updated to obtain an updated bipartite graph.

[0032] To achieve the above object, the present invention also provides a user behavior analysis device based on graph neural network, the device comprising:

[0033] The acquisition module is used to: acquire multiple initial bipartite graphs from a preset database, wherein the initial bipartite graphs are composed of user nodes of historical users, recommendation item nodes, and connection edges between user nodes and recommendation item nodes, and determine the connection edges of the initial bipartite graphs according to the behavior information generated by the user nodes of the initial bipartite graphs on the recommendation item nodes;

[0034] The training module is used to: divide all the initial bipartite graphs into a training set and a validation set according to the connection edges, perform information propagation on the training set according to the initial network model, and obtain user node representation, recommendation item node representation and corresponding edge labels of the training set;

[0035] The training module is further used to: splice the user node representation and the recommendation item node representation and input them into the fully connected network of the initial network model to obtain the gradient training network corresponding to the edge label, and perform shielding calculation on the verification set according to the gradient training network to obtain the shielding value of the connection edge of the verification set;

[0036] The training module is also used for: if the shielding value is greater than a preset value, updating the initial bipartite graph, and iteratively training the updated bipartite graph according to the initial network model until the shielding value is less than the preset value, thereby obtaining a target network model;

[0037] Application module: input the target bipartite graph consisting of the user node of the user to be tested, the recommendation item node, and the connection edges between the user node and the recommendation item node into the target network model for analysis, obtain the behavior analysis result of the user to be tested, and push the recommendation item to the user to be tested according to the analysis result.

[0038] To achieve the above object, the present invention further provides an electronic device, the electronic device comprising:

[0039] at least one processor; and,

[0040] a memory communicatively connected to the at least one processor; wherein,

[0041] The memory stores a program that can be executed by the at least one processor, and the program is executed by the at least one processor so that the at least one processor can execute the user behavior analysis method based on graph neural network.

[0042] To achieve the above-mentioned purpose, the present invention also provides a computer-readable medium, which stores a user behavior analysis program. When the user behavior analysis program is executed by a processor, the steps of the user behavior analysis method based on graph neural network are implemented.

[0043] The present invention constructs an initial bipartite graph with historical click data of users on recommended items, constructs a feature matrix and an adjacency matrix respectively according to user nodes, recommended item nodes and connection edges of the initial bipartite graph, propagates information on the feature matrix and the adjacency matrix according to the initial network model to obtain a gradient training network, shields the connection edges generated by random or accidental clicks of users on recommended items in the initial bipartite graph according to the gradient training network, connects the recommended item nodes of interest to the users with the user nodes by edges, reduces the interference of noise labels in the model learning process, obtains a target prediction model with higher accuracy in user behavior analysis, uses the target prediction model to analyze user behavior, and pushes the recommended items of interest to the users to the users. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 It is a flowchart diagram of a preferred embodiment of the user behavior analysis method based on graph neural network of the present invention;

[0045] Figure 2 A schematic diagram of a module of a preferred embodiment of the user behavior analysis device of the present invention;

[0046] Figure 3 A schematic diagram of a preferred embodiment of the electronic device of the present invention;

[0047] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0048] In order to make the purpose, technical scheme and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0049] The embodiments of the present invention can acquire and process relevant data based on artificial intelligence technology. Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0050] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0051] The present invention provides a user behavior analysis method based on graph neural network. Figure 1 , which is a schematic diagram of a method flow of an embodiment of a method for analyzing user behavior based on a graph neural network of the present invention. The method can be executed by an electronic device, and the electronic device can be implemented by software and / or hardware. The method for analyzing user behavior based on a graph neural network includes:

[0052] Step S10: Obtain multiple initial bipartite graphs from a preset database, wherein the initial bipartite graphs are composed of user nodes of historical users, recommendation item nodes, and connection edges between user nodes and recommendation item nodes, and the connection edges of the initial bipartite graphs are determined based on the behavior information generated by the user nodes of the initial bipartite graphs on the recommendation item nodes.

[0053] In this embodiment, the preset database refers to a database built by the enterprise itself or by a third party based on information such as users, recommended items clicked by users, and the click relationship between users and recommended items. The initial bipartite graph is a graph composed of information such as user nodes of historical users, recommended item nodes, and connecting edges between user nodes and recommended item nodes. A user node is a network node generated based on user information, such as name, gender, occupation, permanent address, browsing behavior (such as websites that users like to browse, items clicked, browsing time, number of views), and other attribute information. A recommended item node is a network node generated based on the attribute information of the user's click behavior / browsing behavior (attribute information of the object clicked and browsed, such as the name of the item, function, consumer group, historical evaluation, etc.). A recommended item refers to the object clicked and browsed by the user.

[0054] Before obtaining multiple initial bipartite graphs from a preset database, the method first obtains historical behavior data of users on recommended items from the preset database as an original data set, and preprocesses the original data set to obtain multiple initial bipartite graphs (for example, the preprocessing is data screening). The preset database stores information about users' behavior on recommended items, for example, which items (recommended items) users click on when browsing a website. Some click behaviors represent that users click on recommended items out of interest or hobbies, some click behaviors may be due to random or misunderstanding of users, and some recommended items may be liked by users, but they are not clicked for some reason (for example, browsing the web page too fast and not noticing all the unclicked and browsed items). However, all click behaviors of users on recommended items will start from the user node on the bipartite graph, generating one or more connecting edges connected to different recommended item nodes.

[0055] Step S20: Divide all the initial bipartite graphs into a training set and a validation set according to the connection edges, perform information propagation on the training set according to the initial network model, and obtain user node representation, recommendation item node representation and corresponding edge labels of the training set.

[0056] Specifically, step S20 includes:

[0057] Divide all initial bipartite graphs into training sets and validation sets in random proportions according to the connection edges;

[0058] Constructing a feature matrix according to the feature vectors of the user nodes and the recommendation item nodes of the training set;

[0059] Constructing an adjacency matrix according to the edge connection relationship between the user nodes and the recommendation item nodes of the training set;

[0060] The feature matrix and the adjacency matrix are input into the initial network model for information propagation to obtain user node representations, recommendation item node representations, and edge labels corresponding to the user node representations and the recommendation item node representations of the training set.

[0061] In one embodiment, the initial network model includes more than two graph convolutional network layers, and the inputting the feature matrix and the adjacency matrix into the initial network model for information propagation to obtain the user node representation, the recommendation item node representation, and the edge labels corresponding to the user node representation and the recommendation item node representation of the training set, respectively, includes:

[0062] According to a preset information propagation formula, the feature vector of any node in each row of the feature matrix and the edge connection relationship of the adjacency matrix are aggregated in each graph convolutional network layer to form a feature vector of the next graph convolutional network layer;

[0063] When the information aggregation of the user node and the recommendation item node is completed in each graph convolutional network layer, the user node representation, the recommendation item node representation, and the edge labels corresponding to the user node representation and the recommendation item node representation of the training set are obtained.

[0064] In one embodiment, the preset information propagation formula includes:

[0065]

[0066] in, The feature vector of each row of the feature matrix and the edge connection relationship of the adjacency matrix are aggregated in each graph convolutional network layer. is the adjacency matrix of the training set, is the feature matrix of the training set, is a learnable parameter, is the activation function, is the eigenvector of any node in each row of the feature matrix.

[0067] For ease of representation, “N” is used below to represent the number of nodes in each initial bipartite graph of the training set.

[0068] The feature matrix is ​​specifically constructed by the feature vector of each node in the initial bipartite graph. The feature vector of each node contains the attribute information of the node, that is, the feature matrix can be constructed based on the attribute information carried by each node in each initial bipartite graph. For example, if the length of the node feature vector is M, then the node feature matrix of the initial bipartite graph is a matrix of N×M dimensions, and each row of the matrix is ​​a feature vector of a node. If the initial bipartite graph is specifically a bipartite graph of users and recommended items, and the nodes in the initial bipartite graph are specifically user nodes and recommended item nodes, then the attribute information contained in each feature vector in the feature matrix is ​​(user's gender, age, hobbies, etc.) and (recommended item name, function, etc.).

[0069] The adjacency matrix is ​​constructed based on the edge connection relationship between nodes in the initial bipartite graph. The edge connection relationship refers to the depth of interaction between the user node and the recommendation node (for example, the number of clicks or browsing time of the recommendation item by the user). The adjacency matrix is ​​specifically a matrix of N×N dimensions. For example, A represents the adjacency matrix, and assumes that the user node i and the recommendation node j are two nodes in the bipartite graph. If there is no connection edge between the user node i and the recommendation node j, the corresponding elements of the user node i and the recommendation node j in the adjacency matrix are 0. If there is a connection edge between the user node i and the recommendation node j, the corresponding elements of the user node i and the recommendation node j in the adjacency matrix are 1.

[0070] All the initial bipartite graphs are divided into training sets and validation sets in random proportions (for example, all the initial bipartite graphs are 100,000, and the training sets and validation sets are randomly divided in a ratio of 8:2 or 7:3). In other words, the random proportion should keep the number of training sets larger than the number of validation sets to avoid too little training data, which may lead to underfitting of the initial network model.

[0071] The initial network model includes but is not limited to graph neural networks (GCNs), which are feature extractors that perform node classification, graph classification, and edge prediction on graph data. The feature matrix and the adjacency matrix are input into the initial network model, and after feature extraction and attribute information aggregation, the user node representation, recommendation item node representation, and edge labels of the training set are obtained. The node representation contains the fused feature vector of each node (user node and recommendation item node). For example, if the length of the fused feature vector of each node is F, then the dimension of the fused feature matrix of the node is N×F, where the length F of the fused feature vector is a pre-set hyperparameter of the initial network model (for example, F is set to 10), then the dimension of the degree vector generated by the node is N×1, that is, the node representation refers to the initial modeling of the recommendation item by the user, which is used for vectorization of the entire matrix. An edge label refers to a vector continuation of a user's recommendation item. For example, let I represent a user, and assume that user I clicks on recommendation item J 6 times. Then (i, j) is the connection edge between user node i and recommendation item node j. If the length of the connection edge vector is 6, when the attribute information of recommendation item K is similar to that of recommendation item J, then recommendation item K is a vector continuation of the edge label between user node i and recommendation item node j.

[0072] Step S30: concatenate the user node representation and the recommendation item node representation and input them into the fully connected network of the initial network model to obtain the gradient training network corresponding to the edge label, perform shielding calculation on the verification set according to the gradient training network, and obtain the shielding value of the connection edge of the verification set.

[0073] In this embodiment, after the feature matrix and the adjacency matrix are input into the multi-layer graph convolution layer for information exchange, the user node representation and the recommendation item node representation are concatenated in pairs to form a mixed feature vector, and the mixed feature vector is input into the fully connected network for edge prediction to obtain the gradient training network corresponding to the edge label. The user nodes and recommendation item nodes of the validation set are input into the gradient training network for shielding calculation to determine whether there is a real network relationship between the user nodes and the recommendation nodes, thereby obtaining the shielding value of the connection edge of the validation set.

[0074] In one embodiment, the step of concatenating the user node representation and the recommendation item node representation and inputting the concatenated nodes into a fully connected network of the initial network model to obtain a gradient training network corresponding to the edge label includes:

[0075] All user node representations and recommendation item node representations of the training set are concatenated in pairs and input into the fully connected network;

[0076] Edge prediction is performed between user nodes and recommendation item nodes of the training set according to the fully connected network to obtain a gradient training network corresponding to edge labels.

[0077] In one embodiment, performing shielding calculation on the verification set according to the gradient training network to obtain shielding values ​​of connection edges of the verification set includes:

[0078] Calculating the network relationship between any user node and the recommendation item node in the verification set according to the gradient training network to obtain an edge network relationship value;

[0079] The connection edges of the verification set are shielded and counted according to the edge network relationship values ​​to obtain shielded values ​​of the connection edges of the verification set.

[0080] The user nodes and recommended item nodes of the validation set are input into the gradient training network to obtain the edge network relationship value between the nodes. By comparing the edge network relationship value with the preset network value, it is determined whether there is a real network relationship between the user node and the recommended node. The network relationship represents the closeness between the user node and the current recommended node. The closeness of the connection edge of the user node to the current recommended item is determined by the attribute information of all the recommended items clicked by the user. After the comparison, the unreal connection edges are shielded, and the ratio of the number of shielded connection edges to the number of connection edges in the validation set is counted, and the ratio is used as the shielding value of the connection edge of the validation set. For example, the number of connection edges in the validation set is 10,000, and the number of shielded connection edges is 3,000. Divide 3,000 by 10,000 to obtain a shielding value of 0.3 for the connection edge of the validation set.

[0081] For example, suppose the user node i and the recommended item node j in the verification set, (i, j) is the connection edge between the user node i and the recommended item node j, and the network relationship between the user node i and the recommended item node j is calculated according to the gradient training network. If the edge network relationship value between the two is 1, according to the preset conditions, the edge network relationship value is less than or equal to the preset network value (for example, the preset network value is 1), that is, the gradient training network determines that there is no edge network relationship between the two nodes, which also means that the (i, j) connection edge is a random click or accidental touch of the user node i to the recommended item node j. Blocking or deleting the (i, j) connection edge between the user node i and the recommended item node j is equivalent to clearing the noise label on the initial bipartite graph.

[0082] Suppose there is no connecting edge between the user node i and the recommendation node j in the validation set. The network relationship between the user node i and the recommendation node j is calculated according to the gradient training network. If the edge network relationship value between the two is 3, according to the preset conditions, the edge network relationship value is greater than the preset network value (for example, the preset network value is 1), that is, the gradient training network determines that there is an edge network relationship between the two nodes, which also means that the user node i may be interested in the recommendation node j and click on it. Adding the (i, j) connecting edge between the user node i and the recommendation node j is equivalent to generating a click prediction on the initial bipartite graph.

[0083] Step S40: If the shielding value is greater than the preset value, the initial bipartite graph is updated, and the updated bipartite graph is iteratively trained according to the initial network model until the shielding value is less than the preset value, thereby obtaining a target network model.

[0084] In this embodiment, when the shielding value is greater than a preset value (for example, the preset value is 0.1), it indicates that the initial bipartite graph still contains relatively many noise labels and the various training parameters of the initial network model are in an unstable state. The initial bipartite graph (all training sets and validation sets) is updated according to the shielding value of the connecting edge of the validation set to obtain an updated initial bipartite graph.

[0085] The initial bipartite graph is trained and iterated according to the initial network model, and the training iteration steps include: firstly, all the initial bipartite graphs are randomly divided into a training set and the verification set according to a random ratio, information is propagated on the training set according to the initial network model, and the user node representation, the recommendation item node representation, and the edge label of the training set are obtained, the user node representation and the recommendation item node representation are spliced ​​and input into the fully connected network of the initial network model, and the gradient training network corresponding to the edge label is obtained, and the verification set is shielded and calculated according to the gradient training network to obtain the shielding value of the connection edge of the verification set. When the shielding value is less than the preset value, the training parameters are saved to obtain the target network model. That is to say, the noisy labels of the verification set are reduced to a relatively small range, and the various training parameters of the initial network model tend to be stable. The training parameters of the initial network model can be saved to obtain the target network model.

[0086] In one embodiment, if the shielding value is greater than a preset value, updating the initial bipartite graph includes:

[0087] A1. When the shielding value of the verification set is greater than a preset value, if a connection edge already exists between the user node and the recommendation item node of the initial bipartite graph, the connection edge is retained;

[0088] A2. If there is no connecting edge between the user node and the recommended item node of the initial bipartite graph, connect the user node and the recommended item node of the initial bipartite graph with an edge;

[0089] A3. Repeat A1-A2 until the edge relationships between all user nodes and recommendation item nodes in the initial bipartite graph are updated to obtain an updated bipartite graph.

[0090] Step S50: input the target bipartite graph consisting of the user node of the user to be tested, the recommendation item node, and the connection edges between the user node and the recommendation item node into the target network model for analysis to obtain the behavior analysis result of the user to be tested, and push the recommendation item to the user to be tested based on the analysis result.

[0091] In this embodiment, the target network model is applied to a target bipartite graph for predicting the click behavior of the user to be tested on the recommended items. The target bipartite graph refers to a data graph of information such as connection edges generated by a certain user to be tested clicking on the recommended items. According to the trained target network model, the connection edges generated by the random clicks of the user to be tested in the target bipartite graph are shielded, and the recommendation item nodes that the user to be tested is interested in are connected to the user to be tested nodes by edges to obtain the behavior analysis results of the user to be tested, and the recommended items that the user to be tested is interested in are pushed to the user to be tested based on the behavior analysis results.

[0092] Reference Figure 2 FIG. 1 is a schematic diagram of the functional modules of the user behavior analysis device 100 of the present invention.

[0093] The user behavior analysis device 100 of the present invention can be installed in an electronic device. According to the functions to be implemented, the user behavior analysis device 100 may include an acquisition module 110, a training module 120 and an application module 130. The module described in the present invention may also be referred to as a unit, which refers to a series of computer program segments that can be executed by an electronic device processor and can complete fixed functions, which are stored in the memory of the electronic device.

[0094] In this embodiment, the functions of each module / unit are as follows:

[0095] The acquisition module 110 is used to: acquire multiple initial bipartite graphs from a preset database, wherein the initial bipartite graphs are composed of user nodes of historical users, recommendation item nodes, and connection edges between user nodes and recommendation item nodes, and determine the connection edges of the initial bipartite graphs according to the behavior information generated by the user nodes of the initial bipartite graphs on the recommendation item nodes;

[0096] The training module 120 is used to: divide all the initial bipartite graphs into a training set and a validation set according to the connection edges, perform information propagation on the training set according to the initial network model, and obtain user node representations, recommendation item node representations and corresponding edge labels of the training set;

[0097] The training module 120 is further used to: splice the user node representation and the recommendation item node representation and input them into the fully connected network of the initial network model to obtain the gradient training network corresponding to the edge label, and perform shielding calculation on the verification set according to the gradient training network to obtain the shielding value of the connection edge of the verification set;

[0098] The training module 120 is also used for: if the shielding value is greater than a preset value, updating the initial bipartite graph, and iteratively training the updated bipartite graph according to the initial network model until the shielding value is less than the preset value, thereby obtaining a target network model;

[0099] Application module 130: input the target bipartite graph consisting of the user node of the user to be tested, the recommendation item node, and the connection edges between the user node and the recommendation item node into the target network model for analysis, obtain the behavior analysis result of the user to be tested, and push the recommendation item to the user to be tested according to the analysis result.

[0100] In one embodiment, all the initial bipartite graphs are divided into a training set and a validation set according to the connection edges, and information is propagated on the training set according to the initial network model to obtain user node representations, recommendation item node representations, and corresponding edge labels of the training set, including:

[0101] Divide all initial bipartite graphs into training sets and validation sets in random proportions according to the connection edges;

[0102] Constructing a feature matrix according to the feature vectors of the user nodes and the recommendation item nodes of the training set;

[0103] Constructing an adjacency matrix according to the edge connection relationship between the user nodes and the recommendation item nodes of the training set;

[0104] The feature matrix and the adjacency matrix are input into the initial network model for information propagation to obtain user node representations, recommendation item node representations, and edge labels corresponding to the user node representations and the recommendation item node representations of the training set.

[0105] In one embodiment, the initial network model includes more than two graph convolutional network layers, and the inputting the feature matrix and the adjacency matrix into the initial network model for information propagation to obtain the user node representation, the recommendation item node representation, and the edge labels corresponding to the user node representation and the recommendation item node representation of the training set, respectively, includes:

[0106] According to a preset information propagation formula, the feature vector of any node in each row of the feature matrix and the edge connection relationship of the adjacency matrix are aggregated in each graph convolutional network layer to form a feature vector of the next graph convolutional network layer;

[0107] When the information aggregation of the user node and the recommendation item node is completed in each graph convolutional network layer, the user node representation, the recommendation item node representation, and the edge labels corresponding to the user node representation and the recommendation item node representation of the training set are obtained.

[0108] In one embodiment, the preset information propagation formula includes:

[0109]

[0110] in, The feature vector of each row of the feature matrix and the edge connection relationship of the adjacency matrix are aggregated in each graph convolutional network layer. is the adjacency matrix of the training set, is the feature matrix of the training set, is a learnable parameter, is the activation function, is the eigenvector of any node in each row of the feature matrix.

[0111] In one embodiment, the step of concatenating the user node representation and the recommendation item node representation and inputting the concatenated nodes into a fully connected network of the initial network model to obtain a gradient training network corresponding to the edge label includes:

[0112] All user node representations and recommendation item node representations of the training set are concatenated in pairs and input into the fully connected network;

[0113] Edge prediction is performed between user nodes and recommendation item nodes of the training set according to the fully connected network to obtain a gradient training network corresponding to edge labels.

[0114] In one embodiment, performing shielding calculation on the verification set according to the gradient training network to obtain shielding values ​​of connection edges of the verification set includes:

[0115] Calculating the network relationship between any user node and the recommendation item node in the verification set according to the gradient training network to obtain an edge network relationship value;

[0116] The connection edges of the verification set are shielded and counted according to the edge network relationship values ​​to obtain shielded values ​​of the connection edges of the verification set.

[0117] In one embodiment, if the shielding value is greater than a preset value, updating the initial bipartite graph includes:

[0118] A1. When the shielding value of the verification set is greater than a preset value, if a connection edge already exists between the user node and the recommendation item node of the initial bipartite graph, the connection edge is retained;

[0119] A2. If there is no connecting edge between the user node and the recommended item node of the initial bipartite graph, connect the user node and the recommended item node of the initial bipartite graph with an edge;

[0120] A3. Repeat A1-A2 until the edge relationships between all user nodes and recommendation item nodes in the initial bipartite graph are updated to obtain an updated bipartite graph.

[0121] Reference Figure 3 FIG. 1 is a schematic diagram of a preferred embodiment of an electronic device 1 of the present invention.

[0122] The electronic device 1 includes but is not limited to: a memory 11, a processor 12, a display 13 and a network interface 14. The electronic device 1 is connected to a network through the network interface 14 to obtain raw data. The network may be a wireless or wired network such as an intranet, the Internet, a global system of mobile communication (GSM), a wideband code division multiple access (WCDMA), a 4G network, a 5G network, Bluetooth, Wi-Fi, a call network, etc.

[0123] Among them, the memory 11 includes at least one type of readable medium, and the readable medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 11 can be an internal storage unit of the electronic device 1, such as a hard disk or memory of the electronic device 1. In other embodiments, the memory 11 can also be an external storage device of the electronic device 1, such as a plug-in hard disk, a smart memory card (SmartMediaCard, SMC), a secure digital (SecureDigital, SD) card, a flash card (FlashCard), etc. equipped with the electronic device 1. Of course, the memory 11 can also include both the internal storage unit of the electronic device 1 and its external storage device. In this embodiment, the memory 11 is generally used to store the operating system and various application software installed on the electronic device 1, such as the program code of the user behavior analysis program 10, etc. In addition, the memory 11 can also be used to temporarily store various types of data that have been output or are to be output.

[0124] In some embodiments, the processor 12 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips. The processor 12 is generally used to control the overall operation of the electronic device 1, such as performing control and processing related to data interaction or communication. In this embodiment, the processor 12 is used to run the program code stored in the memory 11 or process data, such as running the program code of the user behavior analysis program 10.

[0125] The display 13 may be referred to as a display screen or a display unit. In some embodiments, the display 13 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an organic light-emitting diode (OLED) touch device. The display 13 is used to display information processed in the electronic device 1 and to display a visual working interface, such as displaying the results of data statistics.

[0126] The network interface 14 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface). The network interface 14 is generally used to establish a communication connection between the electronic device 1 and other electronic devices.

[0127] Figure 3 Only the electronic device 1 having the components 11 - 14 and the user behavior analysis program 10 is shown, but it should be understood that it is not required to implement all the components shown, and more or fewer components may be implemented instead.

[0128] Optionally, the electronic device 1 may further include a user interface, which may include a display (Display), an input unit such as a keyboard (Keyboard), and the optional user interface may also include a standard wired interface and a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an organic light-emitting diode (Organic Light-Emitting Diode, OLED) touch device, etc. Among them, the display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device 1 and to display a visual user interface.

[0129] The electronic device 1 may further include a radio frequency (RF) circuit, a sensor, an audio circuit, etc., which will not be described in detail here.

[0130] In the above embodiment, the processor 12 can implement the following steps when executing the user behavior analysis program 10 stored in the memory 11:

[0131] Acquire multiple initial bipartite graphs from a preset database, wherein the initial bipartite graphs are composed of user nodes of historical users, recommendation item nodes, and connection edges between user nodes and recommendation item nodes, and determine the connection edges of the initial bipartite graphs according to behavior information generated by the user nodes of the initial bipartite graphs on the recommendation item nodes;

[0132] Dividing all the initial bipartite graphs into a training set and a validation set according to the connection edges, performing information propagation on the training set according to the initial network model, and obtaining user node representations, recommendation item node representations, and corresponding edge labels of the training set;

[0133] The user node representation and the recommendation item node representation are concatenated and input into the fully connected network of the initial network model to obtain a gradient training network corresponding to the edge label, and a shielding calculation is performed on the validation set according to the gradient training network to obtain a shielding value of the connection edge of the validation set;

[0134] If the shielding value is greater than a preset value, the initial bipartite graph is updated, and the updated bipartite graph is iteratively trained according to the initial network model until the shielding value is less than the preset value, thereby obtaining a target network model;

[0135] The target bipartite graph consisting of the user node of the user to be tested, the recommendation item node, and the connection edges between the user node and the recommendation item node is input into the target network model for analysis to obtain the behavior analysis result of the user to be tested, and the recommendation item is pushed to the user to be tested according to the analysis result.

[0136] The storage device may be the memory 11 of the electronic device 1 , or may be another storage device that is communicatively connected to the electronic device 1 .

[0137] For a detailed description of the above steps, please refer to the above Figure 2 Functional module diagram of the embodiment of the user behavior analysis device 100 and Figure 1 Description of a flowchart of an embodiment of a method for analyzing user behavior based on a graph neural network.

[0138] In addition, an embodiment of the present invention further proposes a computer-readable medium, which may be non-volatile or volatile. The computer-readable medium may be any one or any combination of a hard disk, a multimedia card, an SD card, a flash memory card, an SMC, a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a portable compact disk read-only memory (CD-ROM), a USB memory, etc. The computer-readable medium includes a data storage area and a program storage area. The data storage area stores data created according to the use of the blockchain node, and the program storage area stores a user behavior analysis program 10. When the user behavior analysis program 10 is executed by the processor, the following operations are implemented:

[0139] Acquire multiple initial bipartite graphs from a preset database, wherein the initial bipartite graphs are composed of user nodes of historical users, recommendation item nodes, and connection edges between user nodes and recommendation item nodes, and determine the connection edges of the initial bipartite graphs according to behavior information generated by the user nodes of the initial bipartite graphs on the recommendation item nodes;

[0140] Dividing all the initial bipartite graphs into a training set and a validation set according to the connection edges, performing information propagation on the training set according to the initial network model, and obtaining user node representations, recommendation item node representations, and corresponding edge labels of the training set;

[0141] The user node representation and the recommendation item node representation are concatenated and input into the fully connected network of the initial network model to obtain a gradient training network corresponding to the edge label, and a shielding calculation is performed on the validation set according to the gradient training network to obtain a shielding value of the connection edge of the validation set;

[0142] If the shielding value is greater than a preset value, the initial bipartite graph is updated, and the updated bipartite graph is iteratively trained according to the initial network model until the shielding value is less than the preset value, thereby obtaining a target network model;

[0143] The target bipartite graph consisting of the user node of the user to be tested, the recommendation item node, and the connection edges between the user node and the recommendation item node is input into the target network model for analysis to obtain the behavior analysis result of the user to be tested, and the recommendation item is pushed to the user to be tested according to the analysis result.

[0144] The specific implementation of the computer-readable medium of the present invention is roughly the same as the specific implementation of the above-mentioned user behavior analysis method based on graph neural network, and will not be repeated here.

[0145] In another embodiment, the user behavior analysis method based on graph neural network provided by the present invention can further ensure the privacy and security of all the above data, and all the above data can also be stored in a blockchain node. For example, user nodes and recommendation item nodes can all be stored in blockchain nodes.

[0146] It should be noted that the blockchain referred to in the present invention is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the blockchain underlying platform, platform product service layer, and application service layer.

[0147] It should be noted that the serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments. And the terms "including", "comprising" or any other variants thereof in this article are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "including a ..." does not exclude the presence of other identical elements in the process, device, article or method including the element.

[0148] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product is stored in a medium (such as ROM / RAM, magnetic disk, optical disk) as described above, including a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, an electronic device, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0149] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A user behavior analysis method based on graph neural network, characterized in that: The method comprises: Acquire multiple initial bipartite graphs from a preset database, wherein the initial bipartite graphs are composed of user nodes of historical users, recommendation item nodes, and connection edges between user nodes and recommendation item nodes, and determine the connection edges of the initial bipartite graphs according to behavior information generated by the user nodes of the initial bipartite graphs on the recommendation item nodes; Dividing all the initial bipartite graphs into a training set and a validation set according to the connection edges, performing information propagation on the training set according to the initial network model, and obtaining user node representations, recommendation item node representations, and corresponding edge labels of the training set; The user node representation and the recommendation item node representation are concatenated and input into the fully connected network of the initial network model to obtain a gradient training network corresponding to the edge label, and a shielding calculation is performed on the validation set according to the gradient training network to obtain a shielding value of the connection edge of the validation set; If the shielding value is greater than a preset value, the initial bipartite graph is updated, and the updated bipartite graph is iteratively trained according to the initial network model until the shielding value is less than the preset value, thereby obtaining a target network model; Inputting a target bipartite graph consisting of a user node of the user to be tested, a recommendation item node, and connection edges between the user node and the recommendation item node into the target network model for analysis, obtaining a behavior analysis result of the user to be tested, and pushing recommendation items to the user to be tested according to the analysis result; The performing shielded calculation on the verification set according to the gradient training network to obtain the shielded value of the connection edge of the verification set includes: calculating the network relationship between any user node and the recommendation item node of the verification set according to the gradient training network to obtain the edge network relationship value; performing shielded statistics on the connection edge of the verification set according to the edge network relationship value to obtain the shielded value of the connection edge of the verification set; If the shielding value is greater than a preset value, the initial bipartite graph is updated, including: A1, when the shielding value of the verification set is greater than a preset value, if there is already a connection edge between the user node and the recommendation item node of the initial bipartite graph, the connection edge is retained; A2, if there is no connection edge between the user node and the recommendation item node of the initial bipartite graph, the user node and the recommendation item node of the initial bipartite graph are connected by an edge; A3, A1-A2 are repeated until the edge relationship between all the user nodes and the recommendation item nodes of the initial bipartite graph is updated to obtain an updated bipartite graph; The user nodes and recommendation item nodes of the verification set are input into the gradient training network to obtain the edge network relationship value between the nodes. By comparing the edge network relationship value with the preset network value, it is determined whether there is a real network relationship between the user node and the recommendation node. After shielding the unreal connection edges, the ratio of the number of shielded connection edges to the number of connection edges in the verification set is counted, and the ratio is used as the shielding value of the connection edges in the verification set.

2. The user behavior analysis method based on graph neural network according to claim 1, characterized in that: The method of dividing all the initial bipartite graphs into a training set and a validation set according to the connection edges, performing information propagation on the training set according to the initial network model, and obtaining user node representations, recommendation item node representations, and corresponding edge labels of the training set includes: Divide all initial bipartite graphs into training sets and validation sets in random proportions according to the connection edges; Constructing a feature matrix according to the feature vectors of the user nodes and the recommendation item nodes of the training set; Constructing an adjacency matrix according to the edge connection relationship between the user nodes and the recommendation item nodes of the training set; The feature matrix and the adjacency matrix are input into the initial network model for information propagation to obtain user node representations, recommendation item node representations, and edge labels corresponding to the user node representations and the recommendation item node representations of the training set.

3. The user behavior analysis method based on graph neural network according to claim 2, characterized in that: The initial network model includes more than two graph convolutional network layers, and the inputting the feature matrix and the adjacency matrix into the initial network model for information propagation to obtain the user node representation, the recommendation item node representation, and the edge labels corresponding to the user node representation and the recommendation item node representation of the training set, respectively, includes: According to a preset information propagation formula, the feature vector of any node in each row of the feature matrix and the edge connection relationship of the adjacency matrix are aggregated in each graph convolutional network layer to form a feature vector of the next graph convolutional network layer; When the information aggregation of the user node and the recommendation item node is completed in each graph convolutional network layer, the user node representation, the recommendation item node representation, and the edge labels corresponding to the user node representation and the recommendation item node representation of the training set are obtained.

4. The user behavior analysis method based on graph neural network according to claim 3 is characterized in that: The preset information propagation formula includes: in, The feature vector of each row of the feature matrix and the edge connection relationship of the adjacency matrix are aggregated in each graph convolutional network layer. is the adjacency matrix of the training set, is the feature matrix of the training set, is a learnable parameter, is the activation function, is the eigenvector of any node in each row of the feature matrix.

5. The user behavior analysis method based on graph neural network according to claim 1, characterized in that: The step of concatenating the user node representation and the recommendation item node representation and inputting the concatenated nodes into the fully connected network of the initial network model to obtain a gradient training network corresponding to the edge label includes: All user node representations and recommendation item node representations of the training set are concatenated in pairs and input into the fully connected network; Edge prediction is performed between user nodes and recommendation item nodes of the training set according to the fully connected network to obtain a gradient training network corresponding to edge labels.

6. A user behavior analysis device based on a graph neural network, used to implement the user behavior analysis method based on a graph neural network as claimed in any one of claims 1 to 5, characterized in that: The device comprises: The acquisition module is used to: acquire multiple initial bipartite graphs from a preset database, wherein the initial bipartite graphs are composed of user nodes of historical users, recommendation item nodes, and connection edges between user nodes and recommendation item nodes, and determine the connection edges of the initial bipartite graphs according to the behavior information generated by the user nodes of the initial bipartite graphs on the recommendation item nodes; The training module is used to: divide all the initial bipartite graphs into a training set and a validation set according to the connection edges, perform information propagation on the training set according to the initial network model, and obtain user node representation, recommendation item node representation and corresponding edge labels of the training set; The training module is further used to: splice the user node representation and the recommendation item node representation and input them into the fully connected network of the initial network model to obtain the gradient training network corresponding to the edge label, and perform shielding calculation on the verification set according to the gradient training network to obtain the shielding value of the connection edge of the verification set; The training module is also used for: if the shielding value is greater than a preset value, updating the initial bipartite graph, and iteratively training the updated bipartite graph according to the initial network model until the shielding value is less than the preset value, thereby obtaining a target network model; Application module: input the target bipartite graph consisting of the user node of the user to be tested, the recommendation item node, and the connection edges between the user node and the recommendation item node into the target network model for analysis, obtain the behavior analysis result of the user to be tested, and push the recommendation item to the user to be tested according to the analysis result.

7. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores a program that can be executed by the at least one processor, and the program is executed by the at least one processor so that the at least one processor can execute the user behavior analysis method based on graph neural network as described in any one of claims 1 to 5.

8. A computer-readable medium, characterized in that The computer-readable medium stores a user behavior analysis program, and when the user behavior analysis program is executed by a processor, it implements the user behavior analysis method based on a graph neural network as described in any one of claims 1 to 5.