Online examination intelligent test paper composition method based on improved genetic algorithm
Through the design of rules and configuration strategies and dynamically adjusting genetic algorithm parameters, the problem that traditional paper grouping methods are difficult to meet personalized needs and multiple goals to screen combination questions is solved, and efficient and reasonable paper grouping is achieved, and the quality of the paper is improved.
Patent Information
- Application Number
- CN202411912182.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-04-22
AI Technical Summary
The traditional online test paper-grouping method is difficult to dynamically generate test papers that meet personalized requirements based on the needs of different users. In the huge question bank, how to efficiently and reasonably screen and combine questions based on multiple goals has become the main challenge facing the paper-grouping system.
Design rules and configuration strategies, allowing users to customize the test question layout, randomly select individual test papers as the initial population, and dynamically adjust parameters in the genetic algorithm to improve the efficiency of paper grouping and quality of test papers.
By dynamically adjusting the genetic algorithm parameters, the paper grouping rate is improved, and the knowledge point coverage and difficulty balance of the test paper are improved, and the problems of uneven distribution of question types, low coverage of knowledge points and unstable difficulty coefficients are solved.
Smart Images

Figure CN119862274A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of online education and information processing technology, and in particular to an online examination intelligent test paper composition method based on an improved genetic algorithm. Background Art
[0002] With the rapid development of online education, the form of examinations has gradually shifted from traditional offline modes to online examinations. Intelligent test-taking, as one of the core technologies of online examinations, can greatly improve test-taking efficiency and reduce manual intervention. However, traditional test-taking methods mainly rely on fixed templates, making it difficult to dynamically generate test papers that meet personalized requirements based on the needs of different users. At the same time, when faced with a huge question bank, how to efficiently and reasonably screen and combine questions based on multiple objectives (such as difficulty coefficient, knowledge point coverage, question type distribution, etc.) has become a major challenge facing the test-taking system.
[0003] Currently, the common way of compiling examination papers is based on fixed templates or simple random selection of questions. This method is easy to implement, but it has obvious deficiencies in the flexibility and diversity of the examination paper content. In addition, as the scale of the examination question bank expands, the efficiency of question screening gradually decreases, and the quality of examination paper compilation is difficult to guarantee. Problems such as uneven distribution of question types or insufficient coverage of knowledge points are prone to occur. Genetic algorithms, as an optimization algorithm with global search capabilities, are widely used in intelligent examination paper compilation systems. They can simulate the process of natural selection and genetic variation by imitating students' thoughts, and optimize the generation of examination papers that meet specific conditions. However, under complex and diverse constraints, the ability to explore the solution space is insufficient, and the diversity and personalized needs of questions are difficult to fully meet. Summary of the Invention
[0004] The purpose of the invention provided by the present invention is to facilitate users to customize the layout of test questions by designing rule configuration strategies, randomly select test paper individuals as the initial population, and the generated initial population has excellent individuals. Under the restriction of rules, the test questions can be quickly divided from a large number of test questions, thereby achieving optimization faster in the genetic operation process, improving the test paper compilation rate, and calculating the question coverage between different individuals in the same population through gene diversity measurement, and dynamically adjusting the genetic algorithm parameters. When the population diversity is lower than a certain threshold, the mutation rate can be increased to introduce new genes and increase the diversity of the population. Conversely, when the population diversity is higher, the mutation rate can be reduced to reduce excessive disturbances and maintain high-quality individuals, so that the test paper can show a higher accuracy in terms of knowledge point coverage and difficulty balance, thereby solving the problems of uneven distribution of question types, low knowledge point coverage and unstable difficulty coefficient in the test paper compilation of a huge question bank.
[0005] In order to achieve the above-mentioned effects, the present invention provides the following technical solution: an online examination intelligent test paper generation method based on an improved genetic algorithm, comprising the following steps:
[0006] Step 1: Design a rule configuration module and randomly select test paper individuals as the initial population.
[0007] Step 2: Improve the calculation of the adaptive fitness function and adjust the mutation probability parameters in the genetic operation.
[0008] Step 3: Optimize the genetic operation process, dynamically adjust genetic diversity and ensure the optimal solution.
[0009] Furthermore, in step 1, the steps of designing the rule configuration module are as follows:
[0010] S101: providing a configuration interface for the user, where the user can define configuration parameters, such as question type, knowledge point coverage, difficulty, number of questions, or core score standards, as constraints;
[0011] S102: Define individual code;
[0012] S103: According to the constraints and the defined individual coding standard, individuals that meet the constraints are obtained from the data set for population initialization.
[0013] Furthermore, in step S102, the definition of individual codes is to treat the test questions in the test paper as individuals. Assuming that there are N questions in the question bank, each question can be represented by a code, then the code of each test paper individual can be represented as an array of length M, where each element in the array represents a question, and the basic attributes of each test question P include but are not limited to knowledge points, difficulty, score, content, etc., which is recorded as P = [x1, x2, x3, ..., x n ] T , where x i Represents the attribute values, let individual P = {p1, p2, ..., p M}, where P i Represents the code of the i-th question in the test paper, where any subset represents a certain fragment of gene.
[0014] Furthermore, in step 2, the step of improving the calculation of the adaptive fitness function is:
[0015] S201: Evaluate the quality of individuals in the population through the fitness function;
[0016] S202: Setting fitness threshold;
[0017] S203: Calculate gene diversity metrics.
[0018] Furthermore, in step S201, the fitness function includes various evaluation indicators, and the evaluation indicators are determined by the attributes of the test questions in the individual, and the evaluation indicators are knowledge point coverage K, question type distribution T and difficulty balance D.
[0019] Furthermore, in step S202, the fitness threshold is set based on the individual test paper and is calculated based on a standard test paper that meets the requirements of knowledge point coverage, question type distribution, and balanced difficulty.
[0020] Furthermore, in step three, the steps of the genetic manipulation process are:
[0021] S301: Selection;
[0022] S302: cross operation;
[0023] S303: mutation;
[0024] S304: Judgment.
[0025] Furthermore, in step S301, the selection is to select individuals with higher fitness as parents based on the fitness value, so as to pass high-quality genes to the next generation with a greater probability.
[0026] Furthermore, in step S302, the crossover operation is performed by exchanging some test questions of the same question type on the test paper.
[0027] Furthermore, in step S303, the steps of the genetic operation process are as follows: mutation is to randomly select an individual P in the population, and perform mutation operation on the i-th specific test question, query the test questions of the same type in the database according to the attributes of the specific test question.
[0028] The present invention provides an online examination intelligent test paper generation method based on an improved genetic algorithm, which has the following beneficial effects:
[0029] (1) In the present invention, by designing a rule configuration strategy, it is convenient for users to customize the layout of test questions, randomly select test paper individuals as the initial population, and the generated initial population has excellent individuals. Under the constraints of the rules, the test questions can be quickly divided from a large number of test questions, thereby achieving optimization faster in the genetic operation process and improving the test paper compilation rate.
[0030] (2) In the present invention, the question coverage between different individuals in the same population is calculated by measuring gene diversity, and the genetic algorithm parameters are dynamically adjusted. When the population diversity is lower than a certain threshold, the mutation rate can be increased to introduce new genes and increase the diversity of the population. Conversely, when the population diversity is high, the mutation rate can be reduced to reduce excessive disturbance and maintain high-quality individuals, so that the test paper can show a higher accuracy in terms of knowledge point coverage and difficulty balance, thereby solving the problems of uneven distribution of question types, low knowledge point coverage and unstable difficulty coefficient in a large question bank. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1This is a flow chart of an online examination intelligent test paper generation method based on an improved genetic algorithm according to the present invention;
[0032] Figure 2 This is a framework diagram of an online examination intelligent test paper generation method based on an improved genetic algorithm according to the present invention;
[0033] Figure 3 This is a flow chart of a rule configuration module for an online examination intelligent test paper composition method based on an improved genetic algorithm according to the present invention;
[0034] Figure 4 This is a flow chart of an adaptive fitness function calculation module of an online examination intelligent test paper composition method based on an improved genetic algorithm according to the present invention;
[0035] Figure 5 The present invention provides a flow chart of a genetic operation module for an online examination intelligent test paper composition method based on an improved genetic algorithm. DETAILED DESCRIPTION
[0036] See also Figure 1-5 The present invention provides a technical solution: an online examination intelligent test paper generation method based on an improved genetic algorithm, comprising the following steps:
[0037] Step 1: Design a rule configuration module and randomly select test paper individuals as the initial population.
[0038] Step 2: Improve the calculation of the adaptive fitness function and adjust the mutation probability parameters in the genetic operation.
[0039] Step 3: Optimize the genetic operation process, dynamically adjust genetic diversity and ensure the optimal solution.
[0040] Step 4: Derive the impedance matching load resistor.
[0041] Specifically, in step 1, the steps for designing the rule configuration module are:
[0042] S101: providing a configuration interface for the user, where the user can define configuration parameters, such as question type, knowledge point coverage, difficulty, number of questions, or core score standards, as constraints;
[0043] S102: Define individual code;
[0044] S103: According to the constraints and the defined individual coding standard, individuals that meet the constraints are obtained from the data set for population initialization.
[0045] Specifically, in step S102, the definition of individual codes is to treat the test questions in the test paper as individuals. Assuming that there are N questions in the question bank, each question can be represented by a code, then the code of each test paper individual can be represented as an array of length M, where each element in the array represents a question, and the basic attributes of each test question P include but are not limited to knowledge points, difficulty, score, content, etc., which is recorded as P = [x1, x2, x3, ..., x n ] T , where x i Represents the attribute values, let individual P = {p1, p2, ..., p M}, where P i Represents the code of the i-th question in the test paper, where any subset represents a certain fragment of gene.
[0046] Specifically, in step 2, the steps for improving the calculation of the adaptive fitness function are:
[0047] S201: Evaluate the quality of individuals in the population through the fitness function;
[0048] S202: Setting fitness threshold;
[0049] S203: Calculate gene diversity metrics.
[0050] The gene diversity metric is calculated by obtaining the individual fitness from the fitness function in the same population. When the individual fitness is higher than the threshold θ, the mutation rate parameter P is reduced. When the population fitness is lower than the threshold, the mutation rate is increased. The threshold setting adopts a medium threshold, that is, the individual fitness is normalized with the standard fitness, and the absolute difference is taken to obtain the range [0.1, 0.3].
[0051]
[0052] Specifically, in step S201, the fitness function includes various evaluation indicators, and the evaluation indicators are determined by the attributes of the test questions in the individual. The evaluation indicators are knowledge point coverage K, question type distribution T and difficulty balance D.
[0053] Knowledge point coverage K:
[0054]
[0055] The knowledge point coverage K can ensure that the test paper covers enough knowledge points, N is the number of knowledge points, W i is the weight of knowledge point i, k i is the number of times knowledge point i is covered in the test paper;
[0056] Question type distribution T:
[0057]
[0058] Question type distribution T is used to control the proportion of each question type, such as multiple choice questions, fill-in-the-blank questions or simple questions, where C j represents the number of occurrences of question type j, C represents the total number of all question types,
[0059] Difficulty Balanced D:
[0060] D(P)=-σ(P)
[0061] Difficulty Balance D can ensure that the overall difficulty of the test paper is within a reasonable range.
[0062] Comprehensive evaluation function:
[0063] F(P)=w k K(P)+w t ·T(P)+w d ·D(P)
[0064] where w k 、w t and w d are the weights of each indicator respectively, and the specific values can be adjusted as needed.
[0065] Specifically, in step S202, the fitness threshold is set based on the individual test paper and is calculated based on a standard test paper that meets the requirements of knowledge point coverage, question type distribution, and balanced difficulty.
[0066] The formula is:
[0067] F(P 标准 )=w k ·K(P 标准 )+w t ·T(P 标准 )+w d ·D(P 标准 )
[0068] Specifically, in step three, the steps of the genetic manipulation process are:
[0069] S301: Selection;
[0070] S302: cross operation;
[0071] S303: mutation;
[0072] S304: Judgment.
[0073] The judgment is to determine whether the current number of iterations has reached the maximum number of iterations, then terminate the calculation and return the final population, where each individual represents a test paper. If there is no obvious change in the Pareto frontier in consecutive T generations, the current algorithm has reached convergence, terminate the algorithm and return to the population. If the above conditions are not met, the current population will be used as the new parent generation for genetic operations.
[0074] Specifically, in step S301, the selection is to select individuals with higher fitness as parents according to the fitness value, so as to pass high-quality genes to the next generation with a greater probability. The fitness of individuals in the parent population is calculated and sorted, and TopK individuals are taken as elite individuals. The proportion of K is designed to be 5% or 10% of the total individuals. The selected elite individuals are directly copied to the next generation population to ensure that the excellent individuals are not lost. The elite strategy adopted here can speed up the convergence speed of the genetic algorithm in the iterative process, and at the same time ensure that the current optimal solution will not be lost during the iterative process, thereby improving the overall performance of the algorithm. Suppose the current population P is t , which contains m individuals, each of which has a fitness of f(x). The mathematical expression for selecting the top n elite individuals is:
[0075] E={x1,x2,…,x i}where i k =argmax i f(x i ) for k = 1, 2, ..., n
[0076] The formation of the next generation population can be expressed as:
[0077] P t+1 =E∪{x′}
[0078] Where x′ is a new individual generated by crossover and mutation,
[0079] Specifically, in step S302, the crossover operation can improve the diversity of test paper individuals and fully improve the adaptability of the test paper by exchanging some test questions of the same question type, thereby improving the coverage of test knowledge points and the stability of the test paper. The crossover point is randomly selected. In order to avoid the population from entering the local optimal solution, this paper adopts single-point directed crossover, that is, after the two individuals perform gene crossover, the fitness is calculated. If the fitness increases, crossover is performed, otherwise no crossover is performed. Using single-point crossover, assuming that the parent individuals are P1 and P2, and the crossover point is C, the crossover of the offspring individuals C1 and C2 is expressed as:
[0080] C1=P1[1:c]+P2[c:n]
[0081] C2=P2[1:c]=P1[c:n]
[0082] Specifically, in step S303, the steps of the genetic operation process are as follows: mutation is to randomly select individual P in the population, and for the i-th specific test question, according to the attributes of the specific test question, query the test questions of the same type in the database for mutation operation. The mutation operation mainly introduces external genes into the current genes, that is, introduces new test questions into the current test paper to form a test paper, solves the diversity problem of the test paper, and sets the mutation probability P of each gene to improve the overall diversity of the test paper.
[0083] When using it, users can customize rules, filter out test questions that meet the rules from the database, and send them to the adaptive fitness calculation module as the initialization population to calculate the standard fitness, which is used for fitness calculation and gene diversity measurement in the genetic operation process. The adaptive fitness calculation module adjusts the mutation rate in the genetic operation, and finally, after selection, crossover, and mutation iterative adjustment calculation, convergence is achieved, and a set of test papers will be generated. The steps for obtaining the probability of mutation parameters are as follows: First, the initialization population is obtained by the rule configuration, the initialization population is used as the parent generation, and fitness calculation is performed to obtain the fitness of each individual. Second, the obtained initialization population is sorted according to individual fitness, and the elite selection strategy is set to take the initial 10% of the total number n of individuals in the population are selected as elite individuals, and the optimal solution is retained and sent directly to the next generation. Third: select the adjacent individuals in front of the remaining individuals, perform single-point crossover operations, exchange individual genes, and increase diversity. Fourth: perform mutation operations on the obtained individuals and calculate the mutation probability. If the mutation conditions are met, randomly select some genes for each individual, obtain the corresponding question type attributes, and select similar question types from the database as new individual genes to increase population diversity. Fourth: The obtained individuals and the selected individuals form a new parent generation, and calculate the number of iterations. If it is greater than the maximum number of iterations, it ends. If the Pareto surface remains unchanged for N consecutive generations and convergence is reached, it ends. Otherwise, repeat the above operations.
[0084] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.
Claims
1. An online test intelligent test paper generation method based on improved genetic algorithm, characterized in that: The following steps are involved: S1, design the rule configuration module and randomly select test paper individuals as the initial population; S2, improve the calculation of adaptive fitness function and adjust the mutation probability parameters in genetic operation; S3. Optimize the genetic operation process, dynamically adjust genetic diversity and ensure the optimal solution.
2. According to claim 1, an online test intelligent test paper composition method based on improved genetic algorithm is characterized in that: In step S1, the steps of designing the rule configuration module are: S101: providing a configuration interface for the user, where the user can define configuration parameters, such as question type, knowledge point coverage, difficulty, number of questions or score core standards, as constraints; S102: Define individual codes; S103: According to the constraints and the defined individual coding standard, individuals satisfying the constraints are obtained from the data set for population initialization.
3. The method for intelligently composing online examination papers based on an improved genetic algorithm according to claim 2, characterized in that: In step S102, defining individual codes is to regard the test questions in the test paper as individuals. Assuming that there are N questions in the question bank, each question can be represented by a code, then the code of each test paper individual can be represented by an array of length M, where each element in the array represents a question, and the basic attributes of each test question P include but are not limited to knowledge points, difficulty, score, content, etc., which are recorded as P = [x1, x2, x3, ..., x n ] T , where x i Represents the attribute values, let individual P = {p1, p2, ..., p M }, where P i Represents the code of the i-th question in the test paper, where any subset represents a certain fragment of gene.
4. The method for intelligently composing online examination papers based on an improved genetic algorithm according to claim 3, characterized in that: In step S2, the steps of improving the calculation of the adaptive fitness function are: S201: Evaluate the quality of individuals in the population through fitness function; S202: Setting fitness threshold; S203: Calculate gene diversity metrics.
5. The method for intelligently composing online examination papers based on an improved genetic algorithm according to claim 4, characterized in that: In step S201, the fitness function includes various evaluation indicators, and the evaluation indicators are determined by the attributes of the test questions in the individual, and the evaluation indicators are knowledge point coverage K, question type distribution T and difficulty balance D.
6. The method for intelligently composing online examination papers based on an improved genetic algorithm according to claim 5, characterized in that: In step S202, the fitness threshold is set based on the individual test paper and is calculated based on a standard test paper that meets the requirements of knowledge point coverage, question type distribution, and balanced difficulty.
7. The method for intelligently composing online examination papers based on an improved genetic algorithm according to claim 6, characterized in that: In step S3, the steps of the genetic manipulation process are: S301: Selection; S302: cross operation; S303: mutation; S304: Judgment.
8. The method for intelligently composing online examination papers based on an improved genetic algorithm according to claim 7, characterized in that: In step S301, the selection is to select individuals with higher fitness as parents according to the fitness value, so as to pass high-quality genes to the next generation with a greater probability.
9. The method for intelligently composing online examination papers based on an improved genetic algorithm according to claim 8, characterized in that: In step S302, the crossover operation is performed by exchanging some test questions of the same question type in the test paper.
10. The method for intelligently composing online examination papers based on improved genetic algorithm according to claim 9, characterized in that: In step S303, the steps of the genetic operation process are as follows: mutation is to randomly select an individual P in the population, and perform mutation operation on the i-th specific test question by searching the database for test questions of the same type according to the attributes of the specific test question.