Middle and primary school test question intelligent generation method based on education big model
By constructing a structured educational dataset and pre-training and fine-tuning a large educational model, combined with the mutant fish swarm algorithm and automatic quality assessment, the problems of diversity and adaptability in the generation of test questions for primary and secondary schools were solved, and high-quality and diversified test question generation was achieved.
Patent Information
- Application Number
- CN202511433305.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-09
- Publication Date
- 2026-01-02
AI Technical Summary
Existing test question generation technologies for primary and secondary schools rely on manual writing and static question banks, making it difficult to continuously and efficiently cover a wide range of knowledge points and diverse question types. They also cannot dynamically adapt to updates to the teaching syllabus and personalized needs, thus limiting the diversity of generated results and their adaptability to teaching.
We construct a structured educational dataset, use a large educational model for pre-training and fine-tuning, combine the mutant fish swarm algorithm and automatic quality assessment mechanism to generate and optimize the test question set, and dynamically adjust the model parameters to adapt to teaching needs.
It has achieved comprehensive coverage of knowledge points, reasonable distribution of difficulty, and excellent language quality in generating multi-question test questions, improving the quality, balance, and diversity of test questions, and adapting to the teaching needs of different grades and subjects.
Smart Images

Figure CN121257488A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of test question technology for primary and secondary schools, and in particular to an intelligent method for generating test questions for primary and secondary schools based on a large-scale educational model. Background Technology
[0002] With the rapid development of artificial intelligence and natural language processing technologies, intelligent educational tools are gradually being applied in primary and secondary school teaching and examinations. Currently, the design and generation of primary and secondary school test questions still mainly rely on manual writing and template matching, depending on teachers' experience and manual maintenance of the question bank. This traditional model has many shortcomings.
[0003] Manually creating test questions is cumbersome, time-consuming, and difficult to consistently and efficiently cover a wide range of knowledge points and diverse question types. Relying on static question banks makes it difficult to dynamically adapt to the latest teaching syllabus, textbook versions, and differences in students' cognitive abilities, resulting in lagging test content updates and failing to meet the needs of personalized teaching and accurate assessment. Traditional automatic test question generation technologies are mainly based on rule extraction, simple templates, or limited machine learning methods, which make it difficult to balance the knowledge coverage, difficulty level, and expression quality of test questions, and the diversity and teaching adaptability of the generated results are significantly limited. Summary of the Invention
[0004] One objective of this invention is to propose an intelligent method for generating test questions for primary and secondary schools based on a large-scale educational model. This invention can automatically output an optimal set of multi-question sets while ensuring comprehensive coverage of knowledge points, reasonable distribution of difficulty, and excellent language quality, thereby greatly improving the quality, balance, and diversity of automatically generated test questions.
[0005] According to an embodiment of the present invention, a method for intelligent generation of primary and secondary school test questions based on a large-scale education model includes:
[0006] We collect primary and secondary school textbooks, teaching outlines, past exam questions and question banks, and perform text cleaning, format standardization and key knowledge point annotation on the collected educational data to generate a structured educational dataset.
[0007] The educational big data model is pre-trained using a structured educational dataset and then fine-tuned to build an educational big data model specifically for intelligent generation of test questions in primary and secondary schools.
[0008] Based on the finely tuned educational model, input the target knowledge points, question types, difficulty levels, and grade level parameters to generate a set of candidate test questions;
[0009] The mutant fish swarm algorithm is used to globally optimize the candidate question set. A question fitness function is set to comprehensively evaluate the knowledge coverage, difficulty distribution and language expression indicators of the candidate questions. The candidate question set is then screened and optimized to generate an optimized candidate question set.
[0010] The optimized candidate test question set is input into the test question evaluation module, and the automatic quality evaluation mechanism is used to detect the semantic accuracy, logical rigor and pedagogical conformity of the test questions, and the test question evaluation results are output.
[0011] Based on the test evaluation results and real-time feedback data from teachers and students, the relevant parameters of the education big data model and the mutant fish swarm algorithm are dynamically adjusted to achieve continuous optimization and adaptive updating of test generation.
[0012] Optionally, generating the structured educational dataset includes:
[0013] Collect textbook text data, teaching syllabus data, past exam question data, and exercise bank data for primary and secondary schools, manage them with unified numbering and timestamp marking, and form a raw educational data set;
[0014] Each educational data sample in the original educational dataset is cleaned to obtain the cleaned educational dataset.
[0015] Each educational data sample in the cleaned educational dataset is standardized to obtain a formatted educational dataset.
[0016] Apply the knowledge point annotation model to each educational data sample in the formatted educational dataset to extract and annotate the core knowledge points contained in each section of content, forming a knowledge point annotation result set;
[0017] A structured educational dataset is constructed by merging a set of formatted educational data with knowledge point annotations and a set of knowledge point annotation results.
[0018] Optionally, generating the structured educational dataset includes:
[0019] The initial form of the large-scale education model is defined as the model network structure, initial model parameters, and vocabulary. The formatted educational text content is encoded into input sequence and target sequence pairs through encoding functions.
[0020] Perform pre-training, set a small batch size, and use autoregressive cross-entropy loss as the training objective. For each batch of educational data samples, the log probability of the target label under the current parameters is accumulated for all positions. The average of the values is then taken as the batch loss.
[0021] A gradient descent-based parameter update strategy is adopted, in which the parameters are adjusted by gradient descent using the pre-trained loss in each parameter iteration;
[0022] A micro-call control prefix for intelligent generation of test questions in primary and secondary schools is constructed. The knowledge point set and grade label are encoded into a control mark sequence, which is then concatenated with the encoded input sequence to form a fine-tuning input.
[0023] Supervised fine-tuning is performed, using cross-entropy loss as the training objective. Within each batch, the log probability of the target label under the current parameters is accumulated according to all educational data samples and all sequence positions. The negative number is then taken as the batch fine-tuning loss after averaging by the number of samples.
[0024] By simultaneously minimizing the weighted sum of the pre-training loss and the fine-tuning loss, the final parameter solution for intelligent generation of test questions for primary and secondary schools is obtained. The final parameter solution, along with the model network structure and vocabulary, is used as a component of the large-scale education model.
[0025] Optionally, generating the candidate question set includes:
[0026] Based on the finely tuned educational model, the input control parameters are set as the target knowledge point set, test question type identifier, difficulty level label, and the label of the primary and secondary school grade.
[0027] The control parameters input for the test question generation task are sequentially converted into a control tag sequence through a control encoding function;
[0028] The control tag sequence is input into the education big data model to generate candidate test question text;
[0029] When generating candidate test question texts, a temperature-controlled sampling strategy is adopted to repeatedly sample a specified number of candidate test question texts, and then combine all the generated candidate test question texts into a candidate test question set in sequence.
[0030] Optionally, the mutant fish swarm algorithm includes:
[0031] For each candidate test question text, the knowledge coverage score, difficulty matching score, and language expression score are calculated separately, and then weighted and summed to obtain the single question fitness score;
[0032] Construct a global optimization model based on the mutant fish swarm algorithm, assuming the fish swarm size is . The selection results of the question set are represented by binary selection vectors. Each bit of each binary selection vector is used to indicate whether the corresponding candidate question text is selected. For any binary selection vector, its group-level objective function value is calculated.
[0033] Several binary selection vectors are randomly generated as the initial positions of the fish swarm, and the population-level objective function value corresponding to each selection vector is calculated. The selection vector with the largest population-level objective function value is taken as the initial global optimal selection vector.
[0034] Determine the neighborhood set of the selection vector in each fish group, count each selection vector in the neighborhood set, and use majority voting to determine the new value of each vector to obtain the intermediate selection vector. If the group-level objective function value corresponding to the intermediate selection vector is greater than that of the current selection vector, then replace the current selection vector with the intermediate selection vector; otherwise, leave it unchanged.
[0035] For each updated selection vector, perform a mutation operation bit by bit. For each bit, generate a random number between zero and one. If the random number is less than the product of the current mutation rate and the mutation sensitivity adjustment factor, flip the bit; otherwise, leave it unchanged. After the update, recalculate the population-level objective function value corresponding to each selection vector and take the selection vector with the largest population-level objective function value as the new global optimal selection vector.
[0036] Repeat the neighborhood search and mutation operation until the preset maximum number of iterations is reached or the change in the population-level objective function value of the global optimal selection vector in two consecutive iterations is less than the preset threshold. Output the selection vector with the largest population-level objective function value, and form an optimized candidate question set by combining all candidate question texts selected by this selection vector.
[0037] Optionally, the automatic quality assessment mechanism for detecting the semantic accuracy, logical rigor, and pedagogical suitability of the test questions includes:
[0038] Calculate the semantic accuracy score, logical rigor score, and pedagogical conformity score for each optimized candidate test question text;
[0039] The semantic accuracy score, logical rigor score, and pedagogical conformity score of each optimized candidate test question text are weighted and summed to obtain a comprehensive evaluation score;
[0040] The semantic accuracy score, logical rigor score, pedagogical compliance score, and comprehensive evaluation score of each optimized candidate test question text are all used as the test question evaluation results. All test question evaluation results are combined into a test question evaluation result set in the order of the text.
[0041] Optionally, the semantic accuracy score is obtained by extracting the core semantic vectors of the candidate test question text and the target knowledge point set, standardizing them respectively, and then calculating the cosine similarity.
[0042] Optionally, the teaching compliance score is obtained by extracting the semantic vectors of the candidate test question text and the teaching knowledge base content corresponding to the target grade label, standardizing them, and then calculating the cosine similarity.
[0043] The beneficial effects of this invention are:
[0044] This invention constructs a multi-source structured educational dataset covering primary and secondary school textbooks, teaching outlines, past exam questions, and question banks. It employs a step-by-step data cleaning, format standardization, and knowledge point annotation strategy to achieve unified data granularity and accurate mapping of knowledge point labels. Relying on deep data structuring and supervised annotation, it can achieve accurate modeling and semantic understanding of knowledge structures for all educational stages. This significantly improves the knowledge adaptability and content updating ability of large models in question generation tasks. It breaks through the data utilization bottleneck of template and rule-driven approaches, enabling the model to dynamically adapt to different grades, subjects, and knowledge point combinations, achieving flexible coverage of all educational stages, multiple knowledge points, and multiple question types.
[0045] This invention proposes a mutated fish swarm algorithm for candidate question sets. By using a group-level objective function, it integrates single-question fitness, knowledge coverage, difficulty fit, and language expression indicators into a global optimal selection paradigm. The algorithm uses binary selection vector encoding of fish swarm positions and combines majority voting neighborhood search and adaptive mutation operators to achieve efficient global optimization of large-scale candidate question sets. Under the premise of ensuring comprehensive knowledge coverage, reasonable difficulty distribution, and excellent language quality, it can automatically output the optimal multi-question set, which greatly improves the quality, balance, and diversity of automatically generated questions. Attached Figure Description
[0046] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:
[0047] Figure 1 This is a flowchart of a method for intelligently generating primary and secondary school test questions based on a large-scale education model, as proposed in this invention. Detailed Implementation
[0048] Example 1: Reference Figure 1 A method for intelligently generating primary and secondary school test questions based on a large-scale education model, comprising:
[0049] We collect primary and secondary school textbooks, teaching outlines, past exam questions and question banks, and perform text cleaning, format standardization and key knowledge point annotation on the collected educational data to generate a structured educational dataset.
[0050] In this implementation, a structured educational dataset is generated, including:
[0051] Collect textbook text data, teaching syllabus data, past exam question data, and exercise bank data for primary and secondary schools, manage them with unified numbering and timestamp marking, and form a raw educational data set;
[0052] Each educational data sample in the original educational dataset includes a data source identifier, a data collection timestamp, text content, and a label for the grade level to which it belongs. The total amount of educational data in the original educational dataset is N.
[0053] Each educational data sample in the original educational dataset is cleaned to obtain the cleaned educational dataset.
[0054] Text cleaning involves removing invalid symbols, garbled characters, duplicate content, and redundant information unrelated to the teaching content.
[0055] Each educational data sample in the cleaned educational dataset is standardized to obtain a formatted educational dataset.
[0056] The format standardization process involves dividing the text content into chapters, entries, and paragraphs according to the structure of the teaching content, thereby unifying the style of knowledge expression.
[0057] Apply the knowledge point annotation model to each educational data sample in the formatted educational dataset to extract and annotate the core knowledge points contained in each section of content, forming a knowledge point annotation result set;
[0058] Based on the cleaned and formatted educational datasets, initial knowledge point samples are labeled using expert manual annotation, rule extraction, or a pre-trained natural language processing model to form a knowledge point sample set. Using the knowledge point sample set as training data, a knowledge point annotation model is trained through supervised learning. Each item in the knowledge point annotation result set contains a formatted educational dataset sample and all the core knowledge points corresponding to that sample.
[0059] A structured educational dataset is constructed by merging a set of formatted educational data with knowledge point annotations and a set of knowledge point annotation results.
[0060] Each formatted educational data sample in the formatted educational dataset is matched against all the core knowledge points corresponding to the sample in the knowledge point annotation result set. The text content, all core knowledge points, and the primary / secondary school grade label of the sample are integrated one-to-one as a data item in the structured educational dataset. The above matching and integration operations are performed on all data samples in the formatted educational dataset and the knowledge point annotation result set in turn. All integrated data items are summarized to construct the structured educational dataset. Each data item in the structured educational dataset includes a formatted educational data sample, all core knowledge points, and primary / secondary school grade labels, ensuring that the content, knowledge points, and grade labels in each data item correspond one-to-one and are stored consistently.
[0061] The educational big data model is pre-trained using a structured educational dataset and then fine-tuned to build an educational big data model specifically for intelligent generation of test questions in primary and secondary schools.
[0062] In this implementation, a structured educational dataset is generated, including:
[0063] The initial form of the large-scale education model is defined as the model network structure, initial model parameters, and vocabulary. The formatted educational text content is encoded into input sequence and target sequence pairs through encoding functions.
[0064] The target sequence length does not exceed the maximum sequence length, and the effective sequence length of each educational data sample is denoted as the effective sequence length of the educational data sample.
[0065] Perform pre-training, set a small batch size, and use autoregressive cross-entropy loss as the training objective. For each batch of educational data samples, the log probability of the target label under the current parameters is accumulated for all positions. The average of the values is then taken as the batch loss.
[0066] A gradient descent-based parameter update strategy is adopted, in which the parameters are adjusted by gradient descent using the pre-trained loss in each parameter iteration;
[0067] A micro-call control prefix for intelligent generation of test questions in primary and secondary schools is constructed. The knowledge point set and grade label are encoded into a control mark sequence, which is then concatenated with the encoded input sequence to form a fine-tuning input.
[0068] In Example 1, the set of all core knowledge points and the grade label of each data item in the structured education dataset are used as input to the control encoding function, which maps the set of core knowledge points and the grade label to a control tag sequence in sequence. The control tag sequence is then concatenated with the input sequence obtained by encoding the formatted educational text content. The concatenation operation adopts a sequential connection method, that is, the control tag sequence is first followed by the input sequence. The complete concatenated sequence is the fine-tuning input. During the concatenation process, the control encoding function is used to convert the set of core knowledge points and the grade label into a tag sequence under the word index one by one. The concatenation function is used to merge the control tag sequence and the input sequence in sequence without loss, so as to obtain the fine-tuning input containing control information and text information.
[0069] Supervised fine-tuning is performed, using cross-entropy loss as the training objective. Within each batch, the log probability of the target label under the current parameters is accumulated according to all educational data samples and all sequence positions. The negative number is then taken as the batch fine-tuning loss after averaging by the number of samples.
[0070] The input during calculation includes the control tag sequence and a prefix of the previous sequence.
[0071] By simultaneously minimizing the weighted sum of the pre-training loss and the fine-tuning loss, the final parameter solution for intelligent generation of test questions for primary and secondary schools is obtained. The final parameter solution, along with the model network structure and vocabulary, is used as a component of the large-scale education model.
[0072] Based on the finely tuned educational model, input the target knowledge points, question types, difficulty levels, and grade level parameters to generate a set of candidate test questions;
[0073] In this embodiment, a candidate question set is generated, including:
[0074] Based on the finely tuned educational model, the input control parameters are set as the target knowledge point set, test question type identifier, difficulty level label, and the label of the primary and secondary school grade.
[0075] The control parameters input for the test question generation task are sequentially converted into a control tag sequence through a control encoding function;
[0076] The control tag sequence consists of the order of corresponding index tags in the vocabulary, and the length of the control tag sequence is equal to the number of tags into which the control parameter input is split.
[0077] The control tag sequence is input into the education big data model to generate candidate test question text;
[0078] The generation process of candidate test text is a conditional language modeling process. The generation of each candidate test text is equivalent to the education big model taking the control tag sequence as a condition, outputting the probability distribution of the next tag for each position in sequence, selecting a tag from the probability distribution as the output, until all test text content is generated. Each candidate test text is composed of several tags in sequence, and the generation length is the number of tags used to generate the candidate test text.
[0079] ;
[0080] in, Indicates the first The question is in the location The output marker, Indicates the generation of test questions Total length, Indicates based on parameters The conditional probability function, Indicates the first All generated markers before the current position in the question.
[0081] When generating candidate test question texts, a temperature-controlled sampling strategy is adopted to repeatedly sample a specified number of candidate test question texts, and then combine all the generated candidate test question texts into a candidate test question set in sequence.
[0082] The temperature-controlled sampling strategy involves performing a power transformation and normalization on the original probability distribution of the educational model's output at each step, adjusting the diversity of sampling. The temperature parameter is greater than zero; the larger the temperature parameter, the more uniform the output distribution becomes, and the greater the diversity of the generated test questions.
[0083] Each candidate test question text in the candidate test question set is generated by the education big data model under the same set of control parameters. Each candidate test question text covers the target knowledge point set, conforms to the test question type identifier, meets the difficulty level label, and has the semantic requirements of the primary and secondary school grade label.
[0084] The mutant fish swarm algorithm is used to globally optimize the candidate question set. A question fitness function is set to comprehensively evaluate the knowledge coverage, difficulty distribution and language expression indicators of the candidate questions. The candidate question set is then screened and optimized to generate an optimized candidate question set.
[0085] In this embodiment, the mutated fish swarm algorithm includes:
[0086] For each candidate test question text, the knowledge coverage score, difficulty matching score, and language expression score are calculated separately, and then weighted and summed to obtain the single question fitness score;
[0087] The knowledge coverage score is the proportion of the intersection of the set of knowledge points contained in the candidate test question text and the set of target knowledge points to the target set of knowledge points. The difficulty fit score is the absolute value of the difference between the estimated difficulty value of the candidate test question text and the difficulty level label. The language expression score is the language expression quality score of the candidate test question text.
[0088] Construct a global optimization model based on the mutant fish swarm algorithm, assuming the fish swarm size is . The selection results of the question set are represented by binary selection vectors. Each bit of each binary selection vector is used to indicate whether the corresponding candidate question text is selected. For any binary selection vector, its group-level objective function value is calculated.
[0089] The group-level objective function value is the average fitness score of each individual question in the selected test text minus the penalty value for knowledge point coverage gaps and the penalty value for difficulty fit deviation. The penalty value for knowledge point coverage gaps is one minus the proportion of the intersection of the knowledge point set of all selected test texts and the target knowledge point set to the target knowledge point set. The penalty value for difficulty fit deviation is the absolute value of the difference between the average difficulty estimate of all selected test texts and the difficulty level label. Each penalty value in the group-level objective function value is multiplied by its respective penalty weight coefficient and then included in the total value.
[0090] ;
[0091] in, For the i-th candidate question text, The total number of candidate question texts. Let i be the fitness score of the i-th candidate test item text. This indicates the number of questions selected. As a penalty weight, This refers to the knowledge gap, that is, the proportion of target knowledge points not covered by the current set of questions. Difficulty fit deviation is the absolute value of the difference between the average difficulty of the selected test questions and the target difficulty level. This is a binary selection vector indicating whether a question has been selected. Indicates selection Otherwise ;
[0092] Several binary selection vectors are randomly generated as the initial positions of the fish swarm, and the population-level objective function value corresponding to each selection vector is calculated. The selection vector with the largest population-level objective function value is taken as the initial global optimal selection vector.
[0093] Determine the neighborhood set of the selection vector in each fish group, count each selection vector in the neighborhood set, and use majority voting to determine the new value of each vector to obtain the intermediate selection vector. If the group-level objective function value corresponding to the intermediate selection vector is greater than that of the current selection vector, then replace the current selection vector with the intermediate selection vector; otherwise, leave it unchanged.
[0094] In Example 1, the majority voting method is as follows: for each selection variable, all selection vectors in the neighborhood set are counted for the value (0 or 1) at that position, and the value that appears most frequently is taken as the new value of that position. If 0 and 1 appear the same number of times, the value of the original selection vector at that position is retained first. After all positions are counted in turn, a new intermediate selection vector is obtained. The new intermediate selection vector is used to compare the group-level objective function value with the current selection vector. If the group-level objective function value is larger, it is replaced by the intermediate selection vector; otherwise, it remains unchanged.
[0095] For each updated selection vector, perform a mutation operation bit by bit. For each bit, generate a random number between zero and one. If the random number is less than the product of the current mutation rate and the mutation sensitivity adjustment factor, flip the bit; otherwise, leave it unchanged. After the update, recalculate the population-level objective function value corresponding to each selection vector and take the selection vector with the largest population-level objective function value as the new global optimal selection vector.
[0096] The mutation sensitivity adjustment factor is the result of a nonlinear mapping between the population-level objective function value of the currently selected vector and the population-level objective function value of the selected vector before mutation.
[0097] ;
[0098] in, For the first The fish in the The intermediate selection vector in the next iteration. For the first The fish in the The updated selection vector in the next iteration. For the first The value (0 or 1) of the middle selection vector of a fish at the i-th position. For the first After updating the vector, the fish selects the value at the i-th position. For the first The random number generated at position i of the fish takes values within the range [i, ii, iii]. , For the current number The mutation rate of the next iteration. This is a mutation sensitivity adjustment factor, which controls the degree of response of the mutation operation to the difference in the objective function. Choose the group-level objective function value corresponding to the intermediate selection vector.
[0099] Repeat the neighborhood search and mutation operation until the preset maximum number of iterations is reached or the change in the population-level objective function value of the global optimal selection vector in two consecutive iterations is less than the preset threshold. Output the selection vector with the largest population-level objective function value, and form an optimized candidate question set by combining all candidate question texts selected by this selection vector.
[0100] The candidate question set was optimized to achieve optimal or near-optimal coverage of knowledge points, relevance of difficulty, and quality of language expression.
[0101] The optimized candidate test question set is input into the test question evaluation module, and the automatic quality evaluation mechanism is used to check the semantic accuracy, logical rigor and pedagogical conformity of the test questions, and output the test question evaluation results.
[0102] In this implementation, an automatic quality assessment mechanism is used to detect the semantic accuracy, logical rigor, and pedagogical suitability of the test questions, including:
[0103] Calculate the semantic accuracy score, logical rigor score, and pedagogical conformity score for each optimized candidate test question text;
[0104] In Example 1, the semantic accuracy score is used to measure the degree of semantic mapping between the candidate test question text and the target knowledge point set. The higher the cosine similarity value, the higher the degree of semantic mapping and the higher the semantic accuracy score.
[0105] The logical rigor score is used to measure the coherence and compliance of the internal structure of candidate test question texts. The logical rigor score is obtained by calculating the log probability of the current tag under the prefix condition in the sequence order of all tags in each candidate test question text, averaging the log probability values of all tags to obtain the raw score, and then performing max-min normalization on the raw scores of all candidate test question texts to map them to the interval between zero and one. The normalized score is used as the logical rigor score. The higher the logical rigor score, the stronger the logic of the text.
[0106] The teaching conformity score is used to measure the degree of matching between the candidate test text and the teaching semantic content corresponding to the target grade label. The higher the cosine similarity value, the more the teaching content is in line with the target grade, and the higher the teaching conformity score.
[0107] In this embodiment, the semantic accuracy score is obtained by extracting the core semantic vectors of the candidate test question text and the target knowledge point set, standardizing them, and then calculating the cosine similarity.
[0108] In this embodiment, the teaching compliance score is obtained by extracting the semantic vectors of the candidate test question text and the teaching knowledge base content corresponding to the target grade label, standardizing them, and then calculating the cosine similarity.
[0109] The semantic accuracy score, logical rigor score, and pedagogical conformity score of each optimized candidate test question text are weighted and summed to obtain a comprehensive evaluation score;
[0110] The weights of the comprehensive evaluation score are determined by the weights of semantic accuracy, logical rigor, and pedagogical conformity. The sum of all weights equals one, and the higher the comprehensive evaluation score, the higher the overall quality of the test text.
[0111] The semantic accuracy score, logical rigor score, pedagogical compliance score, and comprehensive evaluation score of each optimized candidate test question text are all used as the test question evaluation results. All test question evaluation results are combined into a test question evaluation result set in the order of the text.
[0112] Based on the test evaluation results and real-time feedback data from teachers and students, the relevant parameters of the education big data model and the mutant fish swarm algorithm are dynamically adjusted to achieve continuous optimization and adaptive updating of test generation.
[0113] Example 2: In an experiment to generate unit assessment questions for linear functions in the third year of junior high school, the implementers first imported the school's mathematics textbooks from the past five years, past exam papers, exercise books, and internal and external mathematics question banks into the system. The original data totaled 82,000 entries. After automatic removal of irrelevant entries, format correction, and redundancy cleanup, 74,500 structured educational samples remained. Each data item was accompanied by a knowledge point tag, a grade tag, and the original text content. Manual sampling confirmed a data accuracy rate of 99.3%.
[0114] The system performs pre-training and fine-tuning of a large-scale educational model based on a dataset. During the training phase, an autoregressive training strategy with a batch size of 128 was adopted, and the maximum sequence length was 256 labels. After the pre-training loss decreased to 0.07, the fine-tuning phase began. During fine-tuning, the following control parameters were used: "Knowledge point set: linear function concept, function expression, graph and properties, practical applications; Grade: Ninth grade; Question types: multiple choice, fill-in-the-blank, problem solving; Difficulty: medium". The training loss converged to 0.06, and the model had 3.1 billion parameters.
[0115] The process then proceeds to intelligent question generation. After the implementer inputs the target parameters, the model automatically generates 60 candidate questions. With the sampling temperature parameter set to 0.7, the generated results are as follows:
[0116] "If the graph of the linear function y=3x+b passes through the point (1,2), then b=____."
[0117] "Given that the graph of the linear function y=kx+c passes through the point (-1,0) and intersects the x-axis at (3,0), then the values of k and c are ______ and ______ respectively."
[0118] "The graph of the linear function y=ax+b passes through the points (0,5) and (2,1). Please write its analytical expression and state the coordinates of the intersection points of the graph with the x-axis and y-axis."
[0119] The candidate question set was fed into the mutated fish swarm algorithm optimization module. The system used a swarm size of 30, and all initial selection vectors were randomly generated. Knowledge coverage, difficulty fit, and language expression quality were automatically scored, and the changes in the swarm-level objective function were recorded in each iteration. After 18 rounds of neighborhood search and adaptive mutation, the final selected vectors covered 100% of the target knowledge points, with an average difficulty fit of 0.94 and an average language expression quality score of 0.92 for each question. The question redundancy rate was reduced to 3.2% during the optimization process.
[0120] The candidate question set was optimized and entered into an automatic quality assessment process. The system scored each question separately: semantic accuracy was highest at 0.97, lowest at 0.89, and average at 0.93; logical rigor averaged 0.91, and pedagogical relevance averaged 0.95. The comprehensive weighted score (weights: semantic 0.4, logic 0.3, pedagogy 0.3) was highest at 0.96 and lowest at 0.88, with the overall score significantly higher than the threshold of 0.80.
[0121] To verify the beneficial effects, 40 questions of the same knowledge points and difficulty were generated concurrently using the traditional template method. The template questions scored an average of 0.81 for semantic accuracy, 0.72 for logical rigor, and 0.76 for pedagogical relevance, with a highest overall score of 0.84 and a lowest of 0.61. The two sets of questions were then given to two groups of students for practice. The average accuracy rate for the intelligently generated group was 86.4%, while it was 78.1% for the template group. After anonymous teacher review, the proportion of questions requiring manual revision was 4.7% for the intelligently generated group and 19.3% for the template group.
[0122] The system also automatically calculated the time taken for the entire process of question generation and optimization. The intelligent generation of 60 questions took a total of 65 seconds, of which data cleaning and knowledge point annotation took 11 seconds, model generation took 34 seconds, fish swarm optimization took 16 seconds, and automatic evaluation and scoring took 4 seconds. In contrast, the traditional template generation of the same number of questions takes about 45 minutes in total, including synthesis and manual screening, and the novelty and coverage of the final output questions are not as good as those of this invention.
[0123] Throughout the implementation process, the implementers also recorded the handling of anomalies. In Example 2, some knowledge points appeared frequently in multiple test question texts. The algorithm automatically detected entries with a repetition rate higher than 5%, and the system triggered further optimization to reduce redundant items to below a preset threshold, ensuring the diversity and relevance of the generated test questions.
[0124] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. An intelligent generation method of primary and secondary school test questions based on an educational large model, characterized in that, The application relates to an intelligent test question generation method and system for primary and secondary schools. The application comprises: Collecting primary and secondary school teaching materials, teaching syllabuses, examination questions and exercise banks, and performing text cleaning, format standardization and key knowledge point labeling on the collected education data to generate a structured education data set; Using the structured education data set to pre-train an education large model and fine-tune the education large model to build an education large model specially used for intelligent generation of primary and secondary school test questions; Based on the fine-tuned education large model, input target knowledge points, question types, difficulty levels and grade parameters to generate a candidate test question set; Using a mutation fish swarm algorithm to globally optimize the candidate test question set, setting a test question fitness function, comprehensively evaluating the knowledge coverage, difficulty distribution and language expression indexes of the candidate test questions, screening and optimizing the candidate test question set to generate an optimized candidate test question set; Inputting the optimized candidate test question set into a test question evaluation module, using an automatic quality evaluation mechanism to detect the semantic accuracy, logical rigor and teaching compliance of the test questions, and outputting test question evaluation results; 2. The method of claim 1, wherein the method is characterized by, According to the test question evaluation results and real-time feedback data from teachers and students, dynamically adjusting the related parameters of the education large model and the mutation fish swarm algorithm to realize continuous optimization and adaptive update of test question generation. The application comprises: Collecting primary and secondary school teaching material text data, teaching syllabus data, examination question data and exercise bank data, and forming an original education data set according to unified numbering management and timestamp marking; Performing text cleaning processing on each education data sample in the original education data set to obtain a cleaned education data set; Performing format standardization processing on each education data sample in the cleaned education data set to obtain a formatted education data set; Applying a knowledge point labeling model to each education data sample in the formatted education data set to extract and label the core knowledge points contained in each piece of content to form a knowledge point labeling result set; 3. The method of claim 2, wherein the method further comprises: Fusing the formatted education data set with the knowledge point labeling result set to construct a structured education data set. The application comprises: Defining the initial form of the education large model as a model network structure, model initial parameters and a word table, and encoding the formatted education text content into input sequence and target sequence pairs through an encoding function; Performing pre-training, setting a small batch size, using autoregressive cross-entropy loss as a training target to gradually accumulate the logarithmic probability of the target label under the current parameters for all positions in each batch of education data samples, and taking the inverse of the average after sample quantity as the batch loss; Using a gradient descent-based parameter updating strategy to perform gradient descent adjustment on the parameters in each parameter iteration using the pre-training loss; Constructing a micro-call control prefix for intelligent generation of primary and secondary school test questions, encoding the knowledge point set and grade label into a control label sequence, and splicing the encoded input sequence to form a fine-tuning input; The supervision fine-tuning is performed, a cross-entropy loss is used as a training target, and a logarithmic probability of a target label under current parameters is accumulated according to all educational data samples and all sequence positions in each batch, and the logarithmic probability is taken as a negative number after being averaged by the number of samples to obtain a batch fine-tuning loss; The final parameter solution for the intelligent generation of primary and secondary school test questions is obtained by simultaneously minimizing a weighted sum of the pre-training loss and the fine-tuning loss, and the final parameter solution and a model network structure and a vocabulary are used as components of the educational large model.
4. The method of claim 3, wherein the method further comprises: The generated candidate test question set comprises: Based on the completed fine-tuned educational large model, the control parameter input is set as a target knowledge point set, a test question type identifier, a difficulty level label and a corresponding primary and secondary school grade label; The control parameter input of the test question generation task is converted into a control token sequence through a control encoding function; The control token sequence is input into the educational large model to generate a candidate test question text; In the generation of the candidate test question text, a temperature control sampling strategy is used, a specified number of candidate test question texts are repeatedly sampled, and all generated candidate test question texts are sequentially combined into a candidate test question set.
5. The method of claim 1, wherein the method is characterized by, The mutation fish swarm algorithm comprises: For each candidate test question text, a knowledge coverage score, a difficulty fitting score and a language expression score are calculated respectively, and a weighted sum is performed to obtain a single question fitness score; A global optimization model based on the mutation fish swarm algorithm is constructed, and the fish swarm size is set as N fish And a binary selection vector is used to represent the screening result of the test item set, each bit of the binary selection vector is used to represent whether the corresponding candidate test item text is selected, and the group level objective function value of any binary selection vector is calculated. A plurality of binary selection vectors are randomly generated as initial positions of the fish swarm, and a group-level objective function value corresponding to each selection vector is calculated, and the selection vector with the largest group-level objective function value is used as an initial global optimal selection vector; A neighborhood set of selection vectors in each fish swarm is determined, all selection vectors in the neighborhood set are statistically processed bit by bit, a new value of each bit is determined by majority voting to obtain an intermediate selection vector, and if the group-level objective function value corresponding to the intermediate selection vector is greater than that of the current selection vector, the intermediate selection vector is used to replace the current selection vector, otherwise, the current selection vector is kept unchanged; Each updated selection vector is processed bit by bit for mutation, a random number between zero and one is generated for each bit, when the random number is less than the product of the current mutation rate and the mutation sensitivity adjustment factor, the bit is flipped, otherwise, the bit is kept unchanged, and the group-level objective function value corresponding to each selection vector is calculated again, and the selection vector with the largest group-level objective function value is used as a new global optimal selection vector; The neighborhood search and mutation operation are repeated until a preset maximum iteration number is reached or the change of the group-level objective function value of the global optimal selection vector in two consecutive iterations is less than a preset threshold, and the selection vector with the largest group-level objective function value is output, and all candidate test question texts selected by the selection vector are combined into an optimized candidate test question set.
6. The method of claim 5, wherein the method further comprises: The automatic quality evaluation mechanism is used to detect the semantic accuracy, logical rigor and teaching compliance of the test questions, comprising: The semantic accuracy score, the logical rigor score and the teaching compliance score of each optimized candidate test question text are calculated; The semantic accuracy score, the logical rigor score and the teaching compliance score of each optimized candidate test question text are weighted and summed to obtain a comprehensive evaluation score. The semantic accuracy score, the logical rigor score, the teaching compliance score and the comprehensive evaluation score of each optimization candidate question text are all taken as the question evaluation result, and all the question evaluation results are sequentially combined to form a question evaluation result set.
7. The method of claim 6, wherein the method further comprises: The semantic accuracy score is obtained by respectively extracting the core semantic vectors of the candidate question text and the target knowledge point set, standardizing the core semantic vectors, and then performing cosine similarity calculation.
8. The method of claim 7, wherein the method further comprises: The teaching compliance score is obtained by respectively extracting the semantic vectors of the candidate question text and the target grade label corresponding to the teaching knowledge base content, standardizing the semantic vectors, and then performing cosine similarity calculation.
Citation Information
Cited By
Test question output method and device based on multi-model collaboration, electronic equipment and medium
CN121457589A
Multi-model collaborative test item output methods, devices, electronic equipment, and media
CN121457589B
Text material generation method and device, electronic equipment and computer program
CN121480458A
Text material generation method and device, electronic equipment and computer program
CN121480458B
