CN110765752A - Test question generation method and device, electronic equipment and computer readable storage medium - Google Patents

Test question generation method and device, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN110765752A
CN110765752A CN201911039007.3A CN201911039007A CN110765752A CN 110765752 A CN110765752 A CN 110765752A CN 201911039007 A CN201911039007 A CN 201911039007A CN 110765752 A CN110765752 A CN 110765752A
Authority
CN
China
Prior art keywords
test question
variable parameter
generating
test
logic expression
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201911039007.3A
Other languages
Chinese (zh)
Other versions
CN110765752B (en
Inventor
刘正阳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN201911039007.3A priority Critical patent/CN110765752B/en
Publication of CN110765752A publication Critical patent/CN110765752A/en
Application granted granted Critical
Publication of CN110765752B publication Critical patent/CN110765752B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The disclosure provides a test question generation method and device, electronic equipment and a computer readable storage medium, and relates to the field of information processing. The method comprises the following steps: determining whether a test question generation instruction is received; responding to a received test question generating instruction, and acquiring a preset test question template, a logic expression corresponding to the test question template and variable parameters in the test question template; determining whether an assignment for a variable parameter is received; when receiving assignment aiming at the variable parameter, acquiring the variable parameter value of the variable parameter; determining whether the variable parameter values satisfy the logical expression; and generating the target test question based on the test question template, the logic expression, the variable parameter and the variable parameter value in response to the variable parameter value satisfying the logic expression. The method and the device not only save the time of a person who gives questions, but also solve the problem that the students can obtain correct answers by carrying the answers aiming at the test questions with the same knowledge points, so that the students cannot be skilled in mastering the knowledge points.

Description

Test question generation method and device, electronic equipment and computer readable storage medium
Technical Field
The present disclosure relates to the field of information processing technologies, and in particular, to a method and an apparatus for generating test questions, an electronic device, and a computer-readable storage medium.
Background
The test question bank is the intelligent crystal of the person who gives the test question, and often a good test question needs the person who gives the test question front and back design and arrangement, spends a large amount of time.
However, the test questions appearing in the examination are often used as practice problems of 'rotten avenues', and the correct results can be given by the students with the back of the students, so that the students can still do the test questions without mastering the knowledge points, and cannot be familiar with the mastered knowledge points. Moreover, in the prior art, the test questions are written manually, and a large amount of labor cost and time cost are consumed.
Disclosure of Invention
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
The present disclosure provides a test question generation method, device, electronic device, and computer-readable storage medium, which can solve the problem that a student can still do a pair of test questions without mastering knowledge points and cannot be familiar with the mastered knowledge points. The technical scheme is as follows:
in a first aspect, a method for generating test questions is provided, the method including:
determining whether a test question generation instruction is received;
responding to a received test question generating instruction, and acquiring a preset test question template, a logic expression corresponding to the test question template and variable parameters in the test question template;
determining whether a value assignment for the variable parameter is received;
when receiving assignment aiming at the variable parameter, acquiring a variable parameter value of the variable parameter;
determining whether the variable parameter values satisfy the logical expression; and
and generating a target test question based on the test question template, the logic expression, the variable parameter and the variable parameter value in response to the variable parameter value satisfying the logic expression.
In a second aspect, there is provided an apparatus for generating test questions, the apparatus comprising:
the first determining module is used for determining whether a test question generating instruction is received or not;
the test question generating module is used for generating a test question generating instruction according to the received test question;
a second determination module to determine whether a value assignment for the variable parameter is received;
the second obtaining module is used for obtaining the variable parameter value of the variable parameter in response to receiving the assignment aiming at the variable parameter;
a third determining module for determining whether the variable parameter value satisfies the logical expression;
and the first generation module is used for responding to the condition that the variable parameter value meets the logic expression and generating a target test question based on the test question template, the logic expression, the variable parameter and the variable parameter value.
In a third aspect, an electronic device is provided, which includes:
a processor, a memory, and a bus;
the bus is used for connecting the processor and the memory;
the memory is used for storing operation instructions;
the processor is configured to call the operation instruction, and the executable instruction causes the processor to execute an operation corresponding to the test question generation method according to the first aspect of the disclosure.
In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored, which when executed by a processor, implements the method for generating test questions shown in the first aspect of the present disclosure.
The technical scheme provided by the disclosure has the following beneficial effects:
in the embodiment of the disclosure, a terminal firstly determines whether a test question generation instruction is received, acquires a preset test question template, a logic expression corresponding to the test question template and a variable parameter in the test question template in response to the received test question generation instruction, then determines whether assignment aiming at the variable parameter is received, acquires a variable parameter value of the variable parameter in response to the received assignment aiming at the variable parameter, and then determines whether the variable parameter value meets the logic expression; and generating the target test question based on the test question template, the logic expression, the variable parameter and the variable parameter value in response to the variable parameter value satisfying the logic expression. Therefore, on the premise of ensuring the consistency of the logic of the test questions, the user randomly changes the variable parameters in the test questions to change the results of the test questions, so that a new test question is generated, a large amount of labor cost and time cost are saved, the test questions aiming at the same knowledge point are solved, and the correct answers can be obtained by the students through the back answers, so that the knowledge point can not be mastered skillfully, and the flexible and valuable test questions can be obtained automatically.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale.
Fig. 1 is a schematic flow chart of a method for generating test questions according to an embodiment of the present disclosure;
fig. 2 is a schematic flow chart of a method for generating test questions according to another embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of an apparatus for generating test questions according to yet another embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of an electronic device for generating test questions according to yet another embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the devices, modules or units to be determined as different devices, modules or units, and are not used for limiting the sequence or interdependence relationship of the functions executed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
To make the objects, technical solutions and advantages of the present disclosure more apparent, embodiments of the present disclosure will be described in detail with reference to the accompanying drawings.
The present disclosure provides a method and an apparatus for generating test questions, an electronic device, and a computer-readable storage medium, which are intended to solve the above technical problems in the prior art.
The following describes the technical solutions of the present disclosure and how to solve the above technical problems in specific embodiments. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present disclosure will be described below with reference to the accompanying drawings.
In one embodiment, a method for generating test questions is provided, as shown in fig. 1, the method including:
step S101, determining whether a test question generation instruction is received;
step S102, responding to a received test question generating instruction, and acquiring a preset test question template, a logic expression corresponding to the test question template and variable parameters in the test question template;
in practical application, a user can generate test questions by interacting with the terminal. For example, a user opens a web page or an application client for generating test questions on a terminal, an interactive interface may be preset in the web page or the application client, and a virtual button preset in the interactive interface and used for generating test questions or having the same function is clicked, the virtual button may correspond to a test question generation instruction, the terminal may determine whether the test question generation instruction is received by monitoring whether the virtual button is clicked, when it is monitored by the terminal that the user clicks the virtual button, it may be determined that the test question generation instruction is received, and then a preset test question template, a logic expression corresponding to the test question template, and variable parameters in the test question template may be obtained from a test question database. The logic expression is a condition which is required to be met by the variable parameters in the test question template so as to ensure that the generated test question logic is correct.
Step S103, determining whether the assignment aiming at the variable parameter is received;
step S104, responding to the received assignment aiming at the variable parameter, and acquiring the variable parameter value of the variable parameter;
after a user selects the test question template, the variable parameters in the test question template can be obtained, the text input boxes corresponding to the variable parameters are displayed in the interactive interface, the user can assign the variable parameters in the text input boxes, and meanwhile, the terminal monitors whether the user initiates a confirmation instruction for assigning the variable parameters. When a user inputs numerical values corresponding to variable parameters in each text input box and initiates a confirmation instruction by clicking the determined virtual button, the terminal monitors the confirmation instruction and can determine that assignment aiming at the variable parameters is received.
Step S105, determining whether the variable parameter values meet the logic expression;
and S106, when the variable parameter values meet the logic expression, generating the target test questions based on the test question template, the logic expression, the variable parameters and the variable parameter values.
After the user inputs the values corresponding to the variable parameters, whether the variable parameter values meet the logic expression or not needs to be judged, and if the variable parameter values meet the logic expression, the target test questions can be generated based on the test question template, the logic expression, the variable parameters and the variable parameter values.
In the embodiment of the disclosure, a terminal firstly determines whether a test question generation instruction is received, acquires a preset test question template, a logic expression corresponding to the test question template and a variable parameter in the test question template in response to the received test question generation instruction, then determines whether assignment aiming at the variable parameter is received, acquires a variable parameter value of the variable parameter in response to the received assignment aiming at the variable parameter, and then determines whether the variable parameter value meets the logic expression; and generating the target test question based on the test question template, the logic expression, the variable parameter and the variable parameter value in response to the variable parameter value satisfying the logic expression. Therefore, on the premise of ensuring the consistency of the logic of the test questions, the user randomly changes the variable parameters in the test questions to change the results of the test questions, so that a new test question is generated, a large amount of labor cost and time cost are saved, the test questions aiming at the same knowledge point are solved, and the correct answers can be obtained by the students through the back answers, so that the knowledge point can not be mastered skillfully, and the flexible and valuable test questions can be obtained automatically.
In one embodiment, a method for generating test questions is provided, as shown in fig. 2, the method includes:
step S201, determining whether a test question generation instruction is received;
step S202, responding to a received test question generating instruction, and acquiring a preset test question template, a logic expression corresponding to the test question template and variable parameters in the test question template;
in practical application, a user can generate test questions by interacting with the terminal. For example, a user opens a web page or an application client for generating test questions on a terminal, an interactive interface may be preset in the web page or the application client, and a virtual button preset in the interactive interface and used for generating test questions or having the same function is clicked, the virtual button may correspond to a test question generation instruction, the terminal may determine whether the test question generation instruction is received by monitoring whether the virtual button is clicked, when it is monitored by the terminal that the user clicks the virtual button, it may be determined that the test question generation instruction is received, and then a preset test question template, a logic expression corresponding to the test question template, and variable parameters in the test question template may be obtained from a test question database. The logic expression is a condition which is required to be met by the variable parameters in the test question template so as to ensure that the generated test question logic is correct.
For example, a test question template is "ax2And + bx + c is 0 ", wherein a, b and c are variable parameters, and a logic expression corresponding to the test question template is' a × c<0', when "a + c<0 "ax2The logic of + bx + c ═ 0 "is correct, and the equation has a real number solution if a ═ c>0, then the generated topic is wrong. That is, the user needs to input the values of a, b, and c, respectively, and the input values of a and c need to satisfy "a × c<A logical expression of 0 ".
As another example, a test question template is "x2D is a variable parameter, and the logic expression corresponding to the test question template is d<0', when "d<When 0 "x2The logic of + d ═ 0 "is correct, the equation has a real number solution, if d is correct>0, then the generated topic is wrong. That is, the user needs to input the value of d, and the input value of d needs to beTo satisfy "d<A logical expression of 0 ".
In a preferred embodiment of the present disclosure, in response to receiving a test question generation instruction, acquiring a preset test question template, a logic expression corresponding to the test question template, and a variable parameter in the test question template, including:
acquiring a matched test question template from a pre-constructed test question database according to a request identifier in a received test question generating instruction, wherein the test question database stores the test question template, variable parameters in the test question template, logic expressions corresponding to the test question template and pairwise corresponding relations among the test question template, the variable parameters and the logic expressions;
and acquiring corresponding logic expressions and variable parameters according to the corresponding relations.
Specifically, before generating the test questions, the user may pre-construct a test question database for storing the test question template, the variable parameters in the test question template, and the logic expressions corresponding to the test question template, where the test question template, the variable parameters, and the logic expressions have pairwise correspondence, for example, the test question template "ax2The logical expression corresponding to + bx + c ═ 0 "is" a × c<0 'corresponding variable parameters are' a, b and c ', and the logical expression corresponding to the variable parameters' a, b and c 'is' a c<0 ", and so on.
In the test question database, each test question template has a corresponding logic expression and a variable parameter, and the variable parameter can be one or more. For example, the test question template "ax2The + bx + c ═ 0' includes three variable parameters of a, b and c, and the test question template "x2D is a variable parameter included in + d ═ 0 ".
Furthermore, the test question template may also be configured with corresponding classification identifiers, such as test question template "ax2The classification identifier of + bx + c ═ 0 "may be a" unitary quadratic equation ", and each classification identifier is displayed in the interactive interface, before the user clicks" generate test question ", the classification identifier of the required test question template, such as a" unitary quadratic equation ", may be selected first, so that the test question template and the variation of the test question template may be selected from the unitary quadratic equationThe quantity parameters and the logic expression of the test question template generate test questions.
Alternatively, it may be an ID identification, such as "a2+b2=c2The ID identification of "may be" pythagorean theorem ",
Figure BDA0002252343780000081
the ID identification of (a) may be a "trigonometric identity" or the like. Of course, other identifiers may also be used, and may be set according to actual requirements, which is not limited in the embodiment of the present disclosure.
In a preferred embodiment of the present disclosure, the logic expression is generated by:
receiving an original logic expression based on natural language input by a user;
and inputting the original logic expression into a preset conversion model to obtain a target logic expression based on the machine language.
Specifically, the logic expression may be generated by converting a natural language-based logic expression (e.g., "a × c < 0") into a machine language-based logic expression using a preset conversion model, such as a seq2seq model, where the input of the conversion model is the natural language-based logic expression and the output is the machine language-based logic expression, such as a code-form logic expression.
In a preferred embodiment of the present disclosure, the logical expression is a machine language-based logical expression entered by a user.
Further, the machine language based logic expression may also be manually input by a user. The conversion into the machine language-based logic expression has the advantage of being used for subsequent test question generation.
Step S203, determining whether the assignment aiming at the variable parameter is received;
step S204, responding to the received assignment aiming at the variable parameter, and acquiring the variable parameter value of the variable parameter;
after the user selects the test question template, the variable parameters in the test question template can be obtained, and the corresponding variable parameters are displayed in the interactive interfaceThe text input box is used for enabling a user to assign values to the variable parameters in the text input boxes, and meanwhile, the terminal monitors whether the user initiates a confirmation instruction for assigning the variable parameters. When a user inputs numerical values corresponding to variable parameters in each text input box and initiates a confirmation instruction by clicking the determined virtual button, the terminal monitors the confirmation instruction and can determine that assignment aiming at the variable parameters is received. For example, "ax2If the variable parameter in + bx + c ═ 0 "is" a, b, and c ", the user can be allowed to enter the values corresponding to" a, b, and c ", respectively. And then, acquiring the numerical value of each variable parameter input by the user from each text input box.
Step S205, determining whether the variable parameter value meets the logic expression;
step S206, responding to the variable parameter value satisfying the logic expression, and generating a target test question based on the test question template, the logic expression, the variable parameter and the variable parameter value;
specifically, after the user inputs the values corresponding to the variable parameters, it is necessary to determine whether the variable parameter values satisfy the logical expressions, and if so, the target test questions may be generated based on the test question template, the logical expressions, the variable parameters, and the variable parameter values. For example, for the question template "ax2And + bx + c is 0 ", a value of a input by the user is 5, b is 8, c is-3, a is-15 and is less than 0, and the logical expression corresponding to the test question template is satisfied, so that the target test question can be generated by using the values of" 5, 8 and-3 ".
Step S207, responding to the variable parameter value not meeting the logic expression, generating an error prompt and displaying the error prompt;
specifically, after the user inputs the values corresponding to the variable parameters, if the values of the variable parameters do not satisfy the logical expression, an error prompt may be generated and displayed to the user, for example, the values corresponding to "a, b, and c" input by the user are "5, 8, 3", and obviously do not satisfy "a × c < 0", so that an "error" may be generated: and a + c > 0' to prompt and display the error to the user, and then the user is enabled to re-input the value of a or the value of c.
And after the user inputs a new numerical value again, continuously judging whether the new numerical value meets the logic expression corresponding to the test question template, if not, continuously generating an error prompt and displaying the error prompt to the user to enable the user to input the new numerical value again until the newly input new numerical value meets the logic expression, and then generating the target test question based on the test question template, the logic expression, the variable parameter and the new variable parameter value.
And S208, solving the target test questions to obtain the solution result of the target test questions.
Specifically, after the target test question is generated, the target test question may be solved to obtain a corresponding solution result. In this way, the user can generate answers corresponding to the test questions while generating the test questions.
In the embodiment of the disclosure, a terminal firstly determines whether a test question generation instruction is received, acquires a preset test question template, a logic expression corresponding to the test question template and a variable parameter in the test question template in response to the received test question generation instruction, then determines whether assignment aiming at the variable parameter is received, acquires a variable parameter value of the variable parameter in response to the received assignment aiming at the variable parameter, and then determines whether the variable parameter value meets the logic expression; and generating the target test question based on the test question template, the logic expression, the variable parameter and the variable parameter value in response to the variable parameter value satisfying the logic expression. Therefore, on the premise of ensuring the consistency of the logic of the test questions, the user randomly changes the variable parameters in the test questions to change the results of the test questions, so that a new test question is generated, a large amount of labor cost and time cost are saved, the test questions aiming at the same knowledge point are solved, and the correct answers can be obtained by the students through the back answers, so that the knowledge point can not be mastered skillfully, and the flexible and valuable test questions can be obtained automatically.
Meanwhile, the generated test questions can be solved, so that the answer results corresponding to the generated test questions can be obtained, the generated test questions can be checked whether to be correct, the step of solving the questions by the question taker is omitted, and the time of the question taker is further saved.
Fig. 3 is a schematic structural diagram of a device for generating test questions according to another embodiment of the present disclosure, and as shown in fig. 3, the device of this embodiment may include:
a first determining module 301, configured to determine whether a test question generating instruction is received;
a first obtaining module 302, configured to, in response to a received test question generating instruction, obtain a preset test question template, a logic expression corresponding to the test question template, and a variable parameter in the test question template;
a second determining module 303, configured to determine whether an assignment for the variable parameter is received;
a second obtaining module 304, configured to, in response to receiving the assignment for the variable parameter, obtain a variable parameter value of the variable parameter;
a third determining module 305 for determining whether the variable parameter value satisfies the logical expression;
a first generating module 306, configured to generate a target test question based on the test question template, the logic expression, the variable parameter, and the variable parameter value in response to the variable parameter value satisfying the logic expression.
In a preferred embodiment of the present disclosure, the method further includes:
and the second generation module is used for responding to the variable parameter value not meeting the logic expression, generating an error prompt and displaying the error prompt.
In a preferred embodiment of the present disclosure, the first obtaining module includes:
the test question template acquisition sub-module is used for acquiring a matched test question template from a pre-constructed test question database according to a request identifier in a received test question generation instruction, wherein the test question database stores the test question template, variable parameters in the test question template, a logic expression corresponding to the test question template and pairwise corresponding relations among the test question template, the variable parameters and the logic expression;
and the corresponding information acquisition submodule is used for acquiring the corresponding logic expression and the corresponding variable parameter according to the corresponding relation.
In a preferred embodiment of the present disclosure, the logic expression is generated by:
receiving an original logic expression based on natural language input by a user;
and inputting the original logic expression into a preset conversion model to obtain a target logic expression based on the machine language.
In a preferred embodiment of the present disclosure, the logical expression is a machine language-based logical expression entered by a user.
In a preferred embodiment of the present disclosure, the method further includes:
and the answer module is used for answering the target test questions to obtain the answer results of the target test questions.
The test question generation device of this embodiment can execute the test question generation methods shown in the first embodiment and the second embodiment of the present disclosure, and the implementation principles thereof are similar, and are not described herein again.
In the embodiment of the disclosure, a terminal firstly determines whether a test question generation instruction is received, acquires a preset test question template, a logic expression corresponding to the test question template and a variable parameter in the test question template in response to the received test question generation instruction, then determines whether assignment aiming at the variable parameter is received, acquires a variable parameter value of the variable parameter in response to the received assignment aiming at the variable parameter, and then determines whether the variable parameter value meets the logic expression; and generating the target test question based on the test question template, the logic expression, the variable parameter and the variable parameter value in response to the variable parameter value satisfying the logic expression. Therefore, on the premise of ensuring the consistency of the logic of the test questions, the user randomly changes the variable parameters in the test questions to change the results of the test questions, so that a new test question is generated, a large amount of labor cost and time cost are saved, the test questions aiming at the same knowledge point are solved, and the correct answers can be obtained by the students through the back answers, so that the knowledge point can not be mastered skillfully, and the flexible and valuable test questions can be obtained automatically.
Meanwhile, the generated test questions can be solved, so that the answer results corresponding to the generated test questions can be obtained, the generated test questions can be checked whether to be correct, the step of solving the questions by the question taker is omitted, and the time of the question taker is further saved.
Referring now to FIG. 4, a block diagram of an electronic device 400 suitable for use in implementing embodiments of the present disclosure is shown. The electronic devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., car navigation terminals), and the like, and fixed terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 4 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
The electronic device includes: a memory and a processor, wherein the processor may be referred to as a processing device 401 described below, and the memory may include at least one of a Read Only Memory (ROM)402, a Random Access Memory (RAM)403, and a storage device 408, which are described below:
as shown in fig. 4, electronic device 400 may include a processing device (e.g., central processing unit, graphics processor, etc.) 401 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)402 or a program loaded from a storage device 408 into a Random Access Memory (RAM) 403. In the RAM 403, various programs and data necessary for the operation of the electronic apparatus 400 are also stored. The processing device 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
Generally, the following devices may be connected to the I/O interface 405: input devices 406 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 407 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 408 including, for example, tape, hard disk, etc.; and a communication device 409. The communication means 409 may allow the electronic device 400 to communicate wirelessly or by wire with other devices to exchange data. While fig. 4 illustrates an electronic device 400 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication device 409, or from the storage device 408, or from the ROM 402. The computer program performs the above-described functions defined in the methods of the embodiments of the present disclosure when executed by the processing device 401.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText transfer protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: determining whether a test question generation instruction is received; responding to a received test question generating instruction, and acquiring a preset test question template, a logic expression corresponding to the test question template and variable parameters in the test question template; determining whether a value assignment for the variable parameter is received; when receiving assignment aiming at the variable parameter, acquiring a variable parameter value of the variable parameter; determining whether the variable parameter values satisfy the logical expression; and generating a target test question based on the test question template, the logic expression, the variable parameter and the variable parameter value in response to the variable parameter value satisfying the logic expression.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules or units described in the embodiments of the present disclosure may be implemented by software or hardware.
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
According to one or more embodiments of the present disclosure, [ example one ] there is provided a generating method of a test question, including:
determining whether a test question generation instruction is received;
responding to a received test question generating instruction, and acquiring a preset test question template, a logic expression corresponding to the test question template and variable parameters in the test question template;
determining whether a value assignment for the variable parameter is received;
when receiving assignment aiming at the variable parameter, acquiring a variable parameter value of the variable parameter;
determining whether the variable parameter values satisfy the logical expression; and
and generating a target test question based on the test question template, the logic expression, the variable parameter and the variable parameter value in response to the variable parameter value satisfying the logic expression.
Preferably, the method further comprises the following steps:
and generating an error prompt and displaying the error prompt in response to the variable parameter value not meeting the logic expression.
Preferably, the obtaining a preset test question template, a logic expression corresponding to the test question template, and a variable parameter in the test question template in response to receiving a test question generation instruction includes:
acquiring a matched test question template from a pre-constructed test question database according to a request identifier in a received test question generating instruction, wherein the test question database stores the test question template, variable parameters in the test question template, a logic expression corresponding to the test question template and pairwise corresponding relations among the test question template, the variable parameters and the logic expression;
and acquiring corresponding logic expressions and variable parameters according to the corresponding relations.
Preferably, the logical expression is generated by:
receiving an original logic expression based on natural language input by a user;
and inputting the original logic expression into a preset conversion model to obtain a target logic expression based on the machine language.
Preferably, the logical expression is a machine language based logical expression entered by a user.
Preferably, the method further comprises the following steps:
and solving the target test questions to obtain the solution results of the target test questions.
According to one or more embodiments of the present disclosure, [ example two ] there is provided the apparatus of example one, further comprising:
the first determining module is used for determining whether a test question generating instruction is received or not;
the test question generating module is used for generating a test question generating instruction according to the received test question;
a second determination module to determine whether a value assignment for the variable parameter is received;
the second obtaining module is used for obtaining the variable parameter value of the variable parameter in response to receiving the assignment aiming at the variable parameter;
a third determining module for determining whether the variable parameter value satisfies the logical expression;
and the first generation module is used for responding to the condition that the variable parameter value meets the logic expression and generating a target test question based on the test question template, the logic expression, the variable parameter and the variable parameter value.
Preferably, the method further comprises the following steps:
and the second generation module is used for responding to the variable parameter value not meeting the logic expression, generating an error prompt and displaying the error prompt.
Preferably, the first obtaining module includes:
the test question template acquisition sub-module is used for acquiring a matched test question template from a pre-constructed test question database according to a request identifier in a received test question generation instruction, wherein the test question database stores the test question template, variable parameters in the test question template, a logic expression corresponding to the test question template and pairwise corresponding relations among the test question template, the variable parameters and the logic expression;
and the corresponding information acquisition submodule is used for acquiring the corresponding logic expression and the corresponding variable parameter according to the corresponding relation.
Preferably, the logical expression is generated by:
receiving an original logic expression based on natural language input by a user;
and inputting the original logic expression into a preset conversion model to obtain a target logic expression based on the machine language.
Preferably, the logical expression is a machine language based logical expression entered by a user.
Preferably, the method further comprises the following steps:
and the answer module is used for answering the target test questions to obtain the answer results of the target test questions.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

Claims (10)

1. A method for generating test questions is characterized by comprising the following steps:
determining whether a test question generation instruction is received;
responding to a received test question generating instruction, and acquiring a preset test question template, a logic expression corresponding to the test question template and variable parameters in the test question template;
determining whether a value assignment for the variable parameter is received;
when receiving assignment aiming at the variable parameter, acquiring a variable parameter value of the variable parameter;
determining whether the variable parameter values satisfy the logical expression; and
and generating a target test question based on the test question template, the logic expression, the variable parameter and the variable parameter value in response to the variable parameter value satisfying the logic expression.
2. The method of generating test questions according to claim 1, further comprising:
and generating an error prompt and displaying the error prompt in response to the variable parameter value not meeting the logic expression.
3. The method for generating test questions according to claim 1, wherein the obtaining of the preset test question template, the logic expression corresponding to the test question template, and the variable parameters in the test question template in response to receiving the test question generation instruction comprises:
acquiring a matched test question template from a pre-constructed test question database according to a request identifier in a received test question generating instruction, wherein the test question database stores the test question template, variable parameters in the test question template, a logic expression corresponding to the test question template and pairwise corresponding relations among the test question template, the variable parameters and the logic expression;
and acquiring corresponding logic expressions and variable parameters according to the corresponding relations.
4. The test question generation method according to any one of claims 1 to 3, wherein the logical expression is generated by:
receiving an original logic expression based on natural language input by a user;
and inputting the original logic expression into a preset conversion model to obtain a target logic expression based on the machine language.
5. The method of generating test questions according to any one of claims 1 to 3, wherein the logical expression is a machine language-based logical expression input by a user.
6. The method of generating test questions according to claim 1, further comprising:
and solving the target test questions to obtain the solution results of the target test questions.
7. An apparatus for generating test questions, comprising:
the first determining module is used for determining whether a test question generating instruction is received or not;
the test question generating module is used for generating a test question generating instruction according to the received test question;
a second determination module to determine whether a value assignment for the variable parameter is received;
the second obtaining module is used for obtaining the variable parameter value of the variable parameter in response to receiving the assignment aiming at the variable parameter;
a third determining module for determining whether the variable parameter value satisfies the logical expression;
and the first generation module is used for responding to the condition that the variable parameter value meets the logic expression and generating a target test question based on the test question template, the logic expression, the variable parameter and the variable parameter value.
8. The test question generation apparatus according to claim 7, further comprising:
and the second generation module is used for responding to the variable parameter value not meeting the logic expression, generating an error prompt and displaying the error prompt.
9. An electronic device, comprising:
a processor, a memory, and a bus;
the bus is used for connecting the processor and the memory;
the memory is used for storing operation instructions;
the processor is configured to execute the method for generating test questions according to any one of claims 1 to 6 by calling the operation instruction.
10. A computer-readable storage medium for storing computer instructions which, when executed on a computer, cause the computer to perform the method of generating test questions of any of claims 1-6 above.
CN201911039007.3A 2019-10-29 2019-10-29 Test question generation method and device, electronic equipment and computer readable storage medium Active CN110765752B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911039007.3A CN110765752B (en) 2019-10-29 2019-10-29 Test question generation method and device, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911039007.3A CN110765752B (en) 2019-10-29 2019-10-29 Test question generation method and device, electronic equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN110765752A true CN110765752A (en) 2020-02-07
CN110765752B CN110765752B (en) 2023-09-01

Family

ID=69334445

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911039007.3A Active CN110765752B (en) 2019-10-29 2019-10-29 Test question generation method and device, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN110765752B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111968434A (en) * 2020-08-12 2020-11-20 福建师范大学协和学院 Method and storage medium for on-line paperless language training and evaluation
CN112579735A (en) * 2020-12-09 2021-03-30 北京字节跳动网络技术有限公司 Question generation method and device, computer equipment and storage medium
CN112863278A (en) * 2021-02-09 2021-05-28 柳州智视科技有限公司 Problem solving method after problem condition replacement

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101308486A (en) * 2008-03-21 2008-11-19 北京印刷学院 Test question automatic generation system and method
US20100081120A1 (en) * 2008-09-29 2010-04-01 Nader Abbas Nanjiani Automated quiz generation system
CN101727536A (en) * 2009-09-28 2010-06-09 江苏省电力试验研究院有限公司 Calculation problem variable parameter examination management system
EP2575123A1 (en) * 2011-09-30 2013-04-03 Tata Consultancy Services Limited Customized question paper generation
CN103761101A (en) * 2014-01-26 2014-04-30 国家电网公司 Method enabling parameters of computational problems in electricity test system to be changeable
US20150031011A1 (en) * 2013-04-29 2015-01-29 LTG Exam Prep Platform, Inc. Systems, methods, and computer-readable media for providing concept information associated with a body of text
KR101620818B1 (en) * 2015-07-14 2016-05-12 우병현 Method for providing mathematics question auto generating service
CN105678664A (en) * 2016-02-03 2016-06-15 成都爱易佰网络科技有限公司 Method for implementing intelligent change anti-cheating movable question bank
CN108052492A (en) * 2017-12-11 2018-05-18 上海启思教育科技服务有限公司 A kind of mathematical problem automatic creation system
WO2018094925A1 (en) * 2016-11-22 2018-05-31 深圳市鹰硕技术有限公司 Method and system for generating blank filling question and grading
CN108182052A (en) * 2017-12-07 2018-06-19 河南思维信息技术有限公司 A kind of railway implementation examination question generation method based on script
CN108628944A (en) * 2018-03-28 2018-10-09 北京大米科技有限公司 Online assignment input method, client, server, computer equipment and medium
CN109299220A (en) * 2018-09-03 2019-02-01 中国平安人寿保险股份有限公司 Worker's online testing test paper generation method and terminal device
CN109800256A (en) * 2019-01-07 2019-05-24 深圳中兴网信科技有限公司 Test paper generation method, creation system for test paper and computer readable storage medium
CN109885288A (en) * 2017-12-06 2019-06-14 张宗尚 A kind of system generating topic according to subject semantic network and the automation of corresponding semantic rules

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101308486A (en) * 2008-03-21 2008-11-19 北京印刷学院 Test question automatic generation system and method
US20100081120A1 (en) * 2008-09-29 2010-04-01 Nader Abbas Nanjiani Automated quiz generation system
CN101727536A (en) * 2009-09-28 2010-06-09 江苏省电力试验研究院有限公司 Calculation problem variable parameter examination management system
EP2575123A1 (en) * 2011-09-30 2013-04-03 Tata Consultancy Services Limited Customized question paper generation
US20150031011A1 (en) * 2013-04-29 2015-01-29 LTG Exam Prep Platform, Inc. Systems, methods, and computer-readable media for providing concept information associated with a body of text
CN103761101A (en) * 2014-01-26 2014-04-30 国家电网公司 Method enabling parameters of computational problems in electricity test system to be changeable
KR101620818B1 (en) * 2015-07-14 2016-05-12 우병현 Method for providing mathematics question auto generating service
CN105678664A (en) * 2016-02-03 2016-06-15 成都爱易佰网络科技有限公司 Method for implementing intelligent change anti-cheating movable question bank
WO2018094925A1 (en) * 2016-11-22 2018-05-31 深圳市鹰硕技术有限公司 Method and system for generating blank filling question and grading
CN109885288A (en) * 2017-12-06 2019-06-14 张宗尚 A kind of system generating topic according to subject semantic network and the automation of corresponding semantic rules
CN108182052A (en) * 2017-12-07 2018-06-19 河南思维信息技术有限公司 A kind of railway implementation examination question generation method based on script
CN108052492A (en) * 2017-12-11 2018-05-18 上海启思教育科技服务有限公司 A kind of mathematical problem automatic creation system
CN108628944A (en) * 2018-03-28 2018-10-09 北京大米科技有限公司 Online assignment input method, client, server, computer equipment and medium
CN109299220A (en) * 2018-09-03 2019-02-01 中国平安人寿保险股份有限公司 Worker's online testing test paper generation method and terminal device
CN109800256A (en) * 2019-01-07 2019-05-24 深圳中兴网信科技有限公司 Test paper generation method, creation system for test paper and computer readable storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
杜世瑾: "试题智能提取技术的研究与实现", 中国优秀硕士学位论文全文数据库 信息科技辑 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111968434A (en) * 2020-08-12 2020-11-20 福建师范大学协和学院 Method and storage medium for on-line paperless language training and evaluation
CN112579735A (en) * 2020-12-09 2021-03-30 北京字节跳动网络技术有限公司 Question generation method and device, computer equipment and storage medium
CN112863278A (en) * 2021-02-09 2021-05-28 柳州智视科技有限公司 Problem solving method after problem condition replacement

Also Published As

Publication number Publication date
CN110765752B (en) 2023-09-01

Similar Documents

Publication Publication Date Title
CN111475298B (en) Task processing method, device, equipment and storage medium
CN110765752B (en) Test question generation method and device, electronic equipment and computer readable storage medium
CN111459364B (en) Icon updating method and device and electronic equipment
CN115640285B (en) Power abnormality information transmission method, device, electronic equipment and medium
CN111309304B (en) Method, device, medium and electronic equipment for generating IDL file
CN115357350A (en) Task configuration method and device, electronic equipment and computer readable medium
CN110689285A (en) Test method, test device, electronic equipment and computer readable storage medium
CN111798251A (en) Verification method and device of house source data and electronic equipment
CN115600964A (en) Voice approval method and device and related equipment
CN111538717B (en) Data processing method, device, electronic equipment and computer readable medium
CN111597441B (en) Information processing method and device and electronic equipment
CN111125501B (en) Method and device for processing information
CN113722738A (en) Data protection method, device, medium and electronic equipment
CN111680754A (en) Image classification method and device, electronic equipment and computer-readable storage medium
CN112365046A (en) User information generation method and device, electronic equipment and computer readable medium
CN112035256A (en) Resource allocation method, device, electronic equipment and medium
CN112308074A (en) Method and device for generating thumbnail
CN111563797A (en) House source information processing method and device, readable medium and electronic equipment
CN112036819B (en) Interaction method and device based on task image, medium and electronic equipment
CN116319322B (en) Power equipment node communication connection method, device, equipment and computer medium
CN116049904B (en) Electronic bill encryption signature method based on blockchain multi-point certificate and electronic equipment
CN111797932B (en) Image classification method, apparatus, device and computer readable medium
CN111026983B (en) Method, device, medium and electronic equipment for realizing hyperlink
CN111641692B (en) Session data processing method and device and electronic equipment
CN112036821B (en) Quantization method, quantization device, quantization medium and quantization electronic equipment based on grid map planning private line

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant after: Douyin Vision Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant before: Tiktok vision (Beijing) Co.,Ltd.

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant after: Tiktok vision (Beijing) Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant before: BEIJING BYTEDANCE NETWORK TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant