A smart education-oriented knowledge graph exercise automatic mounting method and system

CN121937262BActive Publication Date: 2026-07-21ANHUI UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ANHUI UNIV
Filing Date
2026-03-30
Publication Date
2026-07-21

Smart Images

  • Figure CN121937262B_ABST
    Figure CN121937262B_ABST
Patent Text Reader

Abstract

The application discloses a kind of knowledge graph exercise automatic mounting method and system for wisdom education, it is related to wisdom education technical field, including: obtaining original exercise text and education field entity type dictionary, through the mixed strategy of rule matching and deep learning combination identification entity mention and position;Through education field exclusive prompt word driving large language model generation and verification enhanced context;Through knowledge base recall and enhanced context filtering obtain simplified candidate entity set;Based on unlabelled corpus constructs knowledge point co-occurrence knowledge graph and co-occurrence intensity matrix;Three types of matching evidence scores are generated and weighted fusion obtains preliminary linking result;Through iterative optimization balance local score and global consistency obtains final result;Construct the structured mounting relationship of exercise node and knowledge point and generate explainable instruction.The application improves linking accuracy and consistency, realizes exercise and knowledge point accurate association, provides support for education intelligent scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of smart education technology, specifically to a method and system for automatically loading knowledge graph exercises for smart education. Background Technology

[0002] In a smart education system, knowledge point graphs are the core carrier for integrating subject knowledge and connecting teaching resources, while the precise attachment of massive amounts of exercises is a key link in activating the application value of knowledge point graphs. From a technical perspective, the core scientific problem of automatically attaching exercises to corresponding knowledge points in the knowledge graph (hereinafter referred to as "automatic exercise attachment") is the entity linking problem. Its core logic is as follows: First, identify and extract text fragments representing core test points from the exercise text, i.e., entity mentions; then, establish a unique and accurate mapping relationship between these entity mentions and standardized knowledge point entities defined in the knowledge point graph; finally, based on this mapping relationship, attach the complete exercise content to the corresponding node in the knowledge point graph, thereby achieving a deep integration of exercise resources and the knowledge system.

[0003] Existing entity linking technologies have matured in general text domains (such as news and academic literature), but in the context of smart education exercises, they still have significant technical shortcomings due to the dual limitations of the characteristics of exercise texts and the characteristics of knowledge in the educational field: First, exercise texts are characterized by concise expression and focused test points, resulting in extremely sparse contextual information for entity mentions. Traditional entity linking methods struggle to uncover sufficient distinguishing features, easily leading to disambiguation errors, such as mistakenly linking "CPI" in a computer science postgraduate entrance exam to the "Consumer Price Index" knowledge point in economics; Second, knowledge points in the educational field exhibit strong domain co-occurrence characteristics, such as "instruction flow" in computer organization principles. "Waterline" and "CPI" often co-occur in the same exercise. In the field of mathematics, "function monotonicity" and "derivative application" are highly related, but existing general entity linking methods do not incorporate knowledge specific to this field, resulting in extremely poor adaptability for cross-course and cross-syllabus attachment. Third, in the early stages of the release of new subjects and new syllabi, there are very few labeled exercises and knowledge point association samples. Traditional entity linking models that rely on a large amount of labeled data have insufficient generalization ability and cannot meet the needs of rapid attachment. Fourth, existing technologies mostly focus on the matching process of entity links in isolation, without optimizing the output format for attachment needs. They lack structured attachment relationship construction and interpretability, making it difficult to directly support the practical application of knowledge point graphs.

[0004] Existing technologies, such as the "knowledge point annotation method based on semantic association rules," only associate text with knowledge points through keyword matching, without introducing disambiguation and global optimization mechanisms at the core of entity linking. While general entity linking methods can solve some matching problems, they are not adapted to the conciseness of exercise texts and the co-occurrence characteristics in the education field, and cannot effectively overcome the aforementioned technical bottlenecks. Therefore, there is an urgent need for a knowledge graph knowledge point mounting solution adapted to smart education scenarios to improve mounting accuracy and scenario adaptability. Summary of the Invention

[0005] The technical problem to be solved by this invention is how to solve the problem of loose connection between entity links and loading when exercises are automatically loaded in the context of smart education.

[0006] This invention solves the above-mentioned technical problems through the following technical means: a method for automatically mounting knowledge graph exercises for smart education, comprising:

[0007] S1. Obtain the original exercise text and the dictionary of entity types in the education field, and use a hybrid localization strategy that combines rule matching and deep learning to identify the entity mentions and the location information of each mention in the text; S2. For each mention in the entity mention set, based on its corresponding local original context and the course type of the education domain, the large language model is driven by education domain-specific prompt words to generate enhanced context, and after semantic consistency verification, an enhanced context set is formed. S3. For each entity mention and its enhanced context, a two-stage strategy of knowledge base retrieval and enhanced context filtering is adopted to select a simplified candidate entity set corresponding to each entity mention from the preset subject knowledge point graph and knowledge base. S4. Based on unlabeled corpora in the education field, the co-occurrence frequency of knowledge point entities is statistically analyzed and the co-occurrence intensity is calculated using single exercises as co-occurrence windows. Knowledge point co-occurrence knowledge graph and entity co-occurrence intensity matrix are then constructed. S5. For each entity mention and its reduced candidate entity set, generate enhanced contextual evidence score, prior knowledge evidence score and co-occurrence evidence score respectively. S6. Based on the preset evidence weight vector, the scores of the three types of evidence are weighted and fused to obtain a comprehensive matching score. Based on this score, candidate entities are selected from the simplified candidate entity set to obtain preliminary entity linking results. S7. Based on the preliminary entity linking results, comprehensive matching scores, knowledge point graphs, and co-occurrence knowledge graphs, global consistency optimization is performed through iterative optimization strategies to output the final entity linking results. S8. Construct dedicated exercise nodes for the original exercise text, establish a structured mounting relationship between the exercise node and the knowledge point entity node based on the final entity linking result, and generate corresponding interpretable mounting description text.

[0008] Furthermore, S1 includes: Based on the dictionary of entity types in the education field, regular expression matching rules are constructed. The original exercise text is scanned using the regular expression matching rules to initially filter out candidate mention fragments representing knowledge points and form an initial mention set. The initial set of mentions is input into a BERT-BiLSTM-CRF model finely tuned with an educational domain exercise corpus. The model filters out interference content that has no actual test point significance and confirms valid knowledge point entity mentions. Boundary correction and deduplication are performed on the valid mentions confirmed by the model. Output the set of entity mentions and record the position information of each mention in the original exercise text in the form of "start character position, end character position".

[0009] Furthermore, S2 includes: For each entity mention in the entity mention set, obtain the local original context corresponding to each entity mention and the course type of the education field to which each entity mention belongs; wherein, the local original context is truncated forward and backward from the position where the entity mention appears in the original text, by a predetermined number of segments. The text fragment obtained from 1 character; Based on the course type and local original context of the education field to which it belongs, construct corresponding education field-specific prompt words; The education-specific prompts are input into a large language model to generate preliminary enhanced context. The preliminary enhanced context is filtered and validated, including: The initial enhanced context is length-filtered to retain text with character lengths within a preset range; Semantic consistency verification is performed on the text filtered by length: the local original context and the preliminary enhanced context are converted into vector representations by a text embedding model, and the cosine similarity between the two is calculated; when the cosine similarity is greater than a preset first similarity threshold, it is determined as the final enhanced context of the mention, and the final enhanced contexts corresponding to each entity mention are summarized to form the enhanced context set.

[0010] Furthermore, S3 includes: For each entity mention and its enhanced context, filtering is performed based on a knowledge point graph and a knowledge base. The nodes of the knowledge point graph are knowledge point entities, the connections between nodes are the relationships between knowledge points, and the knowledge base stores descriptive information of knowledge point entities. Based on the text features mentioned by the entities, the BM25 text matching algorithm is used to recall multiple related knowledge point entities from the knowledge point graph, and the top K candidate entities with the highest BM25 matching scores are selected to form an initial candidate entity set. Based on the enhanced context, the cosine similarity between the entity and the description information of each entity in the initial candidate entity set in the knowledge base is calculated, and the entity is filtered according to a preset second similarity threshold to obtain a simplified candidate entity set and a candidate entity description information set corresponding to the entity mention.

[0011] Furthermore, the calculation formula for the BM25 text matching algorithm is as follows:

[0012] In the formula, For entity mention Knowledge point entities in the knowledge point graph Text matching relevance score, For words In entity mention word frequency in To adjust the parameters affecting word frequency, To adjust the parameters that affect text length, For entity mention Length, The average length of all entity mentions. This represents the total number of knowledge point entities in the knowledge point graph. For words contained in the knowledge point graph The number of knowledge point entities.

[0013] Furthermore, S4 includes: Obtain unlabeled corpus in the field of education, and use the model trained in step S1 to process the unlabeled corpus to identify all knowledge point entity mentions in it; Using a single exercise text as a co-occurrence window, the frequency of any two different knowledge point entities appearing together in the same co-occurrence window in the unlabeled corpus was statistically analyzed. Based on the co-occurrence frequency and the total frequency of each knowledge point entity in the unlabeled corpus, the co-occurrence strength between any two knowledge point entities is calculated; the formula for calculating the co-occurrence strength between entities is:

[0014] In the formula, For knowledge point entities and knowledge point entities co-occurrence intensity, For knowledge point entities and knowledge point entities The total number of times they appear together within the same exercise. For knowledge point entities Total frequency of occurrence in the entire corpus For knowledge point entities Total frequency of occurrence in the entire corpus; Based on the calculated co-occurrence intensity, a knowledge graph of knowledge point co-occurrence is constructed, where nodes represent knowledge point entities. If the co-occurrence intensity between two entities is not lower than a preset co-occurrence intensity threshold, an edge is established between the corresponding nodes, and the weight of the edge is the co-occurrence intensity. Finally, the knowledge graph of knowledge point co-occurrence and the corresponding entity co-occurrence intensity matrix are obtained, where the element value in the matrix is ​​the co-occurrence intensity between two entities.

[0015] Furthermore, in step S5, for each entity mention and its refined candidate entity set, an enhanced contextual evidence score, a priori knowledge evidence score, and a co-occurrence evidence score are generated, including: Using a text embedding model, the enhanced context corresponding to the entity mention and the descriptive information of the candidate entity are converted into vectors, and the cosine similarity between the two is calculated as the enhanced context evidence score. Based on the course type to which the entity mentions, the entity mentions themselves, and the candidate entities, evaluation prompt words are constructed and input into a large language model. The numerical results of the large language model, which represent the degree of matching, are parsed and used as the prior knowledge evidence score. Based on the co-occurrence knowledge graph, obtain the simplified candidate entity set corresponding to all candidate entities mentioned by other entities in the same exercise, excluding the current entity mention. Calculate the average co-occurrence intensity of the current candidate entity and all entities in the simplified candidate entity set as the co-occurrence evidence score. The formula for calculating the co-occurrence evidence score is:

[0016] In the formula, For entity mention The corresponding number Candidate entities co-occurrence evidence score For the first The entity mentioned the corresponding first One candidate entity, Indicates except the first The union of the reduced candidate entity sets corresponding to all other mentions besides the one mentioned. for The number of candidate entities, Candidate entities and candidate entities The co-occurrence intensity between them.

[0017] Furthermore, the formula for calculating the comprehensive matching score is as follows:

[0018] In the formula, To achieve a comprehensive matching score, , , These represent the weights of the enhanced contextual evidence score, the prior knowledge evidence score, and the co-occurrence evidence score, respectively. Indicates the enhanced contextual evidence score. This represents the score of prior knowledge evidence. This represents the co-occurrence evidence score.

[0019] Furthermore, in S7, global consistency optimization is performed through an iterative optimization strategy, specifically including: The formula for calculating the global consistency score is:

[0020] In the formula, Candidate entities Except for the first Aside from the one mentioned, the preliminary linking result set of all other mentions. The global consistency score, The number of entities contained in the initial linked result set. For the first Each entity mentions the corresponding initial link result entity; The formula for calculating the final score of a candidate entity is as follows:

[0021] In the formula, To balance the weights, Indicates the overall matching score; Based on final score Sort the candidate entity set mentioned by each entity in descending order, and select the entity with the highest score as the link result of the current iteration; Repeat the above steps for iteration. The preset iteration termination condition is: the iteration reaches a preset number of times or the increase in the global consistency score during the iteration is less than or equal to a preset threshold. The iteration stops when either termination condition is met, and the final entity linking result is obtained.

[0022] This invention also provides an automatic knowledge graph exercise loading system for smart education, comprising: The mention localization module is used to obtain the original exercise text and a dictionary of entity types in the education field. It adopts a hybrid localization strategy that combines rule matching and deep learning to identify entity mentions and obtain the set of entity mentions and the location information of each mention in the text. The context enhancement module is used to generate enhanced context for each mention in the entity mention set, based on its corresponding local original context and the course type of the education domain, by driving the large language model with education domain-specific prompt words, and after semantic consistency verification, form an enhanced context set; The candidate entity generation and filtering module is used to filter the concise candidate entity set corresponding to each entity mention from the preset subject knowledge point map and knowledge base by adopting a two-stage strategy of knowledge base retrieval and enhanced context filtering for each entity mention; The knowledge point co-occurrence knowledge construction module is used to statistically analyze the co-occurrence frequency of knowledge point entities and calculate the co-occurrence intensity based on unlabeled corpora in the education field, using a single exercise as the co-occurrence window, and to construct a knowledge point co-occurrence knowledge graph and entity co-occurrence intensity matrix. The multi-source evidence generation module is used to generate enhanced contextual evidence scores, prior knowledge evidence scores, and co-occurrence evidence scores for each entity mention and its refined candidate entity set, respectively. The evidence fusion and disambiguation module is used to weight and fuse the scores of three types of evidence based on a preset evidence weight vector to obtain a comprehensive matching score. Based on this score, candidate entities are selected from the simplified candidate entity set to obtain preliminary entity linking results. The global consistency optimization module is used to perform global consistency optimization based on the preliminary entity linking results, comprehensive matching scores, knowledge point graphs, and co-occurrence knowledge graphs through iterative optimization strategies, and outputs the final entity linking results. The mounting and interpretation module is used to construct dedicated exercise nodes for the original exercise text, establish a structured mounting relationship between the exercise node and the knowledge point entity node based on the final entity linking result, and generate corresponding interpretable mounting description text.

[0023] The advantages of this invention are: This invention ensures the accuracy and efficiency of core test point entity mention recognition through a hybrid localization strategy combining rule matching and deep learning; it effectively compensates for the semantic sparsity of exercise texts by employing a context enhancement mechanism driven by educational domain-specific prompts; it strengthens the method's scenario adaptability by leveraging the specialized construction of co-occurring knowledge points in the educational domain; it significantly improves the reliability and consistency of entity linking results through multi-source evidence fusion and global consistency iterative optimization; and finally, it achieves practical application of the technical solution through structured mounting and interpretable output. This invention realizes the efficient association between exercises and knowledge points, providing reliable support for the intelligent management of exercise knowledge points in the field of smart education. Attached Figure Description

[0024] Figure 1 This is a flowchart of a method for automatically mounting knowledge graph exercises for smart education, according to Embodiment 1 of the present invention. Figure 2 This is a structural example diagram of the knowledge graph of co-occurrence of knowledge points in Embodiment 1 of the present invention; Figure 3 This is a system module block diagram of Embodiment 2 of the present invention. Detailed Implementation

[0025] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below in conjunction with the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0026] Example 1 like Figure 1 As shown, a method for automatically mounting knowledge graph exercises for smart education includes: S1. Obtain the original exercise text and a dictionary of entity types in the education field. Use a hybrid localization strategy that combines rule matching and deep learning to identify entities and obtain the set of entity mentions and the location information of each mention in the text.

[0027] Specifically, this involves obtaining the original exercise text and an entity type dictionary for the education domain. The original exercise text includes questions such as explaining CPI and its relationship to MIPS. The entity type dictionary for the education domain contains entity type definitions for various subject-specific knowledge points, such as computer performance metrics, properties of mathematical functions, and theorems in physics and mechanics.

[0028] The processing adopts a hybrid localization strategy that combines rule matching and deep learning. Specifically, regular matching rules are constructed based on the entity type dictionary in the education field. The original exercise text is scanned in full text based on these rules, and candidate mention fragments that may represent knowledge points are preliminarily screened to form an initial mention set. The initial mention set is input into the BERT-BiLSTM-CRF model fine-tuned with the education exercise corpus. The process of fine-tuning the BERT-BiLSTM-CRF model is as follows: collect and annotate education exercise texts covering multiple disciplines to construct an entity recognition training data set; use the pre-trained BERT model as the word embedding layer to extract context features; then connect the bidirectional long short-term memory network BiLSTM to capture sequence dependencies; finally, output the optimal label sequence through the conditional random field CRF decoding layer. The Adam optimizer is used in the fine-tuning process, the learning rate is set to 2e-5, the number of iterations is 10 rounds, the batch size is 32, the dropout rate is 0.1, and the cross-entropy loss function is used for supervised training. Through this model, interference content without actual test point significance is filtered out. For example, in the computer postgraduate entrance examination real question "3-level instruction pipeline", the modifier "3-level" is filtered out, and only the core "instruction pipeline" is retained as a candidate mention. At the same time, it is confirmed that the remaining mentions are all knowledge point entity mentions that meet the requirements. The boundaries of the mentions confirmed by the model are corrected. For example, "CPI's" is corrected to "CPI", and then duplicate removal is performed, that is, the same mentions that appear repeatedly in the text are merged or removed. Finally, the final entity mention set is obtained, and the position information corresponding to each mention in the original exercise text is recorded. The position information is represented in the form of "starting character position, ending character position".

[0029] S2. For each mention in the entity mention set, based on its corresponding local original context and the education field course type it belongs to, an enhanced context is generated by driving a large language model with education field-specific prompt words, and after semantic consistency verification, an enhanced context set is formed.

[0030] Specifically, this step aims to solve the problem of sparse context information of entity mentions in exercise texts and improve the accuracy of subsequent entity disambiguation by strengthening the semantic features of mentions.

[0031] The processing primarily relies on a large language model; this embodiment uses GLM-4.7. Specifically, for each entity mention in the entity mention set, the local original context corresponding to each entity mention and the educational domain course type to which each entity mention belongs are obtained. The local original context is a text segment consisting of 50 characters before and after the entity mention, centered on the entity mention. Educational domain course types include Computer Organization Principles, Advanced Mathematics, etc. Semantic enhancement is driven by designing educational domain-specific prompt words. First, specific prompt words are constructed, with the format: "Please combine the knowledge background of [Course Type: Specific Course] to analyze the core attributes, functions, and possible related knowledge points of the [Specific Entity Mention] mentioned in the following text, supplement the implicit background information, and generate a text focusing on the semantic parsing of this mention, avoiding irrelevant content: [Local Original Context]". The prompt words are input into the GLM-4.7 model, and the model outputs a text that expands the knowledge of the mention, denoted as the preliminary enhanced context. To ensure the effectiveness of the enhanced text and its consistency with the original context, the generated preliminary enhanced context undergoes two levels of verification and filtering. The first level is length filtering, retaining only text with a character length between 50 and 200 characters. The second level is semantic consistency verification. A pre-trained text embedding model is used to convert the original local context and the preliminary enhanced context (filtered by length) into vectors, and the cosine similarity between the two is calculated. Only when the similarity is greater than a preset first similarity threshold is the text deemed qualified and retained as the final enhanced context corresponding to that entity mention. The final enhanced contexts corresponding to each entity mention are then aggregated to form an enhanced context set.

[0032] Semantic consistency verification is achieved by calculating the cosine similarity between the original local context and the preliminary enhanced context. The calculation formula is as follows:

[0033] In the formula, Indicates the local original context, This indicates an initial enhancement of the context. This represents the text word vector encoding generated by the BERT model. Represents the vector dot product. The L2 norm of the vectors is used to retain only the enhanced text with a similarity greater than 0.7 as the final enhanced context. Ultimately, we obtain the enhanced context set corresponding to each entity's mention. .

[0034] S3. For each entity mention and its enhanced context, a two-stage strategy of knowledge base retrieval and enhanced context filtering is adopted to select a simplified candidate entity set corresponding to each entity mention from the preset subject knowledge point graph and knowledge base.

[0035] Specifically, this step mentions a set of candidate knowledge point entities that may correspond to each entity, and then removes irrelevant entities by filtering, thereby reducing the difficulty and cost of subsequent disambiguation work.

[0036] The processing employs a two-stage strategy: knowledge base retrieval and enhanced context filtering. Specifically, for each entity mention and its enhanced context, filtering is performed based on a knowledge point graph and associated knowledge base. In the knowledge point graph, nodes represent knowledge point entities, and connections between nodes represent relationships between knowledge points. The knowledge base stores descriptive information about the knowledge point entities. The first stage is the candidate entity retrieval stage. Based on the textual features of the entity mention, the BM25 text matching algorithm is used to retrieve relevant knowledge point entities from the knowledge point graph, forming an initial candidate entity set. Generally, the top 20 entities with the highest BM25 matching scores are selected as initial candidates. The second stage is the candidate entity filtering stage. Semantic matching is performed between the enhanced context and the descriptive information of each entity in the initial candidate entity set. The matching degree is determined by calculating the cosine similarity between the two. Candidate entities with a similarity not lower than a preset second similarity threshold (set to 0.6) are selected, forming a simplified candidate entity set, typically no more than 10 entities. This yields the simplified candidate entity set and its descriptive information set for each entity mention.

[0037] The calculation formula for the BM25 text matching algorithm is as follows:

[0038] In the formula, For entity mention Knowledge point entities in the knowledge point graph Text matching relevance score, For words In entity mention word frequency in To adjust the parameter for the influence of word frequency, this embodiment sets it to 2.0. To adjust the parameter affecting text length, this embodiment sets it to 0.75. For entity mention Length, The average length of all entity mentions. This represents the total number of knowledge point entities in the knowledge point graph. For words contained in the knowledge point graph The number of knowledge point entities. The top 20 entities with the highest BM25 scores are selected as the initial candidate entity set. The second stage is candidate entity screening, which utilizes enhanced context. With the initial candidate entity set Chinese entities The descriptive information is semantically matched, and the similarity is calculated using the cosine similarity formula in step S2. Candidate entities with a similarity ≥ 0.6 are selected to obtain a simplified candidate entity set. ,in, To reduce the number of candidate entities, Obtain the simplified candidate entity set corresponding to each entity mentioned. and candidate entity description information set ,in, for Description information of each entity in the text.

[0039] S4. Based on unlabeled corpora in the education field, the co-occurrence frequency of knowledge point entities is statistically analyzed and the co-occurrence intensity is calculated using single exercises as co-occurrence windows, thereby constructing a knowledge point co-occurrence knowledge graph and an entity co-occurrence intensity matrix.

[0040] Specifically, this step provides co-occurrence evidence specific to the education domain to support entity disambiguation, thereby improving the domain adaptability of the mounting work. It obtains an unlabeled corpus set from the education domain, which may include past exam questions, textbook texts, courseware documents, etc.; simultaneously, it obtains the knowledge point entity recognition model and its parameters that were trained in step S1.

[0041] The core of the processing is to construct domain co-occurrence knowledge by statistically analyzing entity co-occurrence frequencies. Specifically, the model in step S1 is invoked to identify entity mentions in the unlabeled corpus, identifying all knowledge point entity mentions in the corpus and forming a full set of entity mentions covering the entire corpus. A "single exercise" text is used as a co-occurrence window; this setting is to adapt to the relatively concentrated nature of knowledge points tested in an educational scenario. The frequency of any two different knowledge point entities appearing together within the same co-occurrence window in the full set of entity mentions is statistically analyzed. To further accurately quantify the degree of association between entities, co-occurrence strength needs to be calculated based on the co-occurrence frequency. Based on the calculated co-occurrence strength between entities, a knowledge point co-occurrence knowledge graph is constructed. Nodes in the knowledge point co-occurrence knowledge graph represent knowledge point entities, and the lines between nodes represent the co-occurrence relationship between entities. If the co-occurrence strength between two entities is not lower than a preset co-occurrence strength threshold (set to 0.3 in this embodiment), an edge is established between them, and the weight of this edge is the calculated co-occurrence strength. This method filters out accidental co-occurrences or noisy relationships with extremely weak correlations, ensuring that the co-occurrence relationships retained in the graph have practical significance. Finally, this step outputs the constructed knowledge point co-occurrence knowledge graph and the corresponding entity co-occurrence strength matrix, where each element represents the co-occurrence strength value between two entities.

[0042] The formula for calculating the co-occurrence intensity between entities is:

[0043] In the formula, For knowledge point entities and knowledge point entities co-occurrence intensity, For knowledge point entities and knowledge point entities The total number of times they appear together within the same exercise. For knowledge point entities Total frequency of occurrence in the entire corpus For knowledge point entities Total frequency of occurrence in the entire corpus.

[0044] Finally, a knowledge graph of knowledge point co-occurrence is constructed. In this context, nodes represent knowledge entities, edges represent co-occurrence relationships between entities, and edge weights represent co-occurrence strengths. ,reserve Edges are used to ensure the validity of co-occurrence relationships. Output a knowledge graph of co-occurrence of knowledge points. and entity co-occurrence intensity matrix , where matrix elements .like Figure 2 This is a structural example diagram of a co-occurrence knowledge graph. It visually distinguishes the strength of co-occurrence relationships between knowledge points: solid lines correspond to a co-occurrence strength ≥ 0.5, representing a strong association; dashed lines correspond to a co-occurrence strength of 0.3-0.5, representing a weaker association. The difference in line type allows for quick identification of entity association strength, improving the readability and efficiency of the co-occurrence knowledge graph.

[0045] S5. For each entity mention and its simplified candidate entity set, generate enhanced contextual evidence score, prior knowledge evidence score, and co-occurrence evidence score respectively.

[0046] Specifically, this step aims to mention each candidate entity in the corresponding simplified candidate entity set for each entity, generate matching evidence scores from multiple dimensions, and provide quantitative basis for subsequent comprehensive disambiguation decision-making.

[0047] For each entity mention and its corresponding simplified candidate entity set, three types of evidence scores are generated: enhanced context evidence score, prior knowledge evidence score, and co-occurrence evidence score. The generation process is as follows: Enhanced contextual evidence score: Through a text embedding model, the enhanced context corresponding to the entity mention and the description information of the candidate entity are converted into vectors, and the cosine similarity between the two is calculated, which is the enhanced contextual evidence score.

[0048] Prior knowledge evidence score: Based on the prior knowledge generation of the education domain built into the large language model, the evaluation prompt words are specifically constructed. The prompt words are roughly in the format of "In the domain of [course type: specific course], the matching probability (between 0 and 1, rounded to 2 decimal places) of mentioning [specific entity mention] and knowledge point entity [specific candidate entity]". This prompt word is input into the GLM-4.7 model, and the probability value output by the model is the prior knowledge evidence score.

[0049] Co-occurrence evidence score: Calculated based on a co-occurrence knowledge graph, it reflects the degree of association between a candidate entity and other entity mentions in the same exercise. The calculation first identifies a simplified set of candidate entities corresponding to all mentions other than the current mention. The average co-occurrence strength between the current candidate entity and all entities in the simplified set is then calculated; this average is the co-occurrence evidence score. If the exercise contains only one entity mention, the co-occurrence evidence score is directly set to 0.5.

[0050] The formula for calculating the co-occurrence evidence score is:

[0051] In the formula, For entity mention The corresponding number Candidate entities co-occurrence evidence score For the first The entity mentioned the corresponding first One candidate entity, Indicates except the first The union of the reduced candidate entity sets corresponding to all other mentions besides the one mentioned. for The number of candidate entities, Candidate entities and candidate entities The co-occurrence intensity between them. If If the exercise contains only one entity mentioned, then Output the set of scores for the three types of evidence. , , .

[0052] S6. Based on the preset evidence weight vector, the scores of the three types of evidence are weighted and fused to obtain a comprehensive matching score. Based on this score, candidate entities are selected from the simplified candidate entity set to obtain preliminary entity linking results.

[0053] Specifically, this step aims to filter out the most likely corresponding knowledge point entities for each entity mention by integrating and calculating multi-dimensional evidence scores, thus forming preliminary link results.

[0054] A predefined evidence weight vector is used to guide the fusion of three types of evidence scores: enhanced context evidence score, prior knowledge evidence score, and co-occurrence evidence score. The sum of the three weights is 1. In a specific embodiment, considering the characteristics of exercises-based tasks in the education domain, the weight of enhanced context evidence can be set to 0.4, the weight of prior knowledge evidence to 0.2, and the weight of co-occurrence evidence to 0.4, thereby balancing and highlighting the role of semantic enhancement information and domain co-occurrence patterns during the fusion process.

[0055] The processing employs a weighted fusion strategy to calculate the overall matching score of candidate entities. This is achieved by multiplying the score of each type of evidence by its corresponding weight, and then summing these three products. After obtaining the overall matching scores for all candidate entities, the streamlined candidate entity set corresponding to each entity mention is sorted from highest to lowest based on its overall matching score. According to the sorting result, the top 3 candidate entities are selected as the initial linking results, and their corresponding overall matching scores are recorded. The output includes the initial linking result set for each entity mention, along with the corresponding set of overall matching scores.

[0056] The formula for calculating the overall matching score is:

[0057] In the formula, To achieve a comprehensive matching score, , , These represent the weights of the enhanced contextual evidence score, the prior knowledge evidence score, and the co-occurrence evidence score, respectively. Indicates the enhanced contextual evidence score. This represents the score of prior knowledge evidence. This represents the co-occurrence evidence score. The overall matching score is then calculated. Then, mention each entity Corresponding simplified candidate entity set according to Sort in descending order and take the top 3 candidate entities as the initial linking results. The numbers in parentheses indicate the ranking and record the corresponding overall matching score. 、 、 Output the initial set of links mentioned by each entity. and the corresponding set of comprehensive matching scores .

[0058] S7. Based on the preliminary entity linking results, comprehensive matching scores, knowledge point graphs, and co-occurrence knowledge graphs, global consistency optimization is performed through an iterative optimization strategy to output the final entity linking results.

[0059] Specifically, this step optimizes the initial linking results from a global perspective, ensuring that the linking results for all entities mentioned in the same exercise have thematic consistency, thereby further improving the accuracy of entity linking.

[0060] The processing employs an iterative optimization strategy, combining local comprehensive matching scores and global consistency scores to adjust the linking results. Specifically, based on the co-occurrence knowledge graph, a global consistency score is defined and calculated. This global consistency score reflects the topic fit between candidate entities and other entities mentioned in the initial linking results. The calculation method is similar to the co-occurrence evidence score: the co-occurrence strength of the current candidate entity with all entities mentioned in the initial linking results is calculated, and the average value is taken as its global consistency score.

[0061] The final score of each candidate entity is calculated. This final score is obtained by balancing local matching and global consistency through a weighted fusion method. A balancing weight is used to adjust the proportion of the two; in this embodiment, the balancing weight is set to 0.6, i.e., final score = 0.6 × comprehensive matching score + (1-0.6) × global consistency score. Then, for each entity mention, its simplified candidate entity set is sorted in descending order according to the final score, and the entity with the highest score is selected as the final linking result for the current iteration. The above steps are repeated iteratively, generally for 3 iterations. If the increase in the global consistency score during the iteration does not exceed 0.01, the iteration stops, and the result obtained at this point is the final entity linking result. The final entity linking result for each entity mention, along with the corresponding set of final scores, is output.

[0062] The formula for calculating the global consistency score is:

[0063] In the formula, Candidate entities Except for the first Aside from the one mentioned, the preliminary linking result set of all other mentions. Global consistency score The number of entities contained in the initial linked result set. For the first Each entity mentions the corresponding initial link result entity.

[0064] The formula for calculating the final score of a candidate entity is:

[0065] In the formula, To balance the weights, this embodiment sets it to 0.6, and mentions each entity... Simplified candidate entity set by Sort in descending order and select the entity with the highest score as the final linking result for the current iteration. Repeat the above steps iterate 3 times. If the improvement in the global consistency score during the iteration is ≤0.01, stop the iteration and obtain the final entity linking results. Output the final entity linking results mentioned by each entity. and the final score set .

[0066] S8. Construct dedicated exercise nodes for the original exercise text, establish a structured mounting relationship between the exercise node and the knowledge point entity node based on the final entity linking result, and generate corresponding interpretable mounting description text.

[0067] Specifically, this step includes three main stages: constructing structured attachment relationships, generating interpretable attachment description text, and outputting the updated graph and data. Specifically: Constructing structured attachment relationships: In the knowledge point graph, a dedicated exercise node is created for the complete original exercise text. Node attributes include basic information such as exercise number, subject, and difficulty. Simultaneously, an "association attachment" edge is established between this exercise node (corresponding to the complete exercise content) and the entity in each final entity link result. Edge attributes include attachment time, link accuracy (i.e., the final score corresponding to the link), and attachment type, such as core test point or related test point.

[0068] Generate an explanatory text for each entity mention and its final link result. Analyze the contribution of the three types of evidence scores. If a certain type of evidence score is not lower than 0.7, this type of evidence is used as the primary matching basis. Then, generate an explanatory text according to a fixed format. The explanatory text is roughly as follows: "The complete exercise [specific exercise text] mentions [specific entity mention] and attaches it to the knowledge point [specific link entity]. The primary basis is: enhanced context matching (score: specific score), domain co-occurrence relationship (score: specific score), and the auxiliary basis is: prior knowledge matching (score: specific score)."

[0069] The system outputs structured mounted data, integrating complete exercise texts, mounted knowledge entity entities, mounting relationships, and explanatory texts into JSON format for easy storage, retrieval, and subsequent application of the knowledge point graph. The final output includes the updated knowledge point graph (containing the mounting relationships of complete exercises), a set of mounted explanatory texts, and the structured mounted data.

[0070] This embodiment selects exercises from the Computer Organization Principles module of the 408 Computer Science Comprehensive Examination as the processing object. These types of exercises are characterized by focused test points, concise context, and the co-occurrence of multiple test points, which can fully verify the accuracy and adaptability of the method of this invention in semantically sparse and domain-specific scenarios. The complete mounting process of the method of this invention will be described in detail below, using this exercise as an example.

[0071] This embodiment takes exercises involving instruction pipelines and CPI as the processing object. Through the coordinated processing of each step of the method of this invention, the entire process from exercise input to exercise loading is completed. The specific processing process is as follows: S1. Identify key entities mentioned in practice questions. Obtain the original exercise text (i.e., "Given that a CPU uses a 3-level instruction pipeline...explain the relationship between CPI and MIPS.") and an entity type dictionary for the education field. (Including 15 entity types such as "computer performance indicators").

[0072] Processing procedure: ① Based on an entity type dictionary for the education domain Construct regular expression matching rules. For example, for the "computer performance metrics" type, construct a regular expression containing keywords such as "CPI", "MIPS", and "throughput" to match the original exercise text. The scan initially identified candidate mentions: "Level 3 instruction pipeline", "throughput", "CPI", and "MIPS", forming an initial mention set. ={"Level 3 instruction pipeline", "throughput", "CPI", "MIPS"}.

[0073] ② Input the finely tuned BERT-BiLSTM-CRF model. The model filters out the modifier "Level 3" which has no practical test value, corrects the candidate mentions to "instruction pipeline", and confirms that "throughput", "CPI" and "MIPS" are all knowledge points that meet the requirements.

[0074] ③ Perform boundary correction and deduplication on the filtered mentions to obtain the final entity mention set. Location information The numbers in parentheses indicate the starting and ending positions of each reference in the exercise text.

[0075] S2, Supplementary mention of sparse semantic information For each entity mention in the entity mention set Obtain the local original context corresponding to each entity mention. and course type ="Computer Organization Principles".

[0076] by For example, its local original context =“Calculate the throughput and CPI of the pipeline, and explain the relationship between CPI and MIPS”, since the number of characters before and after is less than 50, the remaining text is used.

[0077] Processing procedure: ① Construct a prompt word specific to the education field: Prompt = "Please combine the knowledge background of [Course Type: Computer Organization Principles] to analyze the core attributes, functions and possible related knowledge points of [CPI] mentioned in the following text, supplement the implicit background information, and generate a text focusing on the semantic analysis of the mention, avoiding irrelevant content: [Calculate the throughput and CPI of this pipeline, and explain the relationship between CPI and MIPS]".

[0078] ② Input the Prompt into the GLM-4.7 model, and the model outputs the initial augmentation context. =“CPI (Clock Cycles Per Instruction) is one of the core metrics for measuring CPU performance. It reflects the average number of clock cycles required for the CPU to execute one instruction. In instruction pipeline scenarios, CPI is related to the number of pipeline stages and the execution time of each pipeline stage. It is often used in conjunction with MIPS (Millions of Instructions Per Second) to evaluate the CPU's execution efficiency.

[0079] ③ To initially enhance the context Length filtering: The preset character length range is 50–200 characters. If the generated text length exceeds this range, it will be discarded and regenerated.

[0080] ④ Calculation and Cosine similarity: The word vector codes of the two were generated using the BERT model. The calculated similarity was 0.82, which is greater than the threshold of 0.7. Therefore, the enhanced text was retained as the final enhanced context. .

[0081] Similarly, complete the task for "Instruction Pipeline" "throughput" The context enhancement of “MIPS” ultimately results in an enhanced context set. .

[0082] S3, Matching possible knowledge point entities For each entity mention and its enhanced context Based on knowledge point graph and knowledge base The selection process involves filtering the knowledge points, including the knowledge point graph containing computer organization principle knowledge point nodes such as "instruction pipeline" and "CPI". The knowledge base stores detailed descriptions of each knowledge point, such as "CPI: clock cycles per instruction, a CPU performance evaluation indicator".

[0083] by For example, the processing steps are as follows: ① Based on the text feature of "CPI", the BM25 text matching algorithm is used to analyze the knowledge point graph. Multiple knowledge point entities were recalled. The BM25 algorithm parameters were set to... , After calculation, the BM25 scores of the three entities "CPI (clock cycles per instruction)," "CPI (Consumer Price Index)," and "clock cycle" in the knowledge point graph are 2.8, 1.2, and 0.9, respectively. The top 20 entities (only 3 in this case meet the criteria) are selected as the initial candidate entity set. ={"CPI (clock cycles per instruction)", "CPI (Consumer Price Index)", "clock cycles"}.

[0084] ②Utilize enhanced context (Including information such as "Computer Organization and Architecture" and "CPU Performance") and the initial candidate entity set Semantic matching of the description information of each entity in the knowledge base is performed, and cosine similarity is calculated: "CPI (number of clock cycles per instruction)" similarity is 0.91, "CPI (Consumer Price Index)" similarity is 0.32, and "clock cycle" similarity is 0.65.

[0085] ③ Select candidate entities with a similarity of ≥0.6 to obtain a simplified candidate entity set. , .

[0086] Similarly, complete the task for , The candidate entity generation and filtering process ultimately yields a simplified candidate entity set for each mention. and candidate entity description information set ,For example for Detailed descriptions of the two entities.

[0087] S4. Provide evidence of domain co-occurrence. Obtaining unlabeled corpora in the education field This includes the 408 exercise set from 2009 to 2024, the textbook on computer organization principles, and the model parameters of step S1, namely the fine-tuned BERT-BiLSTM-CRF model parameters.

[0088] Processing procedure: ① Call the model from step S1 to process the unlabeled corpus. Entity mention recognition is performed to obtain the entity mention set in the corpus. (Includes numerous mentions related to computer organization principles, such as "instruction pipeline", "CPI", "MIPS", and "throughput").

[0089] ② Set the co-occurrence window to "Single Exercise" to count the co-occurrence frequency of any two knowledge point entities, for example, in In the exercises, "instruction pipeline" and "CPI" co-occur in 86 exercises, "CPI" and "MIPS" co-occur in 124 exercises, and "instruction pipeline" and "throughput" co-occur in 78 exercises.

[0090] ③ Calculate the co-occurrence strength between entities, using the "instruction pipeline" ( ) and "CPI" For example, exist Total number of times , , Substituting into the co-occurrence intensity formula, we obtain... .

[0091] ④ Construct a knowledge graph of co-occurrence of knowledge points ,reserve The edges, of which “Instruction Pipeline”-“CPI” (2.53), “CPI”-“MIPS” (3.12), and “Instruction Pipeline”-“Throughrate” (2.31) are all retained as co-occurring edges.

[0092] Finally, a knowledge graph of co-occurrence of knowledge points was obtained. Co-occurrence intensity matrix of entities The entity co-occurrence intensity matrix records the co-occurrence intensity among the aforementioned entities.

[0093] S5. Generate scores for three types of matching evidence. For each entity mention and its corresponding simplified candidate entity set, three types of evidence scores are generated: enhanced context evidence score, prior knowledge evidence score, and co-occurrence evidence score.

[0094] Still with and its candidate entities For example, the processing steps are: ① Enhance the contextual evidence score :calculate and The cosine similarity of the descriptive information is obtained. .

[0095] ② Prior knowledge evidence score The prompt word `Prompt_pri` is constructed as follows: "In the field of [Course Type: Computer Organization and Architecture], the probability of matching [CPI] with the knowledge point entity [CPI (Clock Cycles Per Instruction)] (between 0 and 1, rounded to 2 decimal places)". This is input into the GLM-4.7 model, and the model outputs a probability of 0.95. .

[0096] ③ Co-occurrence evidence score : for , , The simplified candidate entity set union (including entities such as "instruction pipeline", "throughput", and "MIPS") is used to compute... and The average co-occurrence intensity of each entity in the middle is obtained. Then, through normalization, it is linearly mapped to the [0,1] interval, and the normalized co-occurrence evidence score is 0.87.

[0097] Similarly, the calculation yields A score set is formed based on the three types of evidence scores for each candidate entity. , , .

[0098] S6. Preliminary Entity Linking Results Based on a preset evidence weight vector The scores of the three types of evidence are weighted and fused to obtain a comprehensive matching score. Based on this score, candidate entities are selected from the simplified candidate entity set to obtain preliminary entity linking results.

[0099] by candidate entities For example, the processing steps are as follows: ① Substitute the values ​​into the weighted fusion formula to calculate the overall matching score. .

[0100] ② Two candidate entities in the middle Sort in descending order: (0.902) "Clock cycle" (0.58).

[0101] ③ Take the first 3 candidate entities (only 2 in this case) as the initial linking results. Record the corresponding comprehensive matching score .

[0102] Similarly, we obtain the preliminary link result set for each mentioned. and the comprehensive matching score set .

[0103] S7. Optimize to obtain the final link result. Based on preliminary entity linking results Comprehensive matching score set Knowledge Point Map Co-occurrence intensity matrix Global consistency optimization is performed through an iterative optimization strategy, and the final entity linking result is output. Processing procedure: ① candidate entities For example, calculate the global consistency score. : for , , The preliminary linking results (including "instruction pipeline", "throughput", and "MIPS") are used to calculate... The average co-occurrence intensity with these entities is obtained. Then, through normalization, it is linearly mapped to the [0,1] interval, and the final normalized global consistency score is 0.87.

[0104] ② Substitute into the final fraction formula to calculate the result. .

[0105] ③ For each mentioned candidate entity, according to Sort in descending order and select the entity with the highest score as the final linking result for the current iteration.

[0106] ④ Repeat the iteration 3 times. If the global consistency score improves by 0.008 (≤0.01) during the iteration, stop the iteration and obtain the final entity linking result. .

[0107] S8. Complete map mounting and interpretable output. Original exercise text Build dedicated exercise nodes based on the final entity linking results. Establish a structured attachment relationship between the exercise node and the knowledge point entity node, and generate corresponding interpretable attachment description text.

[0108] Processing steps: ① Constructing structured mounting relationships: in the knowledge point graph Create a node titled "2024 408 Computer Organization Principles Exam Question 7" in the documentation. This node uniquely corresponds to the complete original exercise text, and its attributes are "Exercise Number: 2024-408-07, Subject: Computer Organization Principles, Difficulty: Medium". Establish a connection between this exercise node and... The four knowledge point entities have "associated mounting" edges with the attributes "mounting time: 2025-11-12, link accuracy: " "Mount type: core test point".

[0109] ② Generate mounting explanation text: with For example, if the scores of all three types of evidence are ≥0.7, an explanatory text will be generated. =“The complete exercise [Given that a CPU uses a 3-level instruction pipeline... Explain the relationship between CPI and MIPS.] mentions that [CPI] is attached to the knowledge point [CPI (Clock Cycles Per Instruction)], mainly based on: Enhanced Context Matching (Score: Domain co-occurrence relationship (score: ), supplementary basis: prior knowledge matching (score: Similarly, generate , , This forms a collection of explanatory texts. .

[0110] ③ Output structured mounted data: Integrate the complete exercise text, mounted knowledge points, mounted relationships, and explanation text into JSON format data. Example excerpt: {"Exercise Text": "Given that a certain CPU uses a 3-level instruction pipeline...", "Loaded Knowledge Points": ["Instruction Pipeline", "Throughput", "CPI (Clock Cycles Per Instruction)", "MIPS (Millions of Instructions Per Second)"], "Explanation Text": [ , , , ]}.

[0111] Finally, the updated knowledge point map was obtained. (Including exercise attachment relationships), collection of explanatory texts Structured mounting data .

[0112] This embodiment takes the computer organization principles questions involving instruction pipelines and CPI in the 408 Computer Science Comprehensive Examination as the processing object. First, a hybrid localization strategy of rule matching and deep learning is used to accurately identify the core test points mentioned in the questions. Then, based on education-specific prompt words, a large language model is driven to generate and verify enhanced context to supplement semantic information. A two-stage screening strategy of knowledge base retrieval and enhanced context filtering is used to obtain a simplified candidate entity set. At the same time, based on unlabeled corpus in the education field and using a single question as the co-occurrence window, a knowledge graph of knowledge point co-occurrence and an entity co-occurrence strength matrix are constructed. Then, three types of matching evidence scores of enhanced context, prior knowledge, and co-occurrence are generated and weighted and fused to obtain the preliminary entity linking results. Then, an iterative optimization strategy is used to balance local scores and global consistency to output the final linking results. Finally, a dedicated node is constructed for the question, a structured attachment relationship with the knowledge point is established, and an interpretable explanatory text is generated. Through the above processing, this method can accurately distinguish the semantic differences of "CPI" in the computer field and other fields, and successfully attach complete exercise content containing four core test points to the corresponding knowledge point entities. The entire implementation process forms a complete processing loop of "exercise input - semantic enhancement - precise matching - global optimization - attachment output", which effectively verifies the adaptability and reliability of this method in educational scenarios with sparse semantics and multiple test points co-occurring, reduces the cost of manual intervention, and realizes the automation and accuracy of exercise attachment.

[0113] To verify the effectiveness of the method of this invention, this experiment configured the hardware and software environment, selected differentiated datasets, and compared and tested three methods, setting core evaluation indicators as follows: The hardware environment consisted of four NVIDIA RTX 3090 graphics cards, a 32-core or higher main processor, 128GB DDR5 ECC memory, and a 2TB NVMe SSD; the software environment used Ubuntu 22.04 LTS system, CUDA 12.1, PyTorch 2.0.1+, Transformers 4.36+ framework, and Qwen-14B platform. The dataset selected was a set of math problems for fifth grade elementary school students, containing 1050 exercises and 294 knowledge point entities, belonging to basic subjects, with low difficulty and standardized expression; and a set of computer organization and architecture problems, containing 900 exercises and 505 knowledge point entities, belonging to a professional field, with high difficulty and dense terminology. The experiment compared the traditional BM25 method, the TF-IDF text matching method, and the method of this invention, using precision, recall, and F1 score as evaluation indicators. The experimental results are shown in Tables 1 and 2. On the fifth-grade elementary school math dataset, the method of this invention has a precision of 0.92, a recall of 0.90, and an F1 score of 0.91, which is significantly better than the other two methods. On the computer organization principle dataset, the method of this invention has a precision of 0.88, a recall of 0.85, and an F1 score of 0.86, which is also better, verifying the effectiveness of the method of this invention.

[0114] Table 1. Experimental Results of Math Problems for Fifth Grade Students

[0115] Table 2. Experimental Results of Computer Organization Principles Problems

[0116] Example 2 Based on Embodiment 1, Embodiment 2 also provides an automatic knowledge graph exercise loading system for smart education, such as... Figure 3 As shown, it includes: The mention localization module is used to obtain the original exercise text and a dictionary of entity types in the education field. It adopts a hybrid localization strategy that combines rule matching and deep learning to identify entity mentions and obtain the set of entity mentions and the location information of each mention in the text.

[0117] Specifically, it includes: a data receiving unit, which receives input data including original exercise text and an entity type dictionary for the education domain, the entity type dictionary for the education domain containing entity type definitions for knowledge points of various subjects.

[0118] The regular expression matching preliminary screening unit is used to construct regular expression matching rules based on the dictionary of entity types in the education field. The regular expression matching rules are used to scan the original exercise text sentence by sentence to initially screen out candidate mention fragments that may represent knowledge points and form an initial mention set.

[0119] The model filtering and correction unit is used to input the initial mention set into the BERT-BiLSTM-CRF model finely tuned by the corpus of educational exercises. The model filters out interference content that has no actual test point significance and confirms the valid knowledge point entity mentions. The valid mentions confirmed by the model are then corrected for boundaries and deduplicated.

[0120] The final output unit is used to output the set of entity mentions, as well as the position information of each mention in the original exercise text in the form of "start character position, end character position".

[0121] The context enhancement module is used to generate enhanced context for each mention in the entity mention set, based on its corresponding local original context and the course type of the education domain, by driving the large language model with education domain-specific prompt words, and after semantic consistency verification, form an enhanced context set.

[0122] Specifically, it includes: an input data loading unit, used to receive input data including entity mentions, the local original context corresponding to each mention, and the course type in the education domain. The local original context is centered on the mention and includes data from the preceding and following parts. A text segment consisting of 100 characters.

[0123] The context enhancement and validation unit is used to construct educational domain-specific cue words. These cue words are input into a large language model (GLM-4.7), which outputs preliminary enhanced context. The preliminary enhanced context undergoes length filtering and semantic consistency validation. Only the retained enhanced text is used as the final enhanced context, outputting a set of enhanced contexts corresponding to each entity mention.

[0124] The candidate entity generation and filtering module is used to filter the concise candidate entity set corresponding to each entity mention from the preset subject knowledge point graph and knowledge base by adopting a two-stage strategy of knowledge base retrieval and enhanced context filtering for each entity mention.

[0125] Specifically, it includes: a multi-source data receiving unit, used to receive input data including entity mentions, enhanced context, knowledge graphs and knowledge bases, where nodes in the knowledge graph are knowledge point entities, and connections between nodes are relationships between knowledge points, and the knowledge base stores detailed descriptions of knowledge point entities; The two-stage candidate entity screening unit is used to recall multiple relevant knowledge point entities from the knowledge point graph based on the text features of entity mentions using the BM25 text matching algorithm, select the top K candidate entities with the highest BM25 matching scores to form an initial candidate entity set; based on the enhanced context, calculate the semantic similarity between the entity mention and the description information of each entity in the initial candidate entity set in the knowledge base, and filter according to the preset second similarity threshold to obtain the simplified candidate entity set and the candidate entity description information set corresponding to the entity mention.

[0126] The calculation formula for the BM25 text matching algorithm is as follows:

[0127] In the formula, For entity mention Knowledge point entities in the knowledge point graph Text matching relevance score, For words In entity mention word frequency in To adjust the parameters affecting word frequency, To adjust the parameters that affect text length, For entity mention Length, The average length of all entity mentions. This represents the total number of knowledge point entities in the knowledge point graph. For words contained in the knowledge point graph The number of knowledge point entities.

[0128] The knowledge point co-occurrence knowledge construction module is used to construct a knowledge point co-occurrence knowledge graph and an entity co-occurrence intensity matrix based on unlabeled corpora in the education field, using a single exercise as the co-occurrence window.

[0129] Specifically, it includes: an entity mention set generation unit, which is used to call the training completed model of the mention localization module to perform knowledge point entity mention recognition on unlabeled corpora in the education field.

[0130] The co-occurrence intensity calculation unit is used to calculate the frequency of any two different knowledge point entities appearing together within the same co-occurrence window in the unlabeled corpus, using a single exercise text as the co-occurrence window. Based on the co-occurrence frequency and the total frequency of each knowledge point entity in the unlabeled corpus, the co-occurrence intensity between any two knowledge point entities is calculated. The formula for calculating the co-occurrence intensity between entities is as follows:

[0131] In the formula, For knowledge point entities and knowledge point entities co-occurrence intensity, For knowledge point entities and knowledge point entities The total number of times they appear together within the same exercise. For knowledge point entities Total frequency of occurrence in the entire corpus For knowledge point entities Total frequency of occurrence in the entire corpus.

[0132] The co-occurrence knowledge graph construction unit is used to construct a co-occurrence knowledge graph of knowledge points based on the calculated co-occurrence intensity. Nodes represent knowledge point entities. If the co-occurrence intensity between two entities is not lower than a preset co-occurrence intensity threshold, an edge is established between the corresponding nodes, and the weight of the edge is the co-occurrence intensity. Simultaneously, an entity co-occurrence intensity matrix is ​​generated, and the matrix elements are the co-occurrence intensities of the corresponding two entities.

[0133] The multi-source evidence generation module is used to generate enhanced contextual evidence scores, prior knowledge evidence scores, and co-occurrence evidence scores for each entity mention and its refined candidate entity set.

[0134] Specifically, it includes: an enhanced context evidence score calculation unit, which uses a text embedding model to convert the enhanced context corresponding to the entity mention and the description information of the candidate entity into vectors, and calculates the cosine similarity between the two as the enhanced context evidence score.

[0135] The prior knowledge evidence score calculation unit is used to construct evaluation prompts based on the course type to which the entity mention belongs, the entity mention itself, and candidate entities, and input them into the large language model. It then parses the numerical results of the large language model, which represent the degree of matching, as the prior knowledge evidence score.

[0136] The co-occurrence evidence score calculation unit is used to obtain the simplified candidate entity set corresponding to all candidate entities mentioned by other entities in the same exercise, excluding the current entity mention, and calculate the average co-occurrence intensity of the current candidate entity and all entities in the simplified candidate entity set as the co-occurrence evidence score.

[0137] The formula for calculating the co-occurrence evidence score is:

[0138] In the formula, For entity mention The corresponding number Candidate entities co-occurrence evidence score For the first The entity mentioned the corresponding first One candidate entity, Indicates except the first The union of the reduced candidate entity sets corresponding to all other mentions besides the one mentioned. for The number of candidate entities, Candidate entities and candidate entities The co-occurrence intensity between them.

[0139] The evidence fusion and disambiguation module is used to weight and fuse the scores of three types of evidence based on a preset evidence weight vector to obtain a comprehensive matching score. Based on this score, candidate entities are selected from the simplified candidate entity set to obtain preliminary entity linking results.

[0140] Specifically, the formula for calculating the overall matching score is as follows:

[0141] In the formula, To achieve a comprehensive matching score, 、 、 These represent the weights of the enhanced contextual evidence score, the prior knowledge evidence score, and the co-occurrence evidence score, respectively. Indicates the enhanced contextual evidence score. This represents the score of prior knowledge evidence. This represents the co-occurrence evidence score.

[0142] The global consistency optimization module is used to perform global consistency optimization based on the preliminary entity linking results, comprehensive matching scores, knowledge point graphs, and co-occurrence knowledge graphs, and outputs the final entity linking results through an iterative optimization strategy.

[0143] Specifically, the formula for calculating the global consistency score is as follows:

[0144] In the formula, Candidate entities Except for the first Aside from the one mentioned, the preliminary linking result set of all other mentions. The global consistency score, The number of entities contained in the initial linked result set. For the first Each entity mentions the corresponding initial link result entity.

[0145] The formula for calculating the final score of a candidate entity is:

[0146] In the formula, To balance the weights, This indicates the overall matching score.

[0147] Initial link result generation unit, used to generate results by final score For each entity, the candidate entity set mentioned is sorted in descending order, and the entity with the highest score is selected as the link result for the current iteration.

[0148] The final entity linking result generation unit is used to repeatedly execute the relevant steps of calculating the global consistency score, calculating the final score of candidate entities, and generating the initial linking result to perform iterative optimization. The preset iteration termination condition is: the iteration reaches a preset number of times or the increase in the global consistency score during the iteration is ≤ a preset threshold. When either termination condition is met, the iteration stops and the final entity linking result is obtained.

[0149] The mounting and interpretation module is used to construct dedicated exercise nodes for the original exercise text, establish a structured mounting relationship between the exercise node and the knowledge point entity node based on the final entity linking result, and generate corresponding interpretable mounting description text.

[0150] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for automatically loading knowledge graph exercises for smart education, characterized in that, include: S1. Obtain the original exercise text and the dictionary of entity types in the education field, and use a hybrid localization strategy that combines rule matching and deep learning to identify the entity mentions and the location information of each mention in the text; S2. For each mention in the entity mention set, based on its corresponding local original context and the course type of the education domain, the large language model is driven by education domain-specific prompt words to generate enhanced context, and after semantic consistency verification, an enhanced context set is formed. S3. For each entity mention and its enhanced context, a two-stage strategy of knowledge base retrieval and enhanced context filtering is adopted to select a simplified candidate entity set corresponding to each entity mention from the preset subject knowledge point graph and knowledge base. S4. Based on unlabeled corpora in the education field, the co-occurrence frequency of knowledge point entities is statistically analyzed and the co-occurrence intensity is calculated using single exercises as co-occurrence windows. Knowledge point co-occurrence knowledge graph and entity co-occurrence intensity matrix are then constructed. S5. For each entity mention and its refined candidate entity set, generate enhanced contextual evidence score, prior knowledge evidence score, and co-occurrence evidence score, including: Using a text embedding model, the enhanced context corresponding to the entity mention and the descriptive information of the candidate entity are converted into vectors, and the cosine similarity between the two is calculated as the enhanced context evidence score. Based on the course type to which the entity mentions, the entity mentions themselves, and the candidate entities, evaluation prompt words are constructed and input into a large language model. The numerical results of the large language model, which represent the degree of matching, are parsed and used as the prior knowledge evidence score. Based on the co-occurrence knowledge graph, obtain the simplified candidate entity set corresponding to all candidate entities mentioned by other entities in the same exercise, excluding the current entity mention. Calculate the average co-occurrence intensity of the current candidate entity and all entities in the simplified candidate entity set as the co-occurrence evidence score. The formula for calculating the co-occurrence evidence score is: In the formula, For entity mention The corresponding number Candidate entities co-occurrence evidence score For the first The entity mentioned the corresponding first One candidate entity, Indicates except the first The union of the reduced candidate entity sets corresponding to all other mentions besides the one mentioned. for The number of candidate entities, Candidate entities and candidate entities The co-occurrence intensity between them; S6. Based on the preset evidence weight vector, the scores of the three types of evidence are weighted and fused to obtain a comprehensive matching score. Based on this score, candidate entities are selected from the simplified candidate entity set to obtain preliminary entity linking results. S7. Based on the preliminary entity linking results, comprehensive matching scores, knowledge point graphs, and co-occurrence knowledge graphs, global consistency optimization is performed through iterative optimization strategies to output the final entity linking results. S8. Construct dedicated exercise nodes for the original exercise text, establish a structured mounting relationship between the exercise node and the knowledge point entity node based on the final entity linking result, and generate corresponding interpretable mounting description text.

2. The method for automatically mounting knowledge graph exercises for smart education according to claim 1, characterized in that, S1 includes: Based on the dictionary of entity types in the education field, regular expression matching rules are constructed. The original exercise text is scanned using the regular expression matching rules to initially filter out candidate mention fragments representing knowledge points and form an initial mention set. The initial set of mentions is input into a BERT-BiLSTM-CRF model finely tuned with an educational domain exercise corpus. The model filters out interference content that has no actual test point significance and confirms valid knowledge point entity mentions. Boundary correction and deduplication are performed on the valid mentions confirmed by the model. Output the set of entity mentions and record the position information of each mention in the original exercise text in the form of "start character position, end character position".

3. The method for automatically mounting knowledge graph exercises for smart education according to claim 1, characterized in that, S2 includes: For each entity mention in the entity mention set, obtain the local original context corresponding to each entity mention and the course type of the education field to which each entity mention belongs; wherein, the local original context is truncated forward and backward from the position where the entity mention appears in the original text, by a predetermined number of segments. The text fragment obtained from 1 character; Based on the course type and local original context of the education field to which it belongs, construct corresponding education field-specific prompt words; The education-specific prompts are input into a large language model to generate preliminary enhanced context. The preliminary enhanced context is filtered and validated, including: The initial enhanced context is length-filtered to retain text with character lengths within a preset range; Semantic consistency verification is performed on the text filtered by length: the local original context and the preliminary enhanced context are converted into vector representations by a text embedding model, and the cosine similarity between the two is calculated; when the cosine similarity is greater than a preset first similarity threshold, it is determined as the final enhanced context of the mention, and the final enhanced contexts corresponding to each entity mention are summarized to form the enhanced context set.

4. The method for automatically mounting knowledge graph exercises for smart education according to claim 1, characterized in that, S3 includes: For each entity mention and its enhanced context, filtering is performed based on a knowledge point graph and a knowledge base. The nodes of the knowledge point graph are knowledge point entities, the connections between nodes are the relationships between knowledge points, and the knowledge base stores descriptive information of knowledge point entities. Based on the text features mentioned by the entities, the BM25 text matching algorithm is used to recall multiple related knowledge point entities from the knowledge point graph, and the top K candidate entities with the highest BM25 matching scores are selected to form an initial candidate entity set. Based on the enhanced context, the cosine similarity between the entity and the description information of each entity in the initial candidate entity set in the knowledge base is calculated, and the entity is filtered according to a preset second similarity threshold to obtain a simplified candidate entity set and a candidate entity description information set corresponding to the entity mention.

5. The method for automatically mounting knowledge graph exercises for smart education according to claim 4, characterized in that, The calculation formula for the BM25 text matching algorithm is as follows: In the formula, For entity mention Knowledge point entities in the knowledge point graph Text matching relevance score, For words In entity mention word frequency in To adjust the parameters affecting word frequency, To adjust the parameters that affect text length, For entity mention Length, The average length of all entity mentions. This represents the total number of knowledge point entities in the knowledge point graph. For words contained in the knowledge point graph The number of knowledge point entities.

6. The method for automatically mounting knowledge graph exercises for smart education according to claim 1, characterized in that, S4 includes: Obtain unlabeled corpus in the field of education, and use the model trained in step S1 to process the unlabeled corpus to identify all knowledge point entity mentions in it; Using a single exercise text as a co-occurrence window, the frequency of any two different knowledge point entities appearing together in the same co-occurrence window in the unlabeled corpus was statistically analyzed. Based on the co-occurrence frequency and the total frequency of each knowledge point entity in the unlabeled corpus, the co-occurrence strength between any two knowledge point entities is calculated; the formula for calculating the co-occurrence strength between entities is: In the formula, For knowledge point entities and knowledge point entities co-occurrence intensity, For knowledge point entities and knowledge point entities The total number of times they appear together within the same exercise. For knowledge point entities Total frequency of occurrence in the entire corpus For knowledge point entities Total frequency of occurrence in the entire corpus; Based on the calculated co-occurrence intensity, a knowledge graph of knowledge point co-occurrence is constructed, where nodes represent knowledge point entities. If the co-occurrence intensity between two entities is not lower than a preset co-occurrence intensity threshold, an edge is established between the corresponding nodes, and the weight of the edge is the co-occurrence intensity. Finally, the knowledge graph of knowledge point co-occurrence and the corresponding entity co-occurrence intensity matrix are obtained, where the element value in the matrix is ​​the co-occurrence intensity between two entities.

7. The method for automatically mounting knowledge graph exercises for smart education according to claim 1, characterized in that, The formula for calculating the comprehensive matching score is as follows: In the formula, To achieve a comprehensive matching score, , , These represent the weights of the enhanced contextual evidence score, the prior knowledge evidence score, and the co-occurrence evidence score, respectively. Indicates the enhanced contextual evidence score. This represents the score of prior knowledge evidence. This represents the co-occurrence evidence score.

8. The method for automatically mounting knowledge graph exercises for smart education according to claim 1, characterized in that, The S7 section describes a global consistency optimization strategy using an iterative approach, specifically including: The formula for calculating the global consistency score is: In the formula, Candidate entities Except for the first Aside from the one mentioned, the preliminary linking result set of all other mentions. The global consistency score, The number of entities contained in the initial linked result set. For the first Each entity mentions the corresponding initial link result entity; The formula for calculating the final score of a candidate entity is: In the formula, To balance the weights, Indicates the overall matching score; Based on final score Sort the candidate entity set mentioned by each entity in descending order, and select the entity with the highest score as the link result of the current iteration; Repeat the above steps for iteration. The preset iteration termination condition is: the iteration reaches a preset number of times or the increase in the global consistency score during the iteration is less than or equal to a preset threshold. The iteration stops when either termination condition is met, and the final entity linking result is obtained.

9. A knowledge graph exercise automatic loading system for smart education, characterized in that, include: The mention localization module is used to obtain the original exercise text and a dictionary of entity types in the education field. It adopts a hybrid localization strategy that combines rule matching and deep learning to identify entity mentions and obtain the set of entity mentions and the location information of each mention in the text. The context enhancement module is used to generate enhanced context for each mention in the entity mention set, based on its corresponding local original context and the course type of the education domain, by driving the large language model with education domain-specific prompt words, and after semantic consistency verification, form an enhanced context set; The candidate entity generation and filtering module is used to filter the concise candidate entity set corresponding to each entity mention from the preset subject knowledge point map and knowledge base by adopting a two-stage strategy of knowledge base retrieval and enhanced context filtering for each entity mention; The knowledge point co-occurrence knowledge construction module is used to statistically analyze the co-occurrence frequency of knowledge point entities and calculate the co-occurrence intensity based on unlabeled corpora in the education field, using a single exercise as the co-occurrence window, and to construct a knowledge point co-occurrence knowledge graph and entity co-occurrence intensity matrix. The multi-source evidence generation module is used to generate enhanced contextual evidence scores, prior knowledge evidence scores, and co-occurrence evidence scores for each entity mention and its refined candidate entity set; including: The enhanced context evidence score calculation unit is used to convert the enhanced context corresponding to the entity mention and the description information of the candidate entity into vectors through a text embedding model, and calculate the cosine similarity between the two as the enhanced context evidence score. The prior knowledge evidence score calculation unit is used to construct evaluation prompt words based on the course type to which the entity mention belongs, the entity mention itself, and the candidate entity, and input them into a large language model, and parse the numerical result of the large language model output, which represents the degree of matching, as the prior knowledge evidence score; The co-occurrence evidence score calculation unit is used by the multi-source evidence generation module to obtain, based on the co-occurrence knowledge graph, the simplified candidate entity set corresponding to all candidate entities mentioned in the same exercise (excluding the current entity mention), and calculate the average co-occurrence intensity of the current candidate entity and all entities in the simplified candidate entity set as the co-occurrence evidence score. The formula for calculating the co-occurrence evidence score is: In the formula, For entity mention The corresponding number Candidate entities co-occurrence evidence score For the first The entity mentioned the corresponding first One candidate entity, Indicates except the first The union of the reduced candidate entity sets corresponding to all other mentions besides the one mentioned. for The number of candidate entities, Candidate entities and candidate entities The co-occurrence intensity between them; The evidence fusion and disambiguation module is used to weight and fuse the scores of three types of evidence based on a preset evidence weight vector to obtain a comprehensive matching score. Based on this score, candidate entities are selected from the simplified candidate entity set to obtain preliminary entity linking results. The global consistency optimization module is used to perform global consistency optimization based on the preliminary entity linking results, comprehensive matching scores, knowledge point graphs, and co-occurrence knowledge graphs through iterative optimization strategies, and outputs the final entity linking results. The mounting and interpretation module is used to construct dedicated exercise nodes for the original exercise text, establish a structured mounting relationship between the exercise node and the knowledge point entity node based on the final entity linking result, and generate corresponding interpretable mounting description text.