User behavior driven personalized coaching method, apparatus, device and medium
Patent Information
- Application Number
- CN202610411001.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-31
- Publication Date
- 2026-10-20
- Estimated Expiration
- 2046-03-31
AI Technical Summary
[0004]有鉴于此,本申请实施例提供一种用户行为驱动的个性化投教方法、装置、设备及介质,以解决用户特征表示不全面,关系建模能力弱等问题
[0015]借由上述技术方案,本申请实施例提供一种用户行为驱动的个性化投教方法、装置、设备及介质,该方法通过基于用户的行为数据构建能够反映复杂关系的异构图,并利用图注意力网络结合对比学习和软模块度损失的自监督训练策略训练得到的预设多层GAT网络,输出节点的既能区分个体特征,又能反映社区结构的高维特征,基于该高维特征可以实现精准的社区发现,并为不同社区推送合适的投教内容。
Smart Images

Figure CN122312303B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of investor education technology, and in particular to a user behavior-driven personalized investor education method, device, equipment, and medium. Background Technology
[0002] In the financial sector, personalized investor education is crucial for matching user needs and improving user engagement. Related technologies typically employ statistical, machine learning, and deep learning methods to analyze user behavior and achieve preliminary personalized services. These include machine learning-based user grouping (e.g., collaborative filtering, K-means clustering algorithms) and investor education content recommendation based on time-series graph networks (e.g., the PfoTGNRec model).
[0003] Although the above methods have achieved certain results, they also have shortcomings: (1) User feature representation is not comprehensive, relying on manually designed features, which cannot capture the deep meaning of user behavior and the implicit complex relationship between users, resulting in homogenization of investor education content; (2) The relationship modeling ability is weak, focusing only on individual behavior and ignoring its relative position and contextual information in the high-dimensional graph structure, resulting in low user representation differentiation and affecting the accuracy of community discovery and recommendation. Summary of the Invention
[0004] In view of this, embodiments of this application provide a user behavior-driven personalized investor education method, apparatus, device, and medium to solve problems such as incomplete user feature representation and weak relationship modeling capabilities.
[0005] According to one aspect of this application, a user behavior-driven personalized investor education method is provided, comprising: Acquire behavioral data of several first users; wherein the behavioral data includes the codes of the targets they follow; Based on the behavioral data of all the first users, a first heterogeneous graph is constructed; the first heterogeneous graph includes a first node and a first edge; the first node and the first user are in one-to-one correspondence; if two first users pay attention to the same target within a specific time window, a first edge is established between the two corresponding first nodes, and the number of times they pay attention to the same target is used as the weight of the first edge. Extract the first node features from the behavior data of the first user corresponding to the first node in the first heterogeneous graph, and preprocess the first node features to obtain the first initial feature vector of the first node. Each first node in the first heterogeneous graph is taken as a first target node, and first neighbor nodes within M order are randomly sampled based on the first target node; the first target node and the randomly sampled first neighbor nodes within M order are combined to form a first subgraph corresponding to the first target node; The first subgraph corresponding to the first target node is input into a preset multi-layer GAT network to output the first high-dimensional features of all nodes in the first subgraph. The first high-dimensional features of all nodes in the first subgraph include the first high-dimensional features of the first target node and the first high-dimensional features of the first neighbor node. The preset multi-layer GAT network is trained using a graph attention network combined with a self-supervised training strategy of contrastive learning and soft modularity loss. Cluster the first high-dimensional features of all the first target nodes to obtain different communities; For the aforementioned community, corresponding investor education content will be pushed.
[0006] In some embodiments, the method for generating the preset multi-layer GAT network includes: Obtain behavioral data from several second users; Based on the behavioral data of several second users, a second heterogeneous graph is constructed; the second heterogeneous graph includes second nodes and second edges; the second nodes and second users correspond one-to-one; if two second users pay attention to the same target within a specific time window, a second edge is established between the corresponding two second nodes, and the number of times they pay attention to the same target is used as the weight of the second edge. Extract the second node features from the behavioral data of the second user corresponding to the second node in the second heterogeneous graph, and preprocess the second node features to obtain the second initial feature vector of the second node; Each second node in the second heterogeneous graph is treated as a second target node, and second neighbor nodes within order M are randomly sampled based on the second target node; the second target node and the randomly sampled second neighbor nodes within order M form a second subgraph corresponding to the second target node; The second subgraph corresponding to the second target node is input into the multilayer GAT network to output the second high-dimensional features of all nodes in the second subgraph, wherein the second high-dimensional features of all nodes in the second subgraph include the second high-dimensional features of the second target node and the second high-dimensional features of the second neighbor nodes. Based on the second high-dimensional features of all nodes in all the second subgraphs, the total learning loss value obtained by comparing the learning loss function and the total soft modularity loss value obtained by the soft modularity loss function are used to adjust the parameters in the multi-layer GAT network to obtain the preset multi-layer GAT network.
[0007] In some embodiments, the step of adjusting the parameters in the multilayer GAT network to obtain a preset multilayer GAT network based on the second high-dimensional features of all nodes in all the second subgraphs, by comparing the total learning loss value obtained through the learning loss function and by obtaining the total soft modularity loss value through the soft modularity loss function, includes: The total learning loss value is obtained by weighting and summing the total learning loss value obtained by comparing the total learning loss function and the total soft modularity loss value obtained by the soft modularity loss function based on the second high-dimensional features of all nodes in all second subgraphs. By adjusting the parameters in the multi-layer GAT network, a preset multi-layer GAT network is obtained to minimize the loss value.
[0008] In some embodiments, Each layer of GAT in the multi-layer GAT network is represented by the following formula: ; ; ; in, This represents the unnormalized attention coefficient of the i-th node to the j-th neighbor node; i represents the node index, and j represents the neighbor node index. Indicates the first activation function; Let W be the attention weight vector; W is the shared linear transformation weight matrix. Both W and W are parameters that need to be learned during model training; This represents the feature vector of the i-th node; This represents the feature vector of the j-th neighbor node; This means concatenating the feature vector of the i-th node with the feature vector of its j-th neighbor node; This represents the normalized attention weight; J represents the total number of neighboring nodes; This represents the high-dimensional feature vector of the i-th node; This represents the second activation function; This represents the edge weight from the i-th node to the j-th neighbor node.
[0009] In some embodiments, the method for determining the total learning loss value includes: Obtain positive and negative samples; wherein the positive sample is a second neighbor node that is directly connected to the second target node in the second subgraph corresponding to the second target node, and the similarity between the positive sample and the second target node is higher than a first preset similarity; the negative sample is a node randomly selected from the second subgraph corresponding to other second target nodes, and the negative sample is not connected to the second target node, and the similarity between the negative sample and the second target node is lower than a second preset similarity. Determine the second high-dimensional feature corresponding to the positive sample and the second high-dimensional feature corresponding to the negative sample; Using the second high-dimensional feature corresponding to the positive sample and the second high-dimensional feature corresponding to the negative sample, the learning loss function value corresponding to the second target node is calculated based on the learning loss function. The total learning loss function value is obtained by summing the learning loss function values corresponding to all the second target nodes.
[0010] In some embodiments, the learning loss function is expressed using the following formula: ; in, This represents the value of the learning loss function; Let x represent the second high-dimensional feature of the x-th second target node, where x is the index of the second target node; represents the second high-dimensional feature of the y-th positive sample, where y is the index of the positive sample; sim(·,·) represents the cosine similarity function; This represents the temperature hyperparameter; K represents the set of negative samples. This represents the second high-dimensional feature of the k-th negative sample, where k is the index of the negative sample.
[0011] In some embodiments, the soft modularity loss function is expressed by the following formula: ; in, This represents the total soft modularity loss value; This represents the total number of the second edges in the second subgraph corresponding to the second target node. x is the index of the second target node, and d is the index of the second neighbor node of the second target node; For elements of the adjacency matrix, when When , it means that the x-th second target node and the d-th second neighbor node are directly connected. This indicates that the x-th second target node and the d-th second neighbor node are not directly connected; This represents the degree of the x-th second target node, which is the number of second neighbor nodes directly connected to the x-th second target node. D represents the number of second neighbor nodes connected to the x-th second target node; This represents the degree of the d-th second neighbor node, which is the number of second nodes directly connected to the d-th second neighbor node. This represents the second high-dimensional feature of the x-th second target node; This represents the second high-dimensional feature of the d-th second neighbor node.
[0012] This application also provides a user behavior-driven personalized education device, including: The acquisition unit is used to acquire behavioral data of several first users; wherein the behavioral data includes the code of the target being followed; The construction unit is used to construct a first heterogeneous graph based on the behavioral data of all the first users. The first heterogeneous graph includes a first node and a first edge. The first node and the first user are in one-to-one correspondence. If two first users pay attention to the same target in a specific time window, a first edge is established between the two corresponding first nodes, and the number of times they pay attention to the same target is used as the weight of the first edge. The extraction unit is used to extract the first node features from the behavior data of the first user corresponding to the first node in the first heterogeneous graph, and to preprocess the first node features to obtain the first initial feature vector of the first node. The component unit is used to treat each first node in the first heterogeneous graph as a first target node, and to randomly sample first neighbor nodes within order M based on the first target node; and to form a first subgraph corresponding to the first target node by combining the first target node and the randomly sampled first neighbor nodes within order M. The input unit is used to input the first subgraph corresponding to the first target node into a preset multi-layer GAT network to output the first high-dimensional features of all nodes in the first subgraph, wherein the first high-dimensional features of all nodes in the first subgraph include the first high-dimensional features of the first target node and the first high-dimensional features of the first neighbor nodes; the preset multi-layer GAT network is trained using a graph attention network combined with a self-supervised training strategy of contrastive learning and soft modularity loss. Clustering unit, used to cluster the first high-dimensional features of all the first target nodes to obtain different communities; The push unit is used to push corresponding investor education content to the community.
[0013] This application also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the user behavior-driven personalized education method.
[0014] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the user behavior-driven personalized education method.
[0015] Using the above technical solutions, embodiments of this application provide a user behavior-driven personalized investor education method, apparatus, device, and medium. This method constructs a heterogeneous graph that reflects complex relationships based on user behavior data, and trains a preset multi-layer GAT network using a self-supervised training strategy that combines graph attention network with contrastive learning and soft modularity loss. The output nodes have high-dimensional features that can distinguish individual characteristics and reflect community structure. Based on these high-dimensional features, accurate community discovery can be achieved, and appropriate investor education content can be pushed to different communities.
[0016] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description
[0017] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 An exemplary flowchart of a user behavior-driven personalized investor education method is shown. Figure 2 An exemplary schematic diagram of a user behavior-driven personalized education device is shown. Detailed Implementation
[0018] The present application will be described in detail below with reference to the accompanying drawings and embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in the embodiments of the present application can be combined with each other.
[0019] To address the issues mentioned above, this application provides a user behavior-driven personalized investor education method, apparatus, device, and medium. This method constructs a heterogeneous graph that reflects complex relationships based on user behavior data, and trains a pre-defined multi-layer GAT network using a self-supervised training strategy that combines graph attention network with contrastive learning and soft modularity loss. The output nodes have high-dimensional features that can distinguish individual characteristics and reflect community structure. Based on these high-dimensional features, accurate community discovery can be achieved, and appropriate investor education content can be pushed to different communities.
[0020] This application provides a user behavior-driven personalized education method in some embodiments, such as... Figure 1 As shown, the method includes S100-S700.
[0021] S100. Obtain behavioral data of several first users; wherein the behavioral data includes the code of the target being followed.
[0022] In some embodiments, behavioral data of a first user can be obtained from a database. This behavioral data includes transaction behavior and clickstream data. The transaction behavior includes user ID, transaction code, transaction time, transaction type, and transaction amount. The clickstream data includes user ID, browsed item code, favorited item code, news page, dwell time, and click time. In this embodiment, the database stores the behavioral data of the first user to whom investor education content is to be pushed.
[0023] In some embodiments, the target codes of interest include transaction target codes, browsed target codes, and favorited target codes.
[0024] S200. Based on the behavioral data of all the first users, construct a first heterogeneous graph; the first heterogeneous graph includes a first node and a first edge; the first node and the first user correspond one-to-one; if two first users pay attention to the same target within a specific time window, then establish a first edge between the two corresponding first nodes, and use the number of times they pay attention to the same target as the weight of the first edge. For example, a specific time window could be 5 days. Mutually following the same asset could mean that both first users perform any one of the following actions on the asset with asset code 001: execute a transaction, browse, or favorite it. If the two users jointly follow the asset with asset code 001 3 times within 5 days, then the weight of the first side established between them is 3.
[0025] S300. Extract the first node features from the behavior data of the first user corresponding to the first node in the first heterogeneous graph, and preprocess the first node features to obtain the first initial feature vector of the first node.
[0026] In one example, the first node feature is a user behavior feature. In this embodiment of the application, the first node feature is extracted from the behavior data of the first user corresponding to each first node in the first heterogeneous graph, and the first node feature is preprocessed to obtain the first initial feature vector of the first node.
[0027] User behavior characteristics include historical trading behavior characteristics and stock preference characteristics. Historical trading behavior characteristics include, for example, turnover rate, average holding period, trading frequency, and risk appetite. Stock preference characteristics include, for example, the industry distribution of stocks followed by the user, average market capitalization preference, and style preference (growth / value).
[0028] In some embodiments, preprocessing may include normalization and dimensionality reduction using principal component analysis to obtain the first initial feature vector of the first node.
[0029] In this embodiment, normalization can eliminate the influence of dimensions. Principal component analysis and other methods can be used to reduce dimensionality, thereby removing redundant information and reducing noise. The dimensionality-reduced eigenvectors are used as the first initial eigenvectors corresponding to the first node in the graph.
[0030] S400. Each first node in the first heterogeneous graph is taken as a first target node, and first neighbor nodes within M order are randomly sampled based on the first target node; the first target node and the randomly sampled first neighbor nodes within M order are combined to form a first subgraph corresponding to the first target node.
[0031] In this embodiment of the application, each first node in the first heterogeneous graph is used as a first target node, so the number of first subgraphs generated is the same as the number of first nodes.
[0032] In some embodiments, M can be set according to actual needs. For example, M is 20, and the first neighbor nodes of the first, second, third, ..., Mth order are obtained. The first neighbor nodes obtained for each order can be preset. For example, 10 first neighbor nodes are obtained for the first order, and 20 first neighbor nodes are obtained for the second order. It should be noted that a neighbor node is another node that is directly or indirectly connected to the node through an edge.
[0033] S500, The first subgraph corresponding to the first target node is input into a preset multi-layer GAT network to output the first high-dimensional features of all nodes in the first subgraph, wherein the first high-dimensional features of all nodes in the first subgraph include the first high-dimensional features of the first target node and the first high-dimensional features of the first neighbor node; the preset multi-layer GAT network is a self-supervised training strategy that uses graph attention network and combines contrastive learning and soft modularity loss, and the first subgraph trained is input into the preset multi-layer GAT network.
[0034] In this embodiment, a pre-defined multi-layer GAT network is trained using a self-supervised training strategy that combines graph attention network (multi-layer GAT network) with contrastive learning and soft modularity loss. The output of the first node is a first high-dimensional feature that can distinguish individual features and reflect the community structure.
[0035] In some embodiments, the method for generating the preset multi-layer GAT network includes: Obtain behavioral data from several second users; In this embodiment of the application, the behavioral data of several second users can be used to train a multi-layer GAT network to obtain a preset multi-layer GAT network.
[0036] In this embodiment, the second user and the first user can be the same user or different users. This application does not impose any restrictions on this.
[0037] In some embodiments, the behavior data of the second user can be updated periodically, and the new behavior data of the second user can be used to continue training the multi-layer GAT network to update the preset multi-layer GAT network. This can quickly generate the latest node representation (i.e., the first high-dimensional feature) and community division, and can respond to market changes and user interest shifts in a timely manner, thereby improving the dynamic adaptability of the preset multi-layer GAT network.
[0038] Based on the behavioral data of several second users, a second heterogeneous graph is constructed; the second heterogeneous graph includes second nodes and second edges; the second nodes and second users correspond one-to-one; if two second users pay attention to the same target within a specific time window, a second edge is established between the corresponding two second nodes, and the number of times they pay attention to the same target is used as the weight of the second edge. Extract the second node features from the behavioral data of the second user corresponding to the second node in the second heterogeneous graph, and preprocess the second node features to obtain the second initial feature vector of the second node; Each second node in the second heterogeneous graph is treated as a second target node, and second neighbor nodes within order M are randomly sampled based on the second target node; the second target node and the randomly sampled second neighbor nodes within order M form a second subgraph corresponding to the second target node; The steps for determining the second subgraph are the same as those for determining the first subgraph mentioned above, and will not be repeated here.
[0039] In this embodiment, considering the user scale, a subgraph sampling-based training method is adopted, enabling the multi-layer GAT network to focus on local structures, thereby improving the scalability and training efficiency of the multi-layer GAT network. For each second target node, second neighbor nodes within order M are randomly sampled from its neighbors to form a second subgraph for training, which is represented as follows: ,in Let the edge weights be those between nodes i and j in the second subgraph. Let be the second initial feature vector of the i-th node.
[0040] The second subgraph corresponding to the second target node is input into the multilayer GAT network to output the second high-dimensional features of all nodes in the second subgraph, wherein the second high-dimensional features of all nodes in the second subgraph include the second high-dimensional features of the second target node and the second high-dimensional features of the second neighbor nodes. In this embodiment, a multi-layer GAT network is used for feature enhancement: the sampled second subgraph is input into the multi-layer GAT network, and through an attention mechanism, each node assigns different importance to different neighbors when aggregating their neighbor information. After stacking multiple layers of GAT, each node can fuse information from multi-order (multi-hop) neighbors, ultimately obtaining a high-dimensional node representation containing rich local structural information.
[0041] In some embodiments, each layer of the GAT in the multi-layer GAT network is represented by the following formula: ; ; ; in, This represents the unnormalized attention coefficient of the i-th node to the j-th neighbor node; i represents the node index, and j represents the neighbor node index. This represents the first activation function; Let W be the attention weight vector; W is the shared linear transformation weight matrix. Both W and W are parameters that need to be learned during model training; This represents the feature vector of the i-th node; This represents the feature vector of the j-th neighbor node; This means concatenating the feature vector of the i-th node with the feature vector of its j-th neighbor node; This represents the normalized attention weight; J represents the total number of neighboring nodes; This represents the high-dimensional feature vector of the i-th node; This represents the second activation function; This represents the edge weight from the i-th node to the j-th neighbor node.
[0042] Based on the second high-dimensional features of all nodes in all the second subgraphs, the total learning loss value obtained by comparing the learning loss function and the total soft modularity loss value obtained by the soft modularity loss function are used to adjust the parameters in the multi-layer GAT network to obtain the preset multi-layer GAT network.
[0043] In some embodiments, the step of adjusting the parameters in the multilayer GAT network to obtain a preset multilayer GAT network based on the second high-dimensional features of all nodes in all the second subgraphs, by comparing the total learning loss value obtained through the learning loss function and by obtaining the total soft modularity loss value through the soft modularity loss function, includes: The total learning loss value is obtained by weighting and summing the total learning loss value obtained by comparing the total learning loss function and the total soft modularity loss value obtained by the soft modularity loss function based on the second high-dimensional features of all nodes in all second subgraphs. For example, the loss value can be expressed using the following formula: ; in, Indicates the loss value; This represents the total learning loss value; This represents the total soft modularity loss value; This represents a hyperparameter used to balance the contrastive learning loss and the soft modularity loss.
[0044] In this embodiment of the application, in order to learn a more discriminative first high-dimensional feature without manual annotation, two self-supervised tasks are involved, including node-level contrastive learning and soft modularity.
[0045] By adjusting the parameters in the multi-layer GAT network, a preset multi-layer GAT network is obtained to minimize the loss value.
[0046] In this embodiment, the parameter to be adjusted can be the attention weight vector. And the shared linear transformation weight matrix W.
[0047] In some embodiments, the method for determining the total learning loss value includes: Obtain positive and negative samples; wherein the positive sample is a second neighbor node that is directly connected to the second target node in the second subgraph corresponding to the second target node, and the similarity between the positive sample and the second target node is higher than a first preset similarity; the negative sample is a node randomly selected from the second subgraph corresponding to other second target nodes, and the negative sample is not connected to the second target node, and the similarity between the negative sample and the second target node is lower than a second preset similarity. In this embodiment of the application, "not connected" can be understood as two nodes not being directly or indirectly connected through an edge.
[0048] Determine the second high-dimensional feature corresponding to the positive sample and the second high-dimensional feature corresponding to the negative sample; In this embodiment of the application, the preceding steps mentioned inputting the second subgraph corresponding to the second target node into a multilayer GAT network to output the second high-dimensional features of all nodes in the second subgraph, which can determine the second high-dimensional features corresponding to the positive sample and the second high-dimensional features corresponding to the negative sample.
[0049] Using the second high-dimensional feature corresponding to the positive sample and the second high-dimensional feature corresponding to the negative sample, the learning loss function value corresponding to the second target node is calculated based on the learning loss function. In some embodiments, the learning loss function is expressed using the following formula: ; in, This represents the value of the learning loss function; Let x represent the second high-dimensional feature of the x-th second target node, where x is the index of the second target node; represents the second high-dimensional feature of the y-th positive sample, where y is the index of the positive sample; sim(·,·) represents the cosine similarity function; This represents the temperature hyperparameter; K represents the set of negative samples. This represents the second high-dimensional feature of the k-th negative sample, where k is the index of the negative sample.
[0050] In the training process of the multi-layer GAT network implemented in this application, it is necessary to maximize the similarity between the second target node and its positive sample node representation, while minimizing the similarity with the negative sample node representation.
[0051] The total learning loss function value is obtained by summing the learning loss function values corresponding to all the second target nodes.
[0052] In this embodiment, the number of second target nodes is the number of second nodes in the second heterogeneous graph. Therefore, the learning loss function values corresponding to all second target nodes are summed to obtain the total learning loss function value.
[0053] In some embodiments, the soft modularity loss function is expressed by the following formula: ; in, This represents the total soft modularity loss value; This represents the total number of the second edges in the second subgraph corresponding to the second target node. x is the index of the second target node, and d is the index of the second neighbor node of the second target node; For elements of the adjacency matrix, when When , it means that the x-th second target node and the d-th second neighbor node are directly connected. This indicates that the x-th second target node and the d-th second neighbor node are not directly connected; This represents the degree of the x-th second target node, which is the number of second neighbor nodes directly connected to the x-th second target node. D represents the number of second neighbor nodes connected to the x-th second target node; This represents the degree of the d-th second neighbor node, which is the number of second nodes directly connected to the d-th second neighbor node. This represents the second high-dimensional feature of the x-th second target node; This represents the second high-dimensional feature of the d-th second neighbor node.
[0054] In this embodiment, considering that nodes in the same community should have closer connections, the soft modularity loss function is used to guide the multi-layer GAT network to learn node representations with obvious community structures based on the structural information of the second subgraph.
[0055] S600. Cluster all the first high-dimensional features to obtain different communities.
[0056] In this embodiment, community detection algorithms (such as the Louvain algorithm) or clustering algorithms (such as DBSCAN) can be used to cluster all the first high-dimensional features to divide them into different communities. Since the first high-dimensional features contain rich structural and attribute similarity information, the clustering result is a more refined community division.
[0057] S700: Push corresponding investor education content to the community.
[0058] In some embodiments, the step of pushing corresponding investor education content to the community includes: For the first user corresponding to the first high-dimensional feature within the community, common features are analyzed to form a community profile; educational content matching the corresponding community profile is pushed to the community.
[0059] For example, common characteristics could include a high turnover rate and a preference for the technology industry.
[0060] If the community profile indicates a high willingness to contribute and a preference for short-term trading, then educational content such as technical analysis and stop-loss strategies can be pushed to them. If the community profile indicates a preference for value investing and blue-chip stocks, then educational content such as company fundamental analysis and long-term holding strategies can be pushed to them.
[0061] The method in this application embodiment has the following advantages: 1. High accuracy in community segmentation: By employing a graph attention network (GAT) and combining a self-supervised training strategy of contrastive learning and soft modularity loss, it can accurately capture the complex relationships and behavioral similarities between users, thereby obtaining more granular and accurate community segmentation.
[0062] 2. Highly effective personalized recommendations: Based on high-precision community segmentation and community profiles, highly relevant investor education content can be recommended to user groups with different characteristics, significantly improving the targeting and effectiveness of investor education.
[0063] 3. Dynamic Updates: The system regularly collects new behavioral data, updates the graph structure, and uses the trained GAT model to generate new node features and community divisions, thereby enabling dynamic adjustments to investor education content.
[0064] 4. High degree of automation, no manual annotation required: Through carefully designed self-supervised tasks, the model can be trained without any manual annotation, which greatly reduces the cost of model building and maintenance.
[0065] By applying the technical solutions of the above embodiments, the method constructs a heterogeneous graph that reflects complex relationships based on user behavior data, and trains a preset multi-layer GAT network using a self-supervised training strategy that combines graph attention network with contrastive learning and soft modularity loss. The output nodes have high-dimensional features that can distinguish individual characteristics and reflect community structure. Based on these high-dimensional features, accurate community discovery can be achieved, and appropriate investor education content can be pushed to different communities.
[0066] In some embodiments, as a specific implementation of the user behavior-driven personalized investment education method described in the above embodiments, some embodiments of this application also provide a user behavior-driven personalized investment education device, such as... Figure 2 As shown, it includes: The acquisition unit 201 is used to acquire behavioral data of a number of first users; wherein the behavioral data includes the code of the target being followed. Construction unit 202 is used to construct a first heterogeneous graph based on the behavioral data of all the first users; the first heterogeneous graph includes a first node and a first edge; the first node and the first user correspond one-to-one; if two first users pay attention to the same target in a specific time window, a first edge is established between the two corresponding first nodes, and the number of times they pay attention to the same target is used as the weight of the first edge. Extraction unit 203 is used to extract first node features from the behavior data of the first user corresponding to the first node in the first heterogeneous graph, and to preprocess the first node features to obtain the first initial feature vector of the first node. The component unit 204 is used to treat each first node in the first heterogeneous graph as a first target node, and randomly sample first neighbor nodes within order M based on the first target node; and to form a first subgraph corresponding to the first target node by combining the first target node and the randomly sampled first neighbor nodes within order M. The input unit 205 is used to input the first subgraph corresponding to the first target node into a preset multi-layer GAT network to output the first high-dimensional features of all nodes in the first subgraph, wherein the first high-dimensional features of all nodes in the first subgraph include the first high-dimensional features of the first target node and the first high-dimensional features of the first neighbor nodes; the preset multi-layer GAT network is trained using a graph attention network combined with a self-supervised training strategy of contrastive learning and soft modularity loss; Clustering unit 206 is used to cluster the first high-dimensional features of all the first target nodes to obtain different communities; The push unit 207 is used to push corresponding investor education content to the community.
[0067] This application also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the user behavior-driven personalized education method described above.
[0068] This application also provides a computer device, specifically a personal computer, server, network device, etc. The computer device includes a bus, processor, memory, and communication interface, and may also include input / output interfaces and a display device. The processor of the computer device provides computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database of the computer device stores location information. The network interface of the computer device is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements the steps in the various method embodiments.
[0069] Those skilled in the art will understand that the structure of the computer device described above is only a partial structure related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. A specific computer device may include more or fewer components, or combine certain components, or have different component arrangements.
[0070] In one embodiment, a computer-readable storage medium is also provided, the computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the user behavior-driven personalized education method.
[0071] In one embodiment, a computer-readable storage medium is also provided, which may be non-volatile or volatile, and a computer program is stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.
[0072] In one embodiment, a computer program product is also provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0073] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0074] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods.
[0075] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0076] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A user behavior-driven personalized investor education method, characterized in that, include: Obtain behavioral data from several first-users; The behavioral data mentioned above includes the code of the target of interest; Based on the behavioral data of all the first users, a first heterogeneous graph is constructed; the first heterogeneous graph includes a first node and a first edge; the first node and the first user are in one-to-one correspondence; if two first users pay attention to the same target within a specific time window, a first edge is established between the two corresponding first nodes, and the number of times they pay attention to the same target is used as the weight of the first edge. Extract the first node features from the behavior data of the first user corresponding to the first node in the first heterogeneous graph, and preprocess the first node features to obtain the first initial feature vector of the first node. Each first node in the first heterogeneous graph is taken as a first target node, and first neighbor nodes within M order are randomly sampled based on the first target node; the first target node and the randomly sampled first neighbor nodes within M order are combined to form a first subgraph corresponding to the first target node; The first subgraph corresponding to the first target node is input into a preset multilayer GAT network to output the first high-dimensional features of all nodes in the first subgraph, wherein the first high-dimensional features of all nodes in the first subgraph include the first high-dimensional features of the first target node and the first high-dimensional features of the first neighbor node. The preset multi-layer GAT network is trained using a graph attention network combined with a self-supervised training strategy that incorporates contrastive learning and soft modularity loss. Cluster the first high-dimensional features of all the first target nodes to obtain different communities; For the aforementioned community, push corresponding investor education content; The method for generating the preset multi-layer GAT network includes: acquiring behavioral data of several second users; constructing a second heterogeneous graph based on the behavioral data of several second users; the second heterogeneous graph includes second nodes and second edges; the second nodes and second users correspond one-to-one; if two second users jointly focus on the same target within a specific time window, a second edge is established between the corresponding two second nodes, and the number of times they jointly focus on the same target is used as the weight of the second edge; extracting second node features from the behavioral data of the second nodes corresponding to the second users in the second heterogeneous graph, and preprocessing the second node features to obtain the second initial feature vector of the second node; treating each second node in the second heterogeneous graph as a second target node, and based on the... The second target node is randomly sampled from its second neighbor nodes within the M-order range; the second target node and the randomly sampled second neighbor nodes within the M-order range are combined to form a second subgraph corresponding to the second target node; the second subgraph corresponding to the second target node is input into a multi-layer GAT network to output the second high-dimensional features of all nodes in the second subgraph, wherein the second high-dimensional features of all nodes in the second subgraph include the second high-dimensional features of the second target node and the second high-dimensional features of the second neighbor nodes; based on the second high-dimensional features of all nodes in the second subgraph, the total learning loss value obtained by comparing the learning loss function and the total soft modularity loss value obtained by the soft modularity loss function are adjusted to obtain a preset multi-layer GAT network.
2. The method according to claim 1, characterized in that, The step of adjusting the parameters in the multi-layer GAT network to obtain the preset multi-layer GAT network based on the second high-dimensional features of all nodes in all the second subgraphs, by comparing the total learning loss value obtained through the learning loss function and the total soft modularity loss value obtained through the soft modularity loss function, includes: The total learning loss value is obtained by weighting and summing the total learning loss value obtained by comparing the total learning loss function and the total soft modularity loss value obtained by the soft modularity loss function based on the second high-dimensional features of all nodes in all second subgraphs. By adjusting the parameters in the multi-layer GAT network, a preset multi-layer GAT network is obtained to minimize the loss value.
3. The method according to claim 1, characterized in that, Each layer of GAT in the multi-layer GAT network is represented by the following formula: ; ; ; in, This represents the unnormalized attention coefficient of the i-th node to the j-th neighbor node; i represents the node index, and j represents the neighbor node index. Indicates the first activation function; Let W be the attention weight vector; W is the shared linear transformation weight matrix. Both W and W are parameters that need to be learned during model training; This represents the feature vector of the i-th node; This represents the feature vector of the j-th neighbor node; This means concatenating the feature vector of the i-th node with the feature vector of its j-th neighbor node; This represents the normalized attention weight; J represents the total number of neighboring nodes; This represents the high-dimensional feature vector of the i-th node; This represents the second activation function; This represents the edge weight from the i-th node to the j-th neighbor node.
4. The method according to claim 2, characterized in that, The method for determining the total learning loss value includes: Obtain positive and negative samples; wherein the positive sample is a second neighbor node that is directly connected to the second target node in the second subgraph corresponding to the second target node, and the similarity between the positive sample and the second target node is higher than a first preset similarity; the negative sample is a node randomly selected from the second subgraph corresponding to other second target nodes, and the negative sample is not connected to the second target node, and the similarity between the negative sample and the second target node is lower than a second preset similarity. Determine the second high-dimensional feature corresponding to the positive sample and the second high-dimensional feature corresponding to the negative sample; Using the second high-dimensional feature corresponding to the positive sample and the second high-dimensional feature corresponding to the negative sample, the learning loss function value corresponding to the second target node is calculated based on the learning loss function. The total learning loss function value is obtained by summing the learning loss function values corresponding to all the second target nodes.
5. The method according to claim 4, characterized in that, The learning loss function is expressed using the following formula: ; in, This represents the value of the learning loss function; Let x represent the second high-dimensional feature of the x-th second target node, where x is the index of the second target node; represents the second high-dimensional feature of the y-th positive sample, where y is the index of the positive sample; sim(·,·) represents the cosine similarity function; This represents the temperature hyperparameter; K represents the set of negative samples. This represents the second high-dimensional feature of the k-th negative sample, where k is the index of the negative sample.
6. The method according to claim 2, characterized in that, The soft modularity loss function is expressed by the following formula: ; in, This represents the total soft modularity loss value; This represents the total number of the second edges in the second subgraph corresponding to the second target node. x is the index of the second target node, and d is the index of the second neighbor node of the second target node; For elements of the adjacency matrix, when When , it means that the x-th second target node and the d-th second neighbor node are directly connected. This indicates that the x-th second target node and the d-th second neighbor node are not directly connected; This represents the degree of the x-th second target node, which is the number of second neighbor nodes directly connected to the x-th second target node. D represents the number of second neighbor nodes connected to the x-th second target node; This represents the degree of the d-th second neighbor node, which is the number of second nodes directly connected to the d-th second neighbor node. This represents the second high-dimensional feature of the x-th second target node; This represents the second high-dimensional feature of the d-th second neighbor node.
7. A user behavior-driven personalized investor education device, characterized in that, include: The acquisition unit is used to acquire behavioral data of several first users; The behavioral data mentioned above includes the code of the target of interest; The construction unit is used to construct a first heterogeneous graph based on the behavioral data of all the first users. The first heterogeneous graph includes a first node and a first edge. The first node and the first user are in one-to-one correspondence. If two first users pay attention to the same target in a specific time window, a first edge is established between the two corresponding first nodes, and the number of times they pay attention to the same target is used as the weight of the first edge. The extraction unit is used to extract the first node features from the behavior data of the first user corresponding to the first node in the first heterogeneous graph, and to preprocess the first node features to obtain the first initial feature vector of the first node. The component unit is used to treat each first node in the first heterogeneous graph as a first target node, and to randomly sample first neighbor nodes within order M based on the first target node; and to form a first subgraph corresponding to the first target node by combining the first target node and the randomly sampled first neighbor nodes within order M. The input unit is used to input the first subgraph corresponding to the first target node into a preset multilayer GAT network to output the first high-dimensional features of all nodes in the first subgraph, wherein the first high-dimensional features of all nodes in the first subgraph include the first high-dimensional features of the first target node and the first high-dimensional features of the first neighbor node. The preset multi-layer GAT network is trained using a graph attention network combined with a self-supervised training strategy that incorporates contrastive learning and soft modularity loss. The method for generating the preset multi-layer GAT network includes: acquiring behavioral data of several second users; constructing a second heterogeneous graph based on the behavioral data of several second users; the second heterogeneous graph includes second nodes and second edges; the second nodes and second users correspond one-to-one; if two second users jointly focus on the same target within a specific time window, a second edge is established between the corresponding two second nodes, and the number of times they jointly focus on the same target is used as the weight of the second edge; extracting second node features from the behavioral data of the second nodes corresponding to the second users in the second heterogeneous graph, and preprocessing the second node features to obtain the second initial feature vector of the second node; treating each second node in the second heterogeneous graph as a second target node, and based on the... The second target node is randomly sampled from its second neighbor nodes within the M-order range; the second target node and the randomly sampled second neighbor nodes within the M-order range are combined to form a second subgraph corresponding to the second target node; the second subgraph corresponding to the second target node is input into a multi-layer GAT network to output the second high-dimensional features of all nodes in the second subgraph, wherein the second high-dimensional features of all nodes in the second subgraph include the second high-dimensional features of the second target node and the second high-dimensional features of the second neighbor nodes; based on the second high-dimensional features of all nodes in the second subgraph, the total learning loss value obtained by comparing the learning loss function and the total soft modularity loss value obtained by the soft modularity loss function are adjusted to obtain a preset multi-layer GAT network; Clustering unit, used to cluster the first high-dimensional features of all the first target nodes to obtain different communities; The push unit is used to push corresponding investor education content to the community.
8. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the user behavior-driven personalized education method as described in any one of claims 1 to 6.
9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the user behavior-driven personalized education method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Community division method and system based on social network, and storage medium
CN113407784A
Graph neural network pre-training method and system based on community structure generality
CN119167985A