Deep learning-based crowd portrait interest map enhanced modeling method
By constructing a ternary heterogeneous graph and hierarchical graph neural network, combined with artificial bee colony optimization and knowledge distillation, the problem of insufficient processing of user interest dynamics and structural heterogeneity in the existing technology is solved, and efficient identification and real-time recommendation of cold-start users and interest transfer users' behavior patterns are achieved.
Patent Information
- Application Number
- CN202510600553.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-12
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2045-05-12
AI Technical Summary
The prior art has shortcomings in dealing with the dynamics and structural heterogeneity of user interests, and lacks the integration of contextual scenario information. Graph neural networks are inefficient when processing large-scale graph data, have poor generalization capabilities, and are difficult to deploy in online real-time recommendation systems, resulting in large response delays and poor model adaptability.
A ternary heterogeneous graph is constructed, a snapshot sequence of population portrait interest maps is generated through a multi-grained time window, heuristic cropping is implemented, pooled hyperparameters are dynamically selected in combination with the artificial bee colony optimization algorithm, and a hierarchical graph neural network model combined with the DiffPool module and graph convolution network is used to perform interest fusion representation, and a lightweight student model is trained through knowledge distillation for online deployment.
It improves the ability to identify complex behavior patterns of cold-start users and interest-transfer users, significantly captures the nonlinear changes in the time dimension of user interests, and improves the real-time performance and model adaptability of the recommendation system.
Smart Images

Figure CN120541402A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of interest graph technology, and in particular to a crowd portrait interest graph enhancement modeling method based on deep learning. Background Art
[0002] With the development of big data and artificial intelligence technologies, user profiling and interest modeling have gradually become key components of intelligent recommendation systems. In particular, in crowd profiling modeling, extracting user interest tags and behavior patterns through multi-dimensional behavioral data has been widely used in e-commerce recommendations, content push, and advertising targeting scenarios. Current mainstream methods usually rely on static graphs or sequence modeling methods, using user behavior logs to construct graph structures or time series feature vectors, and predicting and representing user interests through graph neural networks or time series neural networks.
[0003] However, existing technologies still have major shortcomings in dealing with the dynamics and structural heterogeneity of user interests. First, most graph modeling methods only construct static graphs based on the binary relationship between users and interest tags. The lack of integration of contextual scene information leads to a lack of contextual awareness in interest relationship modeling and an inability to effectively reflect the differences in user behavior in different scenarios. Secondly, current graph neural networks are susceptible to node degree imbalance and redundant edge interference when processing large-scale graph data, and lack an efficient and selective graph pruning mechanism, resulting in low training efficiency and poor model generalization ability. In addition, when dealing with graph structure evolution problems, existing methods usually simply splice or independently model graph structures under different time windows, ignoring the evolution law of graph structure in the time dimension, and it is difficult to capture the continuity and mutation of interest evolution.
[0004] In addition, most existing graph neural models are offline models with complex structures and large parameters. Although they have strong representation capabilities, they are difficult to deploy in online real-time recommendation systems, resulting in large response delays and poor model adaptability during online reasoning. Although some attempts to introduce model compression and knowledge distillation have made some breakthroughs, they lack high-quality teacher model construction mechanisms and dynamic adjustment strategies. The distilled models still lag significantly when responding to sudden changes in user interests.
[0005] Therefore, there is an urgent need for a crowd interest graph enhancement modeling method that can integrate heterogeneous structural information, has dynamic cropping capabilities, and takes into account both temporal evolution and real-time performance, so as to improve the overall performance of the recommendation system. Summary of the Invention
[0006] One purpose of the present invention is to propose a crowd portrait interest graph enhanced modeling method based on deep learning, which effectively improves the ability to recognize the complex behavior patterns of cold start users and interest transfer users.
[0007] According to an embodiment of the present invention, a method for enhancing modeling of a crowd portrait interest graph based on deep learning includes the following steps:
[0008] S1. Construct a ternary heterogeneous graph and generate a snapshot sequence of the crowd portrait interest graph based on the ternary heterogeneous graph based on multi-granularity time windows;
[0009] S2. For each snapshot in the population profile interest graph snapshot sequence, perform heuristic pruning based on the node degree threshold, semantic similarity threshold, and time decay factor to generate the corresponding candidate subgraph. Aggregate the candidate subgraphs of all snapshots to form a candidate subgraph set. Perform offline task model training on the candidate subgraph set on the training dataset, and calculate click-through rate evaluation results, transaction conversion evaluation results, and normalized loss evaluation results to obtain a set of performance evaluation results.
[0010] S3. Using the candidate subgraph set and the performance evaluation result set as input, define the search space and fitness function of the artificial bee colony optimization algorithm, initialize the artificial bee colony optimization algorithm, iteratively search for a set of candidate pooling hyperparameter solutions through the discovery bee phase, following bee phase, and scout bee phase of the artificial bee colony optimization algorithm, and evaluate the fitness of the candidate pooling hyperparameter solutions based on the fitness function. Select the optimal pooling hyperparameter configuration based on the fitness evaluation results.
[0011] S4. Under the optimal pooling hyperparameter configuration, execute a hierarchical graph neural network model composed of a DiffPool module and a graph convolutional network module for each snapshot in the population profile interest graph snapshot sequence and its corresponding candidate subgraph. The hierarchical graph neural network model is used to extract the structural embedding vector of each snapshot and output a set of hierarchical structure vectors in the time window.
[0012] S5. Concatenate the hierarchical structure vectors of the time windows in the chronological order of the graph snapshot sequence and fuse them using a sparse attention mechanism to obtain an interest fusion representation vector for downstream supervised training. Using the interest fusion representation vector as input, train and construct an offline teacher model for offline supervised learning. The offline teacher model is a high-capacity neural network structure.
[0013] S6. Based on the output and parameters of the offline teacher model, a streamlined lightweight student model is trained for knowledge distillation. This lightweight student model approximates the teacher model's behavior without relying on the complete graph structure, resulting in a lightweight student model that can be deployed online. This lightweight student model is then deployed in an online real-time recommendation system and outputs inference results in real-time traffic scenarios.
[0014] S7. Continuously monitor the key performance indicators of the online real-time recommendation system. When it is detected that the key performance indicators are lower than the preset threshold or the user interest distribution changes by more than the preset threshold, collect the latest user data and regenerate the snapshot sequence of the population portrait interest graph, and then re-execute steps S2 to S6 to achieve enhanced modeling of the population portrait interest graph structure vector.
[0015] Optionally, step S1 includes the following steps:
[0016] S11. Collect raw behavior log data to form a raw behavior log set. Each user behavior record in the raw behavior log set includes four fields: user ID, interest action tag, behavior timestamp, and behavior context scene attribute. Each user behavior record in the raw behavior log set is used to describe a user's interest-related behavior triggered at a specific time and in a specific scenario;
[0017] S12. Based on the original behavior log set, extract the user identification set, interest tag set, and context scene set respectively, and jointly construct a ternary heterogeneous graph with the user identification set, interest tag set, and context scene set. The nodes of the ternary heterogeneous graph are composed of user nodes, interest tag nodes, and context scene nodes. In the ternary heterogeneous graph, the connection edge between the user node and the interest tag node is used to represent the relationship between the user's behavior on the interest tag, and the connection edge between the user node and the context scene node is used to represent the context scene information when the user behavior occurs. The interest tag node V (k) The connection edge E between the context scene node (k) It is used to represent the co-occurrence relationship of interest behaviors in a specific context. Each connection edge is associated with a connection strength parameter. The connection strength parameter between the user node and the interest tag node is used to characterize the weighted result of the user's behavior frequency and behavior freshness on a certain interest tag. The connection strength parameter between the user node and the context scene node is used to characterize the expression intensity of the user's activity in different context scenes. The connection strength parameter between the interest tag node and the context scene node is used to characterize the co-occurrence frequency of interest tags in different context scenes.
[0018] S13. Set a set of multi-granularity time windows to divide the time dimension of user behavior. For each time window, extract the structural subgraph within the time period from the ternary heterogeneous graph to generate a sequence of graph snapshots. Each graph snapshot in the sequence consists of a set of valid connection edges within the corresponding time period and a set of nodes involved in the connection edges. Each graph snapshot only contains the user nodes, interest tag nodes, and context scenario nodes that performed behavior within the time period, as well as all connection edges formed between nodes within the time period.
[0019] S14. For each graph snapshot in the graph snapshot sequence, record its time window label, number of active nodes, and edge density. The number of active nodes in the graph snapshot is used to indicate the total number of nodes that have participated in at least one behavior within the time period. The edge density is used to measure the structural density in the graph snapshot. The edge density is obtained by dividing the number of connected edges in the graph snapshot by the product of the number of nodes in the graph snapshot and the number of nodes minus one. The time window label, number of active nodes, and edge density of the graph snapshot are defined as a crowd portrait interest graph snapshot sequence.
[0020] Optionally, step S2 includes the following steps:
[0021] S21. For each snapshot G in the crowd portrait interest graph snapshot sequence (k) =(V (k) ,E (k) ), calculate the node degree value of each node and set the node degree threshold θ d , filter out all nodes whose node degree values are lower than the node degree threshold Define node degree values
[0022]
[0023] in, Represents node v i In the snapshot G (k) The weighted value in , Represents node v i With node v j In the time window Δt k Connection strength parameter of inner connection edge, 1 {·} is an indicator function, which is 1 if the edge exists and 0 otherwise;
[0024] S22. Based on graph snapshot G (k) The interest semantic vector representation of each node in Construct node semantic similarity matrix S (k) , and set the semantic similarity threshold, filter out all edges corresponding to node pairs with semantic similarity lower than the semantic similarity threshold, and get node v i With node v j In the snapshot G (k) Semantic similarity in Semantic similarity is used to characterize the similarity between two nodes in terms of their interest semantic vector representations. Semantic similarity is obtained by taking the dot product of the interest semantic vector representations of the two nodes and then dividing it by the product of the modulo lengths of the two vectors.
[0025] S23. For each graph snapshot G (k) , combined with the behavior timestamp t iWith time window Δt k , calculate the node activity decay weight factor The node activity decay weight factor is used to reflect the timeliness of node behavior relative to the current system time. It is obtained by dividing the difference between the current system time and the time of the node's most recent behavior by the duration of the time window corresponding to the graph snapshot, and multiplying it by the time decay control coefficient to obtain the negative exponent.
[0026] S24. Comprehensive node degree value Semantic similarity and node activity decay weight factor Construct candidate sub-image cropping function:
[0027]
[0028] in, Represents node v i Satisfy the clipping preservation condition, θ d ,θ s ,θ γ Indicates the corresponding threshold;
[0029] S25. Snapshot G (k) All the candidate subgraphs that satisfy the pruning function A collection of nodes and its associated edge sets Constructing candidate subgraphs Aggregate the candidate subgraphs under all time windows to form a candidate subgraph set:
[0030]
[0031] S26. On the training dataset, the candidate subgraph set G sub Perform task objective function training and use the click-through rate evaluation indicator AUC (k) , transaction conversion indicator CVR (k) and structural fidelity index Dist (k) For each candidate subgraph Perform performance evaluation and build a performance evaluation result set M perf :
[0032]
[0033] Among them, AUC (k) Representation graph snapshot G (k) The area under the curve score of the corresponding candidate subgraph in the click prediction task, CVR (k) Representation graph snapshot G (k) Conversion rate performance in transaction conversion prediction tasks, Dist (k)Represents the fidelity measure between the candidate subgraph structure and the original graph snapshot structure.
[0034] Optionally, step S3 includes the following steps:
[0035] S31. Taking the candidate subgraph set G sub and the performance evaluation result set M perf As input, a hyperparameter search space for the artificial bee colony optimization algorithm is constructed. Each solution vector x in the search space represents a set of pooled hyperparameter configurations:
[0036] x=(p,m,λ,α);
[0037] Where p represents the graph pooling ratio hyperparameter in the DiffPool module, m represents the number of cluster centers after each layer of graph pooling, λ represents the graph structure preservation regularization coefficient, which controls the structural constraint strength between the original image and the pooled image, and α represents the graph attention gating coefficient, which is used to adjust the information fusion weight.
[0038] S32. Define the fitness function f(x) of the artificial bee colony optimization algorithm. The fitness function is used to measure the comprehensive effect of each set of pooling hyperparameter configurations on the candidate subgraph set. The objective function is constructed based on the evaluation indicators of S26:
[0039]
[0040] Among them, AUC (k) (x), CVR (k) (x) and Dist (k) (x) represents the kth candidate subgraph Above, the area under the click-through rate curve score, transaction conversion rate score, and structural fidelity metric obtained after applying the pooling hyperparameter configuration x, where w1, w2, and w3 are weighting coefficients;
[0041] S33. Initialize the bee colony individual set X={x1,x2,…,x n}, where n is the initial bee colony size, and each bee colony individual x i Represents a set of candidate pooling hyperparameter configurations and calculates the fitness function f(x i );
[0042] S34. In the discovery bee stage of the artificial bee colony optimization algorithm, for each bee colony individual x i Perform parameter perturbation to generate neighborhood solution x′ i , and evaluate the fitness of the neighborhood solution. If the fitness function f(x′ i )>f(x i ), then use the neighborhood solution x′ i Replace swarm individual xi ;
[0043] S35. In the following bee phase of the artificial bee colony optimization algorithm, a probabilistic selection strategy is constructed based on the fitness distribution of the current swarm individual set. Some individuals are probabilistically selected for local search and perturbation, the solution space is updated, and the fitness function is recalculated.
[0044] S36. In the scout bee stage of the artificial bee colony optimization algorithm, the bee colony individuals whose fitness function has not improved within the preset time are randomly reinitialized to form a new solution vector x r , join the bee swarm individual set X, and perform fitness function calculation;
[0045] S37. Set the maximum number of iterations or the optimal solution convergence condition, execute the artificial bee colony optimization iterative process, and output the optimal pooling hyperparameter configuration of the fitness function when the termination condition is met.
[0046] Optionally, step S4 includes the following steps:
[0047] S41. Taking the optimal pooling hyperparameter configuration as the input configuration parameter, for each snapshot G in the crowd portrait interest graph snapshot sequence G (k) and its corresponding candidate subgraph Construct a structure-adaptive graph convolutional network module combined with a multi-head attention mechanism, using node neighborhood interest aggregation weights Update each node interest embedding vector
[0048]
[0049] in, Represents the node v after the l-th layer of graph convolution in the k-th graph snapshot i Interest embedding vector, N(v i ) represents node v i The first-order interest neighborhood node set, W (l) is the learnable feature transformation weight matrix of the lth layer, σ(·) represents the nonlinear activation function, and the node neighborhood interest aggregation weight Represents node v j For node v i The neighborhood contribution of interest representation is obtained by jointly calculating the node interest semantic similarity and edge connection strength parameter;
[0050] S42. The DiffPool module and the structure-adaptive graph convolutional network module are connected in series to form a hierarchical graph neural network model. In the first layer of DiffPool pooling, a soft cluster allocation matrix S is constructed that is adaptive to the criticality of the nodes of interest to the crowd. (k,l), the soft cluster assignment matrix represents the assignment probability of each interest node belonging to each interest cluster. The assignment probability is generated by multi-layer perceptron network mapping. The graph attention gating coefficient α is introduced into the multi-layer perceptron network. * , which is used to adjust the influence of each interest node on the clustering decision. The number of interest clusters in each layer is determined by the graph pooling ratio hyperparameter p * Control, which is the product of the number of interest nodes in the current layer and the graph pooling ratio rounded off;
[0051] S43. Perform interest-adaptive aggregation on the node interest embedding vector according to the soft cluster assignment matrix generated in each layer of the graph pooling module. The interest-adaptive aggregation is performed by weighted summing the interest embedding vectors of all interest nodes according to their corresponding cluster assignment probabilities to obtain the node interest embedding vector X of the lth layer. (k,l) , map the original graph adjacency structure relationship according to the distribution probability, and obtain the l-th layer interest cluster graph structure vector A (k,l) ;
[0052]
[0053] S44. Construct an interest structure fidelity loss function in each layer of the graph pooling module. The interest structure fidelity loss function is used to measure the degree of structural deviation between the adjacency structure of the original graph and the compressed interest cluster graph:
[0054]
[0055] in, It is used to measure the degree of deviation between the interest graph structure after the l-th layer DiffPool pooling and the interest graph structure before pooling, and guides the DiffPool module to adaptively retain key nodes and interest cluster information through the interest structure fidelity loss function;
[0056] S45. In the top-level interest cluster graph representation of the hierarchical graph neural network model, a cross-layer residual connection mechanism is used to fuse the interest cluster embedding vectors of different layers. The fusion process multiplies the node interest embedding vectors output by each layer by the learnable residual connection weight and then performs weighted superposition layer by layer. All node interest embedding vectors are aggregated through a global average pooling operation to obtain the high-order interest graph embedding vector h of the crowd portrait interest graph corresponding to the graph snapshot. (k) ;
[0057] S46. Aggregate the high-order interest graph embedding vector h of all time window graph snapshots (k) , construct a time window hierarchical structure vector set H for subsequent interest representation fusion and supervised learning snap .
[0058] Optionally, step S5 includes the following steps:
[0059] S51. Concatenate the high-order interest graph embedding vectors corresponding to each graph snapshot in the time window hierarchical structure vector set in chronological order to form a time series interest vector matrix. The time series interest vector matrix is used to preserve the evolution trajectory of the interest graph structure of the crowd portrait under different time windows. Each row of the matrix represents the high-order interest graph embedding vector of a time snapshot, and each column represents an interest embedding dimension.
[0060] S52. Construct a sparse attention fusion module to calculate the time series interest vector matrix H seq The snapshots of each graph are embedded to distribute attention weights, and the time-weighted interest fusion representation vector h is obtained. agg :
[0061]
[0062] Among them, α k represents the attention weight of the k-th time snapshot embedding;
[0063] S53. Use the interest fusion representation vector generated by the sparse attention fusion module as training input to construct an offline supervised learning model. The offline supervised learning model is defined as an offline teacher model. The offline teacher model is a multi-layer neural network with a high-capacity structure. Its input is the interest fusion representation vector, and its output is the prediction result, which is used to restore the recommendation task results for the user's specific interest behavior scenario.
[0064] S54. Construct a supervised loss function based on the true label value of each sample in the training dataset and the prediction result of the offline teacher model. The supervised loss function is used to measure the difference between the predicted value and the true label. The supervised loss function uses binary cross entropy to calculate the logarithmic error between the predicted value and the label value at the sample level and then averages it over all samples. The smaller the supervised loss function, the stronger the predictive ability of the offline teacher model.
[0065] S55. Use the gradient descent optimization algorithm to minimize the supervision loss function and iteratively optimize the parameter set of the offline teacher model. When the supervision loss function reaches the minimum value or meets the termination condition, the training process ends and the obtained model parameter set is used to fix the state of the offline teacher model.
[0066] Optionally, step S6 includes the following steps:
[0067] S61. Construct a streamlined lightweight student model. This model is a deep compressed graph neural network structure with smaller feature representation dimensions and network depth than the offline teacher model. Its input is a node-level sparse feature set or a low-dimensional interest representation set of candidate subgraphs, and it does not rely on the complete graph structure information.
[0068] S62. Extract the output distribution of each training sample from the offline teacher model as a soft label Combined with the true label of each sample Constructing knowledge distillation loss function The knowledge distillation loss function consists of two parts: the Kullback-Leibler divergence loss between the soft label and the student model prediction result, and the cross entropy loss between the true label and the student model prediction result:
[0069]
[0070] in, represents the predicted output of the i-th sample calculated by the lightweight student model, β is the distillation loss weight hyperparameter, KL(·||·) represents the Kullback-Leibler divergence, and CE(·,·) represents the cross entropy loss function;
[0071] S63. Using knowledge distillation loss function Optimize the parameter set Θ of the lightweight student model student , iteratively minimized by back propagation and gradient descent Obtain the distilled lightweight student model structure;
[0072] S64. Deploy the lightweight student model trained after distillation to the online real-time recommendation system. Build an inference interface to accept user request data from real-time traffic scenarios. The input data includes the user's current context, the user's historical behavior, interest tag sequence, and timestamp compression features. The lightweight student model calculates and outputs the recommendation task results.
[0073] S65. Recommendation score based on the output of the lightweight student model in real-time traffic scenarios Combined with the preset classification decision rules, determine the recommended status label for the user's current behavior:
[0074] If the recommendation score If the user behavior context is a cold start environment, the current user status is marked as unknown interest;
[0075] If the recommendation score If there are time sparse jumps in the historical interest tag sequence, the user status is marked as interest change;
[0076] If the recommendation score If the aggregate similarity between the current interest tag and the historical tag exceeds the threshold, the user status is marked as having stable interest.
[0077] The beneficial effects of the present invention are:
[0078] (1) The present invention introduces an artificial bee colony optimization algorithm to dynamically select pooling hyperparameters in graph neural networks, thereby achieving joint optimization of the graph pooling ratio, the number of interest clusters, the structure preservation coefficient, and the attention gating coefficient in the DiffPool module. By constructing a fitness function centered on prediction accuracy and structural fidelity and utilizing the global search capability of the artificial bee colony in the solution space, the optimal hyperparameter combination can be accurately identified.
[0079] (2) The present invention introduces a heuristic multi-factor pruning mechanism in the graph structure modeling stage, and extracts candidate subgraphs from graph snapshots based on the three-dimensional features of node degree, semantic similarity, and temporal activity, avoiding the computational redundancy and information dilution problems caused by full-graph calculations in traditional graph neural networks. Through the node retention function, it realizes the automatic screening of node subsets with high information density, active behavior, and strong semantic concentration in the graph snapshot to form a candidate subgraph set, effectively compressing the graph scale while retaining the core semantic structure.
[0080] (3) The present invention designs a set of interest graph vector integration mechanisms that integrate hierarchical graph structures and time evolution expressions. Combined with the sparse attention fusion module, the high-order interest embedding vector sequences generated under multi-granularity time windows are weightedly integrated to construct an interest fusion representation vector for offline supervised learning teacher model training, and further migrate it to a lightweight student model through knowledge distillation for deployment in a real-time recommendation system. It can significantly capture the nonlinear change characteristics of user interests in the time dimension and effectively improve the ability to recognize the complex behavior patterns of cold-start users and interest-shifting users. BRIEF DESCRIPTION OF THE DRAWINGS
[0081] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0082] Figure 1 This is a flowchart of a crowd portrait interest graph enhanced modeling method based on deep learning proposed by the present invention. DETAILED DESCRIPTION
[0083] The present invention will now be described in further detail with reference to the accompanying drawings, which are simplified schematic diagrams that illustrate the basic structure of the present invention in a schematic manner.
[0084] refer to Figure 1 , a crowd portrait interest graph enhanced modeling method based on deep learning, including the following steps:
[0085] S1. Construct a ternary heterogeneous graph and generate a snapshot sequence of the crowd portrait interest graph based on the ternary heterogeneous graph based on multi-granularity time windows;
[0086] S2. For each snapshot in the population profile interest graph snapshot sequence, perform heuristic pruning based on the node degree threshold, semantic similarity threshold, and time decay factor to generate the corresponding candidate subgraph. Aggregate the candidate subgraphs of all snapshots to form a candidate subgraph set. Perform offline task model training on the candidate subgraph set on the training dataset, and calculate click-through rate evaluation results, transaction conversion evaluation results, and normalized loss evaluation results to obtain a set of performance evaluation results.
[0087] S3. Using the candidate subgraph set and the performance evaluation result set as input, define the search space and fitness function of the artificial bee colony optimization algorithm, initialize the artificial bee colony optimization algorithm, iteratively search for a set of candidate pooling hyperparameter solutions through the discovery bee phase, following bee phase, and scout bee phase of the artificial bee colony optimization algorithm, and evaluate the fitness of the candidate pooling hyperparameter solutions based on the fitness function. Select the optimal pooling hyperparameter configuration based on the fitness evaluation results.
[0088] S4. Under the optimal pooling hyperparameter configuration, execute a hierarchical graph neural network model composed of a DiffPool module and a graph convolutional network module for each snapshot in the population profile interest graph snapshot sequence and its corresponding candidate subgraph. The hierarchical graph neural network model is used to extract the structural embedding vector of each snapshot and output a set of hierarchical structure vectors in the time window.
[0089] S5. Concatenate the hierarchical structure vectors of the time windows in the chronological order of the graph snapshot sequence and fuse them using a sparse attention mechanism to obtain an interest fusion representation vector for downstream supervised training. Using the interest fusion representation vector as input, train and construct an offline teacher model for offline supervised learning. The offline teacher model is a high-capacity neural network structure.
[0090] S6. Based on the output and parameters of the offline teacher model, a streamlined lightweight student model is trained for knowledge distillation. This lightweight student model approximates the teacher model's behavior without relying on the complete graph structure, resulting in a lightweight student model that can be deployed online. This lightweight student model is then deployed in an online real-time recommendation system and outputs inference results in real-time traffic scenarios.
[0091] S7. Continuously monitor the key performance indicators of the online real-time recommendation system. When it is detected that the key performance indicators are lower than the preset threshold or the user interest distribution changes by more than the preset threshold, collect the latest user data and regenerate the snapshot sequence of the population portrait interest graph, and then re-execute steps S2 to S6 to achieve enhanced modeling of the population portrait interest graph structure vector.
[0092] In this embodiment, step S1 includes the following steps:
[0093] S11. Collect raw behavior log data to form a raw behavior log set. Each user behavior record in the raw behavior log set includes four fields: user ID, interest action tag, behavior timestamp, and behavior context scene attribute. Each user behavior record in the raw behavior log set is used to describe a user's interest-related behavior triggered at a specific time and in a specific scenario;
[0094] S12. Based on the original behavior log set, extract the user identification set, interest tag set, and context scene set respectively, and jointly construct a ternary heterogeneous graph with the user identification set, interest tag set, and context scene set. The nodes of the ternary heterogeneous graph are composed of user nodes, interest tag nodes, and context scene nodes. In the ternary heterogeneous graph, the connection edge between the user node and the interest tag node is used to represent the relationship between the user's behavior on the interest tag, and the connection edge between the user node and the context scene node is used to represent the context scene information when the user behavior occurs. The interest tag node V (k) The connection edge E between the context scene node (k) It is used to represent the co-occurrence relationship of interest behaviors in a specific context. Each connection edge is associated with a connection strength parameter. The connection strength parameter between the user node and the interest tag node is used to characterize the weighted result of the user's behavior frequency and behavior freshness on a certain interest tag. The connection strength parameter between the user node and the context scene node is used to characterize the expression intensity of the user's activity in different context scenes. The connection strength parameter between the interest tag node and the context scene node is used to characterize the co-occurrence frequency of interest tags in different context scenes.
[0095] S13. Set a set of multi-granularity time windows to divide the time dimension of user behavior. For each time window, extract the structural subgraph within the time period from the ternary heterogeneous graph to generate a sequence of graph snapshots. Each graph snapshot in the sequence consists of a set of valid connection edges within the corresponding time period and a set of nodes involved in the connection edges. Each graph snapshot only contains the user nodes, interest tag nodes, and context scenario nodes that performed behavior within the time period, as well as all connection edges formed between nodes within the time period.
[0096] S14. For each graph snapshot in the graph snapshot sequence, record its time window label, number of active nodes, and edge density. The number of active nodes in the graph snapshot is used to indicate the total number of nodes that have participated in at least one behavior within the time period. The edge density is used to measure the structural density in the graph snapshot. The edge density is obtained by dividing the number of connected edges in the graph snapshot by the product of the number of nodes in the graph snapshot and the number of nodes minus one. The time window label, number of active nodes, and edge density of the graph snapshot are defined as a crowd portrait interest graph snapshot sequence.
[0097] In this embodiment, step S2 includes the following steps:
[0098] S21. For each snapshot G in the crowd portrait interest graph snapshot sequence (k) =(V (k) ,E (k) ), calculate the node degree value of each node and set the node degree threshold θ d , filter out all nodes whose node degree values are lower than the node degree threshold Define node degree values
[0099]
[0100] in, Represents node v i In the snapshot G (k) The weighted value in , Represents node v i With node v j In the time window Δt k Connection strength parameter of inner connection edge, 1 {·} is an indicator function, which is 1 if the edge exists and 0 otherwise;
[0101] S22. Based on graph snapshot G (k) The interest semantic vector representation of each node in Construct node semantic similarity matrix S (k) , and set the semantic similarity threshold, filter out all edges corresponding to node pairs with semantic similarity lower than the semantic similarity threshold, and get node v i With node v j In the snapshot G (k) Semantic similarity in Semantic similarity is used to characterize the similarity between two nodes in terms of their interest semantic vector representations. Semantic similarity is obtained by taking the dot product of the interest semantic vector representations of the two nodes and then dividing it by the product of the modulo lengths of the two vectors.
[0102] S23. For each graph snapshot G (k) , combined with the behavior timestamp t i With time window Δt k , calculate the node activity decay weight factor The node activity decay weight factor is used to reflect the timeliness of node behavior relative to the current system time. It is obtained by dividing the difference between the current system time and the time of the node's most recent behavior by the duration of the time window corresponding to the graph snapshot, and multiplying it by the time decay control coefficient to obtain the negative exponent.
[0103] S24. Comprehensive node degree value Semantic similarity and node activity decay weight factor Construct candidate sub-image cropping function:
[0104]
[0105] in, Represents node v i Satisfy the clipping preservation condition, θ d ,θ s ,θ γ Indicates the corresponding threshold;
[0106] S25. Snapshot G (k) All the candidate subgraphs that satisfy the pruning function A collection of nodes and its associated edge sets Constructing candidate subgraphs Aggregate the candidate subgraphs under all time windows to form a candidate subgraph set:
[0107]
[0108] S26. On the training dataset, the candidate subgraph set G sub Perform task objective function training and use the click-through rate evaluation indicator AUC (k) , transaction conversion indicator CVR (k) and structural fidelity index Dist (k) For each candidate subgraph Perform performance evaluation and build a performance evaluation result set M perf :
[0109]
[0110] Among them, AUC (k) Representation graph snapshot G (k) The area under the curve score of the corresponding candidate subgraph in the click prediction task, CVR (k) Representation graph snapshot G (k) Conversion rate performance in transaction conversion prediction tasks, Dist (k) Represents the fidelity measure between the candidate subgraph structure and the original graph snapshot structure.
[0111] The click-through rate evaluation metric is used to measure the classification ability of candidate subgraphs in the user click behavior prediction task, that is, the model's ability to distinguish between positive and negative samples (clicked / not clicked). The metric is constructed as follows:
[0112] For each candidate subgraph, the user node in the graph is used as the target node, the node embedding vector extracted by the graph neural network is input, the downstream click-through rate prediction task is performed, and the user click probability is output. Combined with the real click row labels in the training set, the area under the ROC curve is used as an indicator to measure the prediction ranking performance. The closer the AUC value is to 1, the more accurate the model is in predicting click behavior on the candidate subgraph.
[0113] The transaction conversion metric is used to evaluate the performance of a candidate subgraph in the task of predicting user transaction behavior. This metric is used to evaluate the modeling capability of the conversion rate from clicks to transactions. The metric is constructed as follows:
[0114] With a graph structure similar to click prediction input, the predicted transaction probability is output, that is, the probability that the user completes the purchase or transaction behavior. This is compared with the actual transaction behavior label and evaluated using the average conversion rate, which is defined as the proportion of samples predicted to be positive that are actually positive:
[0115]
[0116] Among them, τ is the conversion probability threshold, which is usually set to 0.5. is the indicator function.
[0117] The structural fidelity index is used to measure whether the candidate subgraph structure faithfully retains the key topological structure in the original graph snapshot after graph cropping and graph pooling. The construction method is as follows:
[0118] The adjacency matrix of the original graph snapshot is compared with the adjacency matrix of the candidate subgraph, and the Frobenius norm is used to characterize the structural difference metric between the two. The smaller the Dist, the more complete the retained structure is, avoiding the loss of structural information due to cropping or pooling operations.
[0119] In this embodiment, step S3 includes the following steps:
[0120] S31. Taking the candidate subgraph set G sub and the performance evaluation result set M perf As input, a hyperparameter search space for the artificial bee colony optimization algorithm is constructed. Each solution vector x in the search space represents a set of pooled hyperparameter configurations:
[0121] x=(p,m,λ,α);
[0122] Where p represents the graph pooling ratio hyperparameter in the DiffPool module, m represents the number of cluster centers after each layer of graph pooling, λ represents the graph structure preservation regularization coefficient, which controls the structural constraint strength between the original image and the pooled image, and α represents the graph attention gating coefficient, which is used to adjust the information fusion weight.
[0123] S32. Define the fitness function f(x) of the artificial bee colony optimization algorithm. The fitness function is used to measure the comprehensive effect of each set of pooling hyperparameter configurations on the candidate subgraph set. The objective function is constructed based on the evaluation indicators of S26:
[0124]
[0125] Among them, AUC (k) (x), CVR (k) (x) and Dist (k) (x) represents the kth candidate subgraph Above, the area under the click-through rate curve score, transaction conversion rate score, and structural fidelity metric obtained after applying the pooling hyperparameter configuration x, where w1, w2, and w3 are weighting coefficients;
[0126] S33. Initialize the bee colony individual set X={x1,x2,…,x n}, where n is the initial bee colony size, and each bee colony individual x i Represents a set of candidate pooling hyperparameter configurations and calculates the fitness function f(x i );
[0127] S34. In the discovery bee stage of the artificial bee colony optimization algorithm, for each bee colony individual x i Perform parameter perturbation to generate neighborhood solution x′ i , and evaluate the fitness of the neighborhood solution. If the fitness function f(x′ i )>f(x i ), then use the neighborhood solution x′ i Replace swarm individual x i ;
[0128] S35. In the following bee phase of the artificial bee colony optimization algorithm, a probabilistic selection strategy is constructed based on the fitness distribution of the current swarm individual set. Some individuals are probabilistically selected for local search and perturbation, the solution space is updated, and the fitness function is recalculated.
[0129] S36. In the scout bee stage of the artificial bee colony optimization algorithm, the bee colony individuals whose fitness function has not improved within the preset time are randomly reinitialized to form a new solution vector x r , join the bee swarm individual set X, and perform fitness function calculation;
[0130] S37. Set the maximum number of iterations or the optimal solution convergence condition, execute the artificial bee colony optimization iterative process, and output the optimal pooling hyperparameter configuration of the fitness function when the termination condition is met.
[0131] In this embodiment, step S4 includes the following steps:
[0132] S41. Taking the optimal pooling hyperparameter configuration as the input configuration parameter, for each snapshot G in the crowd portrait interest graph snapshot sequence G (k) and its corresponding candidate subgraph Construct a structure-adaptive graph convolutional network module combined with a multi-head attention mechanism, using node neighborhood interest aggregation weights Update each node interest embedding vector
[0133]
[0134] in, Represents the node v after the l-th layer of graph convolution in the k-th graph snapshot i Interest embedding vector, N(v i ) represents node v i The first-order interest neighborhood node set, W (l) is the learnable feature transformation weight matrix of the lth layer, σ(·) represents the nonlinear activation function, and the node neighborhood interest aggregation weight Represents node v j For node v i The neighborhood contribution of interest representation is obtained by jointly calculating the node interest semantic similarity and edge connection strength parameter;
[0135] S42. The DiffPool module and the structure-adaptive graph convolutional network module are connected in series to form a hierarchical graph neural network model. In the first layer of DiffPool pooling, a soft cluster allocation matrix S is constructed that is adaptive to the criticality of the nodes of interest to the crowd. (k,l) , the soft cluster assignment matrix represents the assignment probability of each interest node belonging to each interest cluster. The assignment probability is generated by multi-layer perceptron network mapping. The graph attention gating coefficient α is introduced into the multi-layer perceptron network. * , which is used to adjust the influence of each interest node on the clustering decision. The number of interest clusters in each layer is determined by the graph pooling ratio hyperparameter p * Control, which is the product of the number of interest nodes in the current layer and the graph pooling ratio rounded off;
[0136] S43. Perform interest-adaptive aggregation on the node interest embedding vector according to the soft cluster assignment matrix generated in each layer of the graph pooling module. The interest-adaptive aggregation is performed by weighted summing the interest embedding vectors of all interest nodes according to their corresponding cluster assignment probabilities to obtain the node interest embedding vector X of the lth layer. (k,l) , map the original graph adjacency structure relationship according to the distribution probability, and obtain the l-th layer interest cluster graph structure vector A (k,l) ;
[0137]
[0138] S44. Construct an interest structure fidelity loss function in each layer of the graph pooling module. The interest structure fidelity loss function is used to measure the degree of structural deviation between the adjacency structure of the original graph and the compressed interest cluster graph:
[0139]
[0140] in, It is used to measure the degree of deviation between the interest graph structure after the l-th layer DiffPool pooling and the interest graph structure before pooling, and guides the DiffPool module to adaptively retain key nodes and interest cluster information through the interest structure fidelity loss function;
[0141] S45. In the top-level interest cluster graph representation of the hierarchical graph neural network model, a cross-layer residual connection mechanism is used to fuse the interest cluster embedding vectors of different layers. The fusion process multiplies the node interest embedding vectors output by each layer by the learnable residual connection weight and then performs weighted superposition layer by layer. All node interest embedding vectors are aggregated through a global average pooling operation to obtain the high-order interest graph embedding vector h of the crowd portrait interest graph corresponding to the graph snapshot. (k) ;
[0142] S46. Aggregate the high-order interest graph embedding vector h of all time window graph snapshots (k) , construct a time window hierarchical structure vector set H for subsequent interest representation fusion and supervised learning snap .
[0143] In this embodiment, step S5 includes the following steps:
[0144] S51. Concatenate the high-order interest graph embedding vectors corresponding to each graph snapshot in the time window hierarchical structure vector set in chronological order to form a time series interest vector matrix. The time series interest vector matrix is used to preserve the evolution trajectory of the interest graph structure of the crowd portrait under different time windows. Each row of the matrix represents the high-order interest graph embedding vector of a time snapshot, and each column represents an interest embedding dimension.
[0145] S52. Construct a sparse attention fusion module to calculate the time series interest vector matrix H seq The snapshots of each graph are embedded to distribute attention weights, and the time-weighted interest fusion representation vector h is obtained. agg :
[0146]
[0147] Among them, α k represents the attention weight of the k-th time snapshot embedding;
[0148] S53. Use the interest fusion representation vector generated by the sparse attention fusion module as training input to construct an offline supervised learning model. The offline supervised learning model is defined as an offline teacher model. The offline teacher model is a multi-layer neural network with a high-capacity structure. Its input is the interest fusion representation vector, and its output is the prediction result, which is used to restore the recommendation task results for the user's specific interest behavior scenario.
[0149] S54. Construct a supervised loss function based on the true label value of each sample in the training dataset and the prediction result of the offline teacher model. The supervised loss function is used to measure the difference between the predicted value and the true label. The supervised loss function uses binary cross entropy to calculate the logarithmic error between the predicted value and the label value at the sample level and then averages it over all samples. The smaller the supervised loss function, the stronger the predictive ability of the offline teacher model.
[0150] S55. Use the gradient descent optimization algorithm to minimize the supervision loss function and iteratively optimize the parameter set of the offline teacher model. When the supervision loss function reaches the minimum value or meets the termination condition, the training process ends and the obtained model parameter set is used to fix the state of the offline teacher model.
[0151] In this embodiment, step S6 includes the following steps:
[0152] S61. Construct a streamlined lightweight student model. This model is a deep compressed graph neural network structure with smaller feature representation dimensions and network depth than the offline teacher model. Its input is a node-level sparse feature set or a low-dimensional interest representation set of candidate subgraphs, and it does not rely on the complete graph structure information.
[0153] S62. Extract the output distribution of each training sample from the offline teacher model as a soft label Combined with the true label of each sample Constructing knowledge distillation loss function The knowledge distillation loss function consists of two parts: the Kullback-Leibler divergence loss between the soft label and the student model prediction result, and the cross entropy loss between the true label and the student model prediction result:
[0154]
[0155] in, represents the predicted output of the i-th sample calculated by the lightweight student model, β is the distillation loss weight hyperparameter, KL(·||·) represents the Kullback-Leibler divergence, and CE(·,·) represents the cross entropy loss function;
[0156] S63. Using knowledge distillation loss function Optimize the parameter set Θ of the lightweight student model student , iteratively minimized by back propagation and gradient descent Obtain the distilled lightweight student model structure;
[0157] S64. Deploy the lightweight student model trained after distillation to the online real-time recommendation system. Build an inference interface to accept user request data from real-time traffic scenarios. The input data includes the user's current context, the user's historical behavior, interest tag sequence, and timestamp compression features. The lightweight student model calculates and outputs the recommendation task results.
[0158] S65. Recommendation score based on the output of the lightweight student model in real-time traffic scenarios Combined with the preset classification decision rules, determine the recommended status label for the user's current behavior:
[0159] If the recommendation score If the user behavior context is a cold start environment, the current user status is marked as unknown interest;
[0160] If the recommendation score If there are time sparse jumps in the historical interest tag sequence, the user status is marked as interest change;
[0161] If the recommendation score If the aggregate similarity between the current interest tag and the historical tag exceeds the threshold, the user status is marked as having stable interest.
[0162] Example 1:
[0163] A digital science laboratory officially launched a special test in City A, with the goal of evaluating the performance of different structural modeling algorithms in crowd interest prediction scenarios. In the early user portrait system, the R&D team mainly used a static binary graph structure combined with a standard GCN for interest extraction. However, when processing the large-scale user traffic during the Double 11 (Singles' Day) promotion, the system frequently experienced inaccurate user portraits, decreased cold start recommendation accuracy, and fluctuating online response delays. Therefore, the team decided to introduce the present invention for comparative testing to verify its comprehensive advantages in structural adaptability, recommendation effectiveness, and system deployment efficiency.
[0164] The A / B test environment of the test platform recommendation system was used. The experimental samples were selected from the e-commerce user behavior data of three cities from October 1 to November 1, 2024, covering user browsing, clicking, adding to shopping carts, and ordering behaviors. The scale of the original behavior logs reached 120 million. After data preprocessing, 3.76 million active users, 2.24 million interest tags (such as "headphones", "down jackets", and "children's picture books"), and approximately 470,000 contextual scenarios (such as "morning browsing", "late night ordering", and "subway network") were extracted. This part of the data was used to construct the original ternary heterogeneous graph (user-interest tag-contextual scenario).
[0165] In traditional methods, engineers used a combination of GCN and Attention to model the graph, without distinguishing time windows or cropping the structure. They processed the entire graph and extracted static embeddings for recommendation. In the experimental group, the method of the present invention was applied. First, three time window granularities were set (nearly 1 day, nearly 3 days, and nearly 7 days) to generate corresponding graph snapshot sequences. Then, the team cropped the graph using the triple factors of node degree, semantic similarity, and temporal activity to extract the core substructure. On average, each graph was compressed from the original 390,000 nodes to about 56,000, and the edge compression rate reached 86.7%.
[0166] Subsequently, based on the subgraph set generated from each graph snapshot, CTR and CVR task model training was performed on the offline training set, and a performance evaluation matrix was generated based on the output indicators. The artificial bee colony optimization module used a population size of n=30 and a maximum number of iterations of 60 rounds. The fitness function was used to search for the four-dimensional hyperparameters of pooling ratio p, number of interest clusters m, graph structure preservation coefficient λ, and graph attention gating coefficient α. The optimal solution was finally determined to be (p=0.25, m=128, λ=0.05, α=0.9). The average AUC, CVR, and structural fidelity Dist of this set of parameters were 0.746, 0.412, and 0.027, respectively, which were improved by +4.8%, +3.9%, and -12.2% compared with the manually configured parameters.
[0167] During the structural training phase, a hierarchical graph neural network model is constructed, employing a five-layer DiffPool module stacked with an adaptive graph convolutional structure. High-order interest embedding vectors are output for each graph snapshot at each time period. All snapshot outputs are fed into a sparse attention fusion module to form a fused interest representation vector, which is then input into an offline teacher model composed of a multi-layer fully connected neural network. Model training is completed using a combined AUC and cross-entropy loss optimization approach, and the final results are transferred to a streamlined graph neural student model through knowledge distillation. This model has only 23% of the parameters of the teacher model and is deployed in online systems for real-time prediction.
[0168] During the Double 11 (Singles' Day) pre-launch period from November 5th to 8th, 2024, the platform conducted a 72-hour online A / B test for crowd interest modeling. The control group continued to use the traditional GCN model, while the experimental group used the distilled student model deployed using the method of this invention. In online real-time recommendation scenarios (including personalized recommendations on the homepage, recommended content, and special feature pages), the daily peak online request volume reached 34 million times. The test indicators are as follows:
[0169] Table 1 Comparison of test index data between the method of the present invention and the traditional method
[0170]
[0171] Among them, the sample number of cold start users (registration ≤ 7 days, no more than 3 shopping records) is about 42,000 people. The present invention improves the accuracy of their recommendations by more than 12%; and among users with sudden interest changes (whose interest tags switch to another category of goods within 24 hours), the system improves the accuracy of their recommendations based on the interest stability index set in the model. The similarity between the value and the contextual aggregated label automatically detects interest transfer behavior and triggers the model fine-tuning process, so that the average delay from monitoring interest mutation to adjusting recommended content is only 38 minutes, which is significantly ahead of the traditional solution's 3-hour batch update strategy.
[0172] In addition, system resource consumption evaluation data shows that the online deployment version of the model of the present invention has a CPU usage rate reduced by 27.8%, and an average memory usage reduction of 19.3%. It is suitable for deployment of CDN edge nodes in multiple locations and supports higher frequency update requirements.
[0173] In summary, by performing heuristic cropping of the crowd interest graph, swarm optimization search of pooled parameters, and hierarchical expression modeling of the graph structure, the present invention effectively alleviates the problems of traditional methods in structural redundancy, single interest expression, and response delay, improves the accuracy, response speed, and resource adaptability of recommendations, and demonstrates good feasibility and engineering feasibility.
[0174] The present invention introduces an artificial bee colony optimization algorithm to dynamically select pooling hyperparameters in graph neural networks, thereby realizing the joint optimization of the graph pooling ratio, the number of interest clusters, the structure preservation coefficient, and the attention gating coefficient in the DiffPool module. By constructing a fitness function centered on prediction accuracy and structural fidelity, and utilizing the global search capability of the artificial bee colony in the solution space, the optimal hyperparameter combination can be accurately identified.
[0175] The present invention introduces a heuristic multi-factor pruning mechanism in the graph structure modeling stage, and extracts candidate subgraphs from graph snapshots based on the three-dimensional features of node degree, semantic similarity and temporal activity, avoiding the computational redundancy and information dilution problems caused by full-graph calculations in traditional graph neural networks. Through the node retention function, it realizes the automatic screening of node subsets with high information density, active behavior and strong semantic concentration in the graph snapshot to form a set of candidate subgraphs, effectively compressing the graph scale while retaining the core semantic structure.
[0176] The present invention designs an interest graph vector integration mechanism that integrates hierarchical graph structure and time evolution expression. Combined with the sparse attention fusion module, the high-order interest embedding vector sequence generated under multi-granularity time windows is weightedly integrated to construct an interest fusion representation vector for offline supervised learning teacher model training, and further migrates it to a lightweight student model through knowledge distillation for deployment in a real-time recommendation system. It can significantly capture the nonlinear change characteristics of user interests in the time dimension, and effectively improve the ability to recognize the complex behavior patterns of cold start users and interest-shifting users.
[0177] The above description is only a preferred specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any technician familiar with the technical field, within the technical scope disclosed by the present invention, who makes equivalent replacements or changes based on the technical solution and inventive concept of the present invention, should be covered by the scope of protection of the present invention.
Claims
1. A crowd portrait interest graph enhancement modeling method based on deep learning, characterized by: The steps include: S1. Construct a ternary heterogeneous graph and generate a snapshot sequence of the crowd portrait interest graph based on the ternary heterogeneous graph based on multi-granularity time windows; S2. Perform heuristic cropping on each snapshot in the sequence of snapshots of the crowd portrait interest graph to generate corresponding candidate subgraphs, forming a set of candidate subgraphs. Perform offline task model training on the candidate subgraphs on the training dataset to obtain a set of performance evaluation results. S3. Using the candidate subgraph set and the performance evaluation result set as input, define the search space and fitness function of the artificial bee colony optimization algorithm, perform fitness evaluation on the pooling hyperparameter candidate solution set based on the fitness function, and select the optimal pooling hyperparameter configuration based on the fitness evaluation results. S4. Execute the hierarchical graph neural network model for each graph snapshot and its corresponding candidate subgraph under the optimal pooling hyperparameter configuration, extract the structural embedding vector of each snapshot, and output a set of hierarchical structural vectors for the time window; S5. Concatenate the hierarchical structure vectors of the time windows in the time order of the graph snapshot sequence to obtain the interest fusion representation vector and construct an offline teacher model. S6. Based on the output and parameters of the offline teacher model, perform knowledge distillation training on a streamlined lightweight student model. This lightweight student model is then deployed in an online real-time recommendation system and outputs inference results in real-time traffic scenarios. S7. When it is detected that the key performance indicator is lower than the preset threshold or the user interest distribution has a change greater than the preset threshold, re-execute steps S2 to S6.
2. A crowd portrait interest graph enhancement modeling method based on deep learning according to claim 1, characterized in that: The step S1 comprises the following steps: S11. Collecting original behavior log data to form an original behavior log set; S12. Based on the original behavior log set, extract the user identification set, interest tag set, and context scene set respectively, and jointly construct a ternary heterogeneous graph of the user identification set, interest tag set, and context scene set. The nodes of the ternary heterogeneous graph are composed of user nodes, interest tag nodes, and context scene nodes; S13. Set a set of multi-granularity time windows to divide the time dimension of user behavior. For each time window, extract the structural subgraph within the time period from the ternary heterogeneous graph to generate a graph snapshot sequence. Each graph snapshot in the graph snapshot sequence consists of a set of valid connecting edges within the corresponding time period and a set of nodes involved in the connecting edges. S14. For each graph snapshot in the graph snapshot sequence, record its time window label, number of active nodes, and edge density. The edge density is obtained by dividing the number of connected edges in the graph snapshot by the product of the number of nodes in the graph snapshot and the number of nodes minus one. The time window label, number of active nodes, and edge density of the graph snapshot are defined as a crowd portrait interest graph snapshot sequence.
3. A crowd portrait interest graph enhancement modeling method based on deep learning according to claim 2, characterized in that: In the ternary heterogeneous graph, the connection edge between the user node and the interest tag node is used to represent the relationship between the user's behavior on the interest tag, and the connection edge between the user node and the context scene node is used to represent the context scene information when the user behavior occurs. (k) The connection edge E between the context scene node (k) It is used to represent the co-occurrence relationship of interest behaviors in a specific context. Each connection edge is associated with a connection strength parameter. The connection strength parameter between the user node and the interest tag node is used to characterize the weighted result of the user's behavior frequency and behavior freshness on a certain interest tag. The connection strength parameter between the user node and the context scene node is used to characterize the expression intensity of the user's activity in different context scenes. The connection strength parameter between the interest tag node and the context scene node is used to characterize the co-occurrence frequency of interest tags in different context scenes.
4. The method for enhancing the modeling of a crowd portrait interest graph based on deep learning according to claim 2 is characterized in that: The step S2 comprises the following steps: S21. For each snapshot G in the crowd portrait interest graph snapshot sequence (k) =(V (k) ,E (k) ), calculate the node degree value of each node and set the node degree threshold θ d , filter out all nodes whose node degree values are lower than the node degree threshold Get the node degree value S22. Based on graph snapshot G (k) The interest semantic vector representation of each node in Construct node semantic similarity matrix S (k) , and set the semantic similarity threshold θ s , filter out all edges corresponding to node pairs whose semantic similarity is lower than the semantic similarity threshold, and get node v i With node v j In the snapshot G (k) Semantic similarity in S23. For each graph snapshot G (k) , combined with the behavior timestamp t i With time window Δt k , calculate the node activity decay weight factor The time attenuation is obtained by dividing the difference between the current system time and the time when the node's most recent behavior occurred by the length of the time window corresponding to the graph snapshot, and multiplying it by the time decay control coefficient to obtain the negative exponent. S24. Comprehensive node degree value Semantic similarity and node activity decay weight factor Construct candidate sub-image cropping function: in, Represents node v i Satisfy the clipping preservation condition, θ γ Indicates the corresponding threshold; S25. Snapshot G (k) All the candidate subgraphs that satisfy the pruning function A collection of nodes and its associated edge sets Construct candidate subgraphs Gather the candidate subgraphs under all time windows to form the candidate subgraph set G sub ; S26. On the training dataset, the candidate subgraph set G sub Perform task objective function training and use the click-through rate evaluation indicator AUC (k) , transaction conversion indicator CVR (k) and structural fidelity index Dist (k) For each candidate subgraph Perform performance evaluation and build a performance evaluation result set M perf .
5. A crowd portrait interest graph enhancement modeling method based on deep learning according to claim 4, characterized in that: The step S3 comprises the following steps: S31. Taking the candidate subgraph set G sub and the performance evaluation result set M perf As input, a hyperparameter search space for the artificial bee colony optimization algorithm is constructed. Each solution vector x in the search space represents a set of pooled hyperparameter configurations: x=(p,m,λ,α); Where p represents the graph pooling ratio hyperparameter in the DiffPool module, m represents the number of cluster centers after each layer of graph pooling, λ represents the graph structure preservation regularization coefficient, which controls the structural constraint strength between the original image and the pooled image, and α represents the graph attention gating coefficient, which is used to adjust the information fusion weight. S32. Define the fitness function f(x) of the artificial bee colony optimization algorithm. The fitness function is used to measure the comprehensive effect of each set of pooling hyperparameter configurations on the candidate subgraph set. The objective function is constructed based on the evaluation indicators of S26: Among them, AUC (k) (x), CVR (k) (x) and Dist (k) (x) represents the kth candidate subgraph Above, the area under the click-through rate curve score, transaction conversion rate score, and structural fidelity metric obtained after applying the pooling hyperparameter configuration x, where w1, w2, and w3 are weighting coefficients; S33. Initialize the bee colony individual set X={x1,x2,…,x n }, where n is the initial bee colony size, and each bee colony individual x i Represents a set of candidate pooling hyperparameter configurations and calculates the fitness function f(x i ); S34. In the discovery bee stage of the artificial bee colony optimization algorithm, for each bee colony individual x i Perform parameter perturbation to generate neighborhood solution x′ i , and evaluate the fitness of the neighborhood solution. If the fitness function f(x′ i )>f(x i ), then use the neighborhood solution x′ i Replace swarm individual x i ; S35. In the following bee phase of the artificial bee colony optimization algorithm, a probabilistic selection strategy is constructed based on the fitness distribution of the current swarm individual set. Some individuals are probabilistically selected for local search and perturbation, the solution space is updated, and the fitness function is recalculated. S36. In the scout bee stage of the artificial bee colony optimization algorithm, the bee colony individuals whose fitness function has not improved within the preset time are randomly reinitialized to form a new solution vector x r , join the bee swarm individual set X, and perform fitness function calculation; S37. Set the maximum number of iterations or the optimal solution convergence condition, execute the artificial bee colony optimization iterative process, and output the optimal pooling hyperparameter configuration of the fitness function when the termination condition is met.
6. A crowd portrait interest graph enhancement modeling method based on deep learning according to claim 5, characterized in that: The step S4 comprises the following steps: S41. Taking the optimal pooling hyperparameter configuration as the input configuration parameter, for each snapshot G in the crowd portrait interest graph snapshot sequence G (k) and its corresponding candidate subgraph Construct a structure-adaptive graph convolutional network module combined with a multi-head attention mechanism, using node neighborhood interest aggregation weights Update each node interest embedding vector S42. The DiffPool module and the structure-adaptive graph convolutional network module are connected in series to form a hierarchical graph neural network model. In the first layer of DiffPool pooling, a soft cluster allocation matrix S is constructed that is adaptive to the criticality of the nodes of interest to the crowd. (k,l) , the soft cluster assignment matrix represents the assignment probability of each interest node belonging to each interest cluster. The assignment probability is generated by multi-layer perceptron network mapping. The graph attention gating coefficient α is introduced into the multi-layer perceptron network. * , which is used to adjust the influence of each interest node on the clustering decision. The number of interest clusters in each layer is determined by the graph pooling ratio hyperparameter p * Control, which is the product of the number of interest nodes in the current layer and the graph pooling ratio rounded off; S43. Perform interest-adaptive aggregation on the node interest embedding vector according to the soft cluster assignment matrix generated in each layer of the graph pooling module. The interest-adaptive aggregation is performed by weighted summing the interest embedding vectors of all interest nodes according to their corresponding cluster assignment probabilities to obtain the node interest embedding vector X of the lth layer. (k,l) , map the original graph adjacency structure relationship according to the distribution probability, and obtain the l-th layer interest cluster graph structure vector A (k,l) ; S44. Constructing interest structure fidelity loss function in each layer of graph pooling module The interest structure fidelity loss function is used to measure the degree of structural deviation between the adjacency structure of the original graph and the compressed interest cluster graph; S45. In the top-level interest cluster graph representation of the hierarchical graph neural network model, a cross-layer residual connection mechanism is used to fuse the interest cluster embedding vectors of different layers. The fusion process multiplies the node interest embedding vectors output by each layer by the learnable residual connection weight and then performs weighted superposition layer by layer. All node interest embedding vectors are aggregated through a global average pooling operation to obtain the high-order interest graph embedding vector h of the crowd portrait interest graph corresponding to the graph snapshot. (k) ; S46. Aggregate the high-order interest graph embedding vector h of all time window graph snapshots (k) , construct a time window hierarchical structure vector set H for subsequent interest representation fusion and supervised learning snap .
7. The method for enhancing the modeling of a crowd portrait interest graph based on deep learning according to claim 1 is characterized in that: The step S5 comprises the following steps: S51. Concatenate the high-order interest graph embedding vectors corresponding to each graph snapshot in the time window hierarchical structure vector set in chronological order to form a time series interest vector matrix. The time series interest vector matrix is used to preserve the evolution trajectory of the interest graph structure of the crowd portrait under different time windows. Each row of the matrix represents the high-order interest graph embedding vector of a time snapshot, and each column represents an interest embedding dimension. S52. Construct a sparse attention fusion module to calculate the time series interest vector matrix H seq The snapshots of each graph are embedded to distribute attention weights, and the time-weighted interest fusion representation vector h is obtained. agg ; S53. Use the interest fusion representation vector generated by the sparse attention fusion module as training input to construct an offline supervised learning model. The offline supervised learning model is defined as an offline teacher model. The offline teacher model is a multi-layer neural network with a high-capacity structure. Its input is the interest fusion representation vector, and its output is the prediction result, which is used to restore the recommendation task results for the user's specific interest behavior scenario. S54. Construct a supervised loss function based on the true label value of each sample in the training dataset and the prediction result of the offline teacher model. The supervised loss function is used to measure the difference between the predicted value and the true label. The supervised loss function uses binary cross entropy to calculate the logarithmic error between the predicted value and the label value at the sample level and then averages it over all samples. The smaller the supervised loss function, the stronger the predictive ability of the offline teacher model. S55. Use the gradient descent optimization algorithm to minimize the supervision loss function and iteratively optimize the parameter set of the offline teacher model. When the supervision loss function reaches the minimum value or meets the termination condition, the training process ends.
8. The method for enhancing the modeling of a crowd portrait interest graph based on deep learning according to claim 7 is characterized in that: The step S6 comprises the following steps: S61. Build a streamlined lightweight student model, which is a deep compressed graph neural network structure. S62. Extract the output distribution of each training sample from the offline teacher model as a soft label Combined with the true label of each sample Constructing knowledge distillation loss function The knowledge distillation loss function consists of two parts: one is the Kullback-Leibler divergence loss between the soft label and the student model prediction result, and the other is the cross entropy loss between the true label and the student model prediction result; S63. Using knowledge distillation loss function Optimize the parameter set Θ of the lightweight student model student , iteratively minimize the knowledge distillation loss function through back propagation and gradient descent Obtain the distilled lightweight student model structure; S64. Deploy the lightweight student model trained after distillation to the online real-time recommendation system. Build an inference interface to accept user request data from real-time traffic scenarios. The input data includes the user's current context, the user's historical behavior, interest tag sequence, and timestamp compression features. The lightweight student model calculates and outputs the recommendation task results. S65. Recommendation score based on the output of the lightweight student model in real-time traffic scenarios Combined with the preset classification decision rules, determine the recommended status label for the user's current behavior: If the recommendation score If the user behavior context is a cold start environment, the current user status is marked as unknown interest; If the recommendation score If there are time sparse jumps in the historical interest tag sequence, the user status is marked as interest change; If the recommendation score If the aggregate similarity between the current interest tag and the historical tag exceeds the threshold, the user status is marked as having stable interest.
Citation Information
Patent Citations
Multi-modal big data machine automatic learning system based on nerves and symbols
CN113408703A
Security propaganda and education recommendation method and system based on demand portrait and content label
CN118797173A
Interest point recommendation method based on knowledge graph
CN119226599A
Image recommendation method based on graph neural network
CN119311950A
Methods and system for assessing a cognitive function
WO2018029679A1
Cited By
Prefabricated part quality optimization method and system based on digital twinning
CN121615234A