Disclosure of Invention
The invention mainly aims to provide a method, a terminal and a readable storage medium for generating non-repeated questions, which aim to solve the technical problem of how to combine knowledge points, questions and difficulty coefficients, and generate the non-repeated questions rapidly and efficiently in the prior art.
In order to achieve the above object, the present invention provides a method for generating non-repetitive questions, the method for generating non-repetitive questions comprising:
determining a knowledge point test question library according to the test paper configuration parameters, and extracting the test question type, the difficulty coefficient and the test question number of the test questions from the knowledge point test question library;
extracting non-repeated questions to be determined from the knowledge point question library based on a preset algorithm, and judging whether the questions to be determined are matched with the question types and the difficulty coefficients at the same time;
and if the number of the target questions is matched with the type of the test questions and the difficulty coefficient, determining the to-be-determined test questions as target questions, and completing the generation of the non-repeated questions after the number of the target questions is matched with the number of the test questions.
Optionally, the step of extracting the non-repeated to-be-determined questions from the knowledge point question library based on a preset algorithm includes:
extracting random test questions from the knowledge point test question library based on a preset random function, and judging whether the extracted test questions to be determined have test questions identical with the random test questions based on a preset recursion algorithm;
if the test questions which are the same as the random test questions exist, executing the step of extracting the random test questions from the knowledge point test question library based on a preset random function;
and if the test questions which are the same as the random test questions do not exist, marking the random test questions as to-be-determined test questions.
Optionally, the step of extracting the non-repeated to-be-determined questions from the knowledge point question library based on a preset algorithm includes:
numbering the test questions in the knowledge point test question library to generate a test question sequence;
generating random numbers in a number interval formed by the initial numbers of the test question sequences based on a preset array exchange algorithm, and searching random test questions of the test question sequences on numbers corresponding to the random numbers;
and exchanging the test questions of the test question sequence on the initial number with the random test questions, and taking the test questions on the initial number after the exchange as non-repeated to-be-determined test questions.
Optionally, the step of determining whether the to-be-determined test question is matched with the test question type and the difficulty coefficient simultaneously includes:
and if the number is not matched with the test question type and the difficulty coefficient, executing the step of generating random numbers in a number interval formed by the initial number of the test question sequence based on a preset array exchange algorithm.
Optionally, the step of determining the to-be-determined test question as the target question includes:
and taking the number positioned at the position behind the initial number as a new initial number, and executing the step of generating random numbers in a number interval formed by the initial number of the test question sequence based on a preset array exchange algorithm.
Optionally, the number of questions includes a number of questions types, a number of points, and a total number, and after the number of target questions matches the number of questions, the step of completing the generation of the non-repeated questions includes:
counting the first number of the target questions according to the question types of the target questions, and judging whether the first number is matched with the question types or not;
counting a second number of the target questions according to the knowledge point types corresponding to the target questions, and judging whether the second number is matched with the point number or not;
Counting the third quantity of all the target questions, and judging whether the third quantity is matched with the total quantity;
if the first quantity is matched with the question type quantity, the second quantity is matched with the point quantity, and the third quantity is matched with the total quantity, the quantity of the target questions is judged to be matched with the test question quantity, and the generation of the questions without repetition is completed.
Optionally, the step of determining a knowledge point test question library according to the test paper configuration parameters and extracting the test question type, the difficulty coefficient and the number of the test questions from the knowledge point test question library includes:
acquiring a test question to be classified, identifying a knowledge point type corresponding to the test question to be classified, and dividing the test question to be classified into a preset test question library corresponding to the knowledge point type;
and acquiring configuration information, and configuring the question type and the question difficulty coefficient of the test questions to be classified in the preset question bank based on the configuration information.
Optionally, the step of determining whether the to-be-determined test question is matched with the test question type and the difficulty coefficient simultaneously includes:
determining the type of the to-be-determined test question according to the question type identification of the to-be-determined test question, and judging whether the type of the to-be-determined test question is matched with the type of the test question;
If the test question type is matched with the test question type, searching a question type difficulty coefficient corresponding to the test question type from the difficulty coefficient, and determining a pending coefficient of the pending test question according to a coefficient identifier of the pending test question;
judging whether the undetermined coefficient is matched with the question type difficulty coefficient, and if so, judging that the undetermined test question is matched with the test question type and the difficulty coefficient simultaneously.
Further, to achieve the above object, the present invention further provides a terminal for generating a non-repetitive question, the terminal for generating a non-repetitive question comprising: the computer-readable storage medium comprises a memory, a processor and a control program stored in the memory and executable on the processor, wherein the control program when executed by the processor realizes the steps of the method for generating the non-repeated questions as described above.
Further, in order to achieve the above object, the present invention also provides a readable storage medium having stored thereon a control program which, when executed by a processor, implements the steps of the method of generating a non-repetitive question as described above.
According to the method, the terminal and the readable storage medium for generating the non-repeated examination questions, a knowledge point examination question library is determined according to parameters configured for examination papers, and the examination question types, the difficulty coefficients and the examination question number of the examination questions extracted from the knowledge point examination question library are determined; extracting non-repeated to-be-determined questions from a knowledge point question library based on a preset algorithm, and judging whether the extracted to-be-determined questions are matched with the question types and the difficulty coefficient; and determining the to-be-determined test questions as target questions only when the to-be-determined test questions are matched with the types of the test questions and the difficulty coefficient, and completing the generation of the non-repeated test questions after the number of the target questions is matched with the number of the test questions. Therefore, knowledge points, question types and difficulty coefficients corresponding to the test questions are required to be extracted through configuration parameter setting, and the successfully extracted test questions are calculated only by the test questions matched by the knowledge points, the question types and the difficulty system, so that the extracted test questions meet the requirements of the knowledge points, the question types and the difficulty, the adjustment operation after the questions are given by teachers is avoided, and the question setting efficiency is improved. Meanwhile, the extracted test questions are ensured not to be repeated through a preset algorithm, so that the investigation operation after the questions are given by a teacher is avoided, and the improvement of the question giving efficiency is facilitated. Therefore, the purposes of combining knowledge points, question types and difficulty coefficients, quickly and efficiently generating the questions without repetition are achieved.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a hardware operating environment related to an embodiment of a terminal generating a non-repetitive problem according to the present invention.
As shown in fig. 1, the terminal that generates the no-duplicate question may include a processor 1001, such as a CPU, a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Wherein the communication bus 1002 is used to enable connected communication between these components. The user interface 1003 may include a Display, an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may further include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also optionally be a storage device separate from the processor 1001 described above.
Those skilled in the art will appreciate that the hardware configuration of the terminal generating the no-repeat question shown in fig. 1 does not constitute a limitation of the terminal generating the no-repeat question, and may include more or less components than those illustrated, or may combine certain components, or may be a different arrangement of components.
As shown in fig. 1, an operating system, a network communication module, a user interface module, and a control program may be included in the memory 1005 as one type of readable storage medium. The operating system is a program for managing and controlling the terminal and software resources generating no repeated questions and supports the operation of a network communication module, a user interface module, a control program and other programs or software; the network communication module is used to manage and control the network interface 1004; the user interface module is used to manage and control the user interface 1003.
In the terminal hardware structure for generating the non-repeated questions shown in fig. 1, the network interface 1004 is mainly used for connecting to a background server and performing data communication with the background server; the user interface 1003 is mainly used for connecting a client (user side) and performing data communication with the client; the processor 1001 may call a control program stored in the memory 1005 and perform the following operations:
Determining a knowledge point test question library according to the test paper configuration parameters, and extracting the test question type, the difficulty coefficient and the test question number of the test questions from the knowledge point test question library;
extracting non-repeated questions to be determined from the knowledge point question library based on a preset algorithm, and judging whether the questions to be determined are matched with the question types and the difficulty coefficients at the same time;
and if the number of the target questions is matched with the type of the test questions and the difficulty coefficient, determining the to-be-determined test questions as target questions, and completing the generation of the non-repeated questions after the number of the target questions is matched with the number of the test questions.
Further, the step of extracting the non-repeated pending questions from the knowledge point question library based on the preset algorithm includes:
extracting random test questions from the knowledge point test question library based on a preset random function, and judging whether the extracted test questions to be determined have test questions identical with the random test questions based on a preset recursion algorithm;
if the test questions which are the same as the random test questions exist, executing the step of extracting the random test questions from the knowledge point test question library based on a preset random function;
and if the test questions which are the same as the random test questions do not exist, marking the random test questions as to-be-determined test questions.
Further, the step of extracting the non-repeated pending questions from the knowledge point question library based on the preset algorithm includes:
numbering the test questions in the knowledge point test question library to generate a test question sequence;
generating random numbers in a number interval formed by the initial numbers of the test question sequences based on a preset array exchange algorithm, and searching random test questions of the test question sequences on numbers corresponding to the random numbers;
and exchanging the test questions of the test question sequence on the initial number with the random test questions, and taking the test questions on the initial number after the exchange as non-repeated to-be-determined test questions.
Further, after the step of judging whether the to-be-determined test question is matched with the test question type and the difficulty coefficient at the same time; the processor 1001 may call a control program stored in the memory 1005 and perform the following operations:
and if the number is not matched with the test question type and the difficulty coefficient, executing the step of generating random numbers in a number interval formed by the initial number of the test question sequence based on a preset array exchange algorithm.
Further, after the step of determining the to-be-determined question as a target question; the processor 1001 may call a control program stored in the memory 1005 and perform the following operations:
And taking the number positioned at the position behind the initial number as a new initial number, and executing the step of generating random numbers in a number interval formed by the initial number of the test question sequence based on a preset array exchange algorithm.
Further, the number of questions includes a number of questions types, a number of points and a total number, and after the number of target questions is matched with the number of questions, the step of completing the generation of the non-repeated questions includes:
counting the first number of the target questions according to the question types of the target questions, and judging whether the first number is matched with the question types or not;
counting a second number of the target questions according to the knowledge point types corresponding to the target questions, and judging whether the second number is matched with the point number or not;
counting the third quantity of all the target questions, and judging whether the third quantity is matched with the total quantity;
if the first quantity is matched with the question type quantity, the second quantity is matched with the point quantity, and the third quantity is matched with the total quantity, the quantity of the target questions is judged to be matched with the test question quantity, and the generation of the questions without repetition is completed.
Further, determining a knowledge point test question library according to the test paper configuration parameters, and extracting the test question type, the difficulty coefficient and the test question number of the test questions from the knowledge point test question library; the processor 1001 may call a control program stored in the memory 1005 and perform the following operations:
acquiring a test question to be classified, identifying a knowledge point type corresponding to the test question to be classified, and dividing the test question to be classified into a preset test question library corresponding to the knowledge point type;
and acquiring configuration information, and configuring the question type and the question difficulty coefficient of the test questions to be classified in the preset question bank based on the configuration information.
Further, the step of determining whether the to-be-determined test question is matched with the test question type and the difficulty coefficient simultaneously includes:
determining the type of the to-be-determined test question according to the question type identification of the to-be-determined test question, and judging whether the type of the to-be-determined test question is matched with the type of the test question;
if the test question type is matched with the test question type, searching a question type difficulty coefficient corresponding to the test question type from the difficulty coefficient, and determining a pending coefficient of the pending test question according to a coefficient identifier of the pending test question;
Judging whether the undetermined coefficient is matched with the question type difficulty coefficient, and if so, judging that the undetermined test question is matched with the test question type and the difficulty coefficient simultaneously.
The implementation manner of the terminal generating the non-repeated questions is basically the same as the embodiments of the method generating the non-repeated questions described below, and is not repeated here.
Referring to fig. 2, fig. 2 is a flow chart of a first embodiment of the method for generating non-repetitive questions according to the present invention.
Embodiments of the present invention provide embodiments of methods of generating non-repetitive questions, it being noted that although a logical order is illustrated in the flow chart, in some cases, the steps illustrated or described may be performed in an order other than that illustrated herein. Specifically, the method for generating the non-repeated questions of the embodiment includes:
step S10, determining a knowledge point test question library according to test paper configuration parameters, and extracting test question types, difficulty coefficients and test question numbers of test questions from the knowledge point test question library;
the method for generating the non-repeated questions is applied to a terminal for generating the non-repeated questions, the terminal determines the types, the difficulty coefficients and the quantity of the questions to be generated through test paper configuration parameters, and generates the non-repeated questions matched with the types, the difficulties and the quantity of the questions through a preset algorithm. Specifically, the test paper configuration parameters are set by a teacher through a terminal display interface, and parameters including the required examination knowledge points, question type parameters, question difficulty parameters and question number parameters can be configured. And corresponding question type parameters, question difficulty parameters and question quantity parameters can be set for different knowledge points respectively, and the parameters are summarized to form test paper configuration parameters. The parameters of the required examination knowledge point a, the knowledge point b and the knowledge point C are A, B and C contained in the test paper configuration parameters, A1, A2 and A3 contained in the test paper configuration parameters are single-choice questions, multi-choice questions and indefinite questions for the knowledge point A, A1, A2 and A3 contained in the test paper configuration parameters are the number of single-choice questions, the number of multi-choice questions and indefinite questions respectively, and k1, k2 and k3 contained in the test paper configuration parameters are the ratio of the low-grade difficulty questions to the knowledge point A, the ratio of the medium-grade difficulty questions to the high-grade difficulty questions and the like.
Further, the terminal is connected with a test question library, the test question library is divided into a plurality of knowledge point test question libraries according to the difference of knowledge points, and each knowledge point test question library comprises a plurality of questions of different question types and difficulty coefficients of the same knowledge point. After receiving the test paper configuration parameters, the terminal identifies the specific parameter identifiers contained in the test paper configuration parameters, determines which type of knowledge points the test paper needs to be configured with the test paper according to the parameter identifiers, and further determines a knowledge point test question library which needs to be subjected to test question extraction according to various knowledge points. Meanwhile, the types, the difficulty coefficients and the number of the test questions are respectively extracted from the knowledge point test question library according to the parameter identification.
It should be noted that, the knowledge point question library in this embodiment is formed by dividing questions belonging to each type of knowledge point into a preset question library, and configuring question types and difficulty coefficients of each question. Specifically, the step of determining a knowledge point test question library according to the test paper configuration parameters and extracting the test question type, the difficulty coefficient and the test question number of the test questions from the knowledge point test question library comprises the following steps:
step a1, obtaining a test question to be classified, identifying a knowledge point type corresponding to the test question to be classified, and dividing the test question to be classified into a preset test question library corresponding to the knowledge point type;
Step a2, obtaining configuration information, and configuring the question questions and the question difficulty coefficient of the questions to be classified in the preset question library based on the configuration information.
Further, the terminal acquires the test questions belonging to each type of knowledge point, and takes the acquired test questions as the test questions to be classified. The method for acquiring the test questions to be classified can be to identify the questions recorded on the paper file as electronic data, edit the questions on a display interface of the terminal by a teacher, and intelligently set the questions through a trained neural network model, which is not limited.
Further, after acquiring the test questions to be classified, the terminal determines the knowledge point type corresponding to the test questions to be classified by identifying the keywords carried in the test questions to be classified. And the keywords can be extracted and identified by depending on the keyword extraction model, if the extracted keywords are points, the knowledge points corresponding to the identification to be classified can be determined to be the points in the calculus.
Further, preset question banks are preset, different labels are allocated to the preset question banks, and knowledge point types corresponding to the preset question banks are distinguished by the different labels. After the knowledge point type corresponding to the test questions to be classified is identified, searching a preset test question library with a knowledge point type label as a preset test question library corresponding to the knowledge point type, and dividing the test questions to be classified into the preset test question library to form the knowledge point test question library.
And then, carrying out the configuration of the question type and the difficulty coefficient on the questions to be classified added to the preset question library, wherein the configuration method at least comprises two types. Firstly, outputting prompt information to a terminal interface to prompt the configuration of question types and difficulty coefficients of test questions to be classified; secondly, the problem type and the difficulty coefficient of the recognizer are configured through a pre-trained recognition model. Specifically, for the prompt information, the terminal receives configuration information fed back based on the prompt information, and respectively configures question types and question difficulty coefficients of the questions to be classified in a preset question bank according to the question marks and the difficulty marks carried in the configuration information. And for the identification model, the terminal calls the identification model to identify the question type of the test question to be classified, identifies the difficulty coefficient of the test question to be classified according to the complexity of the question solving thought, and generates the identified question type and the difficulty coefficient into configuration information. After the terminal acquires the configuration information, the question type and the question difficulty coefficient of the test questions to be classified are configured in a preset question bank according to the question type and the difficulty coefficient. Therefore, the to-be-classified test questions of the same knowledge points are distributed to the same preset test question library, and the test question type and the test question difficulty coefficient are configured, so that the follow-up test questions meeting the test paper configuration parameter requirements can be extracted according to the knowledge points, the test question type and the difficulty coefficient.
Step S20, extracting non-repeated questions to be determined from the knowledge point question library based on a preset algorithm, and judging whether the questions to be determined are matched with the question types and the difficulty coefficients at the same time;
further, a preset algorithm for extracting non-repeated questions is preset in the terminal, and the algorithm can be a recursive algorithm or an array exchange algorithm. And extracting non-repeated test questions from the knowledge point test question library through the algorithm, and taking the non-repeated test questions as to-be-determined test questions of which the test question types and the difficulty coefficients are required to be judged to meet the requirements of test paper configuration parameters. And judging whether the test question is matched with the test question type and the question difficulty coefficient identified by the test paper configuration parameters at the same time according to the question type and the question difficulty coefficient set when the test question to be determined is divided into a preset database in advance. The matching relation comprises two aspects of matching the question type of the to-be-determined test question with the test question type of the test paper requirement and matching the question difficulty coefficient of the to-be-determined test question with the difficulty coefficient of the test paper requirement, and if any one of the two aspects is not matched, the fact that the to-be-determined test question is not the question required by the test paper and cannot be taken as the unrepeated question obtained through extraction is indicated. Specifically, the step of judging whether the to-be-determined test question is matched with the test question type and the difficulty coefficient simultaneously includes:
Step S21, determining the type of the to-be-determined test question according to the question type identification of the to-be-determined test question, and judging whether the type of the to-be-determined test question is matched with the type of the test question;
step S22, if the test question type is matched with the test question type, searching a question type difficulty coefficient corresponding to the test question type from the difficulty coefficient, and determining a undetermined coefficient of the undetermined test question according to the coefficient identification of the undetermined test question;
and S23, judging whether the undetermined coefficient is matched with the question type difficulty coefficient, and if so, judging that the undetermined test question is matched with the test question type and the difficulty coefficient at the same time.
Furthermore, the questions in the knowledge point question library all carry question type identifiers for representing the question types of the questions and coefficient identifiers for representing the difficulty coefficients of the questions. Reading the question type identifier and the coefficient identifier carried by the test question, determining the question type of the test question to be used as the question type according to the question type identifier, comparing the question type with the question type, and judging whether the two types are matched by comparing the consistency of the two types. If the two are the same, the two are judged to be matched, otherwise, the two are not matched. In addition, the problem types contained in the same test paper are considered to be numerous, so that the test problem types determined according to the test paper configuration parameters also comprise various types, so that when judging whether the problem types to be determined are matched or not, the essence is that the problem types to be determined are compared with the various test problem types, when any one of the test problem types is matched with the problem types to be determined, the problem types to be determined can be matched with the test problem types, and when all the test problem types are not matched with the problem types to be determined, the problem types to be determined are not matched with the test problem types.
Further, if the to-be-determined test question is matched with the test question type through comparison, the difficulty coefficient of the to-be-determined test question is continuously determined according to the coefficient identification to serve as the to-be-determined coefficient, the to-be-determined coefficient is compared with the difficulty coefficient, and whether the to-be-determined coefficient is matched with the difficulty coefficient is judged through comparison of consistency of the to-be-determined coefficient and the difficulty coefficient. If the two are the same, the two are judged to be matched, otherwise, the two are not matched. Or the difficulty coefficient is set to a numerical value interval, when the coefficient to be determined falls into the numerical value interval, the coefficient to be determined can be judged to be matched with the difficulty coefficient, if the coefficient to be determined does not fall into the numerical value interval, the difficulty of the test question to be determined is too small and too large, and the coefficient to be determined is not matched with the difficulty coefficient. In order to more accurately embody the difficulty coefficients among different question types, different difficulty coefficients can be set for different question types, after the matched test question types are determined, the question type difficulty coefficients corresponding to the test question types are searched for and compared with the undetermined coefficients, whether the two are matched is judged, and if the two are matched, the undetermined test questions are simultaneously matched with the test question types and the difficulty coefficients is judged.
And step S30, if the number of the questions is matched with the type of the questions and the difficulty coefficient, determining the questions to be determined as target questions, and after the number of the target questions is matched with the number of the questions, completing the generation of the questions without repetition.
Further, after it is determined that the to-be-determined test question is matched with the test question type and the difficulty coefficient at the same time, the to-be-determined test question may be determined as the target question, the target question is continuously generated in this way, and the number of generated target questions is counted. Comparing the number of the generated target questions with the number of the test questions required by the characterization determined before, and judging whether the number of the generated target questions reaches the number of the test questions or not to judge whether the number of the generated target questions is matched with the number of the test questions or not. If the target examination questions are matched, the generated target examination questions meet the requirement of the examination paper on the number of the non-repeated examination questions, so that the generation of the non-repeated examination questions is completed; if the number of the target questions is not matched with the number of the questions, continuously generating target questions until the number of the target questions is matched with the number of the questions.
According to the method for generating the non-repeated examination questions, a knowledge point examination question library is determined according to parameters configured for the examination paper, and the examination question types, the difficulty coefficients and the examination question number of the examination questions extracted from the knowledge point examination question library are determined; extracting non-repeated to-be-determined questions from a knowledge point question library based on a preset algorithm, and judging whether the extracted to-be-determined questions are matched with the question types and the difficulty coefficient; and determining the to-be-determined test questions as target questions only when the to-be-determined test questions are matched with the types of the test questions and the difficulty coefficient, and completing the generation of the non-repeated test questions after the number of the target questions is matched with the number of the test questions. Therefore, knowledge points, question types and difficulty coefficients corresponding to the test questions are required to be extracted through configuration parameter setting, and the successfully extracted test questions are calculated only by the test questions matched by the knowledge points, the question types and the difficulty system, so that the extracted test questions meet the requirements of the knowledge points, the question types and the difficulty, the adjustment operation after the questions are given by teachers is avoided, and the question setting efficiency is improved. Meanwhile, the extracted test questions are ensured not to be repeated through a preset algorithm, so that the investigation operation after the questions are given by a teacher is avoided, and the improvement of the question giving efficiency is facilitated. Therefore, the purposes of combining knowledge points, question types and difficulty coefficients, quickly and efficiently generating the questions without repetition are achieved.
Further, referring to fig. 3, a second embodiment of the method for generating non-repetitive questions according to the present invention is presented based on the first embodiment of the method for generating non-repetitive questions according to the present invention.
The second embodiment of the method for generating non-repeated questions is different from the first embodiment of the method for generating non-repeated questions in that the step of extracting non-repeated questions to be determined from the knowledge point question library based on a preset algorithm includes:
step S24, extracting random test questions from the knowledge point test question library based on a preset random function, and judging whether the extracted test questions to be determined have test questions identical with the random test questions based on a preset recursion algorithm;
step S25, if the test questions which are the same as the random test questions exist, executing the step of extracting the random test questions from the knowledge point test question library based on a preset random function;
and S26, if the test questions which are the same as the random test questions do not exist, marking the random test questions as to-be-determined test questions.
In this embodiment, the preset algorithm for generating the non-repeated test question is a preset recursive algorithm. Specifically, firstly, extracting random questions from a knowledge point question library according to a preset random function, wherein the preset random function is a function for generating random numbers. Sequencing all the test questions in the knowledge point test question library, generating random numbers according to a preset random function, and extracting the test questions with the same sequence number as the random numbers as random test questions.
Further, the extracted random test questions are judged according to a preset recursion algorithm, and whether the extracted test questions to be determined have the same test questions as the random test questions or not is judged. If the same test questions exist, the fact that the currently extracted random test questions are the test questions already extracted before can not be used as effective test questions to be determined is indicated, so that new random numbers are needed to be generated again according to a preset random function, and the new random test questions are extracted for judgment. Otherwise, if the same test questions are determined to be absent by comparison, the fact that the currently extracted random test questions are new test questions which are not extracted before is indicated, and the random test questions can be used as effective test questions which are not repeated. And (3) circularly extracting a plurality of non-repeated test questions, judging whether the test questions are matched with the type and the difficulty coefficient of the test questions, forming target test questions according to the judging result, and further forming the test paper.
According to the embodiment, the random test questions are extracted from the knowledge point test question library through the combination of the preset random function and the preset recursion algorithm, the random test questions and the extracted test questions to be determined are judged one by one, whether the random test questions are extracted or not is determined, the fact that repeated test questions do not exist in the extracted test questions to be determined is ensured, and accurate generation of the non-repeated test questions is facilitated.
Further, referring to fig. 4, a third embodiment of the method for generating non-repetitive questions according to the present invention is presented based on the first or second embodiment of the method for generating non-repetitive questions according to the present invention.
The difference between the third embodiment of the method for generating non-repeated questions and the first or second embodiment of the method for generating non-repeated questions is that the step of extracting non-repeated questions from the knowledge point question library based on a preset algorithm includes:
step S27, numbering the test questions in the knowledge point test question library to generate a test question sequence;
step S28, generating random numbers in a number interval formed by the initial numbers of the test question sequences based on a preset array exchange algorithm, and searching random test questions of the test question sequences on numbers corresponding to the random numbers;
and S29, exchanging the test questions of the test question sequence on the initial number with the random test questions, and taking the test questions on the initial number after exchange as non-repeated to-be-determined test questions.
In this embodiment, the algorithm for generating the undetermined test question is a preset array exchange algorithm. Specifically, the test questions in the knowledge point test question library are numbered first to generate a test question sequence, and then the test question sequence is processed through a preset array exchange algorithm. Forming an initial number of the test question sequence into a number interval, and generating a random number in the interval; the minimum value of the random number is not smaller than the initial number, and the maximum value of the random number is not larger than the maximum number of the test question sequence. If the number of the test question sequence is from 1 to 100, the random number generated in the number interval 1 to 100 is more than or equal to 1 and less than or equal to 100.
Further, searching the random test questions of the test question sequence on the numbers corresponding to the random numbers. If the random number is 20 and the test question corresponding to the number 20 in the test question sequence is a1, the test question a1 is searched for as a random test question. And exchanging the test questions of the test question sequence on the initial number with the searched random test questions, and taking the test questions on the initial number after the exchange as non-repeated to-be-determined test questions. For example, b1 and a1 are interchanged when the test question sequence is b1 of the test questions on the initial number, so that the test question on the initial number is a1, and the test question is taken as a non-repeated test question to be determined. And judging the type and the difficulty coefficient of the test questions on the initial number, judging whether the test questions are matched with the type and the difficulty coefficient of the test questions at the same time, and determining whether the test questions on the initial number need to be extracted again according to the judging result. Specifically, the step of judging whether the to-be-determined test question is matched with the test question type and the difficulty coefficient simultaneously includes:
and b, if the number is not matched with the test question type and the difficulty coefficient, executing the step of generating random numbers in a number interval formed by the initial number of the test question sequence based on a preset array exchange algorithm.
Further, if the test questions to be determined on the initial number after the interchange are not matched with the test question types and the difficulty coefficients at the same time or are not matched with the test question types and the difficulty coefficients at the same time, the fact that the test questions to be determined on the initial number at present do not meet the requirements of the test paper on the test question types and the difficulty coefficients is indicated, at the moment, a new random number is generated in a number interval again through a preset numerical value interchange algorithm, the random test questions on the new random number and the test questions on the initial number are searched for to be interchanged, the random test questions are used as non-repeated test questions, and whether the interchanged test questions to be determined are matched with the test question types and the difficulty coefficients at the same time is judged. And circulating in this way until the to-be-determined test question on the initial number is matched with the test question type and the difficulty coefficient at the same time after the exchange, and taking the to-be-determined test question as a target question.
Further, after taking the to-be-determined test question on the initial number as the target question, in order to avoid repeated questions of the test question on the initial number, the preset array exchange algorithm in the implementation is provided with an updating mechanism for the initial number. Specifically, the step of determining the to-be-determined test question as the target question includes:
and c, taking the number positioned at the position behind the initial number as a new initial number, and executing the step of generating random numbers in a number interval formed by the initial number of the test question sequence based on a preset array exchange algorithm.
Furthermore, the number positioned at the next bit after the initial number is used as a new initial number, so that the update of the initial number is realized. The initial number may be the smallest number or the largest number of the test question sequence. If the number is the minimum number 1, after the to-be-determined test question of the number 1 after interchange is determined as the target test question, the number 2 is used as a new initial number to execute extraction interchange operation, and after the to-be-determined test question of the number 2 after interchange is determined as the target test question, the number 3 is used as a new initial number to execute extraction interchange operation, and the cycle is performed until the number of the target test questions reaches the requirement of the number of the test questions. Similarly, in the case where the maximum number is the initial number, the update is moved in the direction of the decimal value. If the maximum number 100 is taken as the initial number, the subsequent updating takes 99 and 98 as new initial numbers in sequence.
Further, for the updated initial number, the number interval formed by the method is synchronously updated, for example, for the initial number 2, the number interval is 2 to 100, a new random number is generated in the interval, the random question on the sign marked by the random number is searched, and then the question on the new initial number is exchanged with the random question to be used as a new pending question. Judging whether the exchanged pending questions are matched with the test question types and the difficulty coefficient at the same time, if so, generating a target question, and updating the initial number again; if the random numbers are not matched, the random numbers between 2 and 100 are regenerated, and the questions to be determined are searched and interchanged for judgment. And circulating until the number of the generated target questions reaches the requirement of the number of the questions.
According to the embodiment, the extracted test questions are interchanged with the test questions with the initial numbers, and the extracted test questions cannot participate in extraction again by updating the initial numbers, so that repeated extraction is avoided. Therefore, the extracted questions to be determined are ensured to have no repeated questions, and the accurate generation of the questions which are not repeated is facilitated.
Further, referring to fig. 5, a fourth embodiment of the method for generating non-repetitive questions according to the present invention is presented based on the first, second or third embodiment of the method for generating non-repetitive questions according to the present invention.
The fourth embodiment of the method for generating non-repetitive questions is different from the first, second or third embodiments of the method for generating non-repetitive questions in that the number of questions includes a number of questions, a number of points and a total number, and the step of completing the generation of the non-repetitive questions after the number of target questions is matched with the number of questions includes:
step S31, counting the first number of the target questions according to the question types of the target questions, and judging whether the first number is matched with the question types or not;
step S32, counting a second number of the target questions according to the knowledge point types corresponding to the target questions, and judging whether the second number is matched with the point number;
Step S33, counting the third quantity of all the target questions, and judging whether the third quantity is matched with the total quantity;
step S34, if the first number matches the number of questions, the second number matches the number of points, and the third number matches the total number, determining that the number of target questions matches the number of test questions, and completing the generation of questions without repeating.
The number of questions in this embodiment characterizes not only the total number of questions required for the test paper, but also the number of questions required for the test paper to examine each knowledge point and the number of various questions required for the test paper. Specifically, the number of questions is set to include the number of questions, the number of points and the total number of questions, so as to respectively represent the number of questions required, the number of knowledge points and the total number of questions. After the to-be-determined test questions are formed into target questions, counting the number of the types of the current questions according to the types of the target questions to obtain a first number. And further comparing the first quantity with the question type quantity, and judging whether the first quantity is consistent with the question type quantity or exceeds the question type quantity. If the first quantity is consistent with the question type quantity or exceeds the question type quantity, the first quantity is judged to be matched with the question type quantity, and the questions generated on the type meet the requirement of the test paper on the question type quantity. If the first number is smaller than the number of question types, the method indicates that the generated questions on the type are too few, and the questions of the type need to be continuously generated.
Further, counting the number of the topics with the knowledge points according to the knowledge point types corresponding to the target examination questions to obtain a second number. And further comparing the second quantity with the question type quantity, and judging whether the second quantity is consistent with the point quantity or exceeds the point quantity. If the second quantity is consistent with the number of points or exceeds the number of points, the second quantity is judged to be matched with the number of points, and the questions generated on the knowledge points meet the quantity requirement of the test paper on the knowledge point questions. If the second number is smaller than the number of points, the method indicates that the generated questions on the knowledge points are too few, and the knowledge point questions need to be continuously generated.
Further, the total number of the generated target questions is counted to obtain a third number. And further comparing the third quantity with the total quantity, and judging whether the third quantity is consistent with the total quantity or exceeds the total quantity. If the third quantity is consistent with the total quantity or exceeds the total quantity, the third quantity is judged to be matched with the total quantity, and the generated examination questions meet the total quantity requirement of the examination paper. If the third number is smaller than the total number, the generated questions are too small, and the questions need to be continuously generated.
Further, after the first quantity is judged to be matched with the question type quantity, the second quantity is judged to be matched with the point quantity, and the third quantity is judged to be matched with the total quantity, the fact that the currently generated target question type quantity meets the quantity requirement of the test paper on various questions, the quantity requirement of the test paper on the questions of various knowledge points and the requirement of the test paper on the total quantity of the questions is explained, and therefore the generation of the questions which are not repeated is completed. Otherwise, if any item is not matched with the corresponding quantity relation, the current generated target question type is not completely in accordance with the test paper requirement, so that the target question type needs to be continuously generated until the current generated target question type completely meets the test paper requirement.
According to the method, the number of the test questions is set to be the number of the questions, the number of the points and the total number, the number of the generated target questions on the questions, the number of the generated target questions on the knowledge points and the total number of the generated target questions are monitored respectively by the three questions, the number of the generated target questions on the knowledge points and the total number of the generated target questions are monitored respectively, so that the finally generated non-repeated questions are ensured to completely meet the test paper requirements, readjustment and screening of test paper questions by teaching staff are avoided, and the paper output efficiency of the teaching staff is improved.
The embodiment of the invention also provides a readable storage medium. The readable storage medium has stored thereon a control program which, when executed by the processor, performs the steps of the method of generating non-repetitive questions as described above.
The specific implementation manner of the readable storage medium of the present invention may be substantially the same as the embodiments of the method for generating the non-repetitive question, and will not be described herein.
While the embodiments of the present invention have been described above with reference to the drawings, the present invention is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many modifications may be made thereto by those of ordinary skill in the art without departing from the spirit of the present invention and the scope of the appended claims, which are to be accorded the full scope of the present invention as defined by the following description and drawings, or by any equivalent structures or equivalent flow changes, or by direct or indirect application to other relevant technical fields.