A heterogeneous graph information mining method for online learning video recommendation
By constructing a heterogeneous graph and utilizing a multi-layer graph attention network and a multi-layer perceptron model, user types are divided according to their viewing behavior and the subgraph structure is updated. This solves the problem of poor viewing of recommended videos on online learning platforms, achieves accurate and personalized recommendation of video resources, and improves the learning experience and efficiency.
Patent Information
- Application Number
- CN202510275052.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-10
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2045-03-10
AI Technical Summary
In the existing technology, it is difficult to conduct targeted information mining when users' actual viewing behavior of recommended videos is not good in online learning platforms, and it is impossible to effectively improve users' viewing behavior of recommended videos.
Construct a heterogeneous graph, use a multi-layer graph attention network and a multi-layer perceptron model to divide user types according to their actual viewing behavior, and improve users' actual viewing behavior of recommended videos by updating the subgraph structure.
By accurately calculating vectors and updating weights, the accuracy of personalized recommendations for video resources can be improved, the actual viewing of recommended videos by users can be improved, and the learning experience and efficiency can be enhanced.
Smart Images

Figure CN119782580B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the fields of artificial intelligence and educational technology, and in particular to a heterogeneous graph information mining method for online learning video recommendation. Background Art
[0002] With the rapid development of internet technology, online learning platforms have become an important way for learners to acquire knowledge. However, faced with a vast amount of learning video resources, how to accurately recommend content that suits learners' interests and needs is a common problem.
[0003] Several patent applications have explored methods for recommending short videos and course content, such as "Short Video Recommendation Method and System Based on Heterogeneous Graph Neural Networks by Fusion of Multimodal Data" (CN202411211539.1) and "Course Recommendation Method and System Based on Heterogeneous Graph Neural Networks with Attention Mechanism" (CN202310588836.7). However, none of these methods address how to conduct targeted information mining to improve user viewing of recommended videos when actual user viewing of the recommended videos is poor. Summary of the Invention
[0004] The embodiment of the present invention provides a heterogeneous graph information mining method for online learning video recommendation to solve the above technical problems.
[0005] In a first aspect, an embodiment of the present invention provides a heterogeneous graph information mining method for online learning video recommendation, comprising:
[0006] Obtain user information, video resource information, and learning topic tags of the online learning platform;
[0007] Based on the acquired content, a heterogeneous graph consisting of user nodes, video nodes, and tag nodes is constructed. The heterogeneous graph is input into a multi-layer graph attention network, and the initial features of each node are aggregated over multiple hops. Videos are then recommended to each user based on the final features of each node.
[0008] According to actual viewing conditions of the recommended videos by the users, the plurality of users are divided into a first user who has watched the recommended videos completely, a second user who has not watched the recommended videos, and a third user who has watched the recommended videos partially.
[0009] Determine a target second user whose final feature has a change from the initial feature less than a set threshold, and a target first user whose initial feature is most similar to the target second user; update the second subgraph structure of the target second user in the heterogeneous graph based on the first subgraph structure of the target first user, so as to improve the actual viewing of the recommended video by the target second user;
[0010] In case of update failure, a target third user is determined whose initial feature similarity with the target first user and the target second user is greater than another threshold; the third subgraph structure of the target third user in the heterogeneous graph is updated according to the first subgraph structure, and the second subgraph structure is updated according to the updated third subgraph structure; the updated heterogeneous graph is used to re-input the multi-layer graph attention network to re-recommend new videos to each user.
[0011] In a second aspect, an embodiment of the present invention provides an electronic device, comprising:
[0012] one or more processors;
[0013] a memory for storing one or more programs,
[0014] When the one or more programs are executed by the one or more processors, the one or more processors implement the heterogeneous graph information mining method for online learning video recommendation described in any embodiment.
[0015] In a third aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the heterogeneous graph information mining method for online learning video recommendation described in any embodiment.
[0016] In summary, the embodiment of the present invention provides a heterogeneous graph information mining method for online learning video recommendation, which constructs a heterogeneous graph by integrating learners, learning videos and label information, uses graph attention network to accurately calculate vectors and update weights, and deeply extracts features and modeling relationships. Finally, a multi-layer perceptron is used to generate prediction probabilities to achieve accurate personalized recommendations of video resources, effectively improving learning experience and efficiency. After the recommendation is completed, the actual viewing situation of the user on the recommended video is recorded, and users whose multi-layer GAT network has not aggregated and transformed the user features to a small extent are selected from users who have never watched the video as improvement objects. At the same time, users who are similar to the user but have better viewing conditions are used as reference objects, and the information data of the improvement objects are targeted and mined with reference to their information structure in the heterogeneous graph, so as to capture more information that can accurately reflect the complex rules of users watching videos, further improve the accuracy of recommended videos, and improve users' actual viewing situation of recommended videos. In particular, in order to improve the effectiveness of sub-graph updates, this embodiment further divides users with better viewing habits into users who have watched the entire program and users who have watched partially, and together with users who have not watched the program, they form a three-level user system. Through the mutual cooperation of the first-level sub-graph update and the two-level sub-graph gradual update, user information data is effectively mined. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0018] Figure 1 This is a flow chart of a heterogeneous graph information mining method for online learning video recommendation provided by an embodiment of the present invention;
[0019] Figure 2 This is a schematic diagram of recommending online learning video resources based on a heterogeneous graph, provided by an embodiment of the present invention;
[0020] Figure 3 is a comparison diagram of a first sub-image and a second sub-image provided by an embodiment of the present invention;
[0021] Figure 4 is a comparison diagram of a simplified first sub-graph and a simplified second sub-graph provided by an embodiment of the present invention;
[0022] Figure 5 A comparison diagram of a current first sub-image and a current second sub-image provided by an embodiment of the present invention;
[0023] Figure 6 A comparison diagram of the remaining portion of the current first sub-image and the current second sub-image provided by an embodiment of the present invention;
[0024] Figure 7 is another comparison diagram of the remaining portion of the current first sub-image and the current second sub-image provided by an embodiment of the present invention;
[0025] Figure 8 is another comparison diagram of the remaining portion of the current first sub-image and the current second sub-image provided by an embodiment of the present invention;
[0026] Figure 9 is a comparison diagram of the simplified first sub-graph and the new simplified second sub-graph provided by an embodiment of the present invention;
[0027] Figure 10 is a schematic diagram comparing the first sub-graph and the new second sub-graph provided in an embodiment of the present invention;
[0028] Figure 11 is a comparison diagram of a new current first sub-image and a new current second sub-image provided by an embodiment of the present invention;
[0029] Figure 12 is a comparison diagram of the remaining portion of the new current first sub-image and the new current second sub-image provided by an embodiment of the present invention;
[0030] Figure 13 is a comparison diagram of the remaining portion of the new current first sub-image and the supplemented new simplified second sub-image provided by an embodiment of the present invention;
[0031] Figure 14 A schematic structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0032] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention are described clearly and completely below. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without inventive effort are also within the scope of protection of the present invention.
[0033] In the description of the present invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings and are intended solely to facilitate and simplify the description of the present invention. They are not intended to indicate or imply that the devices or components referred to must have, be constructed, or operate in a specific orientation, and therefore should not be construed as limitations on the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0034] In the description of the present invention, it should also be noted that, unless otherwise expressly specified or limited, the terms "mounted," "connected," and "connected" should be understood broadly. For example, they may refer to fixed, detachable, or integral connections; mechanical or electrical connections; direct or indirect connections through an intermediate medium; and internal communication between two components. Those skilled in the art will understand the specific meanings of the above terms in the present invention based on the specific circumstances.
[0035] Figure 1 This is a flow chart of a heterogeneous graph information mining method for online learning video recommendation provided by an embodiment of the present invention. The method is executed by an electronic device, such as Figure 1 As shown, the method specifically includes:
[0036] S110: Obtain user information, video resource information, and learning topic tags of the online learning platform.
[0037] User information includes age, identity, interests, courses ordered, past video clicks, and past viewings. Video resource information includes the learning video's title, content, summary, overview, curriculum system, and its hierarchical position within the curriculum. Learning topic tags summarize course content and key points and can be extracted from titles at all levels within the curriculum system.
[0038] This embodiment uses the information data accumulated by the online learning platform as the data source of the entire method. Generally speaking, these information data are relatively large, and some key information can be extracted from them for subsequent operations.
[0039] S120. Based on the acquired content, construct a heterogeneous graph including user nodes, video nodes, and tag nodes, wherein the edge between the user node and the tag node is used to represent the association relationship between the user and the tag, the edge between the video node and the tag node is used to represent the association relationship between the video and the tag, and the edge between the user node and the video node is used to represent the interactive relationship between the user and the video.
[0040] Based on the content obtained in the previous step, this embodiment constructs a heterogeneous graph containing user nodes U, video nodes V, and label nodes T, where each user node corresponds to a user, each video node corresponds to a learning video, and each label node corresponds to a label. Based on user behaviors such as video clicks and video views, edges can be established between user nodes and video nodes, such as establishing edges between videos that a user has watched; based on user information, the user's preferred learning topics can be determined, and edges can be established between the user node and the preferred learning topic label node; based on the textual similarity between video resource information and the label, the learning topic to which the video belongs can be determined, and edges can be established between the user node and the learning topic label node.
[0041] Figure 2 The following example shows a heterogeneous graph with a three-part graph structure. x 、v y and t z They represent user nodes, video nodes, and label nodes respectively. x, y, and z are all node indexes. The user-video edge E UV Represents the interactive relationship between users and videos, user-label edge E UT Represents the association relationship between users and tags, video-tag edge E VTThese nodes and edges represent the relationships between videos and tags, forming a complex heterogeneous graph structure. This heterogeneous graph structure comprehensively captures the rich data information in online learning platforms and, compared to traditional single-relationship graphs, can better alleviate the data sparsity problem of new users or new videos. Because of the introduction of labeled nodes, even if a new user or new video does not have sufficient historical interaction data, the association with the tag can be used to find potential similar users or videos, providing a basis for subsequent recommendations. At the same time, it perceives and learns the relationships between different types of nodes from multiple dimensions, helping to deeply explore the potential information in the data and improve the accuracy and diversity of recommendations.
[0042] S130: Input the heterogeneous graph into a multi-layer graph attention network, perform multi-hop aggregation on the initial features of each node according to the graph structure, and recommend at least one video to each user according to the final features of each node.
[0043] This embodiment uses a neural network model based on a multi-layer graph attention network (GAT) and a multi-layer perceptron (MLP) to process the aforementioned heterogeneous graph. The multi-layer GAT updates node vectors and aggregates neighbor information to accurately capture the complex relationships between nodes. The MLP performs final predictions, further improving the accuracy of video recommendations. This model can be pre-trained based on a large number of heterogeneous graphs. The model input is a heterogeneous graph over a period of time (including the initial features and connectivity of each node in the graph), and the output is the viewing probability of each video by each user over a future period of time. When constructing samples during model training, a heterogeneous graph over a period of time can be selected as input. The viewing probability is calculated based on the number of views of each video by each user over another period of time after the previous period. This viewing probability is used as output to fully train the model.
[0044] In a specific embodiment, the data processing process of the heterogeneous graph in the model may include the following steps:
[0045] Step 1: Generate the initial features of each node based on the acquired content. Optionally, encode the user's age, identity, hobbies, courses ordered, etc. as the initial features of the user node; encode the acquired video information as the initial features of the video node, and encode the tag content as the initial features of the tag node. Among them, the type information can be encoded using ont-hot, hashing, etc., and the text information can be encoded using text embedding, which is not specifically limited in this embodiment. Combined with Figure 2 , each node has a corresponding feature vector, and the initial feature encoding method of nodes of the same type is the same.
[0046] Step 2: Input the initial features and connection relationships of each node into the multi-layer graph attention network. In the multi-layer graph attention network, the feature vector of each node is updated according to the feature vectors of adjacent nodes, and the update is repeated multiple times to complete multi-hop aggregation. This step uses multi-layer GAT to update the node vector. The core idea of GAT is to dynamically assign weights to neighboring nodes through the attention mechanism, so as to more accurately capture the complex relationship between nodes. Specifically, in each hop feature aggregation, for each node i, the node vector is updated according to the following formula:
[0047]
[0048] in, is the updated feature vector of node i, N(i) represents the set of all neighbor nodes of node i, W is the learnable weight matrix, is the current feature vector of each node in the union of its neighbor nodes and node i, is a nonlinear activation function; a ij is the attention coefficient or weight distribution matrix, which is used to measure the importance of different nodes to the target node. It is calculated as follows:
[0049]
[0050] in, is a learnable attention vector, is the current feature vector of each node in the union of its neighboring nodes and node i, || represents the vector concatenation operation, and LeakyReLU() is the activation function. The updated node feature vector will be used as the current feature vector of node i in the next-hop aggregation.
[0051] Through multi-layer GAT, we can gradually aggregate neighbor information of more hops. Assuming that the multi-layer GAT has L layers, the final vector of node i after passing through L layers of GAT is expressed as . GAT dynamically assigns weights to each neighbor node through the attention mechanism, allowing the model to capture the complex relationships between nodes more accurately. By gradually aggregating multi-hop neighbor information, the global structural information in the graph can be captured more comprehensively. For online learning video recommendations, the model can better understand the user's potential interests and the comprehensive features of the video, thereby improving the accuracy and coverage of the recommendation. In particular, in this embodiment, the final features output by the same node after passing through multiple layers of GAT are set to have the same dimension as the initial features input to GAT.
[0052] Step 3: Input the final features of each node into the multi-layer perceptron to predict the probability of each user watching each video. This step introduces MLP for final prediction based on the graph neural network. The input of MLP is the node vector updated by the multi-layer GAT. , the output is the probability of each user watching each prediction Optionally, the MLP consists of K fully connected layers, the activation function of each layer is ReLU, and the activation function of the output layer is Sigmoid, then the prediction score It can be expressed as:
[0053]
[0054] Among them, W k and b k are the weight matrix and bias term of the kth layer, k=1,2,…,K.
[0055] By introducing MLP, we can fully leverage the advantages of graph neural networks in capturing node relationships and MLP in nonlinear fitting, achieving complementary advantages. This combination not only improves prediction accuracy but also enhances the model's generalization capabilities.
[0056] Step 4: Recommend at least one video with the highest viewing probability to each user. For each user, recommend the top few videos with the highest predicted viewing probability to the user.
[0057] S140: Divide the plurality of users into a group of users who have watched the recommended videos completely, a group of users who have not watched the videos, and a group of users who have watched the videos partially, based on the users' actual viewing conditions of the recommended videos.
[0058] After recommending a specific video to a user, this embodiment records each user's actual viewing history of the recommended videos over a period of time. If a user watches any one or more recommended videos in full, the user is classified as a group of users who have watched all of them. If a user does not watch any of the recommended videos, the user is classified as a group of users who have not watched all of them. If a user watches any one or more recommended videos but does not finish them, the user is classified as a group of users who have partially watched them. For ease of distinction and description, each of the three groups of users is referred to as the first user, the second user, and the third user, respectively. This viewing history reflects the accuracy of the video recommendations. If the test accuracy of the recommendation model (i.e., the neural network model composed of the multi-layer GAT and MLP) is relatively stable, this viewing history also reflects whether the input model heterogeneous graph has extracted sufficient effective information from the large amount of information data to learn the complex patterns of user video viewing.
[0059] S150: Determine a target second user whose final feature has a difference from the initial feature that is less than a certain threshold, and a target first user whose pre-aggregation feature is most similar to that of the target second user.
[0060] The final feature here refers to the aggregated feature output of the last layer in the multi-layer GAT network. Initial features refer to the initial features input into the multi-layer GAT network. In this embodiment, the same dimensions are set for the final features and initial features of the same user node. The difference between the final and initial features of the node is used to reflect the degree to which the multi-layer GAT network mines the global relationships of the node. This difference is also used to reflect whether the heterogeneous graph provides sufficient and effective information for mining the node relationships.
[0061] In a specific embodiment, first, for each second user, the similarity between the initial feature and the final feature of the current second user is calculated. ,Will The second user whose value is less than a certain threshold is selected as the target second user. The initial and final features of this target second user do not change much, indicating that the multi-layer GAT network does not aggregate enough effective information for the user's initial features. When the model's test accuracy is relatively stable, this may be because the heterogeneous graph does not contain much effective information about the user (for example, the number of edges or nodes related to the user in the heterogeneous graph is too small, or the number of effective edges or nodes is too small). The multi-layer GAT network does not fully aggregate information about neighbor nodes, resulting in poor actual viewing of recommended videos by users.
[0062] Next, the similarity between each first user's initial features and the target second user's initial features is calculated, and the first user with the greatest similarity is selected as the target first user. The user with the highest initial feature similarity to the target second user indicates that the two users have the most similar information. This target first user can then be used as a reference node for subsequently expanding the target second user's related information in the heterogeneous graph.
[0063] S160: Update the subgraph structure of the target second user in the heterogeneous graph according to the subgraph structure of the target first user in the heterogeneous graph, so as to improve the actual viewing situation of the recommended video by the target second user.
[0064] This step uses the interaction and association information of the first target user in the heterogeneous graph as a reference to expand the interaction and association information of the second target user in the heterogeneous graph. For ease of distinction and description, this embodiment refers to the subgraph corresponding to the first target user as the first subgraph, and the subgraph corresponding to the second target user as the second subgraph.
[0065] In a specific embodiment, the process may include the following steps:
[0066] Step 1: Extracting from the heterogeneous graph a first subgraph that diffuses outwards with the target first user as the center and a second subgraph that diffuses outwards with the target second user as the center. Figure 3An extracted subgraph is shown as an example, wherein U1 represents the target first user, V11, V12, and V13 respectively represent different video nodes in the first subgraph, U12 represents the user node in the first subgraph, and T11, T12, and T13 respectively represent different label nodes in the first subgraph; U2 represents the target second user, V21 represents the video node in the second subgraph, U22 represents the user node in the second subgraph, and T21 and T23 respectively represent different label nodes in the second subgraph.
[0067] Step 2: Simplify the node attributes in each subgraph into node types to obtain the simplified first subgraph and the simplified second subgraph, where the node types include users, videos, and tags. Through node simplification, nodes of the same type are regarded as the same node, for example, multiple user nodes are all the same U node without distinguishing which user they are. Figure 3 For example, the simplified first and second subgraphs are as follows Figure 4 As shown, U, V and T represent user nodes, video nodes and tag nodes respectively. The different colors in the nodes are for the convenience of description in subsequent operations and do not represent the differences between the nodes.
[0068] Step 3: Initialize N to 1 and loop through the following operations:
[0069] S1-10, from the simplified first subgraph and the second subgraph, extract the central node and the nearest N-layer neighbor nodes, as well as the edges between the extracted nodes, to form the current first subgraph and the current second subgraph respectively. Taking N=1 as an example, from Figure 4 The current first sub-image and the current second sub-image extracted are as follows Figure 5 shown.
[0070] S1-20, remove the same parts as those in the current second subgraph from the current first subgraph. Optionally, first, remove the central node and the first N-1 layers of neighboring nodes, as well as the first N-1 layers of edges from the current first subgraph. When N=1, only two central nodes are the same node, so only the central node can be removed, and the remaining parts are as follows Figure 6 shown.
[0071] Then, perform the following operations on each neighbor node in the Nth layer of the current second subgraph:
[0072] If the remaining part of the current first subgraph (excluding the part that has been removed for the previous neighbor nodes) has only one node that is the same as the current neighbor node, remove the same node and its connected edges of the same type as the current neighbor node from the remaining part, where the edge types include edges between users and tags, edges between videos and tags, and edges between users and videos. Figure 6 For example, the first-layer neighbor nodes of the current second subgraph include a V node and a T node. For the V node (i.e., the blue V node), there is only one V node in the remaining part of the current first subgraph. Therefore, the white V node and the user-video edge (i.e., the blue edge) of the same type as the edge (user-video edge) connected to the white V node are removed from the remaining part of the current first subgraph. The two subgraphs after removal are as follows Figure 7 shown.
[0073] If there are multiple nodes identical to the current neighbor node in the remaining portion of the current first subgraph (excluding the portion that has been removed for the previous neighbor nodes), select the node with the most similar initial vector to the current neighbor node as the final identical node from these identical nodes, and remove the final identical node and its connected edges of the same type as the current neighbor node from the remaining portion. For example Figure 7 There is another neighbor node T (green T node) in the first layer of the current second subgraph, and there are two T nodes (red T node and blue T node) in the remaining part of the corresponding current first subgraph. Then calculate the similarity between the initial vector of the red T node and the initial vector of the green T node, and the similarity between the initial vector of the blue T node and the initial vector of the green T node. Select the T node with the highest similarity from the red and blue T nodes, and remove the node and its connected user-label edge of the same type as the edge connected to the green T node from Figure 7 Assuming that the red T node has a high similarity, the two subgraphs after removal are as follows: Figure 8 shown.
[0074] If the remaining part of the current first subgraph (excluding the part that has been removed for the previous neighbor node) does not have a node that is the same as the current neighbor node, indicating that the current neighbor node is a part that is larger than the current first subgraph, then the current neighbor node is marked as a retrieval failure node.
[0075] S1-30: Determine the removed nodes connected to each remaining node and remaining orphan edge in the current first subgraph, and extract the node determined to be the same as the removed node in S1-20 from the current second subgraph as the target node; extract the information data of the target node from the information data accumulated by the online learning platform, and retrieve nodes of the same type as each remaining node and / or the same relationship as each remaining orphan edge from the information data of the target node, and add them to the simplified second subgraph. The following describes S1-30 for each remaining node and remaining orphan edge in the current first subgraph:
[0076] For each remaining node in the current first subgraph, perform the following operations respectively: determine the removed nodes adjacent to the current remaining node, extract the target node determined to be the same as the removed node in S1-20 from the current second subgraph; extract the information data of the target node from the large amount of information data accumulated by the online learning platform, and retrieve the node of the same type as the current remaining node from the information data of the target node, add it to the simplified second subgraph, and add the corresponding edge between the supplemented node and the target node, and use the supplemented node as the node that is the same as the current remaining node in S1-20 of the next cycle. Figure 8 For example, there is only one remaining node in the remaining part of the current first subgraph, that is, the blue T node. For this node, determine the removed nodes adjacent to the blue T node, that is, Figure 5 Then, extract the target node that is determined to be the same as the yellow U node in S1-20 from the current second subgraph (the same nodes here are nodes of the same type, and different colors are only for ease of description and do not mean that the nodes are different), that is, Figure 8 The gray U node in the graph; retrieve the node of the same type as the blue T node from the information data of the gray U node, that is, search for the T node associated with the target second user, and add it to the simplified second subgraph. The result after addition is as follows Figure 9 As shown, the purple T nodes are supplementary nodes.
[0077] Finally, if no nodes of the same type as the currently remaining nodes can be retrieved from the large amount of information data, the remaining nodes are also marked as search failure nodes in this round. For ease of distinction and description, the search failure nodes in the current second subgraph marked in S1-20 are referred to as second search failure nodes, corresponding to the portion of the current second subgraph that is larger than the current first subgraph; the search failure nodes in the current first subgraph marked in S1-30 are referred to as first search failure nodes, corresponding to the portion of the current first subgraph that is larger than the current second subgraph but for which no comparable nodes are retrieved from the information data of the current second subgraph.
[0078] For each remaining orphan edge in the current first subgraph, perform the following operations: determine the two removed nodes connected to the current orphan edge, extract the target node determined to be the same as the two removed nodes in S1-20 from the current second subgraph; retrieve the relationship of the same type as the current orphan edge from the information of the two target nodes, and add it to the simplified second subgraph. Among them, an orphan edge refers to an edge with both end points removed. The above operations are performed in Figure 4-Figure 9 This does not exist in the example shown for N=1 and will be explained in the next cycle for N=2.
[0079] S1-40, restore each node in the new simplified second subgraph to complex attributes, and merge the restored graph into the overall heterogeneous graph. This step performs the reverse operation of the simplification operation in step 2 on the new simplified second subgraph, that is, further distinguishing the same nodes into different nodes of the same type. The new second subgraph after restoration is as follows Figure 10 After restoration, a fusion operation is performed to add the newly added nodes and edges in the new second subgraph to the heterogeneous graph. If the newly added nodes are already in the heterogeneous graph, there is no need to add them again. Instead, edges can be added between the existing nodes. Finally, node disambiguation is performed to obtain the fused heterogeneous graph.
[0080] S1-50. Input the fused heterogeneous graph into the first N layers of the multi-layer graph attention network to obtain a new aggregated feature of the target second user. Under the guidance of the target first user, the fused heterogeneous graph re-mines the information data of the target second user and extracts more information. This step uses the new data to recalculate the aggregated features of the target second user to verify whether the information mined this time can aggregate more effective information for user features. In particular, since each layer of the GAT network corresponds to the information aggregation of one layer of neighboring nodes, the aggregated features processed by the first N layers of the multi-layer GAT are taken here.
[0081] S1-60: If the difference between the new aggregated features and the initial features of the target second user is greater than the set threshold (or another independent threshold), it indicates that the multi-layer GAT network has effectively aggregated the user's neighbor information, so that the user's initial features have been fully transformed. Then, the loop from S1-10 to S1-60 can be terminated. Otherwise, if the difference between the new aggregated features and the initial features of the target second user is less than the set threshold or independent threshold, N is increased by 1, and the loop from S1-10 to S1-60 is restarted based on the simplified first subgraph and the new simplified second subgraph until N reaches the number of layers of the first subgraph or the second subgraph.
[0082] This embodiment takes the latter case as an example, referring to Figure 9 , take N=2, and restart a new cycle of S1-10 to S1-60. First, in S1-10, extract the central node and its nearest neighbor nodes in the first N layers, as well as the edges between the extracted nodes, from the simplified first subgraph and the new simplified second subgraph, respectively, to form the new current first subgraph and the new current second subgraph, respectively, as shown in Figure 11 shown.
[0083] In S1-20, the same parts as those in the new current second subgraph are removed from the new current first subgraph. Specifically, first, the central node and the first-layer neighbor nodes, as well as the first-layer edges, are removed from the new current first subgraph. Since the first-layer neighbor nodes of the two new current subgraphs, except for the nodes that failed to be retrieved, have been replenished in the previous cycle, they can all find the same neighbor nodes as themselves, and the nodes that failed to be retrieved will no longer find the same neighbor nodes as themselves through subsequent operations, so the entire layer can be removed. Then, the following operations are performed for the second-layer neighbor nodes according to different situations:
[0084] Case 1: If there is no failed retrieval node in the previous cycle, the following operations are performed in sequence for the second-layer neighbor nodes in the new current second subgraph: If there is only one node in the remaining part of the new current first subgraph that is identical to the current neighbor node A in the second layer of the new current second subgraph, the identical node and the edges connected to the identical node that are of the same type as the edges connected to the current neighbor node A are removed from the remaining part; If there are multiple identical nodes in the remaining part of the new current first subgraph that are identical to the current neighbor node A, select the node with the most similar initial vector to the current neighbor node from these identical nodes as the final identical node, and remove the final identical node and the edges connected to it that are of the same type as the edges connected to the current neighbor node from the remaining part; If there is no identical node in the remaining part of the new current first subgraph that is identical to the current neighbor node A, then mark the current neighbor node as the second failed retrieval node in this cycle. Figure 11 For example, the remaining part after removal is as follows Figure 12 shown.
[0085] Case 2: If there is a retrieval failure node in the previous cycle, then in the new current first subgraph, the node in the second-layer neighbor node that is only connected to the first retrieval failure node in the previous cycle is marked as the first retrieval failure node in this cycle and removed; at the same time, in the new current second subgraph, the node in the second-layer neighbor node that is only connected to the second retrieval failure node in the previous cycle is marked as the second retrieval failure node in this cycle and removed; then, for each other neighbor node B remaining in the second-layer neighbor node of the new current second subgraph, the following operations are performed in sequence: If the remaining part of the new current first subgraph (excluding the part that has been removed for the previous neighbor node and the first retrieval failure node in this cycle, the same below) is connected to the current neighbor node B being processed If there is only one identical node, the identical node and the edges of the same type as the edges connected to the identical node and the current neighbor node B are removed from the remaining part of the new current first subgraph; if there are multiple identical nodes as the current neighbor node B in the remaining part of the new current first subgraph, the node with the most similar initial vector to the current neighbor node B is selected from these identical nodes as the final identical node, and the final identical node and the edges of the same type as the edges connected to the current neighbor node B are removed from the remaining part of the new current first subgraph; if there is no identical node as the current neighbor node B in the remaining part of the new current first subgraph, the current neighbor node is marked as the second failed retrieval node in this round of loop. In this case, for the neighbor nodes of the current layer, first remove the branches extending from the part that did not retrieve the appropriate added nodes from the large amount of information data in the previous round of loop in the new current first subgraph, and at the same time remove the part that is larger than the new current first subgraph in the new current second subgraph, and then search for the identical nodes in the new current first subgraph for the remaining neighbor nodes and remove them. The operation in this case is Figure 11 and Figure 12 It is not shown in the example, but can be executed in the second and subsequent cycles.
[0086] In S1-30, for the gray V node among the remaining nodes, its adjacent removed nodes are Figure 9 The red T node in the new current second subgraph corresponds to the green T node. The information data of the green T node (i.e., T21) is extracted from the large amount of information data on the online learning platform, and the node of the same type as the gray V node (i.e., the video associated with T21) is retrieved. For example, Figure 13 The red V node in is added to the new simplified second subgraph and the corresponding edge is added. Similarly, similar operations are performed on the other remaining green V node, and finally the Figure 13 The purple V node in is added to the new simplified second subgraph.
[0087] For the remaining isolated edges (for easy distinction, Figure 11 and Figure 12 The edge is displayed in bold red in the figure, and the two removed nodes (i.e. Figure 9 The blue U node and the red T node in the current second subgraph are extracted from the current second subgraph, and the target node (i.e. Figure 9 The white U node and the green T node in the graph are extracted from the large amount of information data accumulated on the online learning platform, and the information data of the two target nodes are extracted, and the relationship of the same type as the currently remaining isolated edge is determined, that is, whether there is an association relationship between the white U node and the green T node, and the information data is added to the new simplified second subgraph, such as Figure 13 shown.
[0088] Then, operations S1-40 to S1-60 are executed again, and this cycle is repeated until N reaches the maximum number of neighbor layers of the first subgraph or the second subgraph.
[0089] S170: If the update fails, determine a target third user whose initial feature similarity with the target first user and the target second user is greater than another threshold; update the subgraph structure of the target third user in the heterogeneous graph according to the first subgraph structure, and then update the second subgraph structure according to the updated third subgraph structure.
[0090] Optionally, if no nodes of the same type as the remaining nodes or relationships with the same remaining isolated edges are retrieved after all loops, that is, the structure of the second subgraph has not changed, the update can be determined to have failed. Alternatively, the updated heterogeneous graph is re-input into the multi-layer graph attention network, and the initial features of each node are multi-hop aggregated according to the new graph structure. After re-recommending new videos to each user, the user's actual viewing of the newly recommended videos is recorded. If the target second user's actual viewing of the recommended videos does not improve (for example, they still have not watched any recommended videos), indicating that the structure of the second subgraph has not changed in a manner conducive to video recommendation, the update can also be determined to have failed. This indicates that it is difficult to directly find useful reference information between the target second user and the target first user. In this case, this embodiment uses a third user to re-update the second subgraph, first updating the third user's subgraph structure based on the first user's subgraph structure, and then updating the second user's subgraph structure based on the third user's updated subgraph structure. Since the viewing situation of the third user is between that of the first and second users, compared with directly comparing the effective information of the first and second users in the heterogeneous graph, the effective information of the third user in the heterogeneous graph is more comparable with that of the first and second users. It is easier to update successfully by using step-by-step analogy, and ultimately achieve a gradual update of the subgraph structure.
[0091] Specifically, first determine a third user whose initial features are relatively similar to those of the target first user and the target second user, referred to as the target third user, and extract a subgraph that can spread outward with the target third user as the center from the heterogeneous graph, referred to as the third subgraph. Then, for all operations in S160 regarding the target second user and the second subgraph, replace the execution objects with the target third user and the third subgraph, re-execute all steps of S160, and finally obtain the updated third subgraph structure. Finally, for all operations in S160 regarding the target first user and the first subgraph, replace the execution objects with the target third user and the updated third subgraph, re-execute all steps of S160, and finally obtain the updated second subgraph and the final fused heterogeneous graph.
[0092] S180: re-input the final fused heterogeneous graph into the multi-layer graph attention network, perform multi-hop aggregation on the initial features of each node according to the new graph structure, and recommend at least one new video to each user according to the new final features of each node.
[0093] If there are multiple target secondary users, the above operations can be performed sequentially for each target secondary user, updating the subgraph structure of each target secondary user in the heterogeneous graph. After the update is complete, the new heterogeneous graph is re-input into the multi-layer GAT and MLP for processing, re-predicting the probability of each user viewing each video, and recommending at least one new video with the highest viewing probability to each user. This recommendation, because more effective information is provided for the target secondary user, at least helps improve the target second user's actual viewing of the recommended videos.
[0094] It should be noted that the user information involved in this application is information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0095] In summary, this embodiment provides a heterogeneous graph information mining method for online learning video recommendation. By integrating learners, learning videos and label information to construct a heterogeneous graph, the graph attention network is used to accurately calculate vectors and update weights, and features are extracted and modeled in depth. Finally, a multi-layer perceptron is used to generate prediction scores to achieve accurate personalized recommendations of video resources, effectively improving learning experience and efficiency. After the recommendation is completed, the actual viewing situation of the user on the recommended video is recorded, and users whose aggregate transformation of user features by the multi-layer GAT network is not large are selected from users who have never watched the video as improvement objects. At the same time, users who are similar to the user but have better viewing conditions are used as reference objects. The information data of the improvement objects are targeted and mined with reference to their information structure in the heterogeneous graph to capture more information that can accurately reflect the complex rules of users watching videos, further improve the accuracy of recommended videos, and improve users' actual viewing situation of recommended videos. In particular, in order to improve the effectiveness of sub-graph updates, this embodiment further divides users with better viewing habits into users who have watched the entire program and users who have watched partially, and together with users who have not watched the program, they form a three-level user system. Through the mutual cooperation of the first-level sub-graph update and the two-level sub-graph gradual update, user information data is effectively mined.
[0096] Figure 14 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention is shown in FIG. Figure 14 As shown, the device includes a processor 60, a memory 61, an input device 62 and an output device 63; the number of processors 60 in the device can be one or more. Figure 14 In the embodiment, a processor 60 is used as an example; the processor 60, the memory 61, the input device 62 and the output device 63 in the device can be connected by a bus or other means. Figure 14 The bus connection is taken as an example.
[0097] Memory 61, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to the heterogeneous graph information mining method for online learning video recommendation in the embodiments of the present invention. Processor 60 executes the software programs, instructions, and modules stored in memory 61 to execute various functional applications and data processing of the device, thereby implementing the aforementioned heterogeneous graph information mining method for online learning video recommendation.
[0098] The memory 61 may primarily include a program storage area and a data storage area. The program storage area may store an operating system and at least one application required for a function; the data storage area may store data generated based on the use of the terminal. Furthermore, the memory 61 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state memory device. In some instances, the memory 61 may further include memory remotely located relative to the processor 60, and these remote memories may be connected to the device via a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0099] The input device 62 may be used to receive input digital or character information and generate key signal input related to user settings and function control of the device. The output device 63 may include a display device such as a display screen.
[0100] An embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the heterogeneous graph information mining method for online learning video recommendation of any embodiment is implemented.
[0101] The computer storage medium of the embodiments of the present invention may adopt any combination of one or more computer-readable media. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device, or device.
[0102] A computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0103] Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0104] Computer program code for performing the operations of the present invention can be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as C or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0105] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the technical solutions of the embodiments of the present invention.
Claims
1. A heterogeneous graph information mining method for online learning video recommendation, characterized in that: include: Obtain user information, video resource information, and learning topic tags of the online learning platform; Based on the acquired content, a heterogeneous graph consisting of user nodes, video nodes, and tag nodes is constructed. The heterogeneous graph is input into a multi-layer graph attention network, and the initial features of each node are aggregated over multiple hops. Videos are then recommended to each user based on the final features of each node. According to actual viewing conditions of the recommended videos by the users, the plurality of users are divided into a first user who has watched the recommended videos completely, a second user who has not watched the recommended videos, and a third user who has watched the recommended videos partially. Determine the target second user whose final feature and initial feature have a change less than a set threshold, and the target first user who is most similar to the initial feature of the target second user; update the second subgraph structure of the target second user in the heterogeneous graph according to the first subgraph structure of the target first user in the heterogeneous graph, so as to improve the actual viewing situation of the recommended video by the target second user; specifically, extract the first subgraph that diffuses outward with the target first user as the center, and the second subgraph that diffuses outward with the target second user as the center from the heterogeneous graph; simplify the node attributes in each subgraph into node types, wherein the node types include users, videos and labels; initialize N to 1, and loop the following operations: S1-10, extract the central node and the first N layers of neighboring nodes closest to it, and the edges between the extracted nodes from the simplified first and second subgraphs, respectively, to form the current first subgraph and the current second subgraph; S1-20, remove the same parts as the current second subgraph from the current first subgraph; S1-30, respectively determine the removed nodes connected to each remaining node and the remaining isolated edge in the current first subgraph, and extract the target node determined to be the same as the removed node in S1-20 from the current second subgraph, retrieve the nodes of the same type as each remaining node, and / or the same relationship as each remaining isolated edge from the information of the target node, and add them to the simplified second subgraph; S1-40, restore each node in the new simplified second subgraph to complex attributes, and fuse the restored graph into the overall heterogeneous graph; S1-50, input the fused heterogeneous graph into the first N layers of the multi-layer graph attention network to obtain an aggregated feature of the target second user; S1-60, if the change between the aggregated feature and the initial feature of the target second user is greater than the set threshold, terminate the loop from S1-10 to S1-60; otherwise, increase N by 1, and restart the loop from S1-10 to S1-60 according to the new simplified second subgraph until N reaches the maximum number of neighbor node layers of the first subgraph or the second subgraph; In case of update failure, a target third user is determined whose initial feature similarity with the target first user and the target second user is greater than another threshold; the third subgraph structure of the target third user in the heterogeneous graph is updated according to the first subgraph structure, and the second subgraph structure is updated according to the updated third subgraph structure; the updated heterogeneous graph is used to re-input the multi-layer graph attention network to re-recommend new videos to each user.
2. The method according to claim 1, characterized in that The heterogeneous graph is input into a multi-layer graph attention network, the initial features of each node are aggregated in multiple hops, and videos are recommended to each user based on the final features of each node, including: Generate initial features of each node based on the acquired content; Inputting the initial features and connection relationships of each node into a multi-layer graph attention network, in which the features of each node are updated multiple times according to the features of adjacent nodes to complete multi-hop feature aggregation; The final features of each node are input into the multi-layer perceptron to predict the probability of each user watching each video; Recommend the video with the highest viewing probability to each user.
3. The method according to claim 2, characterized in that The determining of the target second user whose final feature has a difference from the initial feature that is less than a set threshold, and the target first user whose initial feature is most similar to the target second user, includes: For each second user, calculate the similarity between the initial feature and the final feature of the current second user, and take the second user whose difference between 1 and the similarity is less than a set threshold as the target second user; The similarities between the initial features of each first user and the initial features of the target second user are calculated respectively, and the first user with the greatest similarity is selected as the target first user.
4. The method according to claim 1, wherein S1-20, including: Remove the central node and the first N-1 layers of neighboring nodes, and the first N-1 layers of edges from the current first subgraph; Perform the following operations on each neighbor node in the Nth layer of the current second subgraph: S1-21. If there is only one node identical to the current neighbor node in the remaining portion of the current first subgraph, remove the identical node and its connected edges of the same type as the edge connected to the current neighbor node from the remaining portion; S1-22. If there are multiple identical nodes in the remaining portion of the current first subgraph that are identical to the current neighbor node, select a node whose initial vector is most similar to the current neighbor node from the multiple identical nodes as the final identical node, and remove the final identical node and any connected edges of the same type as the edge connected to the current neighbor node from the remaining portion. Among them, the edge types include edges between users and tags, edges between videos and tags, and edges between users and videos.
5. The method according to claim 1, wherein S1-30 includes: For each remaining node, the following operations are performed: determining a removed node adjacent to the current remaining node, extracting a target node determined in S1-20 to be the same as the removed node from the current second subgraph; retrieving a node of the same type as the current remaining node from the information of the target node, adding the node to the simplified second subgraph, and adding a corresponding edge between the added node and the target node; The following operations are performed for each remaining orphan edge: two removed nodes connected to the current remaining orphan edge are determined, and the target nodes determined to be the same as the two removed nodes in S1-20 are extracted from the current second subgraph; and the relationship of the same type as the current remaining orphan edge is retrieved from the information of the two target nodes and added to the simplified second subgraph.
6. The method according to claim 1, characterized in that Before determining the target third user that is most similar to the initial features of the target second user in the case of update failure, the method further includes: If no node of the same type as the remaining nodes or no relationship of the same type as the remaining isolated edges is retrieved in S1-30 of all loops, it is determined that the update has failed.
7. The method according to claim 1, characterized in that Before determining the target third user that is most similar to the initial features of the target second user in the case of update failure, the method further includes: Re-inputting the updated heterogeneous graph into the multi-layer graph attention network, and re-recommending new videos to each user, and recording the user's actual viewing status of the newly recommended videos; If the updated heterogeneous graph fails to improve the actual viewing situation of the recommended video by the target second user, it is determined that the update fails.
8. An electronic device, characterized in that: include: one or more processors; a memory for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the heterogeneous graph information mining method for online learning video recommendation described in any one of claims 1-7.
9. A computer-readable storage medium, characterized in that A computer program is stored thereon, which, when executed by a processor, implements the heterogeneous graph information mining method for online learning video recommendation described in any one of claims 1-7.
Citation Information
Patent Citations
Heterogeneous graph neural network course recommendation method and system based on attention mechanism
CN116662651A
Heterogeneous graph neural network-based short video recommendation method and system fused with multi-modal data
CN119089004A
Heterogeneous information network enhanced academic paper recommendation method
CN114519097A
Multi-modal project recommendation method, system and equipment and storage medium
CN116561446A