Joint knowledge point prediction method and system in education field based on graph convolutional neural network and type embedding
By introducing graph convolutional neural network and type embedding in knowledge graph representation learning, optimizing entity and relationship vector representation solves the problem of fuzzy knowledge point connections in the existing technology, and achieves more accurate knowledge point association prediction and knowledge graph supplementation. .
Patent Information
- Application Number
- CN202210044138.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-14
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2042-01-14
AI Technical Summary
Existing knowledge graph representation learning models are not comprehensive enough when utilizing graph structure information, resulting in blurred connections between knowledge points and inability to accurately understand the relationships between knowledge points, which affects the construction and application of knowledge graphs.
Using a method based on graph convolutional neural network and type embedding, the BERT model is used to construct a corpus of course knowledge points in the education field. The TransE model and graph convolutional neural network are combined to optimize entity and relationship vector representation, and use entity type information for vector representation learning. , predict the correlation between knowledge points, and build a more complete knowledge graph.
It improves the learning performance of the embedded representation of the knowledge graph, can more accurately predict the correlation between knowledge points, supplements the undiscovered triples in the knowledge graph in the education field, and establishes a complete knowledge graph.
Smart Images

Figure CN114399048B
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of course knowledge graph construction, and in particular relates to a joint knowledge point prediction method and system in the field of education based on graph convolutional neural network and type embedding. Background Art
[0002] Knowledge graph representation learning aims to map the entities and relationships in the knowledge graph into a low-dimensional continuous vector space while retaining the original graph structure and semantic information by learning the semantic features in the graph, so that the entities and relationships can be directly calculated numerically and the computing efficiency can be improved.
[0003] Existing knowledge graph representation learning models include translation models, semantic matching models, and neural network models. The main idea of the translation model is to interpret the relationship r in the triple (h, r, t) as the translation process from the head entity h to the tail entity t. The semantic matching model uses a scoring function based on semantic similarity to measure the rationality of facts by matching semantic similarity. The neural network model mainly learns the embedded representation of the knowledge graph through deep neural networks.
[0004] Most of the above models only consider the triple structure information of the knowledge graph, and do not fully utilize the graph structure information rich in semantic relationships in the knowledge graph.
[0005] However, recent research on graph convolutional neural networks has achieved remarkable results. Graph convolutional networks are a deep learning model that can efficiently utilize graph structure information. By combining the information of the central node and the neighboring nodes, the feature information of the central node can be more accurately represented.
[0006] However, graph convolutional networks are limited by the original input, and the inaccuracy of the original input will affect the final learning results of the model.
[0007] As far as the current knowledge domain learning platform is concerned, the use of randomly initialized vectors as the initial input of the GCN model cannot fully utilize the original semantic relationship between knowledge points. When constructing the representation vectors between knowledge points, the connection between knowledge points will be vague, and learners will not be able to understand the connection between knowledge points. Summary of the invention
[0008] In view of the problem that the current knowledge field learning platform uses randomly initialized vectors as the initial input of the GCN model, which cannot fully utilize the original semantic relationship between knowledge points, and when constructing the representation vectors between knowledge points, the connection between knowledge points is vague, and learners cannot understand the connection between knowledge points. The present invention proposes a joint knowledge point prediction method and system in the field of education based on graph convolutional neural network and type embedding, which can simultaneously learn the structural information and relational semantics of knowledge points in the field of education, and use type embedding to optimize the results of the representation learning of knowledge points in the field of education, and analyze each knowledge point based on the vector representation of the knowledge point to infer whether there is a correlation between the knowledge points, so as to predict the knowledge point triples that have not yet been discovered in the knowledge graph in the field of education, and build a more complete knowledge graph in the field of education.
[0009] In order to achieve the above object, the present invention adopts the following technical solutions:
[0010] On the one hand, the present invention proposes a joint knowledge point prediction method in the field of education based on graph convolutional neural network and type embedding, comprising:
[0011] Step 1: Use the BERT model to build a corpus of educational course knowledge points and a set of triples of educational course knowledge points;
[0012] Step 2: Use the TransE model as a triple encoder, input the constructed triple set of education field course knowledge points into the TransE model, use the TransE model to vectorize the entities and relationships in the triple set, and obtain the entity vector and relationship vector corresponding to the triple set;
[0013] Step 3: Input the constructed education field course knowledge point triple set into the triple entity type encoder, and use the triple entity type encoder to vectorize the type of the entity in the triple set to obtain an entity type vector;
[0014] Step 4: Optimize the entity vector and relationship vector obtained by the TransE model through the entity type vector;
[0015] Step 5: Input the entity vector and relationship vector obtained in step 4 into the graph convolutional neural network for representation learning to obtain the entity vector and relationship vector corresponding to the final updated course knowledge point triple;
[0016] Step 6: Use the entity vector and relationship vector obtained in step 5 to perform link prediction on the associated knowledge points.
[0017] Furthermore, the step 1 comprises:
[0018] Step 1.1: Collect educational corpus;
[0019] Step 1.2: Segment the collected corpus to obtain a word set and construct an education corpus;
[0020] Step 1.3: Count the distribution of words in the corpus, and select words from the word set based on the distribution results, generate a custom dictionary, and construct knowledge point triples;
[0021] Step 1.4: Divide entities according to the text in the constructed education domain corpus, extract the corresponding relationships between entities, and store the defined data in the form of triples for subsequent steps.
[0022] Furthermore, the step 2 comprises:
[0023] Step 2.1: Randomly generate vector representations of the head entity, relationship, and tail entity of the triple, and represent the triple as (h, r, t), where h is the head entity, t is the tail entity, and the relationship r is regarded as a transformation operation from the head entity to the tail entity;
[0024] Step 2.2: Randomly generate negative sample data (h′, r′, t′) using the following formula:
[0025] T′={(h′,r′,t′)|h′∈E}∪{(h,r′,t)|r′∈R}∪{(h,r,t′)|t′∈E}
[0026] Where E and R represent the entity set and relationship set of the knowledge graph respectively; T is the set of positive sample triples; T′ is the set of negative sample triples, which is obtained by randomly replacing the head entity, tail entity or relationship of the positive sample triples;
[0027] Step 2.3: Obtain the triple energy function value E1(h, r, t), which is used to subsequently construct the loss function to optimize the entity vector and relationship vector:
[0028] E1(h,r,t)=||e h +e r -e t ||
[0029] Among them, e h ,e r ,e t Represent the vector representation of the head entity, relation, and tail entity respectively.
[0030] Furthermore, the step 3 comprises:
[0031] Step 3.1: In the triple entity type encoder, the entity type is represented and learned according to the following type feature function:
[0032] fat (v,r)=M r y v
[0033] Among them, y v represents the type representation of entity v in d-dimensional continuous vector space, M r is the linear transformation matrix of relation r;
[0034] Through the type characteristic function, the triple energy function E2(h,r,t) is defined as the following formula:
[0035] y h,r =f at (h,r),y t,r =f at (t,r)
[0036] E2(h,r,t)=||y h,r +y r -y t,r ||
[0037] where y h,r ,y t,r Respectively represent the entity vectors of the head entity h and the tail entity t represented by the relationship r; y r is the vector representation of the relationship in the triple; and y h,r +y r =y t,r ;
[0038] Step 3.2: Constrain the type vector by similarity;
[0039] For two triplets with the same relationship, the following formula should be satisfied:
[0040] y h1,r =y h2,r ,y t1,r =y t2,r
[0041] E2(h1,r,t1)=E2(h2,r,t2)
[0042] where y h1,r and h2,r They are the type vector representations of the two triple head entities under relation r, y t1,r and t2,r They are the type vector representations of the two triple tail entities under relation r.
[0043] Furthermore, in step 4, the optimization method is as follows:
[0044]
[0045]
[0046] L2=max(γ2+E2(h,r,t)-E2(h′,r′,t′),0)
[0047] The final result is e h 、e t 、e r , respectively represent the representation of the head entity, tail entity, and relationship in the d-dimensional continuous vector space; γ, γ1, γ2 are hyperparameters with a value range of (0, 1).
[0048] Furthermore, the step 5 comprises:
[0049] Step 5.1: Use the entity vector and relationship vector generated in step 4 as the initial input of the graph convolutional neural network model; design the graph convolutional neural network; simultaneously learn the information of the directly adjacent entities of the central entity, as well as the edge information connecting the central entity and the adjacent entities, and use the graph convolutional neural network to learn the structural information of the knowledge graph;
[0050] Step 5.2: Use the following formula to fuse the entity vector and relationship vector generated in step 4 into the graph convolutional neural network model to make full use of the semantic information contained in the knowledge graph:
[0051] e h =e t -e r
[0052] where e h 、e t 、e r Respectively represent the vector representation of the head entity, tail entity, and relationship in the d-dimensional continuous space;
[0053] Step 5.3: Using the entity vector and relationship vector obtained in step 4, and the entity type vector obtained in step 3, update the vector representation of related entities and relationships through the graph convolutional neural network GCN to obtain the final knowledge point prediction result.
[0054] On the other hand, the present invention proposes a joint knowledge point prediction system in the field of education based on graph convolutional neural network and type embedding, comprising:
[0055] The triple construction module is used to construct a corpus of course knowledge points in the field of education using the BERT model and to construct a set of triples of course knowledge points in the field of education;
[0056] The first vectorization module is used to use the TransE model as a triple encoder, input the constructed education field course knowledge point triple set into the TransE model, and use the TransE model to vectorize the entities and relationships in the triple set to obtain the entity vector and relationship vector corresponding to the triple set;
[0057] The second vectorization module is used to input the constructed education field course knowledge point triple set into the triple entity type encoder, and use the triple entity type encoder to vectorize the type of the entity in the triple set to obtain an entity type vector;
[0058] The optimization module is used to optimize the entity vectors and relationship vectors obtained by the TransE model through the entity type vectors;
[0059] The updating module is used to input the entity vector and relationship vector obtained by the optimization module into the graph convolutional neural network for representation learning, and obtain the entity vector and relationship vector corresponding to the final updated course knowledge point triple;
[0060] The knowledge point link prediction module is used to perform link prediction on associated knowledge points through the entity vector and relationship vector obtained by the step update module.
[0061] Furthermore, the triple building module is specifically used for:
[0062] Collect corpus in the field of education;
[0063] Segment the collected corpus to obtain a word set and construct a corpus in the field of education;
[0064] Counting the distribution of words in the corpus, and selecting words from the word set based on the distribution results, generating a custom dictionary, and constructing knowledge point triples;
[0065] According to the text in the constructed education field corpus, entities are divided, the corresponding relations between entities are extracted, and the defined data are stored in the form of triples for subsequent steps.
[0066] Furthermore, the first vectorization module is specifically used for:
[0067] Randomly generate vector representations of the head entity, relationship, and tail entity of a triple, and represent the triple as (h, r, t), where h is the head entity, t is the tail entity, and relationship r is regarded as a transformation operation from the head entity to the tail entity;
[0068] Use the following formula to randomly generate negative sample data (h′, r′, t′):
[0069] T′={(h′,r′,t′)|h′∈E}∪{(h,r′,t)|r′∈R}∪{(h,r,t′)|t′∈E}
[0070] Where E and R represent the entity set and relationship set of the knowledge graph respectively; T is the set of positive sample triples; T′ is the set of negative sample triples, which is obtained by randomly replacing the head entity, tail entity or relationship of the positive sample triples;
[0071] The triple energy function value E1(h, r, t) is obtained, which is used to subsequently construct the loss function to optimize the entity vector and relationship vector:
[0072] E1(h,r,t)=||e h +e r -e t ||
[0073] Among them, e h ,e r ,e t Represent the vector representation of the head entity, relation, and tail entity respectively.
[0074] Furthermore, the second vectorization module is specifically used for:
[0075] In the triple entity type encoder, the entity type is represented and learned according to the following type feature function:
[0076] f at (v,r)=M r y v
[0077] Among them, y v represents the type representation of entity v in d-dimensional continuous vector space, M r is the linear transformation matrix of relation r;
[0078] Through the type characteristic function, the triple energy function E2(h,r,t) is defined as the following formula:
[0079] y h,r =f at (h,r),y t,r =f at (t,r)
[0080] E2(h,r,t)=||y h,r +y r -y t,r ||
[0081] where y h,r ,y t,r Respectively represent the entity vectors of the head entity h and the tail entity t represented by the relationship r; yr is the vector representation of the relationship in the triple; and y h,r +y r =y t,r ;
[0082] Constrain the type vector by similarity;
[0083] For two triplets with the same relationship, the following formula should be satisfied:
[0084] y h1,r =y h2,r ,y t1,r =y t2,r
[0085] E2(g1,r,t1)=E2(h2,r,t2)
[0086] where y h1,r and h2,r They are the type vector representations of the two triple head entities under relation r, y t1,r and t2,r They are the type vector representations of the two triple tail entities under relation r;
[0087] In the optimization module, the optimization method is as follows:
[0088]
[0089]
[0090] L2=max(γ2+E2(h,r,t)-E2(h′,r′,t′),0)
[0091] The final result is e h 、e t 、e r , respectively represent the representation of the head entity, tail entity, and relationship in the d-dimensional continuous vector space; γ, γ1, γ2 are hyperparameters with a value range of (0, 1);
[0092] The prediction module is specifically used for:
[0093] The entity vector and relationship vector generated by the optimization module are used as the initial input of the graph convolutional neural network model; the graph convolutional neural network is designed; the information of the directly adjacent entities of the central entity and the edge information connecting the central entity and the adjacent entities are learned at the same time, and the structural information of the knowledge graph is learned using the graph convolutional neural network;
[0094] The entity vector and relationship vector generated by the optimization module are integrated into the graph convolutional neural network model using the following formula to make full use of the semantic information contained in the knowledge graph:
[0095] e h =e t -e r
[0096] where e h 、e t 、e r Respectively represent the vector representation of the head entity, tail entity, and relationship in the d-dimensional continuous space;
[0097] Using the entity vector and relationship vector obtained by the optimization module and the entity type vector obtained by the second vectorization module, the graph convolutional neural network GCN is used to update the vector representation of related entities and relationships to obtain the final knowledge point prediction result.
[0098] Compared with the prior art, the present invention has the following beneficial effects:
[0099] The present invention utilizes the entity type information existing in the graph and relies on the structural information of the knowledge graph itself to perform vector representation of knowledge points in the field of education, which improves the embedding representation learning performance of the knowledge graph to a certain extent and has better performance in knowledge applications in the field of education calculated based on continuous numerical vector space.
[0100] Through the represented knowledge point vectors (i.e., the final updated entity vectors and relationship vectors), link predictions can be made for related knowledge points, which helps to derive the correlation between different knowledge points in the field of education. By analyzing the correlation between knowledge points through vector representation, the knowledge points of the initially constructed knowledge graph in the field of education can be supplemented, the knowledge point triplets that are not yet included in the knowledge graph can be predicted, and a complete knowledge graph in the field of education can be established. BRIEF DESCRIPTION OF THE DRAWINGS
[0101] Figure 1 This is a basic flow chart of a joint knowledge point prediction method in the field of education based on graph convolutional neural network and type embedding according to an embodiment of the present invention;
[0102] Figure 2 This is a schematic diagram of the architecture of a joint knowledge point prediction system in the education field based on graph convolutional neural network and type embedding according to an embodiment of the present invention. DETAILED DESCRIPTION
[0103] The present invention will be further explained below with reference to the accompanying drawings and specific embodiments:
[0104] like Figure 1 As shown, a joint knowledge point prediction method in the field of education based on graph convolutional neural network and type embedding includes:
[0105] Step S101: constructing a corpus of educational course knowledge points using the BERT model, and constructing a set of triples of educational course knowledge points;
[0106] Step S102: Using the TransE model as a triple encoder, the constructed set of triples of educational course knowledge points is input into the TransE model (i.e., entities and relationships are embedded into a d-dimensional continuous vector space), and the entities and relationships in the triple set are represented by vectors through the TransE model to obtain entity vectors and relationship vectors corresponding to the triple set;
[0107] Step S103: inputting the constructed education field course knowledge point triple set into the triple entity type encoder, and performing vector representation on the types of entities in the triple set by the triple entity type encoder to obtain an entity type vector;
[0108] Step S104: Optimizing the entity vector and relationship vector obtained by the TransE model through the entity type vector;
[0109] Step S105: Input the entity vector and relationship vector obtained in step S104 into the graph convolutional neural network for representation learning, and obtain the entity vector and relationship vector corresponding to the final updated course knowledge point triple;
[0110] Step S106: Perform link prediction on the associated knowledge points using the entity vector and relationship vector obtained in step S105.
[0111] The present invention first performs vector representation on entities and relationships, then optimizes entity and relationship vectors by entity type, and uses the two as the original input of the graph convolutional neural network for representation learning to obtain the final entity vector and relationship vector. Compared with the previous method of randomly initializing the original input of the graph convolutional neural network, the model does not start from scratch, but is learned based on known information, which is conducive to more accurate final representation results.
[0112] Furthermore, the step S101 includes:
[0113] S101.1: Collect corpus in the field of education;
[0114] S101.2: Segment the collected corpus to obtain a word set and construct an education corpus;
[0115] S101.3: Counting the distribution of words in the corpus, and selecting words from the word set based on the distribution results, generating a custom dictionary, and constructing knowledge point triples;
[0116] S101.4: Divide entities based on the text in the constructed education domain corpus, extract the corresponding relationships between entities, and store the defined data in the form of triples for subsequent steps.
[0117] Furthermore, the step S102 includes:
[0118] The knowledge graph is stored in the form of triples. In order to convert it into a form that can be understood by computers for subsequent optimization, it is necessary to learn the representation of entities and relationships. Before learning, the entities and relationships are vectorized.
[0119] Step S102.1: randomly generate vector representations of the triple's head entity, relationship, and tail entity; represent the triple as (h, r, t), where h is the head entity, t is the tail entity, and the relationship r is regarded as a transformation operation from the head entity to the tail entity.
[0120] Step S102.2: Based on the idea that a relationship is a conversion operation between a head entity and a tail entity, the following formula is used to randomly generate negative sample data (h′, r′, t′):
[0121] T′={(h′,r′,t′)|h′∈E}∪{(h,r′,t)|r′∈R}∪{(h,r,t′)|t′∈E};
[0122] Among them, E and R represent the entity set and relationship set of the knowledge graph respectively; T is the set of positive sample triplets; T′ is the set of negative sample triplets, which is obtained by randomly replacing the head entity or tail entity or relationship of the positive sample triples.
[0123] Step S102.3: Obtain the triple energy function value E1(h, r, t), which is used to subsequently construct a loss function to optimize the entity vector and relationship vector:
[0124] E1(h,r,t)=||e h +e r -e t ||;
[0125] Among them, e h ,e r ,e t Represent the vector representation of the head entity, relation, and tail entity respectively.
[0126] Furthermore, the step S103 includes:
[0127] Step S103.1: In the given triple, entity e and its associated relation r, learn the vector representation of type and relation, so as to obtain important information of type representation. In the triple entity type encoder, the learned type feature function is expressed as follows:
[0128] f at (v,r)=M r y v
[0129] Among them, y v Represents the type representation of entity v (v can be the head entity or the tail entity) in the d-dimensional continuous vector space; M r is the linear transformation matrix of the relation r. The parameters of this matrix are initially randomly generated. By iteratively updating the parameters, this matrix can select the latent information of each embedding type that is most relevant to the associated relationship.
[0130] Through the above formula, the triple energy function is defined as follows:
[0131] y h,r =f at (h,r),y t,r =f at (t,r)
[0132] E2(h,r,t)=||y h,r +y r -y t,r ||
[0133] where y h,r ,y t,r Respectively represent the entity vectors of the head entity h and the tail entity t represented by the relationship r; y r is the vector representation of the relationship in the type triple; for y h,r ,y t,r ,y r , the expected result should satisfy the following equation:
[0134] y h,r +y r =y t,r
[0135] Step S103.2: constraining the type vector (embedding) by similarity;
[0136] The type representation learned in step S103 should be limited by the similarity constraint of the entity type, so as to restrict the entity type and make the entity type representation more accurate. Therefore, entities with the same relationship should have more similar embedding representations. Therefore, for two triples with the same relationship, the following formula should be satisfied:
[0137] y h1,r =y h2,r ,y t1,r =y t2,r
[0138] where y h1,rand h2,r They are the type vector representations of the two triple head entities under relation r, y t1,r and t2,r They are the type vector representations of the two triple tail entities under relation r.
[0139] Further considering that these two triplets should satisfy E2(h1,r,t1)=E2(h2,r,t2).
[0140] Since the triple relationship between the two is the same, the value of the above formula should be 0 or close to 0.
[0141] Specifically, the step S104 includes:
[0142] By optimizing the triple entity vector, relationship vector, and entity type vector generated above, the feature vector of the original input of the graph convolutional neural network is obtained. The optimization method is as follows:
[0143]
[0144]
[0145] L2=max(γ2+E2(h,r,t)-E2(h′,r′,t′),0)
[0146] The final result is e h 、e t 、e r , respectively represent the representation of the head entity, tail entity, and relationship in the d-dimensional continuous vector space; γ, γ1, γ2 are hyperparameters with a value range of (0, 1).
[0147] Specifically, the step S105 includes:
[0148] Step S105.1: Input the initial feature vector of the graph convolutional neural network
[0149] The entity vector and relationship vector generated in step S104 are used as the initial input of the graph convolutional neural network model. A graph convolutional neural network is designed, including an input layer and two hidden layers. The hidden layers simultaneously learn the information of the directly adjacent entities of the central entity v and the edge information connecting the central entity and the adjacent entities. The graph convolutional neural network is used to learn the structural information of the knowledge graph;
[0150] Step S105.2: The traditional graph convolutional neural network only considers the information of the nodes in the graph and ignores the information of the edges in the graph. In order to make full use of the information of the edges in the graph, the entity vector and relationship vector generated in step S104 are fused into the graph convolutional neural network model using the following formula to make full use of the semantic information contained in the knowledge graph:
[0151] e h =e t -e r
[0152] where e h 、e t 、e r They respectively represent the vector (embedding) representation of the head entity, tail entity, and relationship in the continuous space.
[0153] Step S105.3: Using the entity vector and relationship vector obtained in step S104 and the type representation vector generated in step S103, the vector representations of the relevant entities and relationships are updated through GCN to obtain the final knowledge point prediction result;
[0154] The formula for updating the head entity representation vector in the first layer of the GCN network is as follows:
[0155]
[0156] The formula for updating the tail entity representation vector in the second layer of the GCN network is as follows:
[0157]
[0158] Where N(h) is the set of adjacent entities of the head entity h; N(t) is the set of adjacent entities of the tail entity t; h ,e t ,e r is the result of step S104; by executing the operation of step S105.2, W λ(r) is the weight matrix of the graph convolutional neural network, λ(r) indicates that the weight matrix is about the relationship r, and subtraction operations are performed on the central entity, the adjacent entity, and the relationship between the two, so that the graph convolutional network can utilize the edge information in the graph; e h is the updated entity vector of node h.
[0159] Therefore, after the above transformation, the final relationship vector representation can be obtained, and the formula is as follows:
[0160]
[0161] M r is a linear transformation matrix that maps all relationships into the same continuous vector space and uses the representation vector in the next layer of GCN; e r is the initial relationship vector generated in step S103.
[0162] For the second layer of GCN network, the neural network layer can use the following formula to update the head entity h:
[0163]
[0164] The tail entity update formula is as follows:
[0165]
[0166] The second layer of the GCN network uses the same relationship vector representation as follows:
[0167]
[0168] The entity and relationship vectors generated after the second layer of graph convolutional neural network are the representation vectors of the final triple head entity, tail entity, and relationship.
[0169] Furthermore, the step S106 includes: analyzing the association of knowledge points through vector representation, supplementing the knowledge points of the initially constructed education field knowledge graph, predicting knowledge point triplets that are not yet included in the knowledge graph, and establishing a complete education field knowledge graph.
[0170] Based on the above embodiments, Figure 2 As shown, the present invention also proposes a joint knowledge point prediction system in the field of education based on graph convolutional neural network and type embedding, including:
[0171] A triple construction module 201 is used to construct a corpus of educational course knowledge points using a BERT model, and to construct a triple set of educational course knowledge points;
[0172] The first vectorization module 202 is used to use the TransE model as a triple encoder, input the constructed education field course knowledge point triple set into the TransE model, and use the TransE model to vectorize the entities and relationships in the triple set to obtain the entity vector and relationship vector corresponding to the triple set;
[0173] The second vectorization module 203 is used to input the constructed education field course knowledge point triple set into the triple entity type encoder, and use the triple entity type encoder to vectorize the type of the entity in the triple set to obtain an entity type vector;
[0174] An optimization module 204, configured to optimize the entity vector and the relationship vector obtained by the TransE model through the entity type vector;
[0175] An updating module 205 is used to input the entity vector and relationship vector obtained by the optimization module 204 into the graph convolutional neural network for representation learning, and obtain the entity vector and relationship vector corresponding to the final updated course knowledge point triple;
[0176] The knowledge point link prediction module 206 is used to perform link prediction on the associated knowledge points through the entity vector and relationship vector obtained by the step updating module 205.
[0177] Furthermore, the triplet building module 201 is specifically used for:
[0178] Collect corpus in the field of education;
[0179] Segment the collected corpus to obtain a word set and construct a corpus in the field of education;
[0180] Counting the distribution of words in the corpus, and selecting words from the word set based on the distribution results, generating a custom dictionary, and constructing knowledge point triples;
[0181] According to the text in the constructed education field corpus, entities are divided, the corresponding relations between entities are extracted, and the defined data are stored in the form of triples for subsequent steps.
[0182] Furthermore, the first vectorization module 202 is specifically used for:
[0183] Randomly generate vector representations of the head entity, relationship, and tail entity of a triple, and represent the triple as (h, r, t), where h is the head entity, t is the tail entity, and relationship r is regarded as a transformation operation from the head entity to the tail entity;
[0184] Use the following formula to randomly generate negative sample data (h′, r′, t′):
[0185] T′={(h′,r′,t′)|h′∈E}∪{(h,r′,t)|r′∈R}∪{(h,r,t′)|t′∈E}
[0186] Where E and R represent the entity set and relationship set of the knowledge graph respectively; T is the set of positive sample triples; T′ is the set of negative sample triples, which is obtained by randomly replacing the head entity, tail entity or relationship of the positive sample triples;
[0187] The triple energy function value E1(h, r, t) is obtained, which is used to subsequently construct the loss function to optimize the entity vector and relationship vector:
[0188] E1(h,r,t)=||e h +e r -e t ||
[0189] Among them, e h ,e r ,e t Represent the vector representation of the head entity, relation, and tail entity respectively.
[0190] Furthermore, the second vectorization module 203 is specifically used for:
[0191] In the triple entity type encoder, the entity type is represented and learned according to the following type feature function:
[0192] f at (v,r)=M r y v
[0193] Among them, y v represents the type representation of entity v in d-dimensional continuous vector space, M r is the linear transformation matrix of relation r;
[0194] Through the type characteristic function, the triple energy function E2(h,r,t) is defined as the following formula:
[0195] y h,r =f at (h,r),y t,r =f at (t,r)
[0196] E2(h,r,t)=||y h,r +y r -y t,r ||
[0197] where y h,r ,y t,r Respectively represent the entity vectors of the head entity h and the tail entity t represented by the relationship r; y r is the vector representation of the relationship in the triple; and y h,r +y r =y t,r ;
[0198] Constrain the type vector by similarity;
[0199] For two triplets with the same relationship, the following formula should be satisfied:
[0200] y h1,r =y h2,r ,y t1,r =y t2,r
[0201] E2(h1,r,t1)=E2(h2,r,t2)
[0202] where y h1,r and h2,r They are the type vector representations of the two triple head entities under relation r, y t1,r and t2,r They are the type vector representations of the two triple tail entities under relation r.
[0203] Furthermore, in the optimization module 204, the optimization method is as follows:
[0204]
[0205]
[0206] L2=max(γ2+E2(h,r,t)-E2(h′,r′,t′),0)
[0207] The final result is e h 、e t 、e r , respectively represent the representation of the head entity, tail entity, and relationship in the d-dimensional continuous vector space; γ, γ1, γ2 are hyperparameters with a value range of (0, 1).
[0208] Furthermore, the prediction module 205 is specifically used for:
[0209] The entity vector and the relationship vector generated by the optimization module 204 are used as the initial input of the graph convolutional neural network model; the graph convolutional neural network is designed; the information of the directly adjacent entities of the central entity and the edge information connecting the central entity and the adjacent entities are learned at the same time, and the structural information of the knowledge graph is learned by using the graph convolutional neural network;
[0210] The entity vector and relationship vector generated by the optimization module 204 are integrated into the graph convolutional neural network model using the following formula to fully utilize the semantic information contained in the knowledge graph:
[0211] e h =e t -e r
[0212] where e h 、e t 、e r Respectively represent the vector representation of the head entity, tail entity, and relationship in the d-dimensional continuous space;
[0213] Using the entity vector and relationship vector obtained by the optimization module 204 and the entity type vector obtained by the second vectorization module 203, the graph convolutional neural network GCN is used to update the vector representation of related entities and relationships to obtain the final knowledge point prediction result.
[0214] Furthermore, the knowledge point link prediction module 206 is specifically used to: analyze the association of knowledge points through vector representation, supplement the knowledge points of the initially constructed education field knowledge graph, predict the knowledge point triples that are not yet included in the knowledge graph, and establish a complete education field knowledge graph.
[0215] In summary, the present invention utilizes the entity type information existing in the graph and relies on the structural information of the knowledge graph itself to perform vector representation of knowledge points in the field of education, which improves the embedding representation learning performance of the knowledge graph to a certain extent, and has better performance in knowledge applications in the field of education calculated based on continuous numerical vector space.
[0216] Through the represented knowledge point vectors (i.e., the final updated entity vectors and relationship vectors), link predictions can be made for related knowledge points, which helps to derive the correlation between different knowledge points in the field of education. By analyzing the correlation between knowledge points through vector representation, the knowledge points of the initially constructed knowledge graph in the field of education can be supplemented, the knowledge point triplets that are not yet included in the knowledge graph can be predicted, and a complete knowledge graph in the field of education can be established.
[0217] The above is only a preferred embodiment of the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the principle of the present invention. These improvements and modifications should also be regarded as within the scope of protection of the present invention.
Claims
1. A joint knowledge point prediction method in the field of education based on graph convolutional neural network and type embedding, It is characterized in that include: Step 1: Use the BERT model to build a corpus of educational course knowledge points and a set of triples of educational course knowledge points; Step 2: Use the TransE model as a triple encoder, input the constructed triple set of education field course knowledge points into the TransE model, use the TransE model to vectorize the entities and relationships in the triple set, and obtain the entity vector and relationship vector corresponding to the triple set; Step 3: Input the constructed education field course knowledge point triple set into the triple entity type encoder, and use the triple entity type encoder to vectorize the type of the entity in the triple set to obtain an entity type vector; Step 4: Optimize the entity vector and relationship vector obtained by the TransE model through the entity type vector; Step 5: Input the entity vector and relationship vector obtained in step 4 into the graph convolutional neural network for representation learning to obtain the entity vector and relationship vector corresponding to the final updated course knowledge point triple; Step 6: Use the entity vector and relationship vector obtained in step 5 to perform link prediction on the associated knowledge points.
2. According to claim 1, the method for joint knowledge point prediction in the field of education based on graph convolutional neural network and type embedding, It is characterized in that The step 1 comprises: Step 1.1: Collect educational corpus; Step 1.2: Segment the collected corpus to obtain a word set and construct an education corpus; Step 1.3: Counting the distribution of words in the corpus, and selecting words from the word set based on the distribution results, generating a custom dictionary, and constructing knowledge point triples; Step 1.4: Divide entities according to the text in the constructed education domain corpus, extract the corresponding relationships between entities, and store the defined data in the form of triples for subsequent steps.
3. According to claim 1, the method for joint knowledge point prediction in the field of education based on graph convolutional neural network and type embedding, It is characterized in that The step 2 comprises: Step 2.1: Randomly generate vector representations of the head entity, relationship, and tail entity of the triple, and represent the triple as (h, r, t), where h is the head entity, t is the tail entity, and the relationship r is regarded as a transformation operation from the head entity to the tail entity; Step 2.2: Randomly generate negative sample data (h′, r′, t′) using the following formula: T′={(h′, r′, t′)|h′∈E}∪{(h, r′, t)|r′∈R}∪{(h, r, t′)|t′∈E} Where E and R represent the entity set and relationship set of the knowledge graph respectively; T is the set of positive sample triples; T′ is the set of negative sample triples, which is obtained by randomly replacing the head entity, tail entity or relationship of the positive sample triples; Step 2.3: Obtain the triple energy function value E 1 (h, r, t), which is used to construct the loss function for optimizing entity vectors and relationship vectors: E 1 (h,r,t)=||e h +e r -e t || Among them, e h , e r , e t Represent the vector representation of the head entity, relation, and tail entity respectively.
4. According to claim 3, the method for joint knowledge point prediction in the field of education based on graph convolutional neural network and type embedding, It is characterized in that The step 3 comprises: Step 3.1: In the triple entity type encoder, the entity type is represented and learned according to the following type feature function: f at (v,r)=M r y v Among them, y v represents the type representation of entity v in d-dimensional continuous vector space, M r is the linear transformation matrix of relation r; Through the type characteristic function, the triple energy function E 2 (h, r, t) is defined as follows: y h,r =f at (h,r),y t,r =f at (t,r) E 2 (h,r,t)=||y h,r +y r -y t,r || where y h,r ,y t,r Respectively represent the entity vectors of the head entity h and the tail entity t represented by the relationship r; y r is the vector representation of the relationship in the triple; and y h,r +y r =y t,r ; Step 3.2: Constrain the type vector by similarity; For two triplets with the same relationship, the following formula should be satisfied: and h1,r =and h2,r ,and t1,r =and t2,r E 2 (h 1 ,r,t 1 )=E 2 (h 2 ,r,t 2 ) where y h1,r and h2,r They are the type vector representations of the two triple head entities under relation r, y t1,r and t2,r They are the type vector representations of the two triple tail entities under relation r.
5. According to claim 4, the method for joint knowledge point prediction in the field of education based on graph convolutional neural network and type embedding, It is characterized in that In step 4, the optimization method is as follows: L 2 =max(γ 2 +E 2 (h,r,t)-E 2 (h′,r′,t′),0) The final result is e h 、e t 、e r , respectively represent the representation of the head entity, tail entity, and relationship in the d-dimensional continuous vector space; γ, γ 1 , γ 2 It is a hyperparameter, and its value range is between (0, 1).
6. The method for joint knowledge point prediction in the field of education based on graph convolutional neural network and type embedding according to claim 1, It is characterized in that The step 5 comprises: Step 5.1: Use the entity vector and relationship vector generated in step 4 as the initial input of the graph convolutional neural network model; design the graph convolutional neural network; simultaneously learn the information of the directly adjacent entities of the central entity, as well as the edge information connecting the central entity and the adjacent entities, and use the graph convolutional neural network to learn the structural information of the knowledge graph; Step 5.2: Use the following formula to fuse the entity vector and relationship vector generated in step 4 into the graph convolutional neural network model to make full use of the semantic information contained in the knowledge graph: And h =and t -And r where e h 、e t 、e r Respectively represent the vector representation of the head entity, tail entity, and relationship in the d-dimensional continuous space; Step 5.3: Using the entity vector and relationship vector obtained in step 4, and the entity type vector obtained in step 3, update the vector representation of related entities and relationships through the graph convolutional neural network GCN to obtain the final knowledge point prediction result.
7. A joint knowledge point prediction system in the field of education based on graph convolutional neural network and type embedding, It is characterized in that include: The triple construction module is used to construct a corpus of course knowledge points in the field of education using the BERT model and to construct a set of triples of course knowledge points in the field of education; The first vectorization module is used to use the TransE model as a triple encoder, input the constructed education field course knowledge point triple set into the TransE model, and use the TransE model to vectorize the entities and relationships in the triple set to obtain the entity vector and relationship vector corresponding to the triple set; The second vectorization module is used to input the constructed education field course knowledge point triple set into the triple entity type encoder, and use the triple entity type encoder to vectorize the type of the entity in the triple set to obtain an entity type vector; The optimization module is used to optimize the entity vectors and relationship vectors obtained by the TransE model through the entity type vectors; The updating module is used to input the entity vector and relationship vector obtained by the optimization module into the graph convolutional neural network for representation learning, and obtain the entity vector and relationship vector corresponding to the final updated course knowledge point triple; The knowledge point link prediction module is used to perform link prediction on associated knowledge points through the entity vector and relationship vector obtained by the step update module.
8. The joint knowledge point prediction system in the field of education based on graph convolutional neural network and type embedding according to claim 7, It is characterized in that The triple building block is specifically used for: Collect corpus in the field of education; Segment the collected corpus to obtain a word set and construct a corpus in the field of education; Counting the distribution of words in the corpus, and selecting words from the word set based on the distribution results, generating a custom dictionary, and constructing knowledge point triples; According to the text in the constructed education field corpus, entities are divided, the corresponding relations between entities are extracted, and the defined data are stored in the form of triples for subsequent steps.
9. The joint knowledge point prediction system in the field of education based on graph convolutional neural network and type embedding according to claim 8, It is characterized in that The first vectorization module is specifically used for: Randomly generate vector representations of the head entity, relationship, and tail entity of a triple, and represent the triple as (h, r, t), where h is the head entity, t is the tail entity, and relationship r is regarded as a transformation operation from the head entity to the tail entity; Use the following formula to randomly generate negative sample data (h′, r′, t′): T′={(h′, r′, t′)|h′∈E}∪{(h, r′, t)|r′∈R}∪{(h, r, t′)|t′∈E} Where E and R represent the entity set and relationship set of the knowledge graph respectively; T is the set of positive sample triples; T′ is the set of negative sample triples, which is obtained by randomly replacing the head entity, tail entity or relationship of the positive sample triples; Get the triple energy function value E 1 (h, r, t), which is used to construct the loss function for optimizing entity vectors and relationship vectors: E 1 (h,r,t)=||e h +e r -e t || Among them, e h , e r , e t Represent the vector representation of the head entity, relation, and tail entity respectively.
10. The joint knowledge point prediction system in the field of education based on graph convolutional neural network and type embedding according to claim 9, It is characterized in that The second vectorization module is specifically used for: In the triple entity type encoder, the entity type is represented and learned according to the following type feature function: f at (v,r)=M r y v Among them, y v represents the type representation of entity v in d-dimensional continuous vector space, M r is the linear transformation matrix of relation r; Through the type characteristic function, the triple energy function E 2 (h, r, t) is defined as follows: y h,r =f at (h,r),y t,r =f at (t,r) E 2 (h,r,t)=||y h,r +y r -y t,r || where y h,r ,y t,r Respectively represent the entity vectors of the head entity h and the tail entity t represented by the relationship r; y r is the vector representation of the relationship in the triple; and y h,r +y r =y t,r ; Constrain the type vector by similarity; For two triplets with the same relationship, the following formula should be satisfied: and h1,r =and h2,r ,and t1,r =and t2,r E 2 (h 1 ,r,t 1 )=E 2 (h 2 ,r,t 2 ) where y h1,r and h2,r They are the type vector representations of the two triple head entities under relation r, y t1,r and t2,r They are the type vector representations of the two triple tail entities under relation r; In the optimization module, the optimization method is as follows: L 2 =max(γ 2 +E 2 (h,r,t)-E 2 (h′,r′,t′),0) The final result is e h 、e t 、e r , respectively represent the representation of the head entity, tail entity, and relationship in the d-dimensional continuous vector space; γ, γ 1 , γ 2 is a hyperparameter, and its value range is between (0, 1); The prediction module is specifically used for: The entity vector and relationship vector generated by the optimization module are used as the initial input of the graph convolutional neural network model; the graph convolutional neural network is designed; the information of the directly adjacent entities of the central entity and the edge information connecting the central entity and the adjacent entities are learned at the same time, and the structural information of the knowledge graph is learned using the graph convolutional neural network; The entity vector and relationship vector generated by the optimization module are integrated into the graph convolutional neural network model using the following formula to make full use of the semantic information contained in the knowledge graph: And h =and t -And r where e h 、e t 、e r Respectively represent the vector representation of the head entity, tail entity, and relationship in the d-dimensional continuous space; Using the entity vector and relationship vector obtained by the optimization module and the entity type vector obtained by the second vectorization module, the graph convolutional neural network GCN is used to update the vector representation of related entities and relationships to obtain the final knowledge point prediction result.
