Method, device, equipment and storage medium for processing exercise association relationships
By acquiring and constructing the relationships between exercises, chapters, and knowledge points, and using the knowledge graph embedding model to represent data relationships, the problem of insufficient exercise labels is solved, and a more comprehensive knowledge graph construction and adaptive learning effect are achieved.
Patent Information
- Application Number
- CN202110129249.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-01-29
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2041-01-29
AI Technical Summary
The existing technology has problems such as insufficient comprehensiveness in the mining of exercise labels and insufficient comprehensiveness in the association relationships constructed by the knowledge graph, which affects the effect of adaptive learning.
By obtaining exercise data, chapter data and knowledge point data, determining the association relationship between each data, building a comprehensive graph, and using the vector triples of the knowledge graph embedding model to represent these relationships, the chapter and knowledge point data associated with the exercise data are determined based on the preset link prediction rules.
It achieves a more comprehensive knowledge graph construction, can accurately label the chapters and knowledge points of exercises, improve the effect of adaptive learning, and support the rapid knowledge expansion of new exercise data.
Smart Images

Figure CN114817552B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of adaptive learning technology, and in particular to a method, apparatus, device, and storage medium for processing exercise association relationships. Background Art
[0002] In recent years, the online education industry has experienced rapid growth, with the emergence of a large number of products focused on adaptive learning. These products aim to achieve adaptive learning through the combination of big data and artificial intelligence, by diagnosing students' learning levels and recommending appropriate exercises. A common adaptive learning technology involves constructing a knowledge graph for exercises, knowledge points, and chapters. Using the rich information in the knowledge graph, students' behavior and exercise records are modeled, and the recommended exercises are determined based on the reasoning capabilities of the knowledge graph. This technical solution requires addressing two issues: the mining of exercise labels and the construction of a knowledge graph.
[0003] The inventors have found that both the exercise label mining scheme and the knowledge graph construction scheme in the prior art have some problems. For the existing exercise label mining scheme, the exercise label type mined is single and not comprehensive enough. It only uses the text information of the question, while the actual exercise may have other label information such as chapters. These labels actually play a very important role in predicting the final knowledge points. Losing this part of the data may affect the final effect. In addition, an exercise is often associated with multiple labels. For example, an exercise may test multiple knowledge points and be associated with multiple chapters. General text classification has no way to solve such problems and can only predict one label of one type. For the existing knowledge graph construction scheme, the association relationships it contains are not comprehensive enough. It only looks for the association between knowledge points and knowledge points. In fact, there are certain association relationships between knowledge points and chapters, and between chapters. These association relationships not only help to label the questions, but also help to build a more comprehensive knowledge graph. Summary of the Invention
[0004] The embodiments of the present invention provide a method, device, equipment and storage medium for processing exercise association relationships to solve the problems of incomplete exercise labels and incomplete association relationships during exercise mining and knowledge graph construction, thereby achieving better adaptive learning effects.
[0005] In a first aspect, an embodiment of the present invention provides a method for processing exercise association relationships, comprising:
[0006] Obtain exercise data, chapter data, and knowledge point data, and determine the relationship between the data;
[0007] Construct a comprehensive graph based on the exercise data, chapter data, knowledge point data, and the association relationship between the data, wherein an array consisting of two associated data and the association relationship between them serves as a triple of the comprehensive graph;
[0008] Constructing vector triplets of a knowledge graph embedding model based on the triplets of the comprehensive graph, and training the knowledge graph embedding model based on the vector triplets, wherein the knowledge graph embedding model is used to represent the association relationship between data in the comprehensive graph and data through vectors;
[0009] Based on preset link prediction rules, the chapter data and knowledge point data associated with the exercise data are determined according to the vectors of the exercise data, chapter data and knowledge point data in the knowledge graph embedding model.
[0010] In a second aspect, an embodiment of the present invention provides a device for processing exercise association relationships, comprising:
[0011] The data acquisition module is configured to acquire exercise data, chapter data, and knowledge point data, and determine the association relationship between the data;
[0012] A comprehensive graph construction module is configured to construct a comprehensive graph based on the exercise data, chapter data, knowledge point data, and the association relationship between the data, wherein an array consisting of two associated data and the association relationship between them serves as a triple of the comprehensive graph;
[0013] a knowledge graph construction module configured to construct vector triplets of a knowledge graph embedding model based on the triplets of the comprehensive graph, and train the knowledge graph embedding model based on the vector triplets, wherein the knowledge graph embedding model is used to represent the association relationship between data in the comprehensive graph and data through vectors;
[0014] The exercise tag mining module is configured to determine the chapter data and knowledge point data associated with the exercise data based on the vectors of the exercise data, chapter data and knowledge point data in the knowledge graph embedding model based on preset link prediction rules.
[0015] In a third aspect, an embodiment of the present invention provides an electronic device, including:
[0016] memory and one or more processors;
[0017] a memory for storing one or more programs;
[0018] When one or more programs are executed by one or more processors, the one or more processors implement the method for processing exercise association relationships according to the first aspect.
[0019] In a fourth aspect, an embodiment of the present invention provides a storage medium comprising computer-executable instructions, which, when executed by a computer processor, are used to execute the method for processing exercise association relationships according to the first aspect.
[0020] The embodiment of the present invention obtains exercise data, chapter data and knowledge point data to determine the association relationship between each data; constructs a comprehensive graph based on the exercise data, chapter data, knowledge point data and the association relationship between the data, wherein the array composed of the two associated data and the association relationship between them is used as a triple of the comprehensive graph; constructs a vector triple of the knowledge graph embedding model based on the triple of the comprehensive graph, and trains the knowledge graph embedding model based on the vector triple, the knowledge graph embedding model is used to represent the data in the comprehensive graph and the association relationship between the data through vectors; based on the preset link prediction rules, according to the vectors of the exercise data, chapter data and knowledge point data in the knowledge graph embedding model, the chapter data and knowledge point data associated with the exercise data are determined. Through the above technical means, the relationship between the data in the comprehensive graph and each data is represented by the vector of the knowledge graph embedding model, so that the chapters and knowledge points associated with the exercises can be determined based on the vectors in the knowledge graph embedding model according to the link prediction rules, so as to realize the annotation of chapter labels and knowledge point labels for unlabeled exercises. In addition to identifying the chapters and knowledge points associated with exercises, it also identifies relationships between knowledge points, between chapters, and between chapters and knowledge points, building a more detailed and comprehensive knowledge graph for better adaptive learning. For newly added exercise data, the structure of the knowledge graph embedding model can be quickly adjusted based on its new exercise node vectors and new relationship vectors. The newly added exercise data is represented by vectors in the knowledge graph embedding model, realizing the knowledge expansion function of the knowledge graph embedding model. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 This is a flow chart of a method for processing exercise association relationships provided by the first embodiment of the present invention;
[0022] Figure 2 It is an optional specific acquisition flow chart of data and data relationships;
[0023] Figure 3 It is an optional specific construction flow chart for the comprehensive map.
[0024] Figure 4 It is a schematic diagram of the comprehensive map;
[0025] Figure 5 It is an optional construction flow chart of vector triples;
[0026] Figure 6 It is an optional specific training flowchart for the knowledge graph embedding model;
[0027] Figure 7 It is an optional specific annotation flow chart for the chapter and knowledge point labels of the exercises;
[0028] Figure 8 This is a flow chart of a method for processing exercise association relationships provided by the second embodiment of the present invention;
[0029] Figure 9 This is a flowchart of a method for processing exercise association relationships provided by Example 3 of the present invention.
[0030] Figure 10 1 is a schematic diagram of the structure of a device for processing exercise association relationships provided by a fourth embodiment of the present invention;
[0031] Figure 11 This is a structural diagram of an electronic device provided in Example 5 of the present invention. DETAILED DESCRIPTION
[0032] In order to make the purpose, technical solutions and advantages of the present application clearer, the specific embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. It is understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. It should also be noted that, for ease of description, only parts related to the present application, not all of the contents, are shown in the accompanying drawings. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow charts describe each operation (or step) as a sequential process, many of the operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of the operations can be rearranged. The process can be terminated when its operation is completed, but can also have additional steps not included in the accompanying drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.
[0033] The method, apparatus, device and storage medium for processing exercise association relationships provided by the embodiments of the present invention are designed to obtain exercise data, chapter data and knowledge point data to determine the association relationships between each data; construct a comprehensive graph based on the exercise data, chapter data, knowledge point data and the association relationships between the data, wherein an array consisting of two associated data and the association relationships between them is used as a triple of the comprehensive graph; construct a vector triple of a knowledge graph embedding model based on the triple of the comprehensive graph, and train the knowledge graph embedding model based on the vector triple, wherein the knowledge graph embedding model is used to represent the data in the comprehensive graph and the association relationships between the data through vectors; based on the preset link prediction rules, the chapter data and knowledge point data associated with the exercise data are determined based on the vectors of the exercise data, chapter data and knowledge point data in the knowledge graph embedding model. Compared with the traditional exercise label mining solution, which only uses the text information of the question, some valid data may be lost, thereby affecting the final effect, and it can only predict one label of one type. Compared with the traditional knowledge graph construction scheme, which only searches for the relationship between knowledge points, there are actually certain relationships between knowledge points and chapters, and between chapters. These relationships not only help to label questions, but also help to build a more comprehensive knowledge graph. Based on this, the embodiment of the present invention proposes a method, device, equipment and storage medium for processing exercise relationships to solve the problem of insufficient exercise labels and insufficient relationship when mining exercises and constructing knowledge graphs, so as to achieve better adaptive learning effects.
[0034] Example 1
[0035] Figure 1 This is a flow chart of a method for processing exercise association relationships provided in Example 1 of the present invention. The method for processing exercise association relationships provided in this embodiment can be executed based on an exercise association relationship processing device. The exercise association relationship processing device can be implemented via software or hardware and can be composed of two or more physical entities or a single physical entity.
[0036] For ease of understanding, the embodiment is described exemplarily by taking the exercise association relationship processing device as the execution subject of the exercise association relationship processing method.
[0037] Specifically, refer to Figure 1 The method for processing exercise association relationships provided by the embodiment of the present invention includes:
[0038] S110: Obtain exercise data, chapter data, and knowledge point data, and determine the association relationship between the data.
[0039] Specifically, a large amount of exercise data, chapter data and knowledge points are collected in advance, and the chapter labels and knowledge point labels of the exercise data, the chapter labels and knowledge point labels of the chapter data, and the knowledge point labels and knowledge labels of the knowledge point data are manually marked. The labels of some exercise data may only contain chapter labels or knowledge point labels, or even some exercise data have no labels, and the chapter data and knowledge point labels may not be complete. Based on this, a knowledge graph embedding model can be constructed based on the existing data and data relationships, and the data and data relationships are represented by the vectors of the knowledge graph embedding model. Based on the link prediction rules, more relationships between the vectors in the knowledge graph embedding model can be obtained, thereby improving the labels of the exercise data, chapter data and knowledge point data. Among them, the knowledge graph embedding model is a method for solving the knowledge graph completion problem. It embeds the entities and relationships in the knowledge graph into a continuous vector space, thereby retaining the structural information in the knowledge graph while facilitating the calculation of entity relationships.
[0040] To build a knowledge graph embedding model, we first need to obtain existing data and data relationships. For example, refer to Figure 2 , Figure 2 It is an optional specific acquisition flow chart of data and data relationships. Figure 2 As shown, the data and data relationship acquisition process includes:
[0041] S1101, obtaining initial exercise data in a database, and determining similar exercise data to the initial exercise data;
[0042] S1102, obtaining chapter data and knowledge point data in the database;
[0043] S1103, determining the association relationship between the initial exercise data and the similar exercise data and the chapter data or knowledge point data based on the chapter labels or knowledge point labels of the initial exercise data and the similar exercise data;
[0044] S1104 : Determine association relationships between chapter data, between knowledge point data, and between chapter data and knowledge point data based on chapter tags or knowledge point tags of chapter data and chapter tags or knowledge point tags of knowledge point data.
[0045] Exemplarily, the first exercise data is obtained from the database, the similarity between the first exercise data and other exercise data is calculated, and the exercise data that reaches the preset similarity threshold is used as the first exercise data. The similar exercise data is used as the next exercise data to be processed, and the similarity between the exercise data and the exercise data other than the first exercise data is calculated to determine the similar exercise data of the exercise data, thereby gradually determining the similarity relationship between all exercise data in the database. Further, the chapter data and knowledge point data are obtained from the database, and based on the labels of the chapter data and knowledge point data, the association relationship between all chapter data in the database, all knowledge point data, and between chapter data and knowledge point data is determined. Based on the chapter labels and knowledge point labels of the exercise data, the association relationship between the exercise data in the database and the chapter data and knowledge point data in the database is determined. It can be understood that the above-mentioned association relationship between all chapter data, the association relationship between all knowledge point data, and the association relationship between chapter data and knowledge point data refer to data relationships that can be determined based on the labels of the current data, while data relationships that cannot be determined by labels are temporarily unavailable and need to be obtained through the vectors of the subsequent knowledge graph embedding model.
[0046] S120. Construct a comprehensive graph based on the exercise data, chapter data, knowledge point data, and the association relationship between the data, wherein an array consisting of two associated data and the association relationship between them serves as a triple of the comprehensive graph.
[0047] Specifically, refer to Figure 3 , Figure 3 It is an optional specific construction flow chart of the comprehensive map. Figure 3 As shown in Figure 2, the comprehensive map construction process includes:
[0048] S1201, constructing an entity layer graph based on the exercise data, similar exercise data, and the similarity relationship between the two;
[0049] S1202: Construct an ontology layer graph based on the chapter data and knowledge point data, and the association relationships between chapter data, between knowledge point data, and between chapter data and knowledge point data;
[0050] S1203. According to the association relationship between exercise data and chapter data, and the association relationship between exercise data and knowledge point data, the exercise data in the entity layer is associated with the corresponding chapter data and knowledge point data in the ontology layer to obtain a comprehensive graph.
[0051] Exemplary, reference Figure 4 , Figure 4 It is a schematic diagram of the comprehensive map. Figure 4As shown, chapter data and knowledge point data are set in the ontology layer graph, and the nodes of the ontology layer graph are used to represent chapter data and knowledge data. The edges between two nodes in the ontology layer graph represent the similarity or superior-subordinate relationship between chapter data, the subordinate relationship between knowledge point data, and the correlation between knowledge point data and chapter data. Exercise data are set in the entity layer graph, and the nodes of the entity layer graph represent exercise data, and the edges between two nodes in the entity layer graph represent the similarity relationship between exercise data. Furthermore, based on the association relationship between exercise data in the database and chapter data and knowledge point data in the database, the exercise nodes in the entity layer graph are connected to the chapter nodes and knowledge point nodes in the ontology layer, forming edges between the entity layer nodes and the ontology layer nodes, thereby constructing the entity layer and the ontology layer into a whole to obtain a comprehensive graph. The comprehensive graph describes in detail the database's exercise data, chapter data, knowledge point data, and the relationships between each data. The triples of the comprehensive graph can be understood as the unit data groups that constitute the entire comprehensive graph. The triples are composed of two associated data in the comprehensive graph and the association relationship between them, that is, two associated nodes and the edge between them.
[0052] Specifically, the two data associated in the triple may include: exercises and similar exercises in the entity layer, chapters and related chapters in the ontology layer, knowledge points and related knowledge points in the ontology layer, chapters and related knowledge points in the ontology layer, exercises in the entity layer and chapters in the ontology layer, exercises in the entity layer and knowledge points in the ontology layer, and the association relationship is a superior-subordinate relationship, a similar relationship, or a related relationship. For example, Figure 4 As shown, the first-level chapter and the second-level chapter and the similarity between them are a triple, the first-level chapter and the second-level chapter and the subordinate relationship between them are a triple, the first-level knowledge point and the first- and second-level knowledge points and the subordinate relationship between them are a triple, the first exercise and the second-level chapter and the association relationship between them are a triple, the second exercise and the fourth exercise and the similarity between them are a triple, and the third exercise and the first- and third-level knowledge point and the association relationship between them are a triple. Figure 4 The two endpoints of the connection and the connection relationship can form a triple, which will not be repeated here. Figure 4 There are no triples described in .
[0053] S130. Based on the triples of the comprehensive graph, construct vector triplets of the knowledge graph embedding model, and train the knowledge graph embedding model based on the vector triplets. The knowledge graph embedding model is used to represent the data in the comprehensive graph and the association relationship between the data through vectors.
[0054] Since triples in a comprehensive graph can only describe the relationship between data in the database and its corresponding label data, and between exercise data and similar exercise data, the knowledge in the comprehensive graph needs to be completed. To this end, it is necessary to introduce link prediction rules. Based on any two data in the triple, the relationship between the two data can be determined. To determine whether there is a relationship between two data, a knowledge graph embedding model is introduced. The data in the comprehensive graph are represented by vectors in the knowledge graph embedding model, and the similarity between the two vectors is used to determine whether there is a relationship between the two. To this end, it is necessary to build a knowledge graph embedding model and determine the correct node vector for each data in the knowledge graph embedding model.
[0055] First, we need to construct the vector triples of the knowledge graph embedding model based on the data in the comprehensive graph and the relationship between each data. For example, refer to Figure 5 , Figure 5 is an optional construction flow chart for vector triples. Figure 5 As shown in the figure, the vector triplet construction process includes:
[0056] S1301. Based on the data in the comprehensive graph and the association relationships between the data in the comprehensive graph, randomly generate node vectors corresponding to the data and relationship vectors corresponding to the association relationships in the knowledge graph embedding model;
[0057] S1302: Take two associated node vectors and the corresponding relationship vector as a vector triplet.
[0058] For example, Figure 4 The chapter nodes and knowledge nodes in the ontology layer and the exercise nodes in the entity layer correspond to the generated chapter node vectors, knowledge point node vectors and exercise node vectors in the knowledge graph embedding model. Figure 4 The edges between two associated nodes in the entity layer, the edges between two associated nodes in the ontology layer, and the edges between two associated nodes across the entity layer and the ontology layer correspond to the relationship vectors generated in the knowledge graph embedding model.
[0059] Furthermore, the two associated node vectors and the relationship vector between them in the knowledge graph embedding model are treated as vector triplets. Since the vectors in the knowledge graph embedding model are randomly generated, they cannot yet represent the data and data relationships in the comprehensive graph. Therefore, the vector triplets in the knowledge graph embedding model are used as training samples, and the knowledge graph embedding model is trained based on these vector triplets, so that the vectors in the knowledge graph embedding model can represent the data and data relationships in the comprehensive graph.
[0060] Specifically, refer to Figure 6 , Figure 6 It is an optional specific training flow chart for the knowledge graph embedding model. Figure 6 As shown in Figure 2, the knowledge graph embedding model training process includes:
[0061] S1303: Use the vector triples as positive sample triples for the knowledge graph embedding model, and randomly generate multiple negative sample triplets based on each positive sample triple; wherein the relationship vectors of the positive sample triplets in the ontology layer and the entity layer are the same as those of the corresponding negative sample triplets;
[0062] S1304: Calculate the scores of the positive sample triples and the negative sample triples according to the positive sample triples, the negative sample triples, and a preset scoring function;
[0063] S1305. Calculate the result of the loss function based on the scores of the positive sample triples and the negative sample triples, and the preset loss function, and adjust the vector value of the vector in the knowledge graph embedding model based on the result of the loss function.
[0064] Specifically, the score function is f r (h, t) = h T M r t;
[0065] The loss function is
[0066]
[0067]
[0068] Among them, J Intra is the loss function of the positive sample triples within the ontology layer and entity layer, is the loss function of the positive sample triples across the entity layer and the ontology layer, w is the weight coefficient, S1 is the set of positive sample triplets within the ontology layer and the entity layer, S1′ is the set of negative sample triplets corresponding to the positive sample triplets within the ontology layer and the entity layer, h and t are the head node vector and tail node vector of the positive sample triplets within the ontology layer and the entity layer respectively, r is the relationship vector of the positive sample triplets within the ontology layer and the entity layer, M r is the diagonal matrix under the r relation vector, h′ and t′ are the head node vector and tail node vector of the negative sample triple corresponding to the positive sample triple within the ontology layer and the entity layer, γ is the first score threshold, c and e are the head node vector and tail node vector of the positive sample triple across the ontology layer and the entity layer, c′ is the head node vector of the negative sample triple across the positive sample triple across the ontology layer and the entity layer, f CT is a linear mapping function used to map the tail node vector of the positive sample triple across the ontology layer and the entity layer to the vector space of the corresponding head node vector, γ CTis the second score threshold, S2 is the set of positive sample triplets across the entity layer and the ontology layer, |S2| is the total number of positive sample triplets across the entity layer and the ontology layer, [] + Used to limit sample triplets to be substituted into the corresponding loss function for calculation.
[0069] Among them, the plus sign in the lower right corner of the bracket in the loss function formula limits that only the corresponding sample triples can be substituted into the corresponding loss function for calculation. For example, the loss function J Intra It is limited that only the sample triples within the ontology layer or the entity layer can be substituted into the loss function J Intra Calculate the loss function It is limited that only sample triplets across the ontology layer and the entity layer can be substituted into the loss function For calculation, the sample triples include negative sample triples and positive sample triples.
[0070] Exemplarily, assume that the positive sample triple corresponding to the triple consisting of the second exercise and the fourth exercise and the similarity relationship between the two is (h, r, t), h is the node vector of the second exercise, t is the node vector of the fourth exercise, and r is the edge relationship vector between the second exercise and the fourth exercise. According to the positive sample triple (h, r, t), the corresponding negative sample (h′, r, t′) is randomly generated. It can be understood that if the positive sample triple data is expected to be true, the higher the score of the positive sample triple, when the score of the positive sample triple is higher than the score of the negative sample triple by the first score threshold γ, it indicates that the vector of the current positive sample triple is close to the corresponding triple in the comprehensive graph. If the score of the positive sample triple is not higher than the score of the negative sample triple by the first score threshold γ, it indicates that the vector of the current positive sample triple is not yet the correct embedding vector. At this time, it is necessary to introduce the loss function J of the positive sample triple within the ontology layer and the entity layer. Intra , through the loss function J of the positive sample triples within the ontology layer and the entity layer Intra Optimize the structure of the knowledge graph embedding model so that the vectors in the knowledge graph embedding model are closer to the data and data relationships in the comprehensive graph.
[0071] For the positive sample triples across the entity layer and the ontology layer, since the number of nodes in the entity layer is larger than that in the ontology layer, the space sizes represented by the head node vector and the tail node vector in the positive sample triples across the entity layer and the ontology layer are inconsistent, and a linear mapping function f is needed. CT The score between the two can be calculated only after mapping them to the same space. When the score of the positive sample triple across the entity layer and the ontology layer is higher than the score of the negative sample triple by the second score threshold γ CTWhen , it indicates that the vector of the current positive sample triple is close to the corresponding triple in the comprehensive map. If the score of the positive sample triple is not higher than the score of the negative sample triple by the second score threshold γ CT When , it indicates that the vector of the current positive sample triple is not the correct embedding vector. At this time, it is necessary to introduce the loss function of the positive sample triple across the entity layer and the ontology layer. Through the loss function of positive sample triples across the entity layer and the ontology layer Optimize the structure of the knowledge graph embedding model so that the vectors in the knowledge graph embedding model are closer to the data and data relationships in the comprehensive graph.
[0072] It is understandable that during the training process of a knowledge graph embedding model, it is trained based on all positive sample triplets, and each positive sample triplet has a loss. Therefore, when optimizing the parameters of the knowledge graph embedding model through the loss function, the sum of the losses of all positive sample triplets is calculated. Accordingly, after adjusting the parameters of the knowledge graph embedding model, the vector values of the vectors in the positive sample triplets will also change accordingly, and the knowledge graph embedding model will be trained with the changed positive sample triplets until the scores of all positive sample triplets are higher than the scores of negative sample triplets by the corresponding score threshold.
[0073] S140. Based on a preset link prediction rule, and according to the vectors of the exercise data, chapter data, and knowledge point data in the knowledge graph embedding model, determine the chapter data and knowledge point data associated with the exercise data.
[0074] Specifically, the vectors of the knowledge graph embedding model after training can represent the data and data relationships in the comprehensive graph. Based on the node vectors in the knowledge graph embedding model and the link prediction rules, it can be determined whether the exercise data without chapter labels or knowledge point labels in the comprehensive graph is associated with the chapter data and knowledge point data in the comprehensive graph. For example, refer to Figure 7 , Figure 7 It is an optional specific annotation flow chart for the chapter and knowledge point labels of the exercises. Figure 7 As shown in the figure, the process of labeling chapters and knowledge points of exercises includes:
[0075] S1401, obtaining node vectors of exercise data to be marked, where the exercise data to be marked is exercise data without associated chapter data or knowledge point data;
[0076] S1402, obtaining node vectors of all chapter data and knowledge point data, and calculating the similarity between the node vectors of the exercise data to be marked and the node vectors of the chapter data or knowledge point data;
[0077] S1403: If the similarity is less than a preset similarity threshold, the knowledge point data or chapter data is used as the chapter label and knowledge point label of the exercise data to be annotated.
[0078] Exemplarily, obtain an exercise node vector that has no associated chapter node or knowledge point node, obtain all chapter node vectors and knowledge point node vectors in the knowledge graph embedding model, calculate the cosine angle between the exercise node vector and the chapter node vector, and between the exercise node vector and the knowledge point node vector, and evaluate the similarity between the two vectors using the cosine value of the angle between the two vectors to determine whether there is an association between the two. If the cosine angle is less than a preset cosine threshold, it indicates that there is an association between the two, and the chapter data and knowledge point data corresponding to the chapter node vector and the knowledge node vector are used as labels for the node data corresponding to the exercise node vector.
[0079] For example, suppose there is a high school biology exercise in the exercise database: "When cells are in a state of starvation, they can degrade their own biomacromolecules to produce nutrients that the cells urgently need. What organelle might play an active role in this process?" The answer to this exercise is "lysosome," the knowledge point label for this exercise is "Organelle Function," the chapter label for this exercise is "People's Education Edition Chapter 3, Section 2," the parent chapter of "People's Education Edition Chapter 3, Section 2" is "People's Education Edition Chapter 3," and the parent knowledge point of "Organelle Function" is "Basic Cell Structure." Based on the text content and answer content of this exercise, similar exercises in the exercise database are identified, and the section labels and knowledge point labels of the similar exercises are further determined. All exercises in the exercise database and their corresponding similar exercises and section or knowledge point labels are sequentially obtained, and the relationship between chapters and associated chapters, knowledge points and associated knowledge points, and chapters and associated knowledge points are determined. Furthermore, after the knowledge graph embedding model is trained, assume that there is an unlabeled exercise in the exercise database. The node vector of the unlabeled exercise is A, and the node vector of "People's Education Edition Chapter 3 Section 2" is B. The cosine similarity cosθ of the two vectors is given by the dot product and the vector length. The cosine similarity calculation formula is: Among them, A i and B i Represent the components of vectors A and B, respectively. The cosine similarity (cosθ) gives a similarity range of [-1, 1], where -1 means the two vectors point in opposite directions, 1 means they point in exactly the same direction, 0 means they are independent, and values between (0, 1) indicate a certain degree of similarity. Assuming cosθ = 0.8 and a pre-set cosine threshold of 0.7, this indicates that the unlabeled exercise is somewhat related to "People's Education Edition, Chapter 3, Section 2." Therefore, "People's Education Edition, Chapter 3, Section 2" can be used as the section label for the unlabeled exercise.
[0080] In summary, the embodiment of the present invention obtains exercise data, chapter data and knowledge point data to determine the association relationship between each data; constructs a comprehensive graph based on the exercise data, chapter data, knowledge point data and the association relationship between the data, wherein the array composed of the two associated data and the association relationship between them is used as a triple of the comprehensive graph; constructs a vector triple of the knowledge graph embedding model based on the triple of the comprehensive graph, and trains the knowledge graph embedding model based on the vector triple, the knowledge graph embedding model is used to represent the data in the comprehensive graph and the association relationship between the data through the vector; based on the preset link prediction rules, according to the vectors of the exercise data, chapter data and knowledge point data in the knowledge graph embedding model, the chapter data and knowledge point data associated with the exercise data are determined. Through the above technical means, the relationship between the data in the comprehensive graph and each data is represented by the vector of the knowledge graph embedding model, so that the chapters and knowledge points associated with the exercises can be determined based on the vectors in the knowledge graph embedding model according to the link prediction rules, so as to realize the annotation of chapter labels and knowledge point labels for unlabeled exercises.
[0081] Example 2
[0082] Figure 8 This is a flow chart of a method for processing exercise association relationships provided by the second embodiment of the present invention. Figure 8 As shown in FIG, the method for processing the exercise association relationship includes:
[0083] S210: Obtain exercise data, chapter data, and knowledge point data, and determine the association relationship between the data.
[0084] S220. Construct a comprehensive graph based on the exercise data, chapter data, knowledge point data, and the association relationship between the data, wherein an array consisting of two associated data and the association relationship between them serves as a triple of the comprehensive graph.
[0085] S230. Based on the triples of the comprehensive graph, construct vector triplets of the knowledge graph embedding model, and train the knowledge graph embedding model based on the vector triplets. The knowledge graph embedding model is used to represent the data in the comprehensive graph and the association relationship between the data through vectors.
[0086] S240. Based on the preset link prediction rules, and according to the vectors of the exercise data, chapter data, and knowledge point data in the knowledge graph embedding model, determine the chapter data and knowledge point data associated with the exercise data.
[0087] The specific implementation process of steps S210 to S240 can refer to steps S110 to S140.
[0088] S250: Calculate the similarity between the node vectors of two unrelated chapter data. If the similarity is less than a similarity threshold, associate the two chapter data.
[0089] S260: Calculate the similarity between the node vectors of two unrelated knowledge point data. If the similarity is less than a similarity threshold, associate the two knowledge point data.
[0090] S270: Calculate the similarity between the node vectors of the unrelated knowledge point data and chapter data. If the similarity is less than a similarity threshold, associate the knowledge point data with the chapter data.
[0091] Specifically, all chapter node vectors and knowledge point node vectors in the knowledge graph embedding model are obtained, and the cosine angles between the chapter node vectors, between the knowledge point node vectors, and between the chapter node vectors and the knowledge node vectors are calculated. The similarity between the two vectors is evaluated by the cosine value of the angle between the two vectors to determine whether there is an association between the two. If the cosine angle is less than the preset cosine threshold, it indicates that there is an association between the two, and the relationship vector corresponding to the association relationship is added to the knowledge graph embedding model. The embodiment of the present invention completes the relationship vector between two associated node vectors in the knowledge graph embedding model through the link prediction rule.
[0092] In summary, the embodiment of the present invention obtains exercise data, chapter data and knowledge point data to determine the association relationship between each data; constructs a comprehensive graph based on the exercise data, chapter data, knowledge point data and the association relationship between the data, wherein the array composed of the two associated data and the association relationship between them is used as a triple of the comprehensive graph; constructs a vector triple of the knowledge graph embedding model based on the triple of the comprehensive graph, and trains the knowledge graph embedding model based on the vector triple, the knowledge graph embedding model is used to represent the data in the comprehensive graph and the association relationship between the data through the vector; based on the preset link prediction rules, according to the vectors of the exercise data, chapter data and knowledge point data in the knowledge graph embedding model, the chapter data and knowledge point data associated with the exercise data are determined. Through the above technical means, the relationship between the data in the comprehensive graph and each data is represented by the vector of the knowledge graph embedding model, so that the chapters and knowledge points associated with the exercises can be determined based on the vectors in the knowledge graph embedding model according to the link prediction rules, so as to realize the annotation of chapter labels and knowledge point labels for unlabeled exercises. In addition to determining the chapters and knowledge points associated with exercises, you can also determine the relationships between knowledge points, between chapters, and between chapters and knowledge points, building a more detailed and comprehensive knowledge graph to achieve better adaptive learning results.
[0093] Example 3
[0094] Figure 9This is a flow chart of a method for processing exercise association relationships provided by the third embodiment of the present invention. Figure 9 As shown in FIG, the method for processing the exercise association relationship includes:
[0095] S310: Obtain exercise data, chapter data, and knowledge point data, and determine the association relationship between the data.
[0096] S320. Construct a comprehensive graph based on the exercise data, chapter data, knowledge point data, and the association relationship between the data, wherein an array consisting of two associated data and the association relationship between them serves as a triple of the comprehensive graph.
[0097] S330. Based on the triples of the comprehensive graph, construct vector triplets of the knowledge graph embedding model, and train the knowledge graph embedding model based on the vector triplets. The knowledge graph embedding model is used to represent the data in the comprehensive graph and the association relationship between the data through vectors.
[0098] S340. Based on the preset link prediction rules, and according to the vectors of the exercise data, chapter data, and knowledge point data in the knowledge graph embedding model, determine the chapter data and knowledge point data associated with the exercise data.
[0099] The specific implementation process of steps S310 to S340 can refer to steps S110 to S140.
[0100] S350: Acquire the exercise data newly added to the comprehensive graph, and determine the exercise data in the comprehensive graph that is similar to the newly added exercise data.
[0101] S360. According to the newly added exercise data and the similarity relationship between the newly added exercise data and the corresponding similar exercise data, a corresponding new node vector and a new relationship vector are randomly generated in the knowledge graph embedding model.
[0102] S370. Train the knowledge graph embedding model based on the new node vector, the new relationship vector, and the node vector quantity of similar exercises.
[0103] Specifically, when new exercise data needs to be added to the database, the structure of the comprehensive graph and the structure of the knowledge graph embedding model need to be updated accordingly. Exemplarily, the exercise data in the original database that is similar to the new exercise data is determined, and based on the new exercise data and the corresponding similar exercise data, new exercise nodes of the new exercise data and similar edges between the new exercise nodes and similar exercise nodes are added to the comprehensive graph. Furthermore, based on the new exercise nodes and the similar edges between the new exercise nodes and similar exercise nodes, new exercise node vectors and new relationship vectors in the knowledge graph embedding model are generated accordingly. The knowledge graph embedding model is trained based on the new exercise node vectors and new relationship vectors so that the new exercise node vectors and new relationship vectors find the correct embedding vectors. Since the structure of the current knowledge graph embedding model is stable, only fine-tuning is required to find the correct new exercise node vectors and new relationship vectors.
[0104] For the new exercise node vector, the chapter node vector and knowledge point node vector associated with the new exercise node vector can also be determined according to the link prediction rule, thereby achieving the chapter label and knowledge point label marking of the new exercise data.
[0105] In summary, the embodiment of the present invention obtains exercise data, chapter data and knowledge point data to determine the association relationship between each data; constructs a comprehensive graph based on the exercise data, chapter data, knowledge point data and the association relationship between the data, wherein the array composed of the two associated data and the association relationship between them is used as a triple of the comprehensive graph; constructs a vector triple of the knowledge graph embedding model based on the triple of the comprehensive graph, and trains the knowledge graph embedding model based on the vector triple, the knowledge graph embedding model is used to represent the data in the comprehensive graph and the association relationship between the data through the vector; based on the preset link prediction rules, according to the vectors of the exercise data, chapter data and knowledge point data in the knowledge graph embedding model, the chapter data and knowledge point data associated with the exercise data are determined. Through the above technical means, the relationship between the data in the comprehensive graph and each data is represented by the vector of the knowledge graph embedding model, so that the chapters and knowledge points associated with the exercises can be determined based on the vectors in the knowledge graph embedding model according to the link prediction rules, so as to realize the annotation of chapter labels and knowledge point labels for unlabeled exercises. For newly added exercise data, the structure of the knowledge graph embedding model can be quickly adjusted according to its new exercise node vector and new relationship vector, and the newly added exercise data can be represented by the vectors in the knowledge graph embedding model, realizing the knowledge expansion function of the knowledge graph embedding model.
[0106] Example 4
[0107] Figure 10 This is a schematic diagram of the structure of a device for processing exercise association relationships provided by the fourth embodiment of the present invention. Figure 10The exercise association relationship processing device includes: a data acquisition module 21, a comprehensive graph construction module 22, a knowledge graph construction module 23 and an exercise label mining module 24.
[0108] The data acquisition module 21 is configured to acquire exercise data, chapter data, and knowledge point data, and determine the association relationship between the data;
[0109] The comprehensive graph construction module 22 is configured to construct a comprehensive graph based on the exercise data, chapter data, knowledge point data and the association relationship between the data, wherein an array consisting of two associated data and the association relationship between them is used as a triple of the comprehensive graph;
[0110] A knowledge graph construction module 23 is configured to construct vector triplets of a knowledge graph embedding model based on the triplets of the comprehensive graph, and train the knowledge graph embedding model based on the vector triplets. The knowledge graph embedding model is used to represent the association relationship between data in the comprehensive graph through vectors;
[0111] The exercise tag mining module 24 is configured to determine the chapter data and knowledge point data associated with the exercise data based on the vectors of the exercise data, chapter data and knowledge point data in the knowledge graph embedding model based on preset link prediction rules.
[0112] Based on the above embodiment, the data acquisition module includes: an exercise data acquisition unit, configured to acquire initial exercise data in a database and determine similar exercise data for the initial exercise data; a chapter and knowledge point data acquisition unit, configured to acquire chapter data and knowledge point data in a database; a first association relationship determination unit, configured to determine the association relationship between the initial exercise data and similar exercise data and the chapter data or knowledge point data based on the chapter labels or knowledge point labels of the initial exercise data and similar exercise data; a second association relationship determination unit, configured to determine the association relationship between chapter data, between knowledge point data, and between chapter data and knowledge point data based on the chapter labels or knowledge point labels of the chapter data and the chapter labels or knowledge point labels of the knowledge point data.
[0113] On the basis of the above embodiments, the comprehensive graph construction module includes: an entity layer graph construction unit, which is configured to construct an entity layer graph based on exercise data, similar exercise data and the similarity relationship between the two; an ontology layer graph construction unit, which is configured to construct an ontology layer graph based on chapter data and knowledge point data, the association relationship between chapter data, between knowledge point data, and between chapter data and knowledge point data; a comprehensive graph construction unit, which is configured to associate the exercise data in the entity layer with the corresponding chapter data and knowledge point data in the ontology layer based on the association relationship between exercise data and chapter data, and the association relationship between exercise data and knowledge point data, to obtain a comprehensive graph.
[0114] Based on the above embodiment, the two data associated in the triple include: exercises and similar exercises in the entity layer, chapters and associated chapters in the ontology layer, knowledge points and associated knowledge points in the ontology layer, chapters and associated knowledge points in the ontology layer, exercises in the entity layer and chapters in the ontology layer, exercises in the entity layer and knowledge points in the ontology layer, and the association relationship is a superior-subordinate relationship, a similar relationship or a related relationship.
[0115] Based on the above embodiment, the knowledge graph construction module includes: a knowledge graph construction unit, which is configured to randomly generate node vectors corresponding to the data and relationship vectors corresponding to the association relationship in the knowledge graph embedding model based on the data in the comprehensive graph and the association relationship between the data in the comprehensive graph; a vector triplet determination unit, which is configured to take two associated node vectors and the corresponding relationship vectors as vector triples.
[0116] On the basis of the above embodiment, the knowledge graph construction module also includes: a sample acquisition unit, configured to use the vector triple as the positive sample triple of the knowledge graph embedding model, and randomly generate multiple negative sample triplets based on each positive sample triple; wherein the relationship vectors of the positive sample triples and the corresponding negative sample triples within the ontology layer and the entity layer are the same; a sample score calculation unit, configured to calculate the scores of the positive sample triples and the negative sample triples based on the positive sample triples, the negative sample triples and the preset score function; a first training unit, configured to calculate the result of the loss function based on the scores of the positive sample triples and the negative sample triples, and the preset loss function, and adjust the vector value of the vector in the knowledge graph embedding model according to the result of the loss function;
[0117] Among them, the score function is f r (h, t) = h T M r t;
[0118] The loss function is
[0119]
[0120]
[0121] Among them, J Intra is the loss function of the positive sample triples within the ontology layer and entity layer, is the loss function of the positive sample triples across the entity layer and the ontology layer, w is the weight coefficient, S1 is the set of positive sample triplets within the ontology layer and the entity layer, S1′ is the set of negative sample triplets corresponding to the positive sample triplets within the ontology layer and the entity layer, h and t are the head node vector and tail node vector of the positive sample triplets within the ontology layer and the entity layer respectively, r is the relationship vector of the positive sample triplets within the ontology layer and the entity layer, M r is the diagonal matrix under the r relation vector, h′ and t′ are the head node vector and tail node vector of the negative sample triple corresponding to the positive sample triple within the ontology layer and the entity layer, γ is the first score threshold, c and e are the head node vector and tail node vector of the positive sample triple across the ontology layer and the entity layer, c′ is the head node vector of the negative sample triple across the positive sample triple across the ontology layer and the entity layer, f CT is a linear mapping function used to map the tail node vector of the positive sample triple across the ontology layer and the entity layer to the vector space of the corresponding head node vector, γ CT is the second score threshold, S2 is the set of positive sample triplets across the entity layer and the ontology layer, |S2| is the total number of positive sample triplets across the entity layer and the ontology layer, [] + Used to limit sample triplets to be substituted into the corresponding loss function for calculation.
[0122] Based on the above embodiment, the exercise label mining module includes: a node vector acquisition unit, configured to obtain the node vectors of the exercise data to be labeled, where the exercise data to be labeled is the exercise data without associated chapter data or knowledge point data; a vector similarity calculation unit, configured to obtain the node vectors of all chapter data and knowledge point data, and calculate the similarity between the node vectors of the exercise data to be labeled and the node vectors of the chapter data or knowledge point data; a label labeling unit, configured to use the knowledge point data or chapter data as the chapter label and knowledge point label of the exercise data to be labeled if the similarity is less than a preset similarity threshold.
[0123] On the basis of the above embodiment, the exercise association relationship processing device also includes: a first association relationship determination unit, configured to calculate the similarity between the node vectors of two unrelated chapter data, and if the similarity is less than a similarity threshold, the two chapter data are associated; a second association relationship determination unit, configured to calculate the similarity between the node vectors of two unrelated knowledge point data, and if the similarity is less than a similarity threshold, the two knowledge point data are associated; a third association relationship determination unit, configured to calculate the similarity between the node vectors of unrelated knowledge point data and chapter data, and if the similarity is less than a similarity threshold, the knowledge point data and the chapter data are associated.
[0124] On the basis of the above embodiment, the exercise association relationship processing device also includes: a new exercise data adding unit, configured to obtain exercise data newly added to the comprehensive graph, and determine exercise data in the comprehensive graph that is similar to the newly added exercise data; a new exercise vector generating unit, configured to randomly generate corresponding new node vectors and new relationship vectors in the knowledge graph embedding model based on the newly added exercise data and the similarity relationship between the newly added exercise data and the corresponding similar exercise data; a second training model, configured to train the knowledge graph embedding model based on the new node vector, the new relationship vector and the node vectors of similar exercises.
[0125] In the above, by obtaining exercise data, chapter data and knowledge point data, the association relationship between each data is determined; based on the exercise data, chapter data, knowledge point data and the association relationship between the data, a comprehensive graph is constructed, wherein the array consisting of the two associated data and the association relationship between them is used as a triple of the comprehensive graph; based on the triple of the comprehensive graph, a vector triple of the knowledge graph embedding model is constructed, and the knowledge graph embedding model is trained based on the vector triple. The knowledge graph embedding model is used to represent the data in the comprehensive graph and the association relationship between the data through vectors; based on the preset link prediction rules, the chapter data and knowledge point data associated with the exercise data are determined based on the vectors of the exercise data, chapter data and knowledge point data in the knowledge graph embedding model. Through the above technical means, the relationship between the data in the comprehensive graph and each data is represented by the vector of the knowledge graph embedding model, so that the chapters and knowledge points associated with the exercises can be determined based on the vectors in the knowledge graph embedding model according to the link prediction rules, so as to realize the annotation of chapter labels and knowledge point labels for unlabeled exercises. In addition to identifying the chapters and knowledge points associated with exercises, it also identifies relationships between knowledge points, between chapters, and between chapters and knowledge points, building a more detailed and comprehensive knowledge graph for better adaptive learning. For newly added exercise data, the structure of the knowledge graph embedding model can be quickly adjusted based on its new exercise node vectors and new relationship vectors. The newly added exercise data is represented by vectors in the knowledge graph embedding model, realizing the knowledge expansion function of the knowledge graph embedding model.
[0126] The apparatus for processing exercise association relationships provided in an embodiment of the present invention is included in an exercise association relationship processing device and can be used to execute the exercise association relationship processing method provided in any of the above embodiments, and has corresponding functions and beneficial effects.
[0127] Example 5
[0128] Figure 11 This is a structural diagram of a device for processing exercise association relationships provided by the fifth embodiment of the present invention. Figure 11 As shown, the exercise association relationship processing device includes a processor 30, a memory 31, an input device 32, an output device 33 and a display screen 34; the number of processors 30 in the exercise association relationship processing device can be one or more. Figure 11 In the example of a processor 30; the number of display screens 34 in the exercise association relationship processing device can be one or more, Figure 11 Take a display screen 34 as an example; the processor 30, memory 31, input device 32, output device 33 and display screen 34 in the exercise association relationship processing device can be connected by a bus or other means. Figure 11 The bus connection is taken as an example.
[0129] The memory 31, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as the program instructions or modules corresponding to the exercise association relationship processing method in the embodiments of the present invention (for example, the data acquisition module 21, the comprehensive graph construction module 22, the knowledge graph construction module 23, and the exercise label mining module 24 in the exercise association relationship processing device). The processor 30 executes the software programs, instructions, and modules stored in the memory 31 to execute the various functional applications and data processing of the exercise association relationship processing device, thereby implementing the above-mentioned exercise association relationship processing method.
[0130] The memory 31 may primarily include a program storage area and a data storage area. The program storage area may store an operating system and at least one application required for a function; the data storage area may store data generated based on the use of the exercise association relationship processing device. Furthermore, the memory 31 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state memory device. In some instances, the memory 31 may further include a memory remotely located relative to the processor 30, and these remote memories may be connected to the exercise association relationship processing device via a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0131] The input device 32 can be used to receive input digital or character information, and to generate key signal input related to the user settings and function control of the exercise association relationship processing device. The output device 33 may include an audio output device such as a speaker. The display screen 34 is a display screen with a touch function, which can be a capacitive screen, an electromagnetic screen or an infrared screen. Optionally, when the display screen 34 is an infrared screen, it also includes an infrared touch frame, which is arranged around the display screen 34 and can also be used to receive infrared signals and send the infrared signals to the processor 30 or other devices. The display screen can display other content according to the instructions of the processor.
[0132] The above-mentioned exercise association relationship processing device includes an exercise association relationship processing device, which can be used to execute any exercise association relationship processing method and has corresponding functions and beneficial effects.
[0133] Example 6
[0134] An embodiment of the present invention also provides a storage medium containing computer-executable instructions, which are used to execute a method for processing exercise association relationships when executed by a computer processor. The method includes: obtaining exercise data, chapter data and knowledge point data, and determining the association relationships between each data; constructing a comprehensive graph based on the exercise data, chapter data, knowledge point data and the association relationships between the data, wherein an array consisting of two associated data and the association relationships between them serves as a triple of the comprehensive graph; constructing a vector triple of a knowledge graph embedding model based on the triple of the comprehensive graph, and training the knowledge graph embedding model based on the vector triple, wherein the knowledge graph embedding model is used to represent the data in the comprehensive graph and the association relationships between the data through vectors; based on preset link prediction rules, determining the chapter data and knowledge point data associated with the exercise data based on the vectors of the exercise data, chapter data and knowledge point data in the knowledge graph embedding model.
[0135] Of course, the storage medium containing computer-executable instructions provided in an embodiment of the present invention is not limited to the method operations described above, and can also execute related operations in the exercise association relationship processing method provided in any embodiment of the present invention.
[0136] Through the above description of the implementation methods, those skilled in the art can clearly understand that the present invention can be implemented with the help of software and necessary general-purpose hardware, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods of various embodiments of the present invention.
[0137] It is worth noting that in the above-mentioned embodiment of the apparatus for processing exercise association relationships, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be realized; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.
[0138] Note that the above are only preferred embodiments of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments, and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments and may include many other equivalent embodiments without departing from the concept of the present invention. The scope of the present invention is determined by the scope of the appended claims.
Claims
1. A method for processing exercise association relationships, characterized in that: include: Obtain exercise data, chapter data, and knowledge point data, and determine the relationship between the data; Construct a comprehensive graph based on the exercise data, chapter data, knowledge point data, and the association relationship between the data, wherein an array consisting of two associated data and the association relationship between them serves as a triple of the comprehensive graph; The constructing of a comprehensive graph based on the exercise data, chapter data, knowledge point data and the association relationship between data includes: constructing an entity layer graph based on the exercise data, similar exercise data and the similarity relationship between the two; constructing an ontology layer graph based on the chapter data and the knowledge point data, the association relationship between the chapter data, between the knowledge point data, and between the chapter data and the knowledge point data; and associating the exercise data in the entity layer with the corresponding chapter data and knowledge point data in the ontology layer based on the association relationship between the exercise data and the chapter data, and the association relationship between the exercise data and the knowledge point data, to obtain the comprehensive graph; Constructing vector triplets of a knowledge graph embedding model based on the triplets of the comprehensive graph, and training the knowledge graph embedding model based on the vector triplets, wherein the knowledge graph embedding model is used to represent the association relationship between data in the comprehensive graph and data through vectors; Based on preset link prediction rules, the chapter data and knowledge point data associated with the exercise data are determined according to the vectors of the exercise data, chapter data and knowledge point data in the knowledge graph embedding model.
2. The method according to claim 1, characterized in that The step of obtaining exercise data, chapter data, and knowledge point data and determining the association relationship between the data includes: Acquire initial exercise data from a database, and determine similar exercise data to the initial exercise data; Get chapter data and knowledge point data in the database; Determining, based on the chapter labels or knowledge point labels of the initial exercise data and similar exercise data, the association relationship between the initial exercise data and similar exercise data and the chapter data or the knowledge point data; According to the chapter tags or knowledge point tags of the chapter data and the chapter tags or knowledge point tags of the knowledge point data, the association relationships between the chapter data, between the knowledge point data, and between the chapter data and the knowledge point data are determined.
3. The method according to claim 1, characterized in that The two data associated in the triple include: exercises and similar exercises in the entity layer, chapters and associated chapters in the ontology layer, knowledge points and associated knowledge points in the ontology layer, chapters and associated knowledge points in the ontology layer, exercises in the entity layer and chapters in the ontology layer, exercises in the entity layer and knowledge points in the ontology layer, and the association relationship is a superior-subordinate relationship, a similar relationship or a related relationship.
4. The method according to claim 3, characterized in that The constructing of vector triples of the knowledge graph embedding model based on the triples of the comprehensive graph includes: According to the data in the comprehensive graph and the association relationship between the data in the comprehensive graph, randomly generate node vectors corresponding to the data and relationship vectors corresponding to the association relationship in the knowledge graph embedding model; The two associated node vectors and the corresponding relationship vector are taken as a vector triplet.
5. The method according to claim 4, characterized in that Training the knowledge graph embedding model according to the vector triples includes: The vector triples are used as positive sample triples of the knowledge graph embedding model, and a plurality of negative sample triplets are randomly generated based on each positive sample triple; wherein the relationship vectors of the positive sample triplets in the ontology layer and the entity layer are the same as those of the corresponding negative sample triplets; Calculating scores of the positive sample triplet and the negative sample triplet according to the positive sample triplet, the negative sample triplet and a preset scoring function; Calculating a result of the loss function according to the scores of the positive sample triples and the negative sample triples, and a preset loss function, and adjusting a vector value of a vector in the knowledge graph embedding model according to the result of the loss function; The score function is ; The loss function is ; ; ; in, is the loss function of the positive sample triples within the ontology layer and entity layer, is the loss function for the positive sample triples across the entity layer and the ontology layer, is the weight coefficient, is the set of positive sample triplets in the ontology layer and entity layer, is the set of negative sample triplets corresponding to the positive sample triplets in the ontology layer and entity layer, and are the head node vector and tail node vector of the positive sample triples in the ontology layer and entity layer respectively, is the relationship vector of the positive sample triples within the ontology layer and the entity layer, For The diagonal matrix under the relationship vector, and are the head node vector and tail node vector of the negative sample triple corresponding to the positive sample triple in the ontology layer and entity layer respectively, is the first score threshold, and are the head node vector and tail node vector of the positive sample triples across the ontology layer and entity layer respectively, is the head node vector of the negative sample triplet of the positive sample triplet across the ontology layer and the entity layer, is a linear mapping function used to map the tail node vector of the positive sample triple across the ontology layer and the entity layer to the vector space of the corresponding head node vector. is the second score threshold, is a set of positive sample triples across the entity layer and ontology layer, is the total number of positive sample triplets across the entity layer and the ontology layer, Used to limit sample triplets to be substituted into the corresponding loss function for calculation.
6. The method according to claim 1, characterized in that The step of determining the chapter data and knowledge point data associated with the exercise data based on the preset link prediction rules and the vectors of the exercise data, chapter data, and knowledge point data in the knowledge graph embedding model includes: Obtaining a node vector of the exercise data to be labeled, wherein the exercise data to be labeled is exercise data without associated chapter data or knowledge point data; Obtaining node vectors of all chapter data and knowledge point data, and calculating similarities between the node vectors of the exercise data to be annotated and the node vectors of the chapter data or the knowledge point data; If the similarity is less than a preset similarity threshold, the knowledge point data or the chapter data is used as the chapter label and knowledge point label of the exercise data to be marked.
7. The method according to claim 1, characterized in that After determining the chapter data and knowledge point data associated with the exercise data, the method further includes: Calculate the similarity between the node vectors of two unrelated chapter data, and if the similarity is less than a preset similarity threshold, associate the two chapter data; Calculate the similarity between the node vectors of two unrelated knowledge point data. If the similarity is less than a preset similarity threshold, associate the two knowledge point data. The similarity between the node vectors of unrelated knowledge point data and chapter data is calculated. If the similarity is less than a preset similarity threshold, the knowledge point data is associated with the chapter data.
8. The method according to claim 1, characterized in that After determining the chapter data and knowledge point data associated with the exercise data, the method further includes: Acquire exercise data newly added to the comprehensive graph, and determine exercise data in the comprehensive graph that is similar to the newly added exercise data; According to the newly added exercise data and the similarity relationship between the newly added exercise data and the corresponding similar exercise data, randomly generating corresponding new node vectors and new relationship vectors in the knowledge graph embedding model; The knowledge graph embedding model is trained according to the new node vector, the new relationship vector, and the node vectors of similar exercises.
9. A device for processing exercise association relationships, characterized in that: include: The data acquisition module is configured to acquire exercise data, chapter data, and knowledge point data, and determine the association relationship between the data; The comprehensive graph construction module is configured to construct a comprehensive graph based on the exercise data, chapter data, knowledge point data and the association relationship between the data, wherein an array consisting of two associated data and the association relationship between them serves as a triple of the comprehensive graph; the comprehensive graph construction module is specifically configured to: construct an entity layer graph based on the exercise data, similar exercise data and the similarity relationship between the two; construct an ontology layer graph based on the chapter data and the knowledge point data, the association relationship between the chapter data, between the knowledge point data, and between the chapter data and the knowledge point data; and associate the exercise data in the entity layer with the corresponding chapter data and knowledge point data in the ontology layer based on the association relationship between the exercise data and the chapter data, and the association relationship between the exercise data and the knowledge point data, to obtain the comprehensive graph; a knowledge graph construction module configured to construct vector triplets of a knowledge graph embedding model based on the triplets of the comprehensive graph, and train the knowledge graph embedding model based on the vector triplets, wherein the knowledge graph embedding model is used to represent the association relationship between data in the comprehensive graph and data through vectors; The exercise tag mining module is configured to determine the chapter data and knowledge point data associated with the exercise data based on the vectors of the exercise data, chapter data and knowledge point data in the knowledge graph embedding model based on preset link prediction rules.
10. An electronic device, characterized in that: include: memory and one or more processors; The memory is used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method for processing exercise association relationships as described in any one of claims 1 to 8.
11. A storage medium containing computer-executable instructions, characterized in that: The computer executable instructions are used to execute the exercise association relationship processing method as described in any one of claims 1 to 8 when executed by a computer processor.
Citation Information
Patent Citations
Knowledge-point-structure-based question bank system
CN106709830A
A knowledge map embedding method based on adaptive negative sampling
CN109376249A