Test paper generation methods, devices, storage media, and computer equipment

By encoding test questions into knowledge points and optimizing them using genetic algorithms, test papers can be automatically generated that target students' weak knowledge points, thus solving the problem of low efficiency in existing technologies and improving the efficiency of test paper generation.

CN115130430BActive Publication Date: 2026-05-26TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TENCENT TECHNOLOGY (SHENZHEN) CO LTD
Filing Date
2021-03-25
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Existing technology cannot efficiently generate test papers that target students' weak knowledge points, resulting in teachers needing to perform a lot of manual work, which increases their workload.

Method used

By encoding candidate test questions according to knowledge point dimensions, a population is generated, and the individual with the highest fitness is obtained through genetic algorithm optimization to generate the test paper.

Benefits of technology

It enables the automatic generation of test papers targeting students' weak knowledge points, improving the efficiency of test paper generation and reducing the workload of teachers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115130430B_ABST
    Figure CN115130430B_ABST
Patent Text Reader

Abstract

This invention discloses a test paper generation method, apparatus, storage medium, and computer equipment. The method involves encoding candidate questions from a candidate question set according to knowledge points; generating multiple individuals by taking multiple sets of encoded information from the corresponding knowledge point encoding sequences based on a preset knowledge point set; sorting these individuals by fitness according to preset question attributes; selecting the individual with the highest fitness for genetic processing of a first population; determining the second population as the target population when there are individuals with a fitness greater than a preset threshold in the second population; selecting the individual with the highest fitness from the target population and decoding it to obtain the target test paper. This method employs machine learning technology to automatically generate test papers based on a preset knowledge point set, significantly improving test paper generation efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and specifically to a test paper generation method, apparatus, storage medium, and computer equipment. Background Technology

[0002] In recent years, with the continuous improvement of the national education level and the continuous improvement of the education level of all citizens, the overall quality of the people has also made great progress.

[0003] In the course of daily teaching, in order to improve students' academic performance, teachers often need to provide targeted reinforcement training for students' weak knowledge points, so that students can have a deeper understanding of these weak knowledge points.

[0004] Currently, teachers need to manually search for questions on various knowledge points in a question bank to identify each student's specific weaknesses, and then compile these questions into exam papers for targeted practice. This wastes a significant amount of teachers' time and increases their workload. Summary of the Invention

[0005] This invention provides a test paper generation method, apparatus, storage medium, and computer equipment. The method encodes candidate test questions according to knowledge point dimensions, generates a population based on the obtained codes, and automatically updates the population until a test paper that meets the requirements is obtained. This method can greatly improve the efficiency of test paper generation.

[0006] The first aspect of this application provides a method for generating examination papers, including:

[0007] The candidate questions in the candidate question set are encoded according to the dimension of knowledge points to obtain the encoding information of each candidate question and its corresponding knowledge point, and to form the encoding sequence of each knowledge point;

[0008] Based on a preset set of knowledge points, multiple individuals are generated by taking multiple sets of preset amount of encoded information from the encoding sequence of the corresponding knowledge points, thus obtaining the first group;

[0009] The individuals are sorted by fitness according to preset test item attributes, and the individual with the highest fitness is selected to perform genetic processing on the first population to obtain the second population.

[0010] When there are individuals in the second population with fitness greater than a preset threshold, the second population is determined to be the target population;

[0011] Select the individual with the highest fitness from the target population, and decode the individual with the highest fitness to obtain the target test paper.

[0012] Accordingly, a second aspect of the present invention provides a test paper generation apparatus, comprising:

[0013] The coding unit is used to encode the candidate questions in the candidate question set according to the dimension of knowledge points, so as to obtain the coding information of each candidate question and its corresponding knowledge point, and form the coding sequence of each knowledge point;

[0014] The generation unit is used to generate multiple individuals by taking multiple sets of a preset number of encoded information from the encoding sequence of the corresponding knowledge points based on a preset set of knowledge points, thus obtaining the first group;

[0015] Genetic units are used to sort the multiple individuals according to the fitness of preset test item attributes, select the individual with the highest fitness to perform genetic processing on the first population, and obtain the second population.

[0016] The determining unit is used to determine the second population as the target population when there are individuals in the second population with fitness greater than a preset threshold.

[0017] The decoding unit is used to select the individual with the highest fitness from the target population and decode the individual with the highest fitness to obtain the target test paper.

[0018] In some embodiments, the genetic unit includes:

[0019] The calculation subunit is used to calculate the fitness of each of the multiple individuals based on preset test item attributes;

[0020] The sorting subunit is used to sort the fitness of each individual as calculated.

[0021] In some embodiments, the computing subunit includes:

[0022] The first calculation module is used to calculate the text similarity between test questions corresponding to different codes in any first target individual among the plurality of individuals;

[0023] The second calculation module is used to calculate the similarity score of the first target individual based on the text similarity between the test questions corresponding to the different codes;

[0024] The third calculation module is used to calculate the fitness of the first target individual based on the preset test item attributes and the similarity score of the first target individual.

[0025] In some embodiments, the apparatus further includes:

[0026] A generation unit is used to generate a mapping table between individuals and fitness, and to associate the calculated fitness of each individual with the corresponding encoding set of the individual and store it in the mapping table;

[0027] The first acquisition unit is used to acquire the fitness of the second target individual from the mapping table when there is an individual in the mapping table that has the same encoding set as any second target individual in the second population;

[0028] The calculation unit is used to calculate the fitness of the second target individual when there is no individual in the mapping table that has the same encoding set as the second target individual, and to associate the calculated fitness of the second target individual with the encoding set of the second target individual and store it in the mapping table.

[0029] In some embodiments, the genetic unit includes:

[0030] The crossover unit is used to cross each individual in the first population with the individual with the highest fitness in the first population based on the knowledge point dimension, so as to obtain the crossover transition population.

[0031] The mutation subunit is used to mutate the encoded information contained in each individual in the transition population to obtain a second population.

[0032] In some embodiments, the cross subunit includes:

[0033] The classification module is used to classify the codes contained in each individual in the first population according to knowledge points, so as to obtain multiple gene segments contained in each individual, and each gene segment contains multiple codes.

[0034] The first acquisition module is used to acquire the probability that any first target gene segment in each individual in the first population will cross over with the individual with the highest fitness in the first population;

[0035] The crossover module is used to crossover the first target gene segment with the gene segment corresponding to the first target gene segment in the individual with the highest fitness in the first population when the probability of crossover between the first target gene segment and the individual with the highest fitness in the first population meets a first preset condition.

[0036] In some embodiments, the variant subunit includes:

[0037] The second acquisition module is used to acquire the probability of mutation of any second target gene segment in each individual in the transition population;

[0038] The mutation module is used to mutate the code contained in the second target gene segment when the probability of mutation of the second target gene segment meets the second preset condition.

[0039] In some embodiments, the apparatus further includes:

[0040] The second acquisition unit is used to acquire the test item number corresponding to the code contained in each individual in the second group, wherein the test item number is the number of each test item in the candidate test item set;

[0041] The mutation unit is used to mutate the encoding of the same test item number in any third target individual when the same test item number encoding exists in any third target individual.

[0042] In some embodiments, the determining unit is further configured to select the individual with the highest fitness in the second population to perform genetic processing on the second population when there is no individual with fitness greater than a preset threshold in the second population, thereby generating a new population;

[0043] When the number of genetic treatments reaches a preset number, the new population is identified as the target population.

[0044] When it is detected that the number of genetic treatments has not reached the preset number, the individual with the highest fitness in the new population is selected to perform genetic treatment on the new population, and the new population is updated based on the population obtained from the genetic treatment, until the number of genetic treatments reaches the preset number, and the population obtained from the last genetic treatment is determined as the target population.

[0045] The decoding unit is also used to select the target individual with the highest fitness from the target population and decode the target individual to obtain the target test paper.

[0046] In some embodiments, the determining unit is further configured to select the individual with the highest fitness in the second population to perform genetic processing on the second population when there is no individual with fitness greater than a preset threshold in the second population, thereby generating a new population;

[0047] When an individual with a fitness greater than a preset threshold is detected in the new population, the new population is identified as the target population.

[0048] When it is detected that there are no individuals with fitness greater than a preset threshold in the new population, the individual with the highest fitness in the new population is selected to perform genetic processing on the new population, and the new population is updated based on the population obtained from the genetic processing, until there are individuals with fitness greater than the preset threshold in the new population, and the population obtained from the last genetic processing is determined as the target population.

[0049] The decoding unit is also used to select the target individual with the highest fitness from the target population and decode the target individual to obtain the target test paper.

[0050] A third aspect of this application also provides a storage medium storing a plurality of instructions adapted for loading by a processor to execute the steps in the test paper generation method provided in the first aspect of this application.

[0051] A fourth aspect of this application provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps in the test paper generation method provided in the first aspect of this application.

[0052] A fifth aspect of this application provides a computer program product or computer program, the computer program product or computer program including computer instructions stored in a storage medium. A processor of a computer device reads the computer instructions from the storage medium and executes the computer instructions, causing the computer device to perform the steps in the test paper generation method provided in the first aspect.

[0053] The test paper generation method provided in this application encodes candidate test questions in a candidate question set according to the dimension of knowledge points, obtaining the encoding information corresponding to each candidate test question and its corresponding knowledge point, and forming an encoding sequence for each knowledge point. Based on a preset set of knowledge points, multiple sets of a preset number of encoding information are taken from the encoding sequence of the corresponding knowledge points to generate multiple individuals, resulting in a first population. The multiple individuals are sorted by fitness according to preset test question attributes, and the individual with the highest fitness is selected to perform genetic processing on the first population to obtain a second population. When there are individuals in the second population with a fitness greater than a preset threshold, the second population is determined as the target population. The individual with the highest fitness is selected from the target population, and the individual with the highest fitness is decoded to obtain the target test paper. In this way, by encoding candidate test questions according to the dimension of knowledge points and generating a population containing multiple individuals, the individual in the population is automatically genetically updated until an individual that meets the conditions is generated, and finally the individual is decoded to obtain the target test paper. This method can automatically generate test papers based on the dimension of knowledge points, which greatly improves the efficiency of test paper generation. Attached Figure Description

[0054] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0055] Figure 1 This is a schematic diagram of the test paper generation scenario provided in this application;

[0056] Figure 2 This is a flowchart illustrating the test paper generation method provided in this application;

[0057] Figure 3 This is another flowchart illustrating the test paper generation method provided in this application;

[0058] Figure 4 This is a schematic diagram illustrating the identified knowledge points;

[0059] Figure 5 This is a schematic diagram of the interface for displaying the test paper generation requirements;

[0060] Figure 6 This is a schematic diagram showing the generated test paper organized by knowledge point.

[0061] Figure 7 This is a schematic diagram of the test paper generation device provided in this application;

[0062] Figure 8 This is a schematic diagram of the structure of the computer device provided in this application. Detailed Implementation

[0063] 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.

[0064] This invention provides a test paper generation method, apparatus, storage medium, and computer equipment. The test paper generation method can be used in a test paper generation apparatus. This apparatus can be integrated into a computer device, which can be a terminal or a server. The terminal can be a mobile phone, tablet computer, laptop computer, smart TV, wearable smart device, personal computer (PC), etc. The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, Content Delivery Network (CDN), and big data and artificial intelligence platforms.

[0065] Please see Figure 1The figure illustrates the scenario for generating the test paper provided in this application. As shown, the computer device acquires candidate test questions from a candidate question set, encodes the acquired candidate test questions according to the knowledge point dimension of the test questions, determines the encoding information corresponding to each candidate test question and its corresponding knowledge point, and forms an encoding sequence for each knowledge point. Then, based on a preset set of knowledge points, multiple sets of a preset number of encoding information are taken from the encoding sequence of the corresponding knowledge points to generate multiple individuals, resulting in a first population. The multiple individuals are sorted by fitness according to preset test question attributes, and the individual with the highest fitness is selected to perform genetic processing on the first population to obtain a second population. When there are individuals in the second population with fitness greater than a preset threshold, the second population is determined as the target population. The individual with the highest fitness is selected from the target population, and the individual with the highest fitness is decoded to obtain the target test paper.

[0066] It should be noted that, Figure 1 The illustrated scenario of test paper generation is merely an example. The test paper generation scenario described in this application is intended to more clearly illustrate the technical solution of this application and does not constitute a limitation on the technical solution provided in this application. Those skilled in the art will understand that, with the evolution of test paper generation methods and the emergence of new business scenarios, the technical solution provided in this application is equally applicable to similar technical problems.

[0067] The implementation scenarios described above will be explained in detail below.

[0068] This application will describe the embodiments from the perspective of a test paper generation device, which can be integrated into a computer device. The computer device can be a terminal or a server. For example... Figure 2 The diagram shown is a flowchart of the test paper generation method provided in this application. The method includes:

[0069] Step 101: Encode the candidate questions in the candidate question set according to the dimension of knowledge points to obtain the coding information corresponding to each candidate question and its knowledge point, and form the coding sequence of each knowledge point.

[0070] The candidate question set can be a collection of questions initially selected from a large number of questions based on the students' learning content or the content that the teacher wants to assess. For example, if the students are in the first year of high school, then the candidate question set should be a collection of questions corresponding to the learning content of the first year of high school; if the teacher wants to assess the students' mathematics learning, then the candidate question set should be a collection of questions corresponding to the first year of high school mathematics. Of course, the collection of questions corresponding to the first year of high school mathematics here is just one example of a candidate question set. The candidate question set can also be a collection of questions corresponding to other subjects in other grades, such as the collection of questions corresponding to the first year of junior high school Chinese, the second year of junior high school English, and so on.

[0071] Once a candidate question set is selected, questions can be chosen from it to create an exam paper. Currently, with advancements in computer technology, automatic exam paper generation technology has emerged. This technology can automatically generate exam papers for assessing students from a candidate question set. However, current automatic exam paper generation technology can only generate exam papers for scenarios with defined overall difficulty, knowledge point scope, and question type relationships. Exam papers automatically generated for such scenarios are generally used for diagnostic tests or final exams targeting a large number of students. In actual teaching, it is often necessary to reinforce weak knowledge points that students have not mastered, requiring exam papers specifically designed to assess these weaknesses. Current automatic exam paper generation technology cannot generate exam papers specifically for assessing students' weak knowledge points. Therefore, such exam papers still rely on manual processing, resulting in low efficiency in exam paper generation.

[0072] To address the technical problem that the aforementioned test paper generation technologies cannot generate test papers specifically designed to assess students' weak knowledge points, the inventors of this application propose a test paper generation method. This method aims to automatically generate test papers to assess students' weak knowledge points, thereby improving test paper generation efficiency. The test paper generation method provided in this application is described in detail below.

[0073] After obtaining the candidate question set, it is encoded according to the dimension of knowledge points. Specifically, since each question may contain multiple knowledge points, meaning a question can be used to assess multiple knowledge points, the multiple knowledge points contained in a question are referred to as the knowledge point list corresponding to that question. Encoding the candidate questions in the candidate question set according to the dimension of knowledge points means determining the encoding information corresponding to each question and its associated knowledge point. For example, if the knowledge point list of question A contains knowledge points a, b, and c, then encoding question A according to the dimension of knowledge points means determining the encoding information corresponding to knowledge point a, knowledge point b, and knowledge point c. Alternatively, it can be understood from another perspective that encoding the candidate question set according to knowledge point a involves encoding each question in the knowledge point list that contains knowledge point a, starting from 0, to obtain the encoding sequence for knowledge point a. Similarly, for other knowledge points in the candidate question set, such as knowledge points b and c, their corresponding encoding sequences can also be formed. Within the same knowledge point coding sequence, different codes correspond to different test questions; while within different knowledge point coding sequences, the same code may correspond to different test questions. For example, code 01 in knowledge point a corresponds to test question A, while code 01 in knowledge point b may correspond to test question B.

[0074] Step 102: Based on the preset set of knowledge points, take multiple sets of preset number of encoded information from the encoding sequence of the corresponding knowledge points to generate multiple individuals, and obtain the first group.

[0075] The preset set of knowledge points can be students' weak areas or knowledge points that users want to reinforce and assess. Before generating an individual test paper by extracting coding information from the knowledge point coding sequence, the preset set of knowledge points needs to be acquired first. Specifically, users can input the set of knowledge points they want to assess into the test paper generation device; or users can input students' exam paper marking data into the device, which automatically identifies the students' incorrect answers from the marking data and analyzes this data to determine the students' weak knowledge points. This eliminates the need for manual identification of students' weak knowledge points, further improving test paper generation efficiency.

[0076] After obtaining the preset set of knowledge points, the coding sequence corresponding to each knowledge point in the preset set is determined. Then, a preset number of coding information is taken from the coding sequence corresponding to each knowledge point, and the coding information corresponding to each knowledge point is combined to generate an individual. The above steps are repeated to obtain multiple individuals. These multiple individuals form the initial population, which can also be called the first population. Here, there are at least two individuals. Generally, the larger the number of individuals, the higher the matching degree of the generated test paper with the user's needs. However, a larger number of individuals also leads to a larger amount of computation, resulting in lower test paper generation efficiency. Conversely, a smaller number of individuals reduces the amount of computation and increases test paper generation efficiency, but the matching degree of the generated test paper with the user's needs is lower. The number of codes taken from the coding sequence corresponding to each knowledge point can be set as needed. The number of codes taken from the coding sequences corresponding to different knowledge points can be the same or different. When taking a set of codes from the coding sequence corresponding to each knowledge point, a random method is generally used to ensure the diversity of individuals.

[0077] Step 103: Sort multiple individuals according to their fitness based on preset test item attributes, select the individual with the highest fitness to perform genetic processing on the first population, and obtain the second population.

[0078] After generating the first population, the fitness of each individual in the first population is determined according to the preset test attributes. Then, the individuals in the first population are sorted according to their fitness. After determining the individual with the highest fitness in the first population, this individual is used to perform genetic processing on the first population. The genetic processing retains the elements in the first population that match the preset test attributes and generates new individuals accordingly. These new individuals form the second-generation population, which can also be referred to here as the second population.

[0079] In some embodiments, ranking multiple individuals according to preset test item attributes based on their fitness includes:

[0080] 1. Calculate the fitness of each individual among multiple individuals based on preset test item attributes;

[0081] 2. Sort the fitness of each individual obtained from the calculation.

[0082] The test item attributes can include difficulty requirements, knowledge point requirements, question type requirements, test area requirements, quality requirements, and quantity requirements for each dimension, all of which can be set by the user. Currently, when automatically generating test papers for diagnostic assessments or high school entrance examinations for a large number of students, only the overall test item difficulty, knowledge point range, and question type quantity relationship can be set. In this application, the quantity of each knowledge point, the quantity of each difficulty level, the quantity of each question type, question quality, and knowledge point coverage can be set simultaneously. After obtaining the user-set test item attribute data, i.e., the preset test item attributes, the fitness of each individual is determined based on these test item attributes. It is understood that the fitness of each individual corresponds to the preset test item attributes. For the same individual, when the set test item attributes are different, their corresponding fitness will not necessarily be the same. After calculating the fitness of each individual based on the preset test item attributes, each individual in the first population is sorted according to the fitness level, which can be sorted from high to low or from low to high.

[0083] In some embodiments, calculating the fitness of each individual among multiple individuals based on preset test item attributes includes:

[0084] 1.1 Calculate the text similarity between test questions corresponding to different codes in any first target individual among multiple individuals;

[0085] 1.2 Calculate the similarity score of the first target individual based on the text similarity between test questions corresponding to different codes;

[0086] 1.3 Calculate the fitness of the first target individual based on the preset test item attributes and the similarity score of the first target individual.

[0087] In this embodiment, the calculation of an individual's fitness depends not only on preset test item attributes, but also on a comprehensive calculation that combines the individual's similarity score.

[0088] For any individual in the first group, designated as the first target individual, a similarity score is calculated. This involves first calculating the text similarity between the test questions corresponding to different codes within the first target individual, and then further calculating the similarity score of the first target individual based on the text similarity between the test questions corresponding to different codes. This method allows for the determination of the similarity score for each individual in the first group, and then the fitness of each individual in the first group is calculated by combining the similarity score of each individual with preset test question attributes. In this way, by evaluating the text similarity of the test questions corresponding to the codes of each individual, the selection of test questions with similar content is avoided, thereby improving the quality of the generated test paper.

[0089] In some embodiments, the individuals with the highest fitness are selected to perform genetic treatment on the first population to obtain a second population, including:

[0090] A. Cross each individual in the first population with the individual with the highest fitness in the first population based on the knowledge point dimension to obtain the transitional population after crossover;

[0091] B. Mutate the encoded information contained in each individual in the transition population to obtain the second population.

[0092] The genetic processing of the first population includes crossover and mutation. Specifically, the crossover process can be performed by using the individual with the highest fitness in the first population to crossover each individual in the first population based on a knowledge point dimension. The resulting individuals form a transition population. Then, the encoded information of each individual in the transition population is mutated to obtain the second population.

[0093] In some embodiments, each individual in the first group is cross-referenced with the individual with the highest fitness in the first group based on the knowledge point dimension, including:

[0094] a. Classify the codes contained in each individual in the first population according to knowledge points to obtain multiple gene segments contained in each individual, and each gene segment contains multiple codes;

[0095] b. Obtain the probability of crossover between any first target gene segment in each individual of the first population and the individual with the highest fitness in the first population;

[0096] c. When the probability of crossover between the first target gene segment and the individual with the highest fitness in the first population meets the first preset condition, the first target gene segment is crossed with the gene segment corresponding to the first target gene segment in the individual with the highest fitness in the first population.

[0097] In the first group, each individual is composed of a preset number of codes taken from the coding sequence corresponding to the knowledge point in the preset knowledge point set. Therefore, the genes contained in each individual in the first group can be divided to obtain the gene segment corresponding to each knowledge point.

[0098] Then, the probability of crossover between any first target gene segment from any individual and the individual with the highest fitness is determined. This probability can be randomly determined to ensure the diversity of individuals after crossover. After determining the probability of crossover between the first target gene segment and the individual with the highest fitness, it is determined whether this probability meets a first preset condition. This first preset condition can be that the probability is higher than a certain set value. When it is determined that the probability meets the first preset condition, the target gene segment in the individual with the highest fitness in the first population that has the same knowledge point as the first target gene segment is identified, and then the first target gene segment is crossed with the code in the target gene segment. Here, crossing the first target gene segment with the code in the target gene segment can be done by swapping any one of the codes or by swapping multiple codes. Then, the above method is used to perform crossover operation on all gene segments in an individual one by one to obtain the crossover individuals. Then, the above crossover process is performed on each individual in the first population to obtain a transitional population.

[0099] In some embodiments, the coding contained in each individual in the transition population is mutated to obtain a second population, including:

[0100] Obtain the probability of mutation of any second target gene segment in each individual of the transition population;

[0101] When the probability of mutation in the second target gene segment meets the second preset condition, the coding contained in the second target gene segment is mutated.

[0102] In this context, the second target gene segment is any gene segment in an individual within the transition population. The probability of mutation in the second target gene segment can also be randomly determined. When the probability of mutation in the second target gene segment meets a second preset condition, the coding contained in the second target gene segment is mutated. Mutating the coding contained in the second target gene segment can involve replacing one coding segment with any other gene in the coding sequence of the corresponding knowledge point, or it can involve replacing multiple coding segments with other genes in the coding sequence of the corresponding knowledge point. Then, each gene segment in the individual is mutated accordingly to obtain the mutated individual. This mutation operation is performed on each individual in the transition population to obtain the second population.

[0103] Step 104: When there are individuals in the second population with fitness greater than a preset threshold, the second population is determined as the target population.

[0104] In this process, after genetically processing the first population to obtain the second population, the fitness of each individual in the second population is calculated. Then, it is checked whether there are individuals in the second population with a fitness greater than a preset threshold. If there are individuals in the second population with a fitness greater than the preset threshold, the second population can be determined as the final target population; otherwise, further confirmation of the target population is required.

[0105] In some embodiments, the test paper generation method provided in this application may further include:

[0106] Generate a mapping table between individuals and fitness, and associate the calculated fitness of each individual with the corresponding encoding set of the individual and store it in the mapping table;

[0107] Before determining the second population as the target population, if there are individuals in the second population with fitness greater than a preset threshold, the following steps are also included:

[0108] When there is an individual in the mapping table that has the same encoding set as any second target individual in the second population, the fitness of the second target individual is obtained from the mapping table;

[0109] If there is no individual in the mapping table that has the same encoding set as the second target individual, calculate the fitness of the second target individual and associate the calculated fitness of the second target individual with the encoding set of the second target individual and store it in the mapping table.

[0110] In this embodiment, a mapping table between the encoding set and fitness of each individual can be set. After calculating the fitness of individuals in the first population, the encoding set and fitness of each individual are stored in this mapping table. Thus, when calculating the fitness of individuals in the second population, the mapping table can be used to check if an individual identical to a certain individual in the second population already exists. If such an individual exists, its fitness can be directly obtained, reducing the calculation process and speeding up test paper generation. Determining whether individuals are identical can be done by checking if their encoding sets are the same. If two individuals have the same encoding sets, they are considered identical. If no identical individual exists in the mapping table, the fitness of that individual is calculated, and the calculated fitness is then associated with the individual's encoding set and stored in the mapping table to update the mapping table. Thus, when it is determined that the second population is not the target population and further genetic processing is required for the second population, and fitness calculation is performed on the genetically processed third population, it is also possible to search from the mapping table for individuals with the same encoding set as individuals in the third population. If such individuals exist, their fitness can be directly obtained, reducing the fitness calculation process.

[0111] Step 105: Select the individual with the highest fitness from the target population, and decode the individual with the highest fitness to obtain the target test paper.

[0112] Once a target population with individuals possessing fitness values ​​greater than a preset threshold is identified, the individual with the highest fitness within that population is further determined. Since multiple individuals with fitness values ​​greater than the preset threshold may exist within the target population, selecting the individual with the highest fitness ensures a higher match between the selected individual and the user's needs. Then, each code of the individual with the highest fitness in the target population is decoded to obtain the corresponding test questions, thus generating the target test paper.

[0113] In some embodiments, the test paper generation method provided in this application may further include:

[0114] 1. When there are no individuals with fitness greater than the preset threshold in the second population, select the individual with the highest fitness in the second population to perform genetic processing on the second population to generate a new population;

[0115] 2. When the number of genetic treatments reaches the preset number, the new population is identified as the target population;

[0116] 3. When it is detected that the number of genetic treatments has not reached the preset number, select the individual with the highest fitness in the new population to perform genetic treatment on the new population, and update the new population based on the population obtained from the genetic treatment, until the number of genetic treatments reaches the preset number, and determine the population obtained from the last genetic treatment as the target population;

[0117] 4. Select the target individual with the highest fitness from the target population, and decode the target individual to obtain the target test paper.

[0118] In this process, if no individual with a fitness greater than a preset threshold exists in the second population, the individual with the highest fitness in the second population is identified, and then genetic processing is performed on the second population based on this individual with the highest fitness. After each genetic processing step, the number of genetic iterations is checked. If the number of genetic iterations reaches the preset number, the genetic processing stops, and the current population is designated as the target population. If the number of genetic iterations does not reach the preset number, genetic processing continues on the newly generated population based on the individual with the highest fitness in the newly generated population, until the number of genetic iterations reaches the preset number.

[0119] In some embodiments, the test paper generation method provided in this application may further include:

[0120] a. When there are no individuals with fitness greater than the preset threshold in the second population, select the individual with the highest fitness in the second population to perform genetic processing on the second population to generate a new population;

[0121] b. When an individual with a fitness greater than a preset threshold is detected in a new population, the new population is identified as the target population.

[0122] c. When it is detected that there are no individuals with fitness greater than the preset threshold in the new population, the individual with the highest fitness in the new population is selected to perform genetic processing on the new population, and the new population is updated based on the population obtained from the genetic processing, until there are individuals with fitness greater than the preset threshold in the new population, and the population obtained from the last genetic processing is determined as the target population.

[0123] d. Select the target individual with the highest fitness from the target population, and decode the target individual to obtain the target test paper.

[0124] In this process, if no individual with a fitness greater than a preset threshold exists in the second population, the individual with the highest fitness in the second population is selected for genetic processing. The fitness of each individual in the genetically processed population is then calculated to determine if any individual with a fitness greater than the preset threshold exists. If such an individual exists, the genetically processed population is designated as the target population. Otherwise, the individual with the highest fitness in the target population is selected for genetic processing in a new population until an individual with a fitness greater than the preset threshold exists in the newly generated population.

[0125] In some embodiments, after each genetic treatment, it can be simultaneously detected whether there are individuals with fitness greater than a preset threshold and whether the number of genetic iterations has reached a preset number. If either of these conditions is met, the genetic treatment is stopped, and the final population is determined as the target population. Then, the individual with the highest fitness is identified from the target population, and the target test paper is decoded.

[0126] As described above, the test paper generation method provided in this application encodes candidate test questions in a candidate question set according to the dimension of knowledge points, obtaining the encoding information corresponding to each candidate test question and its corresponding knowledge point, and forming an encoding sequence for each knowledge point. Based on a preset set of knowledge points, multiple sets of encoding information of a preset number are taken from the encoding sequence of the corresponding knowledge points to generate multiple individuals, resulting in a first population. The multiple individuals are sorted by fitness according to preset test question attributes, and the individual with the highest fitness is selected to perform genetic processing on the first population to obtain a second population. When there are individuals in the second population with fitness greater than a preset threshold, the second population is determined as the target population. The individual with the highest fitness is selected from the target population, and the individual with the highest fitness is decoded to obtain the target test paper. In this way, by encoding candidate test questions according to the dimension of knowledge points and generating a population containing multiple individuals, the individual in the population is automatically genetically updated until an individual that meets the conditions is generated, and finally the individual is decoded to obtain the target test paper. This method can automatically generate test papers based on the dimension of knowledge points, greatly improving the efficiency of test paper generation.

[0127] Accordingly, this application embodiment will further describe the test paper generation method provided in this application from the perspective of a computer device. In this embodiment, the computer device can be a terminal or a server, such as... Figure 3 The diagram shown is another flowchart illustrating the test paper generation method provided in this application. The method includes:

[0128] Step 201: The computer device obtains a set of candidate test questions and encodes the candidate test questions in the set according to the knowledge point dimension.

[0129] In this embodiment, the computer device first obtains the user's test paper generation requirements, and then retrieves a set of candidate test questions from the question bank based on those requirements. For example, if the user's test paper generation requirements include creating a set of first-year junior high school math test papers, the computer device will retrieve all relevant test questions from the question bank. The user's test paper generation requirements may also include a specified set of knowledge points (generally a student's weak knowledge points), test question quality, test area, question type ratio, and the number of questions of each difficulty level. In this embodiment, the specific assumptions for the above test paper generation requirements are as follows: the specified set of knowledge points includes four knowledge points: knowledge point 1, knowledge point 2, knowledge point 3, and knowledge point 4; the test question quality requires that over 90% of the questions be rated 4 stars or higher; each knowledge point has 3 questions, including one high-difficulty, one medium-difficulty, and one low-difficulty question; questions from the same test area account for over 40% of the total questions; and the number of multiple-choice, fill-in-the-blank, and short-answer questions is the same. The above is just one specific test paper generation requirement from a user, which is generally aimed at a particular student. For different students, the specific test paper generation requirements can be adjusted accordingly. In some embodiments, multiple requirements among the above test paper generation requirements can be assigned corresponding priorities, and when conflicts arise among these requirements, the requirement with the higher priority will be given priority.

[0130] In some embodiments, the computer device can automatically determine the student's exam paper generation needs based on the grading of the exam papers. After the student finishes the exam, the image information of the graded exam paper can be transmitted to the computer device; when the exam paper is electronic, the electronic exam paper information and the student's answer information can be directly transmitted to the computer device. The computer device automatically identifies all the knowledge points contained in the exam paper and the student's weak knowledge points from the image of the graded paper exam paper or the electronic exam paper and the student's answer information. Figure 4 The diagram shown illustrates the knowledge points automatically identified by the computer equipment. The computer can identify this as a junior high school chemistry exam, covering topics such as redox reactions, Avogadro's constant, molar concentration, physical properties of sodium, flame tests, reactions of sodium with nonmetals like oxygen, electrolytes and non-electrolytes, and ionization equations. The student's weak areas are the physical properties of sodium, flame tests, and reactions of sodium with nonmetals like oxygen. The diagram can represent these weak areas with different shapes and colors. Furthermore, the computer can identify the difficulty level of each question and the student's mastery of questions at different difficulty levels. Based on this mastery, the computer can then determine the recommended difficulty level for the learning materials.

[0131] In some embodiments, after each unified exam, the teacher can input the exam papers and grading information of all students in the class into the computer device. The computer device can then identify the knowledge mastery of all students in the class and determine the weak knowledge points of each student.

[0132] like Figure 5 The image shows a schematic diagram of the user-defined test paper generation requirements interface. As shown, the interface displays requirements such as weak knowledge points, test quality, test area, question type ratio, and the number of questions of each difficulty level. Users can click on any location within the requirements display to view details and modify them. The interface also includes a "Add Requirements" control, allowing users to customize other test paper generation requirements. Finally, a "Generate Test Paper" control is available; once the user confirms the requirements are correct, clicking this control will automatically begin generating the test paper.

[0133] After obtaining the candidate question set, the candidate question set is coded according to the knowledge point dimension. For example, if the candidate question set contains 100 questions, and these 100 questions involve three knowledge points: knowledge point A, knowledge point B, and knowledge point C, then we can first code these questions based on knowledge point A. Specifically, we can first identify the questions in the knowledge point list of the candidate question set that contain knowledge point A. Let's say there are 40 such questions, then we can code these 40 questions as 0 to 39. The knowledge point list for each question is a list of multiple knowledge points involved in each question. For example, if a question involves knowledge points a and b, then the knowledge point list for the question will contain knowledge points a and b. Furthermore, the order of the coding for each question is not restricted. Then, we can code these questions based on knowledge point B, that is, identify the questions in the knowledge point list of the candidate question set that contain knowledge point B. Let's say there are also 40 such questions, then we can also code these 40 questions as 0 to 39. Next, these questions are coded based on knowledge point C. Assuming there are 40 questions, these 40 questions can be coded from 0 to 39. In this way, each knowledge point obtains a coding sequence. In different knowledge point coding sequences, the same code may represent different questions. The same question may also correspond to different codes in different knowledge point sequences. This is just an example; generally, the number of candidate questions is much larger, and the number of knowledge points involved is usually more than the number of specified knowledge points.

[0134] Step 202: The computer device extracts multiple sets of preset number of encoded information from the corresponding encoded sequence based on the specified set of knowledge points to generate the first group.

[0135] The process involves obtaining a set of specified knowledge points, defining the coding sequence for each knowledge point, and then selecting a predetermined number of codes from each knowledge point's coding sequence to form an individual. Multiple individuals are then created using this method to obtain the first group. Specifically, according to the aforementioned specific test paper generation requirements, coding sequences corresponding to knowledge points 1, 2, 3, and 4 can be determined. Then, three codes are selected from each of these coding sequences to form an individual. The selection of codes from the knowledge point coding sequences can be random to ensure individual diversity. For example, an individual might contain 12, 34, and 45 from the coding sequence for knowledge point 1, 23, 34, and 12 from the coding sequence for knowledge point 2, 56, 22, and 47 from the coding sequence for knowledge point 3, and 1, 3, and 6 from the coding sequence for knowledge point 4. That is, the individual contains 12 codes, which are obtained by randomly selecting three codes from each of the four knowledge point coding sequences. The individual contains the same code 23, but the knowledge points corresponding to these two codes are not the same, so the test questions corresponding to these two codes are not necessarily the same. Then, multiple individuals are regenerated using the above method. These generated individuals form the first population, or the initial population.

[0136] In some embodiments, after generating the first group, the question number corresponding to the code of each individual in the first group can be obtained. This question number is the number of the question in the question set. For example, if there are 100 questions in the question set, these 100 questions can be numbered from 0 to 99, so different question numbers correspond to different questions. After obtaining the question numbers corresponding to all codes of an individual in the first group, it is determined whether there are codes with the same question number in that individual. If so, only one code is retained, and the other codes are replaced. For example, when the question numbers corresponding to code 12 for knowledge point 1 and code 23 for knowledge point 2 in the above individual are the same (at this time, the knowledge point list of the question corresponding to this question number contains knowledge point 1 and knowledge point 2), code 12 corresponding to knowledge point 1 can be retained, and code 23 corresponding to knowledge point 2 can be replaced with other codes in the code sequence corresponding to knowledge point 2. Of course, it is also possible to retain code 23 corresponding to knowledge point 2, and then replace code 12 corresponding to knowledge point 1 with other codes in the code sequence corresponding to knowledge point 1.

[0137] Step 203: Obtain the fitness of each individual in the first population.

[0138] The fitness of an individual within the population reveals the degree of match between that individual and the test paper generation requirements. Generally, the higher the fitness of an individual, the greater its match with the test paper generation requirements, and the higher the quality of the test paper determined based on that individual. For the same individual, the fitness will vary depending on the test paper generation requirements. Therefore, the fitness of an individual needs to be calculated based on the given test paper generation requirements. The following section explains in detail the method for calculating the individual fitness exemplified in step 202 using the specific test paper generation requirements given in step 201.

[0139] First, calculate the individual's knowledge point dimension score. The individual's knowledge point dimension score can be calculated according to the following formula (1):

[0140] Equation (1)

[0141] Where y1 is the individual's knowledge point dimension score, S 1i S is the set of knowledge points corresponding to the i-th code in an individual. This set contains only one element, for example, the knowledge point corresponding to the second code in the above individual is knowledge point 1; 2i Let Len be the set of knowledge points in the knowledge point list corresponding to the i-th code of an individual. This set can contain multiple elements. Len is the number of elements in the set. To find the intersection of the sets. Indicates when The value is 1 if true, otherwise it is 0. n is the total number of codes in the individual.

[0142] Then, the individual's quality dimension score is calculated, which can be done according to the following formula (2):

[0143] Equation (2)

[0144] in, Here, m represents the quality dimension score of an individual, m represents the number of codes in the individual whose test quality meets the preset conditions, specifically the number of test questions with a quality requirement rating of 4 stars or higher; and n represents the total number of codes in the individual.

[0145] Then, the individual's regional dimension score is calculated, which can be calculated according to the following formula (3):

[0146] Equation (3)

[0147] in, M represents the regional dimension score of an individual, M is the number of codes corresponding to test questions in the individual whose regional information is the same as the regional information corresponding to the test paper generation requirements, and n is the total number of codes in the individual.

[0148] Next, calculate the difficulty score for each individual question. This can be done by quantifying the difficulty of each question, for example, 1 corresponds to low difficulty, 2 to medium difficulty, and 3 to high difficulty. In this way, the target difficulty vector [a1,…,a] can be determined based on the question difficulty requirements set in the test paper generation specifications. n ], while the individual's difficulty vector is [ ,…, Therefore, the individual's difficulty dimension score can be calculated according to the following formula (4):

[0149] Equation (4)

[0150] in, For each individual, the difficulty score is... The target difficulty level for the question corresponding to the i-th code in the individual set for the test paper generation requirements. The actual difficulty of the test question corresponding to the i-th code in an individual.

[0151] Then, calculate the individual's question type dimension score, where the number of question types is N, meaning there are a total of N question types in the individual. The target number of each question type can be determined as the target question type vector [b1,…,b N ], and the actual question type vector corresponding to the actual number of each question type in an individual is [ ,…, Then, the individual's question type dimension score can be calculated according to the following formula (5):

[0152] Equation (5)

[0153] in, For each individual, the score is based on the question type dimension. The target number of the i-th question type set for the test paper generation requirements. Let represent the actual number of questions of the i-th type in an individual.

[0154] Then, calculate the text similarity score of the individual's test questions. First, calculate the text similarity of the test questions corresponding to the codes related to each knowledge point in the individual, and obtain the similarity between the test questions corresponding to the codes related to each knowledge point. Taking the example that each knowledge point contains 3 test questions, then 3 similarity values ​​can be calculated for each knowledge point. Then the text similarity score of the individual's test questions can be calculated according to the following formula (6):

[0155] Equation (6)

[0156] in, , , These are the three text similarity values ​​corresponding to the i-th knowledge point in an individual, where m is the number of knowledge points in the individual (i.e., the number of knowledge points in the specified knowledge point set), and m can be 4 in the previous example. n is the total number of codes in the individual. To calculate the text similarity between test questions, a word vector model can be trained on all test questions in the entire question bank. Then, the trained word vector model is used to determine the word vectors of all words in the two test questions for which similarity calculation is required. Next, the term frequency–inverse document frequency (TF-IDF) technique is used to perform a weighted average of all word vectors in each test question to obtain the vector representation of each test question. Finally, the cosine similarity between the two vectors is calculated. Then we can obtain the text similarity between the two questions. .

[0157] Finally, the fitness of an individual is calculated by weighting its scores in the knowledge point dimension, quality dimension, region dimension, difficulty dimension, question type dimension, and question text similarity, as well as their respective preset weights. Specifically, the fitness of an individual can be calculated according to the following formula (7):

[0158] Equation (7)

[0159] in, This represents the fitness value of an individual. The weights corresponding to the scores of the knowledge points. The weights corresponding to the quality dimension scores. The weights corresponding to the regional dimension scores. The weights corresponding to the difficulty dimension scores. The weights corresponding to the scores for each question type dimension. The weights are the scores corresponding to the similarity scores of the test texts.

[0160] In some embodiments, after calculating the fitness of each individual, a mapping table between individuals and fitness can be generated. Then, the calculated individual fitness is associated with the encoding set contained in the individual and stored in the mapping table. This way, when calculating the fitness of individuals in the population later, the mapping table can be searched to see if the fitness of the individual already exists, thereby reducing the number of fitness calculations and improving the efficiency of test paper generation.

[0161] Step 204: The computer device selects the individual with the highest fitness in the first population and performs crossover processing on the first population.

[0162] The crossover process for the first group involves crossover processing of each individual within that group. In this application, the crossover process using the individual with the highest fitness in the first group is based on the knowledge point dimension. For example, using the individual with the highest fitness in the first group to crossover the individuals in the example in step 202 involves crossover processing the codes contained in the four knowledge points separately. First, the probability of each knowledge point crossing with the individual with the highest fitness in the first group needs to be randomly determined. When this probability reaches a preset value, it is determined that the knowledge point can crossover with the individual with the highest fitness in the first group. For example, if knowledge point 1 can crossover with the individual with the highest fitness in the first group, then one code corresponding to knowledge point 1 in the individual with the highest fitness in the first group is swapped with one code corresponding to knowledge point 1 in the aforementioned individual. If knowledge point 2 cannot crossover with the individual with the highest fitness in the first group, then the code in knowledge point 2 is not processed, and the original code is retained. Similarly, cross-processing is performed on the codes corresponding to other knowledge points, thereby using the individual with the highest fitness in the first group to cross-process the aforementioned individuals, resulting in a new individual. Then, the same method is used to cross-process other individuals in the first group. The resulting individuals form a new population, which can be identified as a transitional population.

[0163] Step 205: The computer device performs mutation processing on the transition population.

[0164] The transition process for the transition population involves mutation processing of each individual within it. Similarly, in this embodiment, the mutation processing of individuals in the transition population is based on the knowledge point dimension. Specifically, for any individual in the transition population, the probability of mutation for each knowledge point is randomly determined. When the probability of mutation for a certain knowledge point reaches a preset value, it is determined that the code corresponding to that knowledge point can be mutated. For example, when the code corresponding to knowledge point 1 of an individual in the transition population can be mutated, any one of the multiple codes contained in knowledge point 1 is replaced with another code in the code sequence corresponding to knowledge point 1. When the code corresponding to knowledge point 2 cannot be mutated, the codes contained in knowledge point 2 are left unprocessed and the original codes are retained. This process is repeated for the codes contained in other knowledge points to obtain a new individual. Then, the other individuals in the transition population are mutated using the same method to obtain the second population.

[0165] In some embodiments, after mutating the codes in individuals within the transition population to obtain a second population, the method further includes:

[0166] 1. Obtain the test item number corresponding to the code contained in each individual in the second population. The test item number is the number of each test item in the candidate test item set.

[0167] 2. When there is a code with the same test item number in any third target individual, the code with the same test item number in the third target individual is mutated.

[0168] In this process, after mutating each individual in the transition population to obtain the second population, the question number corresponding to the code contained in each individual in the second population is obtained. This question number is the number of the question in the candidate question set. After determining all the question numbers corresponding to the codes in a certain third target individual, it is checked whether there are any duplicate question numbers. If duplicate question numbers exist, the codes corresponding to the duplicate question numbers are mutated, that is, the codes are replaced with other codes in the code sequence of the associated knowledge points, until there are no duplicate question numbers among all the codes in the third target individual. In this embodiment, by deduplicating each individual in the obtained second population, the quality of the generated test paper is further improved.

[0169] Step 206: When there are individuals in the second population with fitness greater than a preset threshold, the computer device determines the second population as the target population.

[0170] After obtaining the second population, the computer calculates the fitness of each individual in the second population to determine if there are any individuals in the second population with a fitness greater than a preset threshold. If there are individuals in the second population with a fitness greater than the preset threshold, then the second population is determined to be the target population.

[0171] Step 207: When there are no individuals with fitness greater than the preset threshold in the second population, the computer device performs genetic processing on the second population again until an individual with fitness greater than the preset threshold appears in the population.

[0172] If no individual with a fitness greater than the preset threshold exists in the second population, the individual with the highest fitness in the second population needs to be used for further genetic processing. After each genetic processing, it is necessary to confirm whether there is an individual with a fitness greater than the preset threshold in the resulting population. This process is repeated until an individual with a fitness greater than the preset threshold appears in the new population or the preset number of genetic processing steps is reached. Then, the final population is determined as the target population.

[0173] Step 208: The computer device decodes the individual with the highest fitness in the target population to obtain the target test paper.

[0174] Once the target population is determined, the fitness of each individual in the target population is calculated again. Then, the individual with the highest fitness is determined, and the code in the individual with the highest fitness is decoded to obtain the test questions corresponding to each code. These test questions constitute the target test paper.

[0175] The generated test papers can be displayed as a single document, or they can be displayed by question type or by knowledge point. For example... Figure 6 The image shows a diagram illustrating the generated test paper displayed by knowledge point. This diagram shows three questions corresponding to the weak knowledge point "Flame Test," with difficulty levels of difficult, easy, and medium. Users can click on the area displaying weak knowledge points, specifically the "Flame Test" area in the image. A drop-down menu will then appear, displaying multiple weak knowledge points. Users can select other weak knowledge points from the drop-down menu to switch between displaying questions for those points. After answering the questions, users can click the "View Explanation" control below each question to switch to the explanation interface for that question, allowing them to check the accuracy of their answers in real time.

[0176] As described above, the test paper generation method provided in this application encodes candidate test questions in a candidate question set according to the dimension of knowledge points, obtaining the encoding information corresponding to each candidate test question and its corresponding knowledge point, and forming an encoding sequence for each knowledge point; based on a preset set of knowledge points, multiple individuals are generated from the encoding sequences of the corresponding knowledge points by taking multiple sets of preset number of encoding information, resulting in a first population; the multiple individuals are sorted by fitness according to preset test question attributes, and the individual with the highest fitness is selected to perform genetic processing on the first population, resulting in a second population; when there is an individual in the second population with a fitness greater than a preset threshold, the second population is determined as the target population; the individual with the highest fitness is selected from the target population, and the individual with the highest fitness is decoded to obtain the target test paper. In this way, by encoding candidate test questions according to the dimension of knowledge points and generating a population containing multiple individuals from the obtained encoding, automatically updating the individuals in the population through genetic processing until an individual that meets the conditions is generated, and finally decoding the individual to obtain the target test paper, this method can automatically generate test papers based on the dimension of knowledge points, greatly improving the efficiency of test paper generation.

[0177] To better implement the above methods, embodiments of the present invention also provide a test paper generation device, which can be integrated into a terminal or server.

[0178] For example, such as Figure 7The diagram shown is a schematic representation of the test paper generation device provided in this embodiment of the application. The test paper generation device may include an encoding unit 301, a generation unit 302, a genetic unit 303, a determination unit 304, and a decoding unit 305, as follows:

[0179] The coding unit 301 is used to encode the candidate questions in the candidate question set according to the dimension of knowledge points, so as to obtain the coding information of each candidate question and its corresponding knowledge point, and form the coding sequence of each knowledge point.

[0180] The generation unit 302 is used to generate multiple individuals by taking multiple sets of a preset number of encoded information from the encoding sequence of the corresponding knowledge points based on a preset set of knowledge points, and thus obtain the first group.

[0181] Genetic unit 303 is used to sort multiple individuals according to the fitness of preset test item attributes, select the individual with the highest fitness to perform genetic processing on the first population, and obtain the second population.

[0182] The determining unit 304 is used to determine the second population as the target population when there are individuals in the second population with fitness greater than a preset threshold.

[0183] Decoding unit 305 is used to select the individual with the highest fitness from the target population and decode the individual with the highest fitness to obtain the target test paper.

[0184] In some embodiments, the genetic unit includes:

[0185] The computational subunit is used to calculate the fitness of each individual among multiple individuals based on preset test item attributes;

[0186] The sorting subunit is used to sort the fitness of each individual as calculated.

[0187] In some embodiments, the computing subunit includes:

[0188] The first calculation module is used to calculate the text similarity between test questions corresponding to different codes in any first target individual among multiple individuals;

[0189] The second calculation module is used to calculate the similarity score of the first target individual based on the text similarity between test questions corresponding to different codes;

[0190] The third calculation module is used to calculate the fitness of the first target individual based on the preset test item attributes and the similarity score of the first target individual.

[0191] In some embodiments, the test paper generation apparatus provided in this application further includes:

[0192] The generation unit is used to generate a mapping table between individuals and fitness, and associates the calculated fitness of each individual with the corresponding encoding set of the individual and stores it in the mapping table;

[0193] The first acquisition unit is used to acquire the fitness of the second target individual from the mapping table when there is an individual in the mapping table whose encoding set is the same as that of any second target individual in the second population;

[0194] The calculation unit is used to calculate the fitness of the second target individual when there is no individual in the mapping table that has the same encoding set as the second target individual, and to associate the calculated fitness of the second target individual with the encoding set of the second target individual and store it in the mapping table.

[0195] In some embodiments, the genetic unit includes:

[0196] Crossover units are used to cross each individual in the first population with the individual with the highest fitness in the first population based on the knowledge point dimension, to obtain the transitional population after crossover;

[0197] The variant subunit is used to mutate the encoded information contained in each individual in the transition population to obtain the second population.

[0198] In some embodiments, the cross subunit includes:

[0199] The classification module is used to classify the codes contained in each individual in the first population according to knowledge points, resulting in multiple gene segments contained in each individual, and each gene segment contains multiple codes.

[0200] The first acquisition module is used to acquire the probability of crossover between any first target gene segment in each individual in the first population and the individual with the highest fitness in the first population;

[0201] The crossover module is used to crossover the first target gene segment with the gene segment corresponding to the first target gene segment in the individual with the highest fitness in the first population when the probability of crossover between the first target gene segment and the individual with the highest fitness in the first population meets a first preset condition.

[0202] In some embodiments, the variant subunit includes:

[0203] The second acquisition module is used to acquire the probability of mutation of any second target gene segment in each individual in the transition population;

[0204] The mutation module is used to mutate the code contained in the second target gene segment when the probability of mutation of the second target gene segment meets the second preset condition.

[0205] In some embodiments, the test paper generation apparatus provided in this application further includes:

[0206] The second acquisition unit is used to acquire the test item number corresponding to the code contained in each individual in the second population, where the test item number is the number of each test item in the candidate test item set;

[0207] The mutation unit is used to mutate the codes of the same test item number in any third target individual when the same code exists in any third target individual.

[0208] In some embodiments, the determining unit is further configured to select the individual with the highest fitness in the second population to perform genetic processing on the second population to generate a new population when there is no individual with fitness greater than a preset threshold in the second population;

[0209] When the number of genetic treatments reaches the preset number, the new population is identified as the target population.

[0210] When it is detected that the number of genetic treatments has not reached the preset number, the individual with the highest fitness in the new population is selected to perform genetic treatment on the new population, and the new population is updated based on the population obtained from the genetic treatment, until the number of genetic treatments reaches the preset number, and the population obtained from the last genetic treatment is determined as the target population.

[0211] The decoding unit is also used to select the target individual with the highest fitness from the target population and decode the target individual to obtain the target test paper.

[0212] In some embodiments, the determining unit is further configured to select the individual with the highest fitness in the second population to perform genetic processing on the second population to generate a new population when there is no individual with fitness greater than a preset threshold in the second population;

[0213] When an individual with a fitness greater than a preset threshold is detected in a new population, the new population is identified as the target population.

[0214] When it is detected that there are no individuals with fitness greater than the preset threshold in the new population, the individual with the highest fitness in the new population is selected to perform genetic processing on the new population, and the new population is updated based on the population obtained from the genetic processing, until there are individuals with fitness greater than the preset threshold in the new population, and the population obtained from the last genetic processing is determined as the target population.

[0215] The decoding unit is also used to select the target individual with the highest fitness from the target population and decode the target individual to obtain the target test paper.

[0216] In practice, each of the above units can be implemented as an independent entity or can be arbitrarily combined to be implemented as the same or several entities. For the specific implementation of each of the above units, please refer to the previous method embodiments, which will not be repeated here.

[0217] As described above, the test paper generation device provided in this embodiment encodes candidate test questions in the candidate question set according to the dimension of knowledge points through the encoding unit 301, obtaining the encoding information corresponding to each candidate test question and its corresponding knowledge point, and forming an encoding sequence for each knowledge point; the generation unit 302 generates multiple individuals by taking multiple sets of preset number of encoding information from the encoding sequence of the corresponding knowledge points based on a preset set of knowledge points, thus obtaining a first population; the genetic unit 303 sorts the multiple individuals according to the fitness of preset test question attributes, selects the individual with the highest fitness to perform genetic processing on the first population, thus obtaining a second population; when there are individuals in the second population with fitness greater than a preset threshold, the determination unit 304 determines the second population as the target population; the decoding unit 305 selects the individual with the highest fitness from the target population and decodes the individual with the highest fitness to obtain the target test paper. In this way, by encoding candidate test questions according to the dimension of knowledge points and generating a population containing multiple individuals from the obtained encoding, the individual in the population is automatically genetically updated until an individual that meets the conditions is generated, and finally the individual is decoded to obtain the target test paper. This method can automatically generate test papers based on knowledge points, greatly improving the efficiency of test paper generation.

[0218] This application also provides a computer device, which can be a terminal or a server, such as... Figure 8 The diagram shown is a structural schematic of the computer device provided in this application. Specifically:

[0219] The computer device may include components such as a processor 401 with one or more processing cores, a memory 402 with one or more storage media, a power supply 403, and an input unit 404. Those skilled in the art will understand that... Figure 8 The computer device structure shown does not constitute a limitation on the computer device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein:

[0220] The processor 401 is the control center of the computer device. It connects various parts of the computer device via various interfaces and lines. By running or executing software programs and / or modules stored in the memory 402, and by calling data stored in the memory 402, it performs various functions of the computer device and processes data, thereby performing overall detection of the computer device. Optionally, the processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 401.

[0221] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications by running the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback, image playback, and web page access), etc.; the data storage area may store data created based on the use of the computer device. In addition, the memory 402 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.

[0222] The computer device also includes a power supply 403 that supplies power to the various components. Preferably, the power supply 403 can be logically connected to the processor 401 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 403 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0223] The computer device may also include an input unit 404, which can be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.

[0224] Although not shown, the computer device may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 401 in the computer device loads the executable files corresponding to the processes of one or more applications into the memory 402 according to the following instructions, and the processor 401 runs the applications stored in the memory 402 to realize various functions, as follows:

[0225] Candidate questions in the candidate question set are encoded according to the dimension of knowledge points to obtain the encoding information corresponding to each candidate question and its corresponding knowledge point, forming an encoding sequence for each knowledge point. Based on a preset set of knowledge points, multiple sets of encoding information of a preset number are taken from the encoding sequence of the corresponding knowledge points to generate multiple individuals, resulting in the first population. The multiple individuals are sorted by fitness according to preset question attributes, and the individual with the highest fitness is selected to perform genetic processing on the first population to obtain the second population. When there are individuals in the second population with fitness greater than a preset threshold, the second population is determined as the target population. The individual with the highest fitness is selected from the target population and decoded to obtain the target test paper.

[0226] It should be noted that the computer device provided in this application embodiment and the test paper generation method in the above embodiment belong to the same concept. The specific implementation of each of the above operations can be found in the previous embodiments, and will not be repeated here.

[0227] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be accomplished by instructions, or by instructions controlling related hardware. These instructions can be stored in a storage medium and loaded and executed by a processor.

[0228] To this end, embodiments of the present invention provide a storage medium storing a plurality of instructions that can be loaded by a processor to execute steps in any of the test paper generation methods provided in the embodiments of the present invention. For example, the instructions can execute the following steps:

[0229] Candidate questions in the candidate question set are encoded according to the dimension of knowledge points to obtain the encoding information corresponding to each candidate question and its corresponding knowledge point, forming an encoding sequence for each knowledge point. Based on a preset set of knowledge points, multiple sets of encoding information of a preset number are taken from the encoding sequence of the corresponding knowledge points to generate multiple individuals, resulting in the first population. The multiple individuals are sorted by fitness according to preset question attributes, and the individual with the highest fitness is selected to perform genetic processing on the first population to obtain the second population. When there are individuals in the second population with fitness greater than a preset threshold, the second population is determined as the target population. The individual with the highest fitness is selected from the target population and decoded to obtain the target test paper.

[0230] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0231] The storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0232] Since the instructions stored in the storage medium can execute the steps in any of the test paper generation methods provided in the embodiments of the present invention, the beneficial effects that any of the test paper generation methods provided in the embodiments of the present invention can achieve can be realized, as detailed in the preceding embodiments, and will not be repeated here.

[0233] According to one aspect of this application, a computer program product or computer program is provided, comprising computer instructions stored in a storage medium. A processor of a computer device reads the computer instructions from the storage medium and executes the computer instructions, causing the computer device to perform the aforementioned actions. Figure 2 or Figure 3 The test paper generation method is provided among the various optional implementations.

[0234] The foregoing has provided a detailed description of a test paper generation method, apparatus, storage medium, and computer equipment provided by embodiments of the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A method for generating test papers, characterized in that, The method includes: The candidate questions in the candidate question set are encoded according to the dimension of knowledge points to obtain the encoding information of each candidate question and its corresponding knowledge point, and to form the encoding sequence of each knowledge point; Based on a preset set of knowledge points, multiple individuals are generated by taking multiple sets of preset amount of encoded information from the encoding sequence of the corresponding knowledge points, thus obtaining the first group; Based on the preset test item attributes and the text similarity of each individual among multiple individuals, the fitness of each individual among the multiple individuals is calculated; The fitness of each individual is ranked according to the calculated fitness; the preset test item attributes include the difficulty requirements, knowledge point requirements, test area requirements, quality requirements, and quantity requirements for each dimension; Each individual in the first population is cross-crossed with the individual with the highest fitness in the first population based on the knowledge point dimension to obtain the cross-crossed transition population. The coding information contained in each individual in the transition population is mutated to obtain a second population; each individual in the first population contains multiple gene segments, each gene segment includes multiple codes, and the codes within the same gene segment correspond to the same knowledge point of the test questions; When there are individuals in the second population with fitness greater than a preset threshold, the second population is determined to be the target population; When there are no individuals with fitness greater than a preset threshold in the second population, the individual with the highest fitness in the second population is selected to perform genetic processing on the second population to generate a new population. When an individual with a fitness greater than a preset threshold is detected in the new population, the new population is identified as the target population. When it is detected that there are no individuals with fitness greater than a preset threshold in the new population, the individual with the highest fitness in the new population is selected to perform genetic processing on the new population, and the new population is updated based on the population obtained from the genetic processing, until there are individuals with fitness greater than the preset threshold in the new population, and the population obtained from the last genetic processing is determined as the target population. Select the individual with the highest fitness from the target population, and decode the individual with the highest fitness to obtain the target test paper.

2. The method according to claim 1, characterized in that, The calculation of the fitness of each individual among the multiple individuals, based on preset test item attributes and text similarity among each individual, includes: Calculate the text similarity between test questions corresponding to different codes in any first target individual among the plurality of individuals; The similarity score of the first target individual is calculated based on the text similarity between the test questions corresponding to the different codes; The fitness of the first target individual is calculated based on the preset test item attributes and the similarity score of the first target individual.

3. The method according to claim 1, characterized in that, The method further includes: Generate a mapping table between individuals and fitness, and associate the calculated fitness of each individual with the corresponding encoding set of the individual and store it in the mapping table; Before determining the second population as the target population when there are individuals in the second population with fitness greater than a preset threshold, the method further includes: When there is an individual in the mapping table that has the same encoding set as any second target individual in the second population, the fitness of the second target individual is obtained from the mapping table; When there is no individual in the mapping table that has the same encoding set as the second target individual, the fitness of the second target individual is calculated and the calculated fitness of the second target individual is associated with the encoding set of the second target individual and stored in the mapping table.

4. The method according to claim 3, characterized in that, The step of cross-referencing each individual in the first population with the individual in the first population with the highest fitness based on the knowledge point dimension includes: The codes contained in each individual in the first population are classified according to knowledge points to obtain multiple gene segments contained in each individual, and each gene segment contains multiple codes; Obtain the probability that any first target gene segment in each individual of the first population will cross over with the individual with the highest fitness in the first population; When the probability of the first target gene segment crossing with the individual with the highest fitness in the first population meets the first preset condition, the first target gene segment is crossed with the gene segment corresponding to the first target gene segment in the individual with the highest fitness in the first population.

5. The method according to claim 4, characterized in that, The process of mutating the encoded information contained in each individual in the transition population to obtain a second population includes: Obtain the probability of mutation of any second target gene segment in each individual of the transition population; When the probability of mutation of the second target gene segment meets the second preset condition, the coding contained in the second target gene segment is mutated.

6. The method according to claim 3, characterized in that, After mutating the encoded information contained in each individual in the transition population to obtain the second population, the process further includes: Obtain the test item number corresponding to the code contained in each individual in the second group, wherein the test item number is the number of each test item in the candidate test item set; When the same test item number exists in any third target individual, the code of the same test item number in the third target individual is mutated.

7. The method according to claim 1, characterized in that, The method further includes: When there are no individuals with fitness greater than a preset threshold in the second population, the individual with the highest fitness in the second population is selected to perform genetic processing on the second population to generate a new population. When the number of genetic treatments reaches a preset number, the new population is identified as the target population. When it is detected that the number of genetic treatments has not reached the preset number, the individual with the highest fitness in the new population is selected to perform genetic treatment on the new population, and the new population is updated based on the population obtained from the genetic treatment, until the number of genetic treatments reaches the preset number, and the population obtained from the last genetic treatment is determined as the target population. Select the target individual with the highest fitness from the target population, and decode the target individual to obtain the target test paper.

8. A test paper generation device, characterized in that, The device includes: The coding unit is used to encode the candidate questions in the candidate question set according to the dimension of knowledge points, so as to obtain the coding information of each candidate question and its corresponding knowledge point, and form the coding sequence of each knowledge point; The generation unit is used to generate multiple individuals by taking multiple sets of a preset number of encoded information from the encoding sequence of the corresponding knowledge points based on a preset set of knowledge points, thus obtaining the first group; A genetic unit is used to calculate the fitness of each individual among multiple individuals based on preset test question attributes and text similarity among each individual; the fitness of each individual is then ranked; the preset test question attributes include difficulty requirements, knowledge point requirements, test area requirements, quality requirements, and quantity requirements for each dimension; each individual in the first population is cross-crossed with the individual with the highest fitness in the first population based on the knowledge point dimension to obtain a transitional population after cross-crossing; the encoded information contained in each individual in the transitional population is mutated to obtain a second population; each individual in the first population contains multiple gene segments, each gene segment contains multiple codes, and the codes within the same gene segment correspond to the same knowledge point of the test question; The determining unit is configured to: determine the second population as the target population when there is an individual in the second population with a fitness greater than a preset threshold; when there is no individual in the second population with a fitness greater than the preset threshold, select the individual with the highest fitness in the second population to perform genetic processing on the second population to generate a new population; when an individual with a fitness greater than the preset threshold is detected in the new population, determine the new population as the target population; when no individual with a fitness greater than the preset threshold is detected in the new population, select the individual with the highest fitness in the new population to perform genetic processing on the new population and update the new population based on the population obtained from the genetic processing, until an individual with a fitness greater than the preset threshold is found in the new population, and determine the population obtained from the last genetic processing as the target population; The decoding unit is used to select the individual with the highest fitness from the target population and decode the individual with the highest fitness to obtain the target test paper.

9. The apparatus according to claim 8, characterized in that, The genetic unit includes: The crossover subunit is used to cross each individual in the first population with the individual with the highest fitness in the first population based on the knowledge point dimension to obtain the transitional population after crossover. The mutation subunit is used to mutate the encoded information contained in each individual in the transition population to obtain a second population.

10. A storage medium, characterized in that, The storage medium stores a plurality of instructions adapted for loading by a processor to execute the steps of the test paper generation method according to any one of claims 1 to 7.

11. A computer device, characterized in that, The method includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the test paper generation method according to any one of claims 1 to 7.

12. A computer program product, characterized in that, The computer program product includes computer instructions stored in a storage medium. The processor of the computer device reads the computer instructions from the storage medium and executes the computer instructions, causing the computer device to perform the test paper generation method according to any one of claims 1 to 7.