CN116662651A - Heterogeneous graph neural network course recommendation method and system based on attention mechanism - Google Patents

Heterogeneous graph neural network course recommendation method and system based on attention mechanism Download PDF

Info

Publication number
CN116662651A
CN116662651A CN202310588836.7A CN202310588836A CN116662651A CN 116662651 A CN116662651 A CN 116662651A CN 202310588836 A CN202310588836 A CN 202310588836A CN 116662651 A CN116662651 A CN 116662651A
Authority
CN
China
Prior art keywords
course
user
video
vector
node
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310588836.7A
Other languages
Chinese (zh)
Inventor
杜玮
许伟
李想
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Renmin University of China
Original Assignee
Renmin University of China
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Renmin University of China filed Critical Renmin University of China
Priority to CN202310588836.7A priority Critical patent/CN116662651A/en
Publication of CN116662651A publication Critical patent/CN116662651A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/70Information retrieval; Database structures therefor; File system structures therefor of video data
    • G06F16/73Querying
    • G06F16/735Filtering based on additional data, e.g. user or group profiles
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • G06F16/9024Graphs; Linked lists
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/042Knowledge-based neural networks; Logical representations of neural networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/0464Convolutional networks [CNN, ConvNet]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • G06Q50/20Education
    • G06Q50/205Education administration or guidance
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Business, Economics & Management (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Mathematical Physics (AREA)
  • Computing Systems (AREA)
  • Molecular Biology (AREA)
  • Evolutionary Computation (AREA)
  • Biophysics (AREA)
  • Biomedical Technology (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Tourism & Hospitality (AREA)
  • Strategic Management (AREA)
  • Educational Technology (AREA)
  • Educational Administration (AREA)
  • General Business, Economics & Management (AREA)
  • Primary Health Care (AREA)
  • Marketing (AREA)
  • Human Resources & Organizations (AREA)
  • Economics (AREA)
  • Multimedia (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application belongs to the technical field of artificial intelligence semantic recommendation, and relates to a heterogeneous graph neural network course recommendation method and system based on an attention mechanism, wherein the method comprises the following steps of: generating a heterogeneous relationship network diagram according to the relationship among the entity users on the online education platform; setting element paths corresponding to the user and the network video respectively according to the heterogeneous relation network diagram; the element path comprises a plurality of nodes, and the weight of the nodes is calculated through a double-layer attention mechanism; according to the weight of the node, carrying out feature fusion to generate a user vector and a course video vector; and splicing the user vector and the course video vector, inputting the spliced vector into a multi-layer perceptron, calculating the recommendation score of the user-course video, and recommending the course according to the recommendation score. The MOOCCube data set has better performance, and can not only provide high-quality personalized course video recommendation service for users, but also contribute valuable reference opinion for development of the course video recommendation field.

Description

Heterogeneous graph neural network course recommendation method and system based on attention mechanism
Technical Field
The application relates to a heterogeneous graph neural network course recommendation method and system based on an attention mechanism, and belongs to the technical field of artificial intelligence semantic recommendation.
Background
Compared with the traditional offline teaching education, the online education breaks through the time and space limitations suffered by the user during learning, effectively reduces the access threshold of the user for learning and reduces the additional time and economic cost required by the user. In addition, the online education platform can project excellent educational resources to every corner of the whole country through the Internet, which also alleviates the problem of unbalance of the educational resources to some extent.
In recent years, related methods model layers related to course video recommendation are endless, but they still have the following limitations: 1. at present, related researches on course video recommendation are mostly realized based on basic characteristics of users, basic characteristics of course videos and interaction data between the basic characteristics and the basic characteristics, and not only are two entities of the users and the course videos in an online education platform, but also the entities such as a teacher, the course to which the course videos belong, knowledge concepts related to the course videos and the like can have certain influence on the users to select to watch different videos, and the related researches at present do not fully utilize the data. 2. At present, most of researches on course video recommendation are realized through traditional recommendation algorithm models such as collaborative filtering, matrix decomposition and the like, and complicated relations exist among a plurality of entities in an online education platform, the entities have the attribute of a graph structure, if the graph network structure is taken as a characteristic to be input into a recommendation model, abstract modeling is required to be carried out on related data, and the graph neural network model is taken as a framework to construct a course video recommendation model.
Disclosure of Invention
Aiming at the problems, the application aims to provide a heterogeneous graph neural network course recommendation method and a heterogeneous graph neural network course recommendation system based on an attention mechanism, which have better performance on a MOOCcube data set, can provide high-quality personalized course video recommendation service for users, and can also contribute valuable reference opinion for development of the course video recommendation field.
In order to achieve the above purpose, the present application proposes the following technical solutions: a heterogeneous graph neural network course recommendation method based on an attention mechanism comprises the following steps: generating a heterogeneous relationship network diagram according to the relationship among the entity users on the online education platform; setting element paths corresponding to the user and the network video respectively according to the heterogeneous relation network diagram; the meta-path comprises a plurality of nodes, and the weights of the nodes are calculated through a double-layer attention mechanism; feature fusion is carried out according to the weight of the node, and a user vector and a course video vector are generated; and splicing the user vector and the course video vector, inputting the spliced vector into a multi-layer perceptron, calculating the recommendation score of the user-course video, and recommending the course according to the recommendation score.
Further, each entity user on the online education platform comprises: characteristic information of the user, the teaching teacher, the course name, the course video and the knowledge concept, and interactive relations among the user, the teaching teacher, the course name, the course video and the knowledge concept.
Further, the meta paths corresponding to the user and the network video setting respectively comprise: user-curriculum video-user: two users who have seen the same course video; user-course-user: two users who learn the same course; course video-course video: two videos belonging to the same course; course video-knowledge concept-course video: two lesson videos related to the same knowledge concept.
Further, the dual-layer attention mechanism includes: when information transmission and node representation update between nodes under a view angle based on a meta-path are carried out, the weights of different nodes on the meta-path are calculated through a node level attention mechanism, and a user vector and a course video vector under the view angle of the corresponding meta-path are obtained through graph convolution; when feature aggregation is carried out on node representations under different element path view angles, the weight of the node representations under the different element path view angles is calculated through a semantic level attention mechanism.
Further, the user vector and the course video vector under the corresponding meta-path view angle are obtained by mapping all nodes on the meta-path into the same vector space, wherein the mapping function formula is as follows:
h′ i =M φi ·h i
in the formula, h i For the characteristics of node i itself, M φi Is a linear transfer matrix, h' i Is the mapped feature of node i.
Further, when the node representation update is performed on the central node, different message propagation weights are given to different neighbor nodes of the central node on the element path through the node level attention mechanism, and the calculation formula is as follows:
in the formula, h' i For the mapped characteristics of the node i, h j ' is the mapped feature of node i, phi is the meta-path, att node Is an attention neural network and,when the node i is taken as a central node under the meta-path, the node j carries out the attention weight of message propagation and information aggregation to the node i.
Further, the calculation formula of the semantic level attention mechanism is as follows:
wherein w is φP Is the semantic level attention value of the meta-path p, V is the total number of nodes in the meta-path view angle, phi p Is a certain element pathp, q is a trainable parameter, T is a transpose operator,is a vector of nodes under the meta-path, W is a linear change matrix, and b is a bias term.
Further, the calculation formula of the recommendation score of the user-course video is as follows:
O=HW o +b o =σ(XW h +b h )W o +b o
wherein H is the output of the hidden layer, O is the output of the model, W o And W is h Are all trainable linear change matrices, sigma is the activation function of the hidden layer, X is the input of the model, b h Is a hidden layer bias term, b o Is the output layer bias term.
Further, the back propagation of the recommendation score model of the user-curriculum video employs a BRP loss function that is:
wherein, loss BRP Is BRP loss function, N is the total number of users, sigma is activation function, y ui A predicted recommendation score for all positive samples of user i,recommendation scores for all negative examples of user i.
The application also discloses a heterogeneous graph neural network course recommendation system based on the attention mechanism, which comprises: the network diagram construction module is used for generating a heterogeneous relation network diagram according to the relation among the entity users on the online education platform; the meta path establishing module is used for setting meta paths corresponding to the user and the network video respectively according to the heterogeneous relation network diagram; the double-layer attention mechanism module is used for calculating the weight of the node in the meta-path through a double-layer attention mechanism; the vector generation module is used for carrying out feature fusion according to the weight of the node to generate a user vector and a course video vector; and the recommendation score module is used for splicing the user vector and the course video vector, inputting the spliced vector into the multi-layer perceptron, calculating the recommendation score of the user-course video and recommending the course according to the recommendation score.
Due to the adoption of the technical scheme, the application has the following advantages:
1. according to the application, the relationships among the five entities of the user, the teaching teacher, the course video and the knowledge concept are analyzed, the three entities are mapped into the same heterogeneous relationship network, and a course video recommendation model MACR is designed and realized based on the heterogeneous graph neural network model. Accordingly, the present application is a great attempt to apply the heterogeneous graphic neural network model to the field of course video recommendation.
2. According to the application, the MOOCCube data set is used as experimental data, and the text characteristics of various entities are converted into corresponding word vector representations by using word2vec and other natural language processing technologies, so that the characteristic expression of the nodes is enriched. In addition, the traditional course video recommendation research mostly only considers the characteristics of the videos of users and courses, but the application not only fully utilizes the characteristics of multiple types of entities in the online education platform, but also extracts the graph structure characteristics of the heterogeneous relationship network graph formed by the users and the courses, and has a certain innovation in the aspect of characteristic construction.
3. According to the application, the heterogeneous graph neural network model is combined with the attention mechanism, the complex interaction relationship among multiple types of entities in the online education platform is analyzed, the complex interaction relationship is abstractly modeled into the heterogeneous network relationship, and two corresponding element paths are respectively set for two types of entities, namely a user and a course video from the practical point of view. After the construction of the heterograph neural network is completed, the application constructs a curriculum video recommendation model based on the heterograph neural network by utilizing the heterograph neural network model and the attention mechanism so as to learn the vector representations of the user and the curriculum video, and the obtained vector representations of the user and the curriculum video are spliced and then transmitted into the multi-layer perceptron so as to calculate the recommendation score of the user-curriculum video.
Drawings
FIG. 1 is a schematic diagram of a heterogeneous neural network course recommendation method based on an attention mechanism according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a dual-layer attention mechanism in accordance with one embodiment of the present application;
FIG. 3 is a schematic diagram of a meta-path according to an embodiment of the present application.
Detailed Description
The application is depicted in detail by specific examples in order to provide a better understanding of the technical solution of the application to those skilled in the art. It should be understood, however, that the detailed description is presented only to provide a better understanding of the application, and should not be taken to limit the application. In the description of the present application, it is to be understood that the terminology used is for the purpose of description only and is not to be interpreted as indicating or implying relative importance.
With the rapid development of computer technology, deep learning has gained more attention, and various deep learning models are widely applied to various fields, thereby playing an increasing role. However, conventional deep neural network models such as CNN, RNN and the like can only be used for euclidean data (such as pictures, sequences, videos, voices and the like), and they do not have the capability of processing non-euclidean data, because the non-euclidean data (such as picture data, streaming data and the like) does not have the characteristic of translational invariance, so the models cannot effectively extract the characteristic of data from the non-euclidean data, however, a large amount of non-euclidean space data exists in real life, such as social networks, knowledge maps, protein molecule interaction networks and the like, and the data has wide application space and huge commercial value. In addition, due to the strong information expression capability of the graph structure data, the research of analyzing the graph structure data by using a deep learning model is getting more and more attention in the industry, wherein the most dominant research direction is the design and implementation of the graph neural network model.
The graph neural network model is a neural network model that learns the structural features of a graph through a messaging mechanism in a graph relational network. It is worth mentioning that the application range of the graph neural network model is very wide, and the graph neural network model has been shown to perform well in many fields such as knowledge graph, academic network, biochemistry, recommendation system and the like. The graph neural network model can be classified into two types of a homogeneous graph neural network model and a heterogeneous graph neural network model according to the type of the processed graph data, and can be roughly classified into a graph convolution neural network model and a graph meaning neural network model according to the design principle thereof. Because of the different entity node and edge relations in the application scene of the application, the graph data of the application also belongs to the heterogeneous graph network relation.
Among the personalized recommendation algorithms, the most widely used is collaborative filtering recommendation algorithm, and collaborative filtering algorithms can be classified into two types of collaborative filtering recommendation algorithms based on models and content according to different implementation modes. The collaborative filtering algorithm based on the content has the advantages of simple implementation principle, low calculation complexity and the like, so that the model is often applied to an industrial recommendation system. However, the algorithm model also has the problems such as incapacity of solving the data sparseness problem, recommending the system to be cold started and the like. The recommendation algorithm based on singular value decomposition is the most common recommendation algorithm model in the recommendation algorithm based on the model, and the recommendation algorithm can alleviate the problem of data sparseness to a certain extent, but the problem of higher model complexity exists, and the model based on the recommendation algorithm comprises PureSVD, funkSVD and the like. In addition, the collaborative filtering recommendation algorithm based on the model also comprises a recommendation algorithm based on the association rule, a recommendation algorithm based on the utility and a recommendation algorithm based on the knowledge.
In recent years, related research on deep learning models has been advanced rapidly, and various deep learning models such as convolutional neural networks, cyclic neural networks, deep belief networks and the like are widely applied to our lives. In order to solve the information overload problem caused by big data, more and more researchers try to apply the deep learning model to the recommendation system. Because the technology implementation principle of the deep learning model is quite similar to the underlying principle of the recommendation system, the application of the deep learning model to the recommendation system has a certain feasibility, and the deep learning model also provides a new research direction and solution for the development of the recommendation system.
Course recommendation has been a hot research problem in the field of educational big data mining, and many course recommendation schemes are layered endlessly. The video is finer in recommendation granularity relative to the course itself, and the direct subject of user interaction with the online education platform is also video rather than course, so that the video of the recommended course can directly meet the bottom requirement of the user compared with the video of the recommended course for the user. However, since there are relatively few studies on the current course video recommendation, and the two application scenarios of the course video recommendation and the course video recommendation only have differences in recommendation items, the implementation principle of the two application scenarios is basically consistent with the selected technical framework, and the current study on the aspect of the course recommendation has a certain foundation. The current course recommendation research can be classified into three categories, namely, a course recommendation algorithm research based on demographics, a course recommendation algorithm research based on collaborative filtering and a course recommendation algorithm research based on a model.
The key idea of the course recommendation algorithm based on demographics is that users with similar attribute information can select similar courses, the implementation principle of the algorithm is that user portrayal is described according to the characteristic data such as gender, age, region and the like of the users, a similarity matrix among the user portrayal is generated based on different user portrayal, and the courses selected by the users most similar to the user are recommended to the user. For the application scene of the application, a plurality of entities which influence the user to select different course videos exist in the online education platform, such as teaching teachers, courses to which the videos belong, knowledge concepts related to the videos and the like, and the limitation is brought to only considering the characteristics of the user and the course per se when the course video recommendation is carried out. In addition, most of the existing course recommendation research adopts traditional machine learning models such as collaborative filtering, matrix decomposition and other models at the selection level of recommendation models, and the research of applying the heterogeneous graph neural network model to the field of course video recommendation is still relatively few at present.
In order to solve the problems that network course recommendation only considers two factors of a user and a course video, and the current research on course video recommendation is mostly realized through traditional recommendation algorithm models such as collaborative filtering, matrix decomposition and the like, and a graph structure cannot be processed, the application aims to provide a heterogeneous graph neural network course recommendation method and system based on an attention mechanism. When the message transmission and the node representation update are based on the inter-node information transmission and the node representation update under the view angle of the meta-path, the application endows different nodes on the meta-path with different weights by adding a node level attention mechanism, and the vector representation of the user and the course video under the view angle of the corresponding meta-path is obtained by a graph convolution mode. When feature aggregation is carried out on node representations under different element path view angles, the application endows the node representations under different element path view angles with different weights by adding a semantic level attention mechanism, and the final vector representation of the user and the course video is obtained through feature fusion. Finally, the obtained final vector representations of the two types of entities are spliced and then input into a multi-layer perceptron, so that the recommendation score of the user-course video is calculated, and the trainable parameters in the model are continuously updated in a mode of back propagation and random gradient descent. The following describes the application in more detail by way of examples with reference to the accompanying drawings.
Example 1
The embodiment discloses a heterogeneous graph neural network course recommendation method based on an attention mechanism, which is shown in fig. 1 and comprises the following steps:
s1, generating a heterogeneous relationship network diagram according to the relationship among entity users on an online education platform;
each entity user on the online education platform comprises: characteristic information of the user, the teaching teacher, the course name, the course video and the knowledge concept, and interactive relations among the user, the teaching teacher, the course name, the course video and the knowledge concept.
The method for generating the heterogeneous relation network graph comprises the following steps:
the characteristics of the user are shown in table 1, wherein the plurse_selected array is a Course selected by a certain user, the video_monitored data is a Video watched by the certain user, and the end_time is a corresponding time point for watching the Video. Abstracting a user-course name based on a course array selected by a certain user; processing a user-course video based on the video abstraction watched by a certain user; in addition, in this embodiment, the user-video sides of 30 months, from 1 st 2017 to 30 th 6 th 2019, are divided into training sets, and the user-video sides of 6 months, from 1 st 7 th 2019 to 31 th 12 th 2019, are divided into test sets, based on the end_time data.
Table 1 user profile
Features (e.g. a character) Variable name Variable type Description of the features
Sex (sex) User_sex Categorial 0-female; 1-Male sex
Course selection list Course_selected Array All courses selected by the user
Course video list Video_watched Array All videos that the user has seen
Video viewing time list Enroll_time Array Viewing time point at which user has seen video
The characteristics of the teaching teacher are shown in Table 2, and the Cours_Taight array is the entire Course taught by a particular teacher. At the heterogeneous relationship network construction level, the present embodiment generates a lecturer-course name based on all courses taught by a certain lecturer.
The characteristics of the courses are shown in table 3, the video_order array is all course videos contained in a certain course, and the accept_order array is all knowledge concepts related to the certain course. In terms of heterogeneous relationship network construction, in this embodiment, a course name-course video is abstracted based on all course videos included in a certain course name, and a course name-knowledge concept is abstracted based on all knowledge concepts related to the certain course name. In the aspect of feature engineering, the course name is often a high profile of course content, and can be used as a representation of course content to a certain extent, and because the attribute of the course name is text data, the attribute cannot be directly used as the characteristic of the course to be applied to a graph neural network, so that word2vec model is used for converting word vectors, and the characteristic expression of the course is enriched.
Table 2 characteristic table of teacher in teaching
Features (e.g. a character) Variable name Variable type Description of the features
Sex (sex) User_sex Categorial 0-female; 1-Male sex
Teaching course Course_taught Array All courses taught by the teacher
Table 3 characteristic table of courses
Features (e.g. a character) Variable name Variable classA kind of electronic device with a display unit Description of the features
Course name Course_name Text Course name
Video list Video_order Array Title list of all videos contained in course
Knowledge concept list Concept_order Array All knowledge concept list contained in course
The characteristics of the curriculum video are shown in table 4, the accept_order array is the whole knowledge Concept related to the video, and title is the title of the video. At the heterogeneous relationship network construction level, in this embodiment, the course video-knowledge concept is abstracted based on all knowledge concepts related to a certain video. On the aspect of feature engineering, the content of the video can be better represented by concentrating the title of the video as essence of the video, but the title cannot be directly used as the feature in the graphic neural network model because the feature is text type data. Therefore, in order to effectively utilize the feature of the video title, the curriculum video nodes are better embedded into the heterogeneous graph network, and the word2vec model is used for word vector conversion of the video title in the embodiment, so that the feature expression of the curriculum video is enriched.
Table 4 feature table of course video
Features (e.g. a character) Variable name Variable type Description of the features
Video title Video_title Text Title of course video
Knowledge concept list Concept_order Array Knowledge concept list related to course video
The features of the knowledge concept are shown in table 5, where the displacement is a detailed literal description of the knowledge concept. The application also adopts related word vector conversion technology to generate corresponding vector features aiming at the word features in the knowledge concept entity, thereby enriching the feature expression of the knowledge concept.
TABLE 5 characterization tables of knowledge concepts
Features (e.g. a character) Variable name Variable type Description of the features
Knowledge concept name Concept_name Text Name of knowledge concept
Knowledge concept interpretation Concept_explanation Text Relevant interpretation of the knowledge concept
S2, setting element paths corresponding to the user and the network video respectively according to the heterogeneous relation network diagram;
as shown in fig. 2, according to the related study of the graph neural network model described above, the current graph neural network model mostly realizes message propagation between nodes and update of node vectors by adopting an aggregation function. In the heterogeneous relationship network of the online education platform of the embodiment, various types of nodes and edges exist, and the characteristic dimensions of the different types of nodes are different, so that message transmission and node update among the nodes are difficult to directly carry out. Therefore, in this embodiment, feature vectors of all entities are mapped into the same dimension, and then two corresponding meta paths are set for two types of entities, namely, the user and the course video, starting from the interactive relationship between the user and the course video and other entities in the real world.
As shown in fig. 3, the meta paths respectively corresponding to the user and the network video settings include: user-curriculum video-user: two users who have seen the same course video; user-course-user: two users who learn the same course; course video-course video: two videos belonging to the same course; course video-knowledge concept-course video: two lesson videos related to the same knowledge concept.
The S3 element path comprises a plurality of nodes, and the weight of the nodes is calculated through a double-layer attention mechanism;
as shown in fig. 2, the dual-layer attention mechanism includes: when information transmission and node representation update between nodes under the view angle of the element path are based, the weights of different nodes on the element path are calculated through a node level attention mechanism, and a user vector and a course video vector under the view angle of the corresponding element path are obtained through graph convolution; when feature aggregation is carried out on node representations under different element path view angles, the weight of the node representations under the different element path view angles is calculated through a semantic level attention mechanism.
The user vector and the course video vector under the corresponding meta-path view angle are obtained by mapping all nodes on the meta-path into the same vector space, wherein the mapping function formula is as follows:
h′ i =M φi ·h i
in the formula, h i For the characteristics of node i itself, M φi Is a linear transfer matrix, h' i Is the mapped feature of node i.
Since the degree of influence of different nodes on the meta-path on the vector representation of the target node is not the same, a node level attention mechanism is introduced in this embodiment when node level messages are aggregated. When the node representation of the central node is updated, different message propagation weights are given to different neighbor nodes of the central node on the element path through a node level attention mechanism, and the calculation formula is as follows:
in the formula, h' i For the mapped characteristics of the node i, h j ' is the mapped feature of node i, phi is the meta-path, att node Is an attention neural network and,when the node i is taken as a central node under the meta-path, the node j carries out the attention weight of message propagation and information aggregation to the node i.
As shown in fig. 2, the vector representation e under the view of the resulting user based on two meta-paths u1 And e u2 And vector representation e of course video under two meta-paths v1 And e v2 After that, the application adds a semantic level attention mechanism when fusing the vector representations of the user and the course video under different element path visual angles to give different weights to the node representations under different element paths, and generates the final vector representation of the user and the course video, namely e, by a node aggregation mode u And e v . The calculation formula of the semantic level attention mechanism is as follows:
wherein w is φP Is the semantic level attention value of the meta-path p, V is the total number of nodes in the meta-path view angle, phi p Is the meta-path p, q is a trainable parameter, T is the transpose operator,is a vector of nodes under the meta-path, W is a linear change matrix, and b is a bias term.
S4, carrying out feature fusion according to the weight of the node to generate a user vector and a course video vector;
and S5, splicing the user vector and the course video vector, inputting the spliced vector into a multi-layer perceptron, calculating the recommendation score of the user-course video, and recommending the course according to the recommendation score.
As shown in FIG. 2, the final vector representation, e, is obtained after the information aggregation of the two entities, namely the user and the course video, at the node level through the message propagation and the semantic level u And e v After that, the application will e u And e v The vector obtained after the splicing is input into an MLP multi-layer perceptron model to calculate the recommendation score of the user-course video, and the calculation formula of the recommendation score of the user-course video is as follows:
O=HW o +b o =σ(XW h +b h )W o +b o
wherein H is the output of the hidden layer, O is the output of the model, W o And W is h Are all trainable linear change matrices, sigma is the activation function of the hidden layer, X is the input of the model, b h Is a hidden layer bias term, b o Is the output layer bias term. In this embodiment, the activation function of the model is LeakyRelu. Compared with direct calculation of e u And e v E as its recommendation score u And e v The capability of characteristic crossing and the complexity of the model can be effectively improved by splicing and inputting the video into the multi-layer perceptron, so that vector characterization of a user and a course video can be better depicted, and the experimental effect of the model is improved.
O=HW o +b o =Φ(XW h +b h )W o +b o
In terms of model back propagation, since the curriculum video recommendation problem is essentially a sort problem, BRP Loss is chosen as the Loss function of the model in terms of Loss function selection, which is often used in sort problems, the goal of which is to hope the recommendation score of the positive sample to be much greater than that of the negative sample, and its calculation formula is shown below, where N is the total number of usersPredicted recommendation score for all positive samples of user i, < >>Recommendation scores for all negative examples of user i. The back propagation of the recommendation score model for user-curriculum video employs a BRP loss function that is:
wherein, loss BRP Is the BRP loss function, N is the total number of users, sigma is the activation function,predicted recommendation score for all positive samples of user i, < >>Recommendation scores for all negative examples of user i.
After the heterogeneous graph neural network course recommendation method is completed, four classical recommendation algorithm models, namely TopPop, MF-BRP, FISM and Metapath2vec, are used as a baseline model of the embodiment, the effectiveness of the method in the embodiment on the data set is verified by setting a comparison experiment method, and the experimental results are shown in table 6. From the experimental results in table 6, HR is hit rate, NDCG is normalized loss cumulative gain, MRR is average reciprocal rank, and AUC is area under ROC curve in table 6. Compared with other existing baseline models, the scheme in the embodiment has the advantages that the area under the ROC curve of the model reaches the level of 0.85, and meanwhile, compared with the traditional matrix decomposition model FISM, the Metapath2vec model has the advantages of hit rate, normalized damage accumulation gain and AUC, and the illustration graph shows that the learning method has certain advantages in the application scene of course video recommendation because the graph structure information can be fully mined. In terms of model interpretability, the dual-layer attention mechanism of the present embodiment sets up a corresponding ablation experiment, so as to analyze the influence of the introduction of the attention mechanism on the model experiment effect of the present embodiment. In terms of comparison of the merits of different element path combinations, nine element path combination modes are obtained after the set element paths are freely combined, and then a control experiment is set based on the nine element path combination modes to analyze the influence of the different element path combinations on the model performance effect and analyze the relevant reasons according to the experiment effect. In terms of setting the value of the length k of the recommendation list, the embodiment sets the length of the recommendation list to three values of 10, 15 and 20 respectively and analyzes the influence of the length of the recommendation list on the experimental effect of the model by means of a comparison experiment.
TABLE 6 comparison of model effects of the present example with effects of the existing model
Model HR@20 NDCG@20 MRR AUC
TopPop 0.5743 0.3195 0.2915 0.6957
MF-BRP 0.8137 0.3973 0.3357 0.8159
Metapath2vec 0.7734 0.3851 0.3186 0.7953
The model of the embodiment 0.8853 0.4756 0.3812 0.8517
FISM 0.6985 0.3568 0.3352 0.7917
Example two
Based on the same inventive concept, the embodiment discloses a heterogeneous graph neural network course recommendation system based on an attention mechanism, which comprises:
the network diagram construction module is used for generating a heterogeneous relation network diagram according to the relation among the entity users on the online education platform;
the meta path establishing module is used for setting meta paths corresponding to the user and the network video respectively according to the heterogeneous relation network diagram;
the double-layer attention mechanism module is used for calculating the weight of the node in the meta-path through a double-layer attention mechanism;
the vector generation module is used for carrying out feature fusion according to the weight of the node to generate a user vector and a course video vector;
and the recommendation score module is used for splicing the user vector and the course video vector, inputting the spliced vector into the multi-layer perceptron, calculating the recommendation score of the user-course video and recommending the course according to the recommendation score.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Finally, it should be noted that: the above embodiments are only for illustrating the technical aspects of the present application and not for limiting the same, and although the present application has been described in detail with reference to the above embodiments, it should be understood by those of ordinary skill in the art that: modifications and equivalents may be made to the specific embodiments of the application without departing from the spirit and scope of the application, which is intended to be covered by the claims. The foregoing is merely illustrative of the present application, and the present application is not limited thereto, and any person skilled in the art will readily appreciate variations or alternatives within the scope of the present application. Therefore, the protection scope of the application is subject to the protection scope of the claims.

Claims (10)

1. The heterogeneous graph neural network course recommendation method based on the attention mechanism is characterized by comprising the following steps of:
generating a heterogeneous relationship network diagram according to the relationship among the entity users on the online education platform;
setting element paths corresponding to the user and the network video respectively according to the heterogeneous relation network diagram;
the meta-path comprises a plurality of nodes, and the weights of the nodes are calculated through a double-layer attention mechanism;
feature fusion is carried out according to the weight of the node, and a user vector and a course video vector are generated;
and splicing the user vector and the course video vector, inputting the spliced vector into a multi-layer perceptron, calculating the recommendation score of the user-course video, and recommending the course according to the recommendation score.
2. The method for recommending a heterogeneous graph neural network course based on an attention mechanism of claim 1, wherein each entity user on the online education platform comprises: characteristic information of the user, the teaching teacher, the course name, the course video and the knowledge concept, and interactive relations among the user, the teaching teacher, the course name, the course video and the knowledge concept.
3. The attention mechanism based heterogeneous graph neural network lesson recommendation method of claim 1 or 2, wherein the user and network video setting respectively corresponding meta paths comprise: user-curriculum video-user: two users who have seen the same course video; user-course-user: two users who learn the same course; course video-course video: two videos belonging to the same course; course video-knowledge concept-course video: two lesson videos related to the same knowledge concept.
4. The attention mechanism-based heterogeneous graph neural network lesson recommendation method of claim 1 or 2, wherein the dual-layer attention mechanism comprises: when information transmission and node representation update between nodes under a view angle based on a meta-path are carried out, the weights of different nodes on the meta-path are calculated through a node level attention mechanism, and a user vector and a course video vector under the view angle of the corresponding meta-path are obtained through graph convolution; when feature aggregation is carried out on node representations under different element path view angles, the weight of the node representations under the different element path view angles is calculated through a semantic level attention mechanism.
5. The attention mechanism based heterogeneous graph neural network lesson recommendation method of claim 4, wherein the user vector and lesson video vector at the corresponding meta-path perspective are obtained by mapping all nodes on the meta-path into the same vector space, wherein the mapping function formula is:
h′ i =M φi ·h i
in the formula, h i For the characteristics of node i itself, M φi Is a linear transfer matrix, h' i Is the mapped feature of node i.
6. The method for recommending a heterogeneous graph neural network course based on an attention mechanism of claim 5, wherein when updating node representation of a central node, different message propagation weights are given to different neighbor nodes of the central node on a meta-path by the node-level attention mechanism, and a calculation formula is as follows:
in the formula, h' i For the mapped feature of node i, h' j For the mapped characteristics of the node i, phi is a meta-path, att node Is an attention neural network and,when the node i is taken as a central node under the meta-path, the node j carries out the attention weight of message propagation and information aggregation to the node i.
7. The method for recommending a heterogeneous graph neural network course based on an attention mechanism of claim 5, wherein the semantic level attention mechanism has a calculation formula of:
wherein w is φP Is the semantic level attention value of the meta-path p, V is the total number of nodes in the meta-path view angle, phi p Is the meta-path p, q is a trainable parameter, T is the transpose operator,is a vector of nodes under the meta-path, W is a linear change matrix, and b is a bias term.
8. The attention mechanism based heterogeneous graph neural network lesson recommendation method of claim 5, wherein the calculation formula of the recommendation score of the user-lesson video is:
O=HW o +b o =σ(XW h +b h )W o +b o
wherein H is the output of the hidden layer, O is the output of the model, W o And W is h Are all trainable linear change matrices, sigma is the activation function of the hidden layer, X is the input of the model, b h Is a hidden layer bias term, b o Is the output layer bias term.
9. The attention mechanism based heterogeneous graph neural network lesson recommendation method of claim 8, wherein the back propagation of the recommendation score model for user-lesson videos employs a BRP loss function that is:
wherein, loss BRP Is the BRP loss function, N is the total number of users, sigma is the activation function,predicted recommendation score for all positive samples of user i, < >>Recommendation scores for all negative examples of user i.
10. An attention mechanism-based heterogeneous graph neural network course recommendation system, which is characterized by comprising:
the network diagram construction module is used for generating a heterogeneous relation network diagram according to the relation among the entity users on the online education platform;
the meta path establishing module is used for setting meta paths corresponding to the user and the network video respectively according to the heterogeneous relation network diagram;
the double-layer attention mechanism module is used for calculating the weight of the node in the meta-path through a double-layer attention mechanism;
the vector generation module is used for carrying out feature fusion according to the weight of the node to generate a user vector and a course video vector;
and the recommendation score module is used for splicing the user vector and the course video vector, inputting the spliced vector into the multi-layer perceptron, calculating the recommendation score of the user-course video and recommending the course according to the recommendation score.
CN202310588836.7A 2023-05-24 2023-05-24 Heterogeneous graph neural network course recommendation method and system based on attention mechanism Pending CN116662651A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310588836.7A CN116662651A (en) 2023-05-24 2023-05-24 Heterogeneous graph neural network course recommendation method and system based on attention mechanism

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310588836.7A CN116662651A (en) 2023-05-24 2023-05-24 Heterogeneous graph neural network course recommendation method and system based on attention mechanism

Publications (1)

Publication Number Publication Date
CN116662651A true CN116662651A (en) 2023-08-29

Family

ID=87711104

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310588836.7A Pending CN116662651A (en) 2023-05-24 2023-05-24 Heterogeneous graph neural network course recommendation method and system based on attention mechanism

Country Status (1)

Country Link
CN (1) CN116662651A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117575744A (en) * 2024-01-15 2024-02-20 成都帆点创想科技有限公司 Article recommendation method and system based on user association relation

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117575744A (en) * 2024-01-15 2024-02-20 成都帆点创想科技有限公司 Article recommendation method and system based on user association relation
CN117575744B (en) * 2024-01-15 2024-03-26 成都帆点创想科技有限公司 Article recommendation method and system based on user association relation

Similar Documents

Publication Publication Date Title
Su et al. Exercise-enhanced sequential modeling for student performance prediction
Wu et al. Exercise recommendation based on knowledge concept prediction
CN111881363B (en) Recommendation method based on graph interaction network
Zhou et al. Modeling context-aware features for cognitive diagnosis in student learning
Wu et al. SGKT: Session graph-based knowledge tracing for student performance prediction
Hu et al. Learning peer recommendation using attention-driven CNN with interaction tripartite graph
CN116127186A (en) Knowledge-graph-based individual matching recommendation method and system for person sentry
CN112699310A (en) Cold start cross-domain hybrid recommendation method and system based on deep neural network
CN116662651A (en) Heterogeneous graph neural network course recommendation method and system based on attention mechanism
Li et al. Social media for ubiquitous learning and adaptive tutoring [guest editors' introduction]
Jia et al. Application of digital image processing technology in online education under COVID-19 epidemic
Bhatia et al. COPAL—Cognitive personalized aid for learning
Shaptala et al. Exploring the vector space model for online courses
Kaur et al. Learner-Centric Hybrid Filtering-Based Recommender System for Massive Open Online Courses
Sun et al. Collaborative embedding for knowledge tracing
Zeng Application of conditional random field model based on machine learning in online and offline integrated educational resource recommendation
Oubalahcen et al. The Use of AI in E-Learning Recommender Systems: A Comprehensive Survey
Jia Online Course Learning Resource Recommendation Based on Difficulty Matching.
Zhu et al. An Effective Framework for Automatically Generating and Ranking Topics in MOOC Videos.
Lin et al. Attention-based high-order feature interactions to enhance the recommender system for web-based knowledge-sharing service
Rishad et al. Application of fuzzy logic in video recommendation system for syllabus driven E-learning platform
El Aouifi et al. Predicting learner’s performance through video viewing behavior analysis using graph convolutional networks
Wang et al. MOOC resources recommendation based on heterogeneous information network
Wang Research on Online Education Resources Recommendation Based on Deep Learning
Li et al. Personalized education resource recommendation method based on deep learning in intelligent educational robot environments

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination