Adaptive group test method, system, device and medium
By combining Project Reaction Theory with hybrid optimization algorithms, the problems of low efficiency, unstable quality, and poor adaptability in traditional test paper generation methods are solved, achieving efficient and personalized test paper generation, which meets the needs of online education and large-scale examinations.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANDONG SAHNDA OUMASOFT CO LTD
- Filing Date
- 2026-03-24
- Publication Date
- 2026-07-14
Smart Images

Figure CN121920328B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of educational assessment technology, specifically to an adaptive test paper generation method, system, device, and medium. Background Technology
[0002] Traditional test paper generation relies heavily on the manual experience of teachers or experts, which has many drawbacks. First, it is inefficient and cannot meet the needs of large-scale online education and frequent examinations. Second, it is highly subjective, resulting in large fluctuations in test paper quality and making it difficult to guarantee fairness. Finally, key indicators such as knowledge point coverage and difficulty gradient control are often estimated based on experience, lacking scientific rigor.
[0003] To overcome the shortcomings of traditional methods, existing technologies have proposed various automatic paper generation techniques, but they still have the following significant deficiencies:
[0004] Convergence issues of single algorithms: Although the paper-building methods based on a single genetic algorithm (GA) or particle swarm optimization (PSO) achieve automation, GA is prone to premature convergence, and PSO is prone to getting stuck in local optima when dealing with complex multi-constraint problems, resulting in a low success rate of paper-building and slow convergence speed.
[0005] Lack of in-depth support from educational measurement theory: Most automated test paper generation methods treat question difficulty as a static attribute, failing to incorporate modern educational measurement theory. Therefore, they cannot scientifically assess the match between question parameters and test-takers' ability levels, resulting in test papers that are difficult to accurately measure test-takers at different ability levels.
[0006] The handling of multi-objective constraints is crude: Test paper generation is essentially a complex multi-objective constraint optimization problem, which needs to simultaneously satisfy multiple dimensions such as knowledge point coverage, question type distribution, difficulty balance, and matching of total score with test duration. Existing technologies usually use simple penalty function methods, which do not handle the constraints finely enough and are difficult to generate high-quality test papers.
[0007] Poor dynamic and personalized adaptability: Existing methods are usually a "one-size-fits-all" approach, lacking the ability to dynamically adjust test paper generation strategies according to the ability distribution of different test takers, and thus failing to meet the needs of personalized assessment and adaptive learning. Summary of the Invention
[0008] The purpose of this invention is to provide an adaptive test paper generation method, system, device, and medium. By mechanistically integrating item response theory with hybrid optimization algorithms, the scientific nature, efficiency, and personalized adaptability of test paper generation are improved. This enables the generation of high-quality, highly matched test papers for candidates of different ability levels, meeting the intelligent needs of online education and large-scale examinations.
[0009] To achieve the above objectives, embodiments of the present invention provide an adaptive volume generation method, including:
[0010] Acquire question bank data and define structured question data that includes project response theory parameters;
[0011] Based on the requirements of test paper compilation, a multi-objective fitness function is constructed, which includes a predicted score item based on item response theory to assess the target candidates' ability level.
[0012] Based on the structured question data and the multi-objective fitness function, a pre-built hybrid optimization algorithm is executed to generate a test paper population. The pre-built hybrid optimization algorithm integrates at least particle swarm optimization and genetic algorithm, and is guided by the parameters of item response theory during its initialization, search and evolution.
[0013] For individuals in the test paper population generated by the hybrid optimization algorithm, hierarchical repair is performed according to preset constraint priorities to obtain an optimized test paper population;
[0014] Particles with fitness values that meet preset requirements are selected from the optimized test paper population and used as target test papers.
[0015] Optionally, the multi-objective fitness function includes at least the following evaluation terms:
[0016] The test paper's coverage of the pre-set knowledge points;
[0017] The absolute deviation between the average difficulty of the test paper and the target difficulty;
[0018] The sum of the absolute deviations between the actual number and the target number for each question type;
[0019] The relative deviation between the total score of the exam and the target total score;
[0020] The relative deviation between the total estimated test time and the target test time;
[0021] Predictive scoring items for the target candidate's ability level based on item response theory.
[0022] Optionally, the formula corresponding to the multi-objective fitness function is as follows:
[0023]
[0024] In the formula, The set of knowledge points covered in the exam paper. This is a collection of knowledge points required for the exam. The average difficulty of the test paper. The average difficulty of the target test paper. The actual number of a certain type of question in the exam paper. The target number of a certain type of question in the exam paper. This refers to the total number of questions in the exam paper. The total score for the exam is... For the target total score, This is the total estimated time for the exam. For the target exam duration, The score of the candidate on this test paper is based on the target ability level predicted by item response theory. These are the weighting coefficients for each indicator.
[0025] Optionally, calculate the candidate's score on the test paper based on the target ability level predicted by item response theory according to the following formula. :
[0026] ;
[0027] Among them, for objective questions, ;
[0028] For subjective questions, ;
[0029] In the formula, It is the ability to The candidates answered the questions correctly. The probability, For the corresponding score, The titles are as follows The distinguishability, difficulty, and guessing coefficient of the sample. This represents the total number of questions.
[0030] Optionally, the execution of a pre-built hybrid optimization algorithm to generate a population of test papers includes:
[0031] Based on the question type requirements, prioritize questions whose difficulty level falls within the preset target difficulty range to construct initial test paper individuals;
[0032] The speed of the initial test paper is calculated according to the speed update rules, and new questions are selected from the question bank to replace the questions in the original positions according to the speed guidelines. The selection of new questions is determined based on the similarity of the item response theory parameters.
[0033] Identify the common knowledge points between the two parent test papers and prioritize exchanging the question sequences that contain the common knowledge points;
[0034] Based on the deviation between the average difficulty of the current test paper and the target difficulty, the difficulty of the selected replacement questions is dynamically adjusted, and replacement questions that meet the preset discrimination criteria are given priority.
[0035] Optional, the speed update rules are as follows:
[0036]
[0037] In the formula, For the first The particle in the first During the nth iteration, at the... Dimensional speed, For the first The particle in the first During the nth iteration, at the... The position of the dimension For the first The particle in the first The optimal position found in the nth iteration is in the th iteration. Dimension value, The optimal position found among all particles is in the th position. Dimension value, For inertial weights, These are individual learning factors and social learning factors, respectively. , is a random number that is uniformly distributed in the interval [0,1].
[0038] Optionally, hierarchical repair can be performed based on preset constraint priorities, including:
[0039] Primary constraint fix: Adjust the number of questions of each question type in the test paper to match the preset question type distribution requirements;
[0040] Secondary constraint repair: Add questions to the exam paper to ensure coverage of all preset knowledge points;
[0041] Optimize constraint repair: Adjust the total score and total estimated time of the test paper to make them fall within the preset target allowable error range.
[0042] Secondly, the present invention also provides an adaptive test paper generation system, comprising:
[0043] The data acquisition module is used to acquire question bank data and define structured question data containing project response theory parameters;
[0044] The function construction module is used to construct a multi-objective fitness function that includes a predicted score item based on the ability level of the target test takers, according to the test paper creation objectives.
[0045] The test paper population generation module is used to generate a test paper population by executing a pre-built hybrid optimization algorithm based on the structured question data and the multi-objective fitness function. The pre-built hybrid optimization algorithm integrates at least particle swarm optimization algorithm and genetic algorithm, and is guided by the parameters of item response theory during its initialization, search and evolution process.
[0046] The repair module is used to perform hierarchical repair on individuals in the test paper population generated by the hybrid optimization algorithm according to a preset constraint priority, so as to obtain an optimized test paper population.
[0047] The target test paper generation module is used to select particles whose fitness values meet preset requirements from the optimized test paper population and use them as target test papers.
[0048] Thirdly, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the adaptive volume grouping method described above.
[0049] Fourthly, the present invention also provides a storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the adaptive volume assembly method described above.
[0050] By integrating IRT with the hybrid optimization algorithm through the above technical solution, the scientific nature, efficiency and personalized adaptability of test paper generation are improved. It can generate high-quality and highly matched test papers for candidates with different ability levels, effectively meeting the intelligent needs of online education and large-scale examinations.
[0051] Other features and advantages of the embodiments of the present invention will be described in detail in the following detailed description section. Attached Figure Description
[0052] The accompanying drawings are provided to further illustrate embodiments of the present invention and form part of the specification. They are used together with the following detailed description to explain the embodiments of the present invention, but do not constitute a limitation thereof. In the drawings:
[0053] Figure 1 This is a flowchart of an adaptive paper generation method provided in an embodiment of the present invention;
[0054] Figure 2 This is a detailed flowchart of an adaptive paper generation method provided in an embodiment of the present invention;
[0055] Figure 3 This is a schematic diagram of the adaptive paper generation system provided in an embodiment of the present invention;
[0056] Figure 4 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0057] Various embodiments of this disclosure will be described more fully in the following detailed description. This disclosure may have various embodiments, and adjustments and changes may be made therein. However, it should be understood that there is no intention to limit the various embodiments of this disclosure to the specific embodiments disclosed herein, but rather this disclosure should be understood to cover all adjustments, equivalents, and / or alternatives falling within the spirit and scope of the various embodiments of this disclosure.
[0058] In the following, the terms “comprising” or “may include”, which may be used in various embodiments of this disclosure, indicate the presence of the disclosed functions or operations and do not limit the addition of one or more functions or operations. Furthermore, as used in various embodiments of this disclosure, the terms “comprising,” “having,” and their cognates are intended only to indicate a specific feature, number, step, operation, or combination of the foregoing and should not be construed as primarily excluding the presence of one or more other features, numbers, steps, operations, or combinations of the foregoing, or the possibility of adding one or more features, numbers, steps, operations, or combinations of the foregoing.
[0059] In various embodiments of this disclosure, the expression "or" or "at least one of A and / or B" includes any combination or all combinations of the words listed simultaneously. For example, the expression "A or B" or "at least one of A and / or B" may include A, may include B, or may include both A and B.
[0060] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and 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.
[0061] See Figure 1 The diagram shows a flowchart of an adaptive volume generation method in a specific embodiment, including the following execution steps:
[0062] Step 100: Obtain the question bank data and define structured question data containing the parameters of the item response theory.
[0063] Specifically, we define the Question data structure, which forms the basis for all subsequent algorithmic operations. It includes the following attributes: question_id: Question ID, a unique identifier; knowledge_points: A list of knowledge points, a set of associated knowledge point tags; question_type: Question type, such as multiple choice, fill-in-the-blank, short answer, etc.; b_param: Difficulty coefficient, a core parameter of the IRT model; a_param: Discrimination coefficient, an IRT model parameter that measures the ability of a question to differentiate between candidates of different ability levels; c_param: Guessing coefficient, an IRT model parameter, limited to objective questions; score: The score corresponding to the question; estimated_time: Estimated time, the average time required to complete the question.
[0064] For example, the original question bank data is converted into a structured, standardized list of Question objects, laying the foundation for subsequent algorithm execution.
[0065] Input: Total_list of question bank data, usually in the form of a database table or CSV / JSON file, containing the original information of the questions.
[0066] Operation: Data Transformation: Iterate through total_list, parse each original question data and instantiate it into a Question object, populate all its attributes, including question_id, knowledge_points, question_type, a_param, b_param, c_param, score, and estimated_time.
[0067] Data Validation: Validity Check: Check if the `question_type` of all questions is a predefined type (e.g., "multiple choice", "fill in the blank"); if `knowledge_points` are valid labels; and if `score` and `estimated_time` are positive numbers. IRT Parameter Validation: Ensure that the IRT parameters `a_param` (discrimination) and `b_param` (difficulty) of all questions are within a reasonable range (e.g., `a_param > 0`, `b_param` is usually in the range [-3, 3]). For objective questions, `c_param` (guessing factor) should be in the range [0, 1]. Mark or remove outlier data that exceeds these ranges.
[0068] Output: A cleaned and validated list of Question objects, i.e., question_bank.
[0069] Requirement parameter configuration: Used to receive the volume grouping target set by the user or system and structure it.
[0070] Operation: Creates a dictionary or object containing the following key-value pairs:
[0071] 'knowledge_points': The set of target knowledge points (list or set).
[0072] 'type_count': The target number of each question type, for example, {'Multiple choice': 10, 'Fill in the blank': 5, 'Subjective question': 3}.
[0073] 'total_score': Target total score, for example, 100.
[0074] 'total_time': The target total duration, for example, 120 (minutes).
[0075] 'b_target': The average difficulty of the target, for example, 0.6.
[0076] 'θ': The target candidate's ability level value, which is the core input of the IRT model, for example, 0.0 (representing medium ability).
[0077] 'score_target': The expected IRT score for a candidate at this ability level, usually proportional to total_score, for example, 60 (representing an expected score of 60%).
[0078] Output: A requirements object containing all group constraints and targets.
[0079] Step 101: Based on the test paper creation objectives, construct a multi-objective fitness function that includes a predicted score item based on item response theory to assess the target test takers' ability level.
[0080] Specifically, the multi-objective fitness function includes at least the following evaluation items: the coverage rate of the test paper to the preset knowledge points; the absolute deviation between the average difficulty of the test paper and the target difficulty; the sum of the absolute deviations between the actual number and the target number of each question type; the relative deviation between the total score of the test paper and the target total score; the relative deviation between the total estimated time of the test paper and the target time; and the predicted score of the target candidate's ability level based on item response theory.
[0081] More specifically, the formula corresponding to the multi-objective fitness function is as follows:
[0082]
[0083] In the formula, The set of knowledge points covered in the exam paper. This is a collection of knowledge points required for the exam. The average difficulty of the test paper. The average difficulty of the target test paper. The actual number of a certain type of question in the exam paper. The target number of a certain type of question in the exam paper. This refers to the total number of questions in the exam paper. The total score for the exam is... For the target total score, This is the total estimated time for the exam. For the target exam duration, The score of the candidate on this test paper is based on the target ability level predicted by item response theory. These are the weighting coefficients for each indicator.
[0084] By integrating multiple dimensions of test paper creation objectives, such as knowledge point coverage, difficulty deviation, question type distribution, total score duration matching degree, and IRT predicted score rate, into a unified and quantifiable multi-objective fitness function mathematical expression, the technical effect of transforming complex educational assessment needs into precise optimization objectives is achieved. This makes the search process of the hybrid optimization algorithm no longer blind but precisely guided, thereby systematically and evenly improving the overall quality of the test paper in terms of content, structure, difficulty, and measurement validity, effectively solving the technical challenge of coordinating the optimization of multiple constrained objectives.
[0085] In a specific implementation, the score of the candidate on the test paper based on the target ability level predicted by item response theory is calculated according to the following formula. :
[0086] ;
[0087] Among them, for objective questions, ;
[0088] For subjective questions, ;
[0089] In the formula, It is the ability to The candidates answered the questions correctly. The probability, For the corresponding score, The titles are as follows The distinguishability, difficulty, and guessing coefficient of the sample. This represents the total number of questions.
[0090] By clearly defining the calculation method for IRT predicted scores, especially distinguishing between objective questions (using a three-parameter model) and subjective questions (using a two-parameter model), the system achieves the technical effect of transforming Item Response Theory from an abstract principle into a concrete, executable algorithm. This enables the system to accurately predict the performance of candidates with specific ability levels on generated test papers based on a scientific model, thus providing a core calculation basis for personalized test paper generation and significantly enhancing the scientific rigor and relevance of the test paper results.
[0091] Step 102: Based on the structured question data and the multi-objective fitness function, execute the pre-built hybrid optimization algorithm to generate a test paper population.
[0092] The pre-constructed hybrid optimization algorithm integrates at least particle swarm optimization and genetic algorithm, and is guided by project reaction theory parameters during its initialization, search and evolution processes.
[0093] Specifically, when executing step 102, the following steps can be performed:
[0094] S1020: Based on the question type requirements, prioritize questions whose difficulty level is within the preset target difficulty range to construct the initial test paper.
[0095] In a specific implementation, GA and PSO are mechanistically fused with the IRT model. Based on the question type requirements, questions are randomly selected from the question bank to construct initial particles (i.e., initial test papers). To ensure the quality of the initial population, IRT guidance is introduced: questions with difficulty b close to the target difficulty b_target (e.g., ±0.5) are preferentially selected, giving the initial population a certain degree of goal orientation.
[0096] For example, set the particle swarm size N (e.g., 50); loop N times to generate N initial particles (exam papers): IRT-guided initialization: For each particle, first determine the number of questions required for each question type based on requirements['type_count']. Then, for each question type, randomly select questions from the question_bank. The key is to prioritize questions whose difficulty coefficient b is near requirements['b_target'] (e.g., within the range [b_target - 0.5, b_target + 0.5]). If there are not enough questions within this range, randomly select from a wider range to ensure that the average difficulty of the initial population is close to the target value, thus improving the quality of the initial population. Combine the selected questions into an initial particle. Output: A list containing N valid initial particles, i.e., the initial population.
[0097] S1021: Calculate the speed of the initial test paper according to the speed update rules, and select new questions from the question bank to replace the questions in the original positions according to the speed guidelines.
[0098] The selection of new topics is based on the similarity of the theoretical parameters of the project response.
[0099] Specifically, the speed update rules are as follows:
[0100]
[0101] in, For the first The particle in the first During the nth iteration, at the... Dimension (i.e., the first) (The speed of the question) For the first The particle in the first During the nth iteration, at the... The position of the dimension (i.e., the question ID). For the first The optimal position (individual optimal) found so far by each particle is in the [missing position]. Dimension value, The optimal position (global optimal) found among all particles is at the [missing position]. Dimension value, For inertial weights, These are individual learning factors and social learning factors, respectively. , is a random number that is uniformly distributed in the interval [0,1].
[0102] Position Update: Particles update their positions based on their velocity. Since position represents the question ID, direct addition or subtraction is meaningless. This invention interprets it as a "replacement" operation: guided by the velocity vector, a new question is selected from the question bank to replace the question in the original position. The criterion for selecting a new question is IRT parameter similarity, that is, priority is given to selecting the question that is closest to the corresponding question in pbest or gbest in terms of difficulty b and discrimination a.
[0103] In specific implementations, a dynamic parameter adjustment strategy is introduced to balance the algorithm's global exploration and local development capabilities and to avoid premature convergence.
[0104] 1) Adaptive inertia weight: It decreases linearly with the number of iterations, so that the algorithm focuses on global search in the early stage and local fine search in the later stage.
[0105]
[0106] in, This represents the current iteration number. The maximum number of iterations, For maximum adaptive inertia weight, The minimum adaptive inertia weight.
[0107] 2) Asynchronous learning factor adjustment: This adjusts the social learning factor... As iterations increase, the individual learning factor As the number of iterations decreases, later particles are encouraged to learn towards the global optimum.
[0108] in, As the initial individual learning factor, This is the final individual learning factor.
[0109]
[0110] in, As the initial social learning factor, This is the final social learning factor.
[0111] Normal settings .
[0112] S1022: Identify the common knowledge points between two parent test papers and prioritize exchanging question sequences that contain the common knowledge points.
[0113] Knowledge-point-oriented cross-operation: To address the problem of traditional random cross-operation undermining knowledge point coverage, the following improvement strategies are proposed.
[0114] Pseudocode example:
[0115] def knowledge_crossover(parent1, parent2, question_bank):
[0116] # Find the set of common knowledge points between the two parent exam papers
[0117] kps_p1 = set().union(*[q.knowledge_points for q in parent1])
[0118] kps_p2 = set().union(*[q.knowledge_points for q in parent2])
[0119] common_kps = kps_p1&kps_p2
[0120] if not common_kps:
[0121] # When there are no common knowledge points, randomly retain one side or perform single-point cross-referencing.
[0122] return random.choice([parent1, parent2])
[0123] # Select the question index that contains common knowledge points
[0124] indices1 = [i for i, q in enumerate(parent1) if any(kp in common_kpsfor kp in q.knowledge_points)]
[0125] indices2 = [i for i, q in enumerate(parent2) if any(kp in common_kpsfor kp in q.knowledge_points)]
[0126] if len(indices1)<2 or len(indices2)<2:
[0127] return random.choice([parent1, parent2])
[0128] # Randomly extract common segments for cross-referencing
[0129] start1, end1 = sorted(random.sample(indices1, 2))
[0130] start2, end2 = sorted(random.sample(indices2, 2))
[0131] child = parent1[:start1] + parent2[start2:end2]+ parent1[end1:]
[0132] return child
[0133] S1023: Based on the deviation between the average difficulty of the current test paper and the target difficulty, dynamically adjust the difficulty of the selected replacement questions, and prioritize the selection of replacement questions whose discrimination meets the preset conditions.
[0134] Specifically, calculate the average difficulty of the current exam paper. ,like ( If the threshold is used, then higher difficulty questions (with larger b values) will be selected from the question bank for replacement. If the difficulty level is low, then a question with a lower difficulty level (smaller b-value) is selected. A discrimination-guided approach is introduced: While ensuring difficulty adjustment, questions with higher discrimination level (a) are prioritized for replacement to improve the overall measurement accuracy of the test. The replacement probability is proportional to the difference in difficulty and discrimination between the current question and the candidate questions.
[0135] Step 103: Perform stratified repair on individuals in the test paper population generated by the hybrid optimization algorithm according to the preset constraint priority to obtain the optimized test paper population.
[0136] Specifically, layered repair is performed based on preset constraint priorities, including:
[0137] Primary constraint fix: Adjust the number of questions of each question type in the test paper to match the preset question type distribution requirements;
[0138] Secondary constraint repair: Add questions to the exam paper to ensure coverage of all preset knowledge points;
[0139] Optimize constraint repair: Adjust the total score and total estimated time of the test paper to make them fall within the preset target allowable error range.
[0140] In a specific implementation, after each iteration generates a new individual (exam paper), a repair is performed to ensure that it meets the hard constraints. The repair is performed in layers according to the importance of the constraints:
[0141] Primary constraint (must be met): Ensure that the number of question types is strictly matched.
[0142] Secondary constraints (striving to satisfy): supplementing the knowledge points that are not covered.
[0143] Optional constraints (optimization adjustment): Fine-tune the total score and total duration to within the allowable range of ±5% of the target value.
[0144] In a specific embodiment, the test papers in the population are gradually optimized through a hybrid optimization algorithm in a cyclical iteration until the termination condition is met.
[0145] Loop condition: The current iteration number t is less than the maximum iteration number. (e.g., 200), or the global optimal fitness value does not improve significantly for M consecutive generations (e.g., 20 generations).
[0146] Operations within the loop: Fitness evaluation: For each particle (exam paper) in the population, call the defined multi-objective fitness function `fitness_function` to calculate its fitness value. This function comprehensively evaluates knowledge point coverage, difficulty deviation, question type distribution, total score, duration, and IRT prediction score based on `requirements[θ]`.
[0147] Update the optimal solution: Based on the calculated fitness value, update the individual optimal position pbest of each particle and the global optimal position gbest of the entire population.
[0148] Particle Swarm Optimization (PSO) Update: Based on the aforementioned velocity update formula and dynamically adjusted parameters ( , ), calculate the velocity per dimension for each particle. Perform position update: for each question (per dimension) in the particle, select a new question from the question_bank to replace it based on the velocity guide. The selection criterion is: the new question has the smallest Euclidean distance between its IRT parameters (difficulty b and discrimination a) and the corresponding question in pbest or gbest.
[0149] Genetic operations (GA part): using crossover probability (For example, 0.8) Select parent particles from the population and perform a knowledge-based crossover operation (knowledge_crossover) to generate offspring. The mutation probability is used to determine the offspring. (e.g., 0.2) Perform an IRT-driven mutation operation on the particles. This operation dynamically adjusts the difficulty of the replacement questions based on the deviation between the current average difficulty of the test paper and the target difficulty, and prioritizes questions with higher discrimination.
[0150] Constraint Repair: For new particles (exam papers) generated after the above PSO and GA operations, the hierarchical priority constraint repair mechanism repair_particle_by_priority is immediately executed to ensure that they meet hard constraints such as question type, knowledge points, total score and time.
[0151] Output: A sequence of events that have passed through the network. The optimized particle swarm after the second iteration or early convergence.
[0152] For example, here's a sample pseudocode for fixing this issue:
[0153] def repair_particle_by_priority(individual, requirements, question_bank):
[0154] # 1. Improve the number of question types (primary constraint)
[0155] for qtype, required_count in requirements['type_count'].items():
[0156] current_count = len([q for q in individual if q.question_type == qtype])
[0157] while current_count < required_count:
[0158] candidates = [q for q in question_bank if q.question_type == qtype and q not in individual]
[0159] if candidates:
[0160] individual.append(random.choice(candidates))
[0161] current_count += 1
[0162] else: break # There are no questions of this type in the question bank
[0163] while current_count > required_count:
[0164] to_remove = random.choice([q for q in individual if q.question_type == qtype])
[0165] individual.remove(to_remove)
[0166] current_count -= 1
[0167] # 2. Supplement knowledge points (secondary constraint)
[0168] covered_kps = set().union(*[q.knowledge_points for q in individual])
[0169] missing_kps = set(requirements['knowledge_points']) - covered_kps
[0170] for kp in missing_kps:
[0171] candidates = [q for q in question_bank if kp in q.knowledge_pointsand q not in individual]
[0172] if candidates:
[0173] individual.append(random.choice(candidates))
[0174] # 3. Adjust total score and duration (optional constraint)
[0175] total_score = sum(q.score for q in individual)
[0176] target_score = requirements['total_score']
[0177] while abs(total_score - target_score)>0.05 * target_score:
[0178] if total_score <target_score:
[0179] # Prioritize adding questions with high point values
[0180] candidates = sorted([q for q in question_bank if q not individual], key=lambda x: x.score, reverse=True)
[0181] if candidates:
[0182] individual.append(candidates[0])
[0183] else:
[0184] # Prioritize removing questions with high point values
[0185] to_remove = sorted([q for q in individual], key=lambda x: x.score,reverse=True)[0]
[0186] individual.remove(to_remove)
[0187] total_score = sum(q.score for q in individual)
[0188] return individual
[0189] Step 104: Select particles whose fitness values meet the preset requirements from the optimized test paper population, and use them as target test papers.
[0190] For example, after the iteration ends, the best particle with the highest fitness value is selected from the final particle swarm as the final generated test paper. The output is a list of questions in the optimal test paper (including question ID, content, etc.). Detailed statistical information of the optimal test paper includes: knowledge point coverage, actual number of questions of each type, total test paper score, total estimated time, average test paper difficulty, difficulty distribution curve, and a comparison between the IRT predicted score and the target score.
[0191] In a specific example, the creation of a qualification exam paper:
[0192] Scenario: A certification exam requires generating a test paper that meets specific requirements from a question bank containing 500 questions.
[0193] Configuration parameters: 'knowledge_points': 23 core knowledge points (e.g., "Data Structures", "Algorithms", "Network Security"). 'type_count': {'Multiple Choice': 10, 'Fill-in-the-Blank': 5, 'Subjective Questions': 3}. 'total_score': 100. 'total_time': 120. 'b_target': 0.6. 'θ': 0.0 (for intermediate-level candidates). 'score_target': 60.
[0194] Algorithm parameter settings: Population size N: 50; Maximum number of iterations Tmax: 200; Crossover probability Pc: 0.8; Mutation probability Pm: 0.2; Inertia weights: ωmax=0.9, ωmin=0.4; Learning factors: c1start=2.5, c1end=0.5, c2start=0.5, c2end=2.5.
[0195] Results: Generation Time: Approximately 48 seconds on a standard server. Knowledge Coverage: 100%, all 23 knowledge points were covered. Question Type Distribution Error: 0 questions, strictly meeting the requirements. Average Difficulty: 0.59, very close to the target of 0.6, with a root mean square error (RMSE) of 0.07. IRT Predicted Score: For candidates with ability θ=0.0, the predicted score was 60.2, highly matching the target score of 60. Total Score and Duration: 100 points, 118 minutes, both within the allowable error range.
[0196] Compared with the prior art, the present invention has the following significant technical advantages:
[0197] 1. Innovation through deep integration: This invention does not simply treat IRT as a term in the fitness function, but rather deeply integrates it into all aspects of the algorithm, including IRT-guided initialization, PSO position update based on IRT parameter similarity, and IRT-driven diversity mutation, forming a synergistic effect mechanism between IRT and the optimization algorithm, which is not available in existing technologies.
[0198] 2. Higher success rate and quality of test paper generation: Through refined strategies such as knowledge point-oriented cross-referencing and hierarchical priority repair, the problem of multi-objective constraint conflict is effectively solved, significantly improving the success rate of test paper generation and the quality of generated test papers.
[0199] 3. Scientific and Personalized: Based on the IRT model, it can accurately predict the performance of candidates with different ability levels on the generated test paper, thereby supporting the generation of personalized test papers that are precisely matched with the target candidate group, making the exam more scientific and diagnostic.
[0200] 4. Strong algorithm robustness: The hybrid algorithm design combined with dynamic parameter adjustment effectively avoids the problem of single algorithms easily getting trapped in local optima, resulting in faster convergence speed and stronger adaptability to question banks of different sizes and different test paper assembly requirements.
[0201] 5. Systematic Solution: This invention provides a complete and systematic solution from data structure definition, fitness function design, hybrid optimization algorithm execution to constraint repair, which has high engineering applicability.
[0202] In an embodiment, Figure 2 This is a detailed flowchart of an adaptive paper generation method according to an embodiment of the present invention. This embodiment is further optimized and extended based on the above embodiments.
[0203] First, the question bank is preprocessed by defining a list of Question objects containing IRT parameters. Then, data validation and cleaning are performed, and required parameters are configured, including setting the target knowledge points, question types, total score, duration, difficulty, and examinee ability θ. Next, IRT-guided particle swarm initialization is performed. IRT-guided initialization prioritizes questions with difficulty close to the target, and it is determined whether the number of iterations t is less than T. max If the convergence fails, then calculate the fitness. Based on a multi-objective function (including IRT predicted scores), the individual optimal and global optimal are updated, and a hybrid optimization algorithm is executed: Particle swarm optimization: position updates are performed based on IRT parameter similarity; genetic operations: knowledge-point-guided crossover and IRT-driven mutation. Hierarchical optimization constraints are addressed: 1. Question type, 2. Knowledge points, 3. Total score, 4. Duration. A new generation of population is generated, and the iteration count t is repeatedly checked to see if it is less than T. max If convergence or subsequent steps are not achieved, the optimal test paper and statistical information will be output at the end.
[0204] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0205] like Figure 3 As shown, the following are embodiments of the adaptive paper-generating system provided in this disclosure. They belong to the same inventive concept as the adaptive paper-generating methods in the above embodiments. For details not described in detail in the embodiments of the adaptive paper-generating system, please refer to the embodiments of the adaptive paper-generating methods described above.
[0206] An adaptive test paper generation system, comprising:
[0207] The data acquisition module is used to acquire question bank data and define structured question data containing project response theory parameters;
[0208] The function construction module is used to construct a multi-objective fitness function that includes a predicted score item based on the ability level of the target test takers, according to the test paper creation objectives.
[0209] The test paper population generation module is used to generate a test paper population by executing a pre-built hybrid optimization algorithm based on the structured question data and the multi-objective fitness function. The pre-built hybrid optimization algorithm integrates at least particle swarm optimization algorithm and genetic algorithm, and is guided by the parameters of item response theory during its initialization, search and evolution process.
[0210] The repair module is used to perform hierarchical repair on individuals in the test paper population generated by the hybrid optimization algorithm according to a preset constraint priority, so as to obtain an optimized test paper population.
[0211] The target test paper generation module is used to select particles whose fitness values meet preset requirements from the optimized test paper population and use them as target test papers.
[0212] Figure 4 This is a schematic diagram of the hardware structure of an electronic device that implements various embodiments of the present invention.
[0213] The adaptive volume assembly method provided in this application can be applied to electronic devices. Those skilled in the art will understand that the electronic device structure involved in the embodiments of this invention does not constitute a limitation on the electronic device. An electronic device may include more or fewer components than illustrated, or combine certain components, or have different component arrangements. In the embodiments of this invention, the electronic device includes, but is not limited to, laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the embodiments of this application described and / or claimed herein.
[0214] Electronic devices may include processors, external memory interfaces, internal memory, universal serial bus (USB) interfaces, charging management modules, power management modules, batteries, wireless communication modules, audio modules, speakers, microphones, sensor modules, buttons, cameras, displays, and SIM card interfaces, etc.
[0215] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device. In other embodiments of this application, the electronic device may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0216] A processor may include one or more processing units, such as: a central processing unit (CPU), an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors.
[0217] The processor can serve as the nerve center and command center of an electronic device. The controller can generate operation control signals based on the instruction opcode and timing signals to control the fetching and execution of instructions.
[0218] The processor may also include memory for storing instructions and data. In some embodiments, the memory in the processor is a cache memory. This memory can store instructions or data that the processor has just used or that are used repeatedly. If the processor needs to use the instruction or data again, it can retrieve it directly from this memory. This avoids repeated accesses, reduces processor latency, and thus improves system efficiency.
[0219] An external storage interface (ESI) can be used to connect external memory cards, such as microSD cards, to expand the storage capacity of electronic devices. The external memory card communicates with the processor through the ESI to perform data storage functions, such as saving music and video files on the external memory card.
[0220] Internal memory can be used to store computer executable program code, which includes instructions. The processor executes various functional applications and data processing of electronic devices by running the instructions stored in internal memory. Internal memory can include a program storage area and a data storage area. Internal memory can include high-speed random access memory, and can also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.
[0221] Wireless communication functionality in electronic devices can be achieved through antennas, wireless communication modules, modem processors, and baseband processors.
[0222] Wireless communication modules can provide solutions for wireless communication applications in electronic devices, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies.
[0223] Electronic devices can implement audio functions through audio modules, speakers, receivers, microphones, headphone jacks, and application processors.
[0224] Electronic devices can achieve shooting functions through ISPs, cameras, video codecs, GPUs, displays, and application processors.
[0225] Electronic devices can achieve display functions through GPUs, displays, and application processors.
[0226] A GPU is a microprocessor for image processing, connected to the display screen and application processor. GPUs perform mathematical and geometric calculations for graphics rendering. A processor may include one or more GPUs, which execute program instructions to generate or modify display information.
[0227] A display screen is used to display images, videos, etc. A display screen includes a display panel.
[0228] The storage medium provided in this application stores a program product capable of implementing an adaptive volume assembly method.
[0229] The adaptive test paper generation method includes: acquiring question bank data and defining structured question data containing item response theory (OPT) parameters; constructing a multi-objective fitness function containing predicted score items based on OPT to assess the target examinee's ability level, according to the test paper generation target requirements; executing a pre-constructed hybrid optimization algorithm to generate a test paper population based on the structured question data and the multi-objective fitness function, wherein the pre-constructed hybrid optimization algorithm integrates at least particle swarm optimization and genetic algorithms, and uses OPT parameters for guidance during its initialization, search, and evolution processes; performing stratified repair on individuals in the test paper population generated by the hybrid optimization algorithm according to preset constraint priorities to obtain an optimized test paper population; selecting particles with fitness values that meet preset requirements from the optimized test paper population and using them as target test papers.
[0230] In some possible implementations, the subject matter of this disclosure, the adaptive paper generation method and system, can be implemented as a program product comprising program code that, when the program product is run on a terminal device, causes the terminal device to perform the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of this disclosure.
[0231] The storage medium disclosed herein can take the form of any combination of one or more readable media. A readable medium can be a readable signal medium or a readable storage medium. A readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof.
[0232] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. An adaptive test paper generation method, characterized in that, include: Acquire question bank data and define structured question data that includes project response theory parameters; Based on the requirements of test paper compilation, a multi-objective fitness function is constructed, which includes a predicted score item based on item response theory to assess the target candidates' ability level. Based on the structured question data and the multi-objective fitness function, a pre-built hybrid optimization algorithm is executed to generate a test paper population. The pre-built hybrid optimization algorithm integrates at least particle swarm optimization and genetic algorithm, and is guided by the parameters of item response theory during its initialization, search and evolution. For individuals in the test paper population generated by the hybrid optimization algorithm, hierarchical repair is performed according to preset constraint priorities to obtain an optimized test paper population; Particles with fitness values that meet preset requirements are selected from the optimized test paper population and used as target test papers. The step of executing a pre-built hybrid optimization algorithm to generate a population of test papers includes: Based on the question type requirements, prioritize questions whose difficulty level falls within the preset target difficulty range to construct the initial test paper. The speed of the initial test paper is calculated according to the speed update rules, and new questions are selected from the question bank to replace the original questions according to the speed guidelines. The selection of new questions is determined based on the similarity of the item response theory parameters. Identify the common knowledge points between the two parent test papers and prioritize exchanging the question sequences that contain the common knowledge points; Based on the deviation between the average difficulty of the current test paper and the target difficulty, the difficulty of the selected replacement questions is dynamically adjusted, and replacement questions that meet the preset discrimination criteria are given priority. The speed update rules are as follows: In the formula, For the first The particle in the first During the nth iteration, at the... Dimensional speed, For the first The particle in the first During the nth iteration, at the... The position of the dimension For the first The particle in the first The optimal position found in the nth iteration is in the th iteration. Dimension value, The optimal position found among all particles is in the th position. Dimension value, For inertial weights, These are individual learning factors and social learning factors, respectively. , is a random number that is uniformly distributed in the interval [0,1].
2. The adaptive test paper generation method according to claim 1, characterized in that, The multi-objective fitness function includes at least the following evaluation terms: The test paper's coverage of the pre-set knowledge points; The absolute deviation between the average difficulty of the test paper and the target difficulty; The sum of the absolute deviations between the actual quantity and the target quantity for each question type; The relative deviation between the total score of the exam and the target total score; The relative deviation between the total estimated test time and the target test time; Predictive scoring items for the target candidate's ability level based on item response theory.
3. The adaptive test paper generation method according to claim 2, characterized in that, The formula corresponding to the multi-objective fitness function is as follows: In the formula, The set of knowledge points covered in the exam paper. This is a collection of knowledge points required for the exam. The average difficulty of the test paper. The average difficulty of the target test paper. The actual number of a certain type of question in the exam paper. The target number of a certain type of question in the exam paper. This refers to the total number of questions in the exam paper. The total score for the exam is... For the target total score, This is the total estimated time for the exam. For the target exam duration, The score of the candidate on this test paper is based on the target ability level predicted by item response theory. These are the weighting coefficients for each indicator.
4. The adaptive test paper generation method according to claim 3, characterized in that, Calculate the candidate's score on this test paper based on the target ability level predicted by item response theory using the following formula. : ; Among them, for objective questions, ; For subjective questions, ; In the formula, It is the ability to The candidates answered the questions correctly. The probability, For the corresponding score, The titles are as follows The distinguishability, difficulty, and guessing coefficient of the sample. This represents the total number of questions.
5. The adaptive test paper generation method according to claim 1, characterized in that, Layered repair is performed based on preset constraint priorities, including: Primary constraint fix: Adjust the number of questions of each question type in the test paper to match the preset question type distribution requirements; Secondary constraint repair: Add questions to the exam paper to ensure coverage of all preset knowledge points; Optimize constraint repair: Adjust the total score and total estimated time of the test paper to make them fall within the preset target allowable error range.
6. An adaptive paper-generating system applied to the adaptive paper-generating method according to any one of claims 1-5, characterized in that, include: The data acquisition module is used to acquire question bank data and define structured question data containing project response theory parameters; The function construction module is used to construct a multi-objective fitness function that includes a predicted score item based on the ability level of the target test takers, according to the test paper creation objectives. The test paper population generation module is used to generate a test paper population by executing a pre-built hybrid optimization algorithm based on the structured question data and the multi-objective fitness function. The pre-built hybrid optimization algorithm integrates at least particle swarm optimization algorithm and genetic algorithm, and is guided by the parameters of item response theory during its initialization, search and evolution process. The repair module is used to perform hierarchical repair on individuals in the test paper population generated by the hybrid optimization algorithm according to a preset constraint priority, so as to obtain an optimized test paper population. The target test paper generation module is used to select particles whose fitness values meet preset requirements from the optimized test paper population and use them as target test papers.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the adaptive volume generation method as described in any one of claims 1 to 5.
8. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the adaptive volume generation method as described in any one of claims 1 to 5.