WO2020063347A1 - 针对口算题的题目批改方法、装置、电子设备和存储介质 - Google Patents
针对口算题的题目批改方法、装置、电子设备和存储介质 Download PDFInfo
- Publication number
- WO2020063347A1 WO2020063347A1 PCT/CN2019/105321 CN2019105321W WO2020063347A1 WO 2020063347 A1 WO2020063347 A1 WO 2020063347A1 CN 2019105321 W CN2019105321 W CN 2019105321W WO 2020063347 A1 WO2020063347 A1 WO 2020063347A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- question
- calculation
- searched
- oral
- test paper
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G09—EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
- G09B—EDUCATIONAL OR DEMONSTRATION APPLIANCES; APPLIANCES FOR TEACHING, OR COMMUNICATING WITH, THE BLIND, DEAF OR MUTE; MODELS; PLANETARIA; GLOBES; MAPS; DIAGRAMS
- G09B7/00—Electrically-operated teaching apparatus or devices working with questions and answers
- G09B7/02—Electrically-operated teaching apparatus or devices working with questions and answers of the type wherein the student is expected to construct an answer to the question which is presented or wherein the machine gives an answer to the question presented by a student
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/279—Recognition of textual entities
- G06F40/284—Lexical analysis, e.g. tokenisation or collocates
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V10/00—Arrangements for image or video recognition or understanding
- G06V10/70—Arrangements for image or video recognition or understanding using pattern recognition or machine learning
- G06V10/82—Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V30/00—Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
- G06V30/10—Character recognition
- G06V30/14—Image acquisition
- G06V30/1444—Selective acquisition, locating or processing of specific regions, e.g. highlighted text, fiducial marks or predetermined fields
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V30/00—Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
- G06V30/10—Character recognition
- G06V30/14—Image acquisition
- G06V30/148—Segmentation of character regions
- G06V30/153—Segmentation of character regions using recognition of characters or words
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V30/00—Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
- G06V30/10—Character recognition
- G06V30/19—Recognition using electronic means
- G06V30/191—Design or setup of recognition systems or techniques; Extraction of features in feature space; Clustering techniques; Blind source separation
- G06V30/19173—Classification techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V30/00—Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
- G06V30/40—Document-oriented image-based pattern recognition
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V30/00—Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
- G06V30/40—Document-oriented image-based pattern recognition
- G06V30/41—Analysis of document content
- G06V30/413—Classification of content, e.g. text, photographs or tables
-
- G—PHYSICS
- G09—EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
- G09B—EDUCATIONAL OR DEMONSTRATION APPLIANCES; APPLIANCES FOR TEACHING, OR COMMUNICATING WITH, THE BLIND, DEAF OR MUTE; MODELS; PLANETARIA; GLOBES; MAPS; DIAGRAMS
- G09B19/00—Teaching not covered by other main groups of this subclass
- G09B19/02—Counting; Calculating
- G09B19/025—Counting; Calculating with electrically operated apparatus or devices
Definitions
- the present invention relates to the field of artificial intelligence technology, and in particular, to a method, a device, an electronic device, and a computer-readable storage medium for correcting a topic for a verbal calculation problem.
- search APPs for smart terminal products that solve correction tasks and test papers.
- the images that contain the test papers to be reviewed are entered into the search app, so that the search app can search from the question bank and the images in the test papers based on the image content of the test papers. Corresponding topics.
- a feature vector of the question can be generated based on the text content of the subject's stem, and a search is performed from the question bank according to the feature vector.
- different tokens have different weights based on word frequency. The more frequent the content of the text in the stem, the less important the token is (such as the word "" in the stem). If the number of times is too large, the character "" is deemed to be unimportant.), The lower the weight of the token is set.
- the text content of the stem of the oral arithmetic problem is mostly numbers and calculation symbols, and the word frequency of the numerals and the calculation symbols is relatively high.
- the weight of the token which will cause the feature vectors corresponding to different oral calculation questions to be less distinguished from each other.
- the recognition engine Once the recognition engine has a small recognition error, it will cause the oral calculation question to match a different oral calculation question. , which in turn leads to errors in correcting the oral calculation questions. It can be seen that the correction of questions for oral arithmetic is prone to errors and the accuracy is not high.
- An object of the present invention is to provide a method, device, electronic device, and computer-readable storage medium for correcting an oral question, so as to solve the problems of correcting an oral question in the existing way of correcting the subject, which is prone to errors and low accuracy.
- the present invention provides a method for correcting a topic for an oral calculation problem, the method includes:
- Step S11 Detect the images of the test papers to be searched, detect the areas of each searchable question on the searchable papers, determine the type of each of the searchable questions, and identify the dry text in the area of each searchable question content;
- Step S12 Obtain a feature vector of the searched question according to the text content of each question to be searched, and perform a search in the question bank according to the feature vector of the searched question to find the closest question to the searched question;
- Step S13 Summarize the test papers of the closest search questions of all the topics to be searched, and compare the summarized test papers with the preset conditions. If there are target test papers that meet the preset conditions, the test papers that meet the preset conditions are determined as A target test paper matching the test paper to be searched;
- Step S14 In the case that the search question paper includes a search question with a question type of oral calculation, for each search question with a question type of oral calculation, the feature vector of the search question and the target test paper The feature vectors of each question in the subject are matched with the shortest edit distance to determine the target question in the target test paper that matches the question to be searched. If the question type of the target question is oral calculation question, then the question to be searched is determined to be Corrections for oral accounts; and
- Step S15 For each verbal question to be corrected, use a preset verbal calculation engine to calculate the verbal question to be corrected, and output the calculation result of the verbal calculation engine as the answer to the verbal question to be corrected, thereby completing the to-be-searched Correction of oral calculation questions to be corrected on the test paper.
- the question type of the target question is oral calculation, and the position of the target question in the target test paper is the same as the position of the question to be searched in the test paper to be searched. In this case, it is determined that the topic to be searched is a topic to be reviewed and corrected.
- step S13 if there is no target test paper that satisfies a preset condition, and when the test paper to be searched includes a search question with a question type of oral calculation, the search type of the question type is oral calculation.
- the title is determined as the oral calculation question to be corrected, and step S15 is executed.
- step S15 further includes: checking whether the calculation result of the oral calculation engine is consistent with the reference answer corresponding to the oral calculation question to be corrected on the target test paper, and if they are consistent, outputting the calculation result of the oral calculation engine as the standby Correct the answer of the oral question.
- a prompt message indicating that the reference answer of the verbal calculation question to be corrected is inconsistent is output.
- the preset verbal calculation engine includes a pre-trained first recognition model, and the first recognition model is a neural network-based model;
- step S15 the preset calculation engine is used to calculate the calculation question to be modified, including:
- the pre-trained first recognition model is used to identify the numbers, letters, words, characters, and calculation types in the oral calculation question to be corrected.
- the calculation types include: four mixed operations, estimation, division with remainder, fraction calculation, and unit. One of conversion, vertical calculation, and free calculation; and
- step S12 includes:
- Step S121 input the text content of the stem of each topic to be searched into a pre-trained stem vectorization model to obtain the feature vector of each topic of the subject to be searched, as the feature vector of each topic to be searched, where ,
- the problem vectorization model is a neural network-based model
- Step S122 For each question to be searched, a search is performed in the question bank to find a feature vector matching the feature vector of the question to be searched, and the question corresponding to the matching feature vector in the question bank is determined to be the closest to the question to be searched. Close topic.
- the problem vectorization model is obtained by training in the following steps:
- a neural network model is used to extract two-dimensional feature vectors of the text content of the stem in each question sample, thereby training to obtain the stem vectorized model.
- the method for correcting a question for an oral calculation question further includes: establishing an index information table for feature vectors of each question on the test paper in the question bank;
- Step S122 includes:
- the topic corresponding to the matching feature vector in the index information table is determined as the topic closest to the topic to be searched.
- the method for correcting a question for a verbal arithmetic problem further includes: grouping feature vectors of different lengths according to lengths;
- finding the feature vector matching the feature vector of the topic to be searched in the index information table includes:
- a feature vector matching the feature vector of the to-be-searched topic is found in a group having the same or similar length as the feature vector of the to-be-searched topic.
- step S13 determining a test paper that satisfies a preset condition as a target test paper that matches the test paper to be searched includes:
- test paper with the highest occurrence frequency and greater than the first preset threshold is determined as a target test paper that matches the test paper to be searched.
- step S11 the image of the test paper to be searched is detected, and the area of each search topic on the test paper to be searched is detected, including:
- the image of the test paper to be searched is detected by using a pre-trained detection model, and regions of each search question on the test paper to be searched are detected, wherein the detection model is a model based on a neural network.
- step S11 the content of the stem text in the area of each topic to be searched is identified, including:
- the pre-trained second recognition model is used to identify the text content of the stem in the region of each search question, wherein the second recognition model is a model based on a neural network.
- the method for correcting questions for oral calculation questions further includes:
- step S15 for each verbal question to be corrected, the calculation result corresponding to the verbal calculation engine in the to-be-adjusted verbal question area is used as the answer to the verbal question to be corrected, thereby completing the questionnaire to be searched. Correction of oral calculation subject to be corrected.
- the present invention also provides a device for correcting questions for oral calculation problems.
- the device includes:
- a detection and recognition module configured to detect the images of the test papers to be searched, detect the areas of each searchable question on the search papers, determine the type of each searchable question, and identify the questions in the area of each searchable question Dry text content;
- the topic search module is used to obtain the feature vector of the topic to be searched according to the text content of the topic of each topic to be searched, and to search in the question bank according to the characteristic vector of the topic to be searched to find the closest to the topic to be searched Topic
- Test paper determination module which is used to summarize all the papers found closest to the search question, and compare the summarized papers with preset conditions. If there is a target paper that meets the preset conditions, it will meet the preset conditions. The test paper is determined to be a target test paper that matches the test paper to be searched;
- the oral calculation problem determination module is configured to, in a case where the search paper includes a to-be-searched question whose question type is an oral calculation question, for each to-be-searched question whose question type is an oral calculation question, the feature vector of the to-be-searched question and The feature vectors of each question in the target test paper are matched with the shortest edit distance to determine the target question in the target test paper that matches the question to be searched. If the question type of the target question is oral calculation question, then the target question is determined. Search for topics to be reviewed for correction; and
- the verbal calculation module is used to calculate the verbal calculation question to be corrected for each verbal calculation question to be corrected by using a preset dictation engine, and output the calculation result of the verbal calculation engine as the answer to the verbal calculation question to be corrected, thereby completing the Correction of the counting question to be corrected on the test paper to be searched.
- the oral calculation question determining module is further configured to use oral calculation questions in the target question, and the position of the target question in the target test paper and the search question in the search paper In the case where the positions are the same, it is determined that the topic to be searched is a topic to be corrected.
- the test paper determining module is further configured to: when the target test paper that satisfies a preset condition does not exist, and when the test paper to be searched includes a question to be searched with a question type of oral calculation, the test type is to be an oral calculation
- the question to be searched is determined as the question to be corrected.
- the oral calculation question correction module is further configured to check whether the calculation result of the oral calculation engine is consistent with the corresponding reference answer of the to-be-corrected oral calculation question on the target test paper, and if they are consistent, output the oral calculation engine's The calculation result is used as the answer of the question to be corrected.
- the oral calculation question correction module is further configured to output an indication indicating that the calculation result of the oral calculation engine is inconsistent with the reference answer of the oral examination question to be corrected on the target test paper. Tips for inconsistent reference answers.
- the preset verbal calculation engine includes a pre-trained first recognition model, and the first recognition model is a neural network-based model;
- the oral calculation question correcting module is configured to identify the numbers, letters, characters, characters, and calculation types in the oral calculation question to be corrected through the pre-trained first recognition model.
- the calculation types include: four mixed operations and estimations. One of division with remainder division, fractional calculation, unit conversion, vertical calculation, and detached calculation; calculation is performed according to the identified numbers, letters, characters, characters, and calculation types to obtain the calculation result of the oral calculation question to be corrected .
- the topic search module includes:
- a feature vector obtaining unit is used to input the text content of the stem of each topic to be searched into a pre-trained stem vectorization model to obtain the feature vector of the stem of each topic to be searched as the Feature vector, wherein the problem vectorization model is a neural network-based model;
- a question finding unit is configured to search the question bank for each question to be searched, find a feature vector matching the feature vector of the question to be searched, and determine the question corresponding to the matching feature vector in the question bank as the question to be searched. Search for the closest question.
- the problem vectorization model is obtained by training in the following steps:
- a neural network model is used to extract two-dimensional feature vectors of the text content of the stem in each question sample, thereby training to obtain the stem vectorized model.
- the device further includes:
- a preprocessing module which is used to establish an index information table of feature vectors of each question on the test paper in the question bank in advance;
- the topic search unit is specifically configured to find a feature vector matching the feature vector of the to-be-searched topic in the index information table for each to-be-searched topic; and place the matched feature vector in the index information table.
- the corresponding question in Chinese is determined to be the closest question to the question to be searched.
- the preprocessing module is further configured to group feature vectors of different lengths according to lengths before establishing the index information table;
- the topic search unit is specifically configured to find, for each topic to be searched, a matching feature vector of the topic to be searched in a group having the same or similar length as the characteristic vector of the topic to be searched in the index information table. Feature vector.
- test paper determination module is specifically configured to determine a test paper with the highest frequency of occurrence and greater than a first preset threshold as a target test paper that matches the test paper to be searched.
- the detection and recognition module is specifically configured to detect the image of the test paper to be searched by using a pre-trained detection model, and detect an area of each search question on the test paper, where
- the detection model is a model based on a neural network.
- the detection and recognition module is specifically configured to use a pre-trained second recognition model to identify the text content of the stem in the region of each search question, wherein the second recognition model is a neural network-based model .
- the question correcting device for oral calculation questions further includes:
- a calculation module configured to use a preset oral calculation engine to perform calculation processing on the area containing the calculation formula and / or formula in the test paper to be searched to obtain the calculation result of each area;
- the oral calculation problem correction module is used for each oral calculation problem to be corrected, and uses the calculation result corresponding to the oral calculation engine in the area of the oral calculation problem to be corrected as the answer of the oral calculation problem to be corrected, thereby completing the calculation Search for corrections on the test papers to be corrected.
- the present invention further provides an electronic device including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory complete communication with each other through the communication bus;
- the processor is configured to implement the method steps of the method for correcting the questions of the oral arithmetic problem as described above when the program stored in the memory is executed.
- the present invention also provides a computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, and the computer program is implemented as described above when executed by a processor. Method steps for the method of correcting the questions for oral calculation problems.
- the present invention also provides a method for correcting questions for oral calculation problems, the method includes:
- Step S41 Detect the images of the test papers to be searched, detect the areas of each searchable question on the searchable papers, determine the type of each searchable question, and identify the stemmed text in the area of each searchable question content;
- Step S42 using a preset verbal calculation engine to perform calculation processing on the area containing the calculation formula and / or formula in the test paper to be searched to obtain the calculation result of each area;
- Step S43 obtaining the feature vector of the subject to be searched according to the text content of the subject of each subject to be searched, and searching in the question bank according to the feature vector of the subject to be searched to find the closest subject of the subject to be searched;
- Step S44 Summarize the test papers closest to all the topics to be searched, and compare the test papers with the preset conditions. If there are target test papers that meet the preset conditions, the test papers that meet the preset conditions are determined as A target test paper matching the test paper to be searched;
- Step S45 In the case that the search question paper includes a search question with a question type of oral calculation, for each search question with a question type of oral calculation, the feature vector of the search question and the target test paper The feature vectors of each question in the subject are matched with the shortest edit distance to determine the target question in the target test paper that matches the question to be searched. If the question type of the target question is oral calculation question, then the question to be searched is determined to be Corrections for oral accounts; and
- Step S46 For each verbal question to be corrected, use the calculation result corresponding to the verbal question area in the verbal question to be corrected as the answer to the verbal question to be corrected, thereby completing the verbal question to be corrected on the test paper to be reviewed. Corrections.
- the present invention also provides a device for correcting questions for oral calculation problems.
- the device includes:
- a detection and recognition module configured to detect the images of the test papers to be searched, detect the areas of each searchable question on the search papers, determine the type of each searchable question, and identify the questions in the area of each searchable question Dry text content;
- a calculation module configured to use a preset oral calculation engine to perform calculation processing on the area containing the calculation formula and / or formula in the test paper to be searched to obtain the calculation result of each area;
- the topic search module is used to obtain the feature vector of the topic to be searched according to the text content of the topic of each topic to be searched, and to search in the question bank according to the characteristic vector of the topic to be searched to find the closest to the topic to be searched Topic
- Test paper determination module which is used to summarize all the papers found closest to the search question, and compare the summarized papers with preset conditions. If there is a target paper that meets the preset conditions, it will meet the preset conditions. The test paper is determined to be a target test paper that matches the test paper to be searched;
- the oral calculation problem determination module is configured to, in a case where the search paper includes a to-be-searched question whose question type is an oral calculation question, for each to-be-searched question whose question type is an oral calculation question, the feature vector of the to-be-searched question and The feature vectors of each question in the target test paper are matched with the shortest edit distance to determine the target question in the target test paper that matches the question to be searched. If the question type of the target question is oral calculation question, then the target question is determined. Search for topics to be reviewed for correction; and
- the verbal assessment correction module is used for each verbal assessment question to be corrected, and uses the calculation result corresponding to the verbal assessment question area to be corrected as the answer to the verbal assessment question to be corrected, thereby completing the questionnaire to be searched. Correction of oral calculation subject to be corrected.
- the present invention is directed to the test paper to be searched.
- the feature vector of the search question is obtained according to the text content of each question to be searched, and then the feature vector of each search question is used to find and search from the question bank.
- the test paper matches the target test paper, and for the searched question whose question type is oral calculation, the secondary search is performed based on the feature vector of the question in the target test paper.
- the search criterion is the shortest editing distance.
- the type is also a verbal calculation question, then confirm that the search question is a verbal calculation question to be corrected, and then use a preset dictation engine to calculate the verbal calculation question to be corrected and output the calculation result as the answer of the verbal calculation question to be corrected.
- FIG. 1 is a schematic flowchart of a method for correcting a topic for an oral calculation problem according to an embodiment of the present invention
- FIG. 2 is a schematic structural diagram of a question correction device for oral calculation questions provided by an embodiment of the present invention
- FIG. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
- FIG. 4 is a schematic flowchart of a method for correcting a topic for an oral calculation problem according to another embodiment of the present invention.
- FIG. 5 is a schematic structural diagram of a question correction device for oral calculation questions provided by another embodiment of the present invention.
- embodiments of the present invention provide a method, an apparatus, an electronic device, and a computer-readable storage medium for correcting a topic for an oral calculation problem.
- the method for correcting oral calculation questions in the embodiment of the present invention can be applied to the device for correcting oral calculation questions in the embodiment of the present invention.
- the device for correcting oral calculation questions can be configured on an electronic device.
- the electronic device may be a personal computer, a mobile terminal, or the like, and the mobile terminal may be a hardware device such as a mobile phone or a tablet computer with various operating systems.
- FIG. 1 is a schematic flowchart of a method for correcting a topic for an oral calculation problem according to an embodiment of the present invention. Please refer to FIG. 1.
- a method for correcting a topic for oral calculation problems may include the following steps:
- Step S11 Detect the image of the test paper to be searched, detect each area of the search question on the search paper, determine the type of each search question, and identify the content of the text in the area of each search question.
- the image of the test paper to be searched may be an image containing the test paper to be searched.
- the image of the test paper to be searched can be detected by using a detection model, and each target area of the search question on the test paper to be searched is detected, and the detection model is a model based on a neural network.
- the detection model may be obtained, for example, by training samples in a test sample training set based on a deep convolutional neural network (Convolutional Neural Networks, CNN).
- each topic to be searched will be cut into a single image, or not actually cut.
- each topic area to be searched is divided into a single area image for processing, and it will be sorted according to the position information of the topic. .
- the classification type of each to-be-searched topic can be determined using a classification recognition model, which is a model based on a neural network.
- the classification recognition model may be obtained, for example, by training samples in a test sample training set based on a deep convolutional neural network, and the questions in each sample are labeled with a question type.
- the types of questions can be divided into operation questions, oral calculation questions, blank questions, multiple choice questions, and application questions.
- the text content of the stem in the area of the subject to be searched can also be identified using a second recognition model, which is a model based on a neural network.
- a second recognition model which is a model based on a neural network.
- the component may include a stem, an answer, and / or a picture, and then identify the text content of the stem through the second recognition model.
- the second recognition model may be established based on the hole convolution and the attention model. Specifically, the hole convolution is used to extract the features of the stem, answer, and / or annotation box corresponding to the picture, and then the extraction is performed by the attention model. The resulting features are decoded into characters.
- Step S12 Obtain a feature vector of the subject to be searched according to the text content of the subject of the subject to be searched, and perform a search in the question bank according to the feature vector of the subject to be searched to find the closest subject of the subject to be searched.
- the step S12 may further include:
- Step S121 input the text content of the stem of each topic to be searched into a pre-trained stem vectorization model to obtain the feature vector of each topic of the subject to be searched, as the feature vector of each topic to be searched, where
- the problem vectorization model is a model based on a neural network.
- the content of the text in the question to be searched is "4. Huawei walks for 3 minutes and is half of the whole journey. How many meters is his home from school? (6 points)", and enter the text content into the pre-trained questions.
- Stem vectorization model In the sent2vec model, the feature vector of the problem stem is obtained, and the feature vector can be expressed as [x0, x1, x2 ..., xn].
- the problem vectorization model may be a neural network-based model, such as a CNN model, and the problem vectorization model may be obtained by training in the following steps: labeling and processing each problem sample in a problem sample training set.
- the text content of the stem in each sample is extracted; a two-dimensional feature vector extraction is performed on the text content of the stem in each sample using a neural network model, thereby training the stem vectorized model.
- the specific training process belongs to the prior art, and is not described in detail here.
- Step S122 For each question to be searched, a search is performed in the question bank to find a feature vector matching the feature vector of the question to be searched, and the question corresponding to the matching feature vector in the question bank is determined to be the closest to the question to be searched. Close topic.
- the feature vector matching the feature vector of the question to be searched can be found in the question bank by means of a vector approximate search, specifically the feature vector that is closest to the feature vector of the question to be searched is found in the question bank.
- the similarity measure between different vectors is usually calculated by calculating the "Distance" between the vectors.
- the commonly used distance calculation methods are: Euclidean distance, Manhattan distance, and angle cosine ( Cosine) and so on.
- the calculation method adopted in the first embodiment is an included angle cosine.
- an index information table may also be established in advance for the feature vectors of each question on the test paper in the question bank.
- the index information table can store the feature vector of each question in the question bank, the specific content of the question, and the ID of the test paper where the question is located.
- step S122 may further include: for each to-be-searched topic, searching in the index information table for a feature vector matching the feature vector of the to-be-searched topic; and matching the matching feature vector in the index information table
- the corresponding question in Chinese is determined to be the closest question to the question to be searched.
- the closest question is found in the index information table, and the specific content of the closest question (including the stem and answer of the question can be obtained at this time). And / or picture), and the ID information of the paper closest to the question.
- feature vectors of different lengths may also be grouped according to length.
- the index information table may first locate a group having the same or similar length as the feature vector of the topic to be searched (here, the group of similar length refers to the length of the feature vector of the topic to be searched and the index information table (The difference in length of the feature vector is less than a specific value or a preset value), and then in the index information table, find the feature vector that is the same as or similar to the feature vector of the topic to be searched Matching feature vectors.
- the feature vectors having the same length can be divided into a group when grouping, and the feature vectors having a length within a certain range can also be divided into a group, which is not limited in the present invention. It can be seen that the feature vectors of different lengths are grouped according to the length, which can make the query in the corresponding group according to the length of the feature vector when searching for topics in the later stage, and improve the speed of topic search. It can be understood that the difference in the length of the feature vector is caused by the difference in the number of words in the stem.
- Step S13 Summarize all the found test papers that are closest to the test question, and determine the test papers that meet the preset conditions as the target test papers that match the test papers to be searched. Specifically, the aggregated test papers can be compared with a preset condition to obtain information about whether there are target test papers that meet the preset conditions, and when there are target test papers that meet the preset conditions, corresponding ones that meet the preset conditions can be obtained. Examination paper.
- determining a test paper that satisfies a preset condition as a target test paper that matches the test paper to be searched specifically may be: determining a test paper that has the highest frequency of occurrence and is larger than a first preset threshold as a target that matches the test paper to be searched for. Examination paper. In practice, because each question in the question bank has the corresponding test paper ID information and position information in the current test paper, you can determine which test paper the closest question belongs to according to the ID of the test paper that is closest to the question. The test paper ID having the largest frequency of occurrence and larger than the first preset threshold may be determined, so as to determine the test paper ID as a matching target test paper.
- the frequency of occurrence of a certain test paper can be calculated in the following way: the ratio of the number of to-be-searched questions closest to the question to the total number of to-be-searched questions in the to-be-searched paper, or the questions that match the to-be-searched paper The ratio of the number to the total number of topics to be searched in the search paper. It can be understood that if the frequency of the most frequently occurring test paper is less than the first preset threshold, it indicates that the number of the most frequently occurring test papers and the searched papers are too few. At this time, it can be considered that the There are target papers that match the papers to be searched.
- step S13 when the test paper to be searched includes a search question with a question type of oral calculation, the search question with a question type of oral calculation can be determined
- the preset calculation engine is used to calculate the question to be revised and output the calculation result of the question to be revised as the answer to the question to be revised. Describes the corrections to be performed on the test papers to be corrected.
- Step S14 In the case where the test paper to be searched includes a question to be searched with a question type of oral calculation, for each question to be searched with a question type of oral calculation, the feature vector of the searched question and each question in the target test paper The feature vector of the shortest edit distance is matched to determine the target question in the target test paper that matches the question to be searched. If the question type of the target question is a verbal question, it is determined that the queried question is a verbal question to be corrected.
- the process of matching the shortest edit distance for the searched question whose question type is oral calculation can be called the process of secondary search, and the secondary search can further confirm the oral calculation in the test paper to be searched.
- the secondary search for each to-be-searched question whose type of question is oral calculation, the shortest edit distance between the target test paper and the to-be-searched question that is the smallest and less than the second preset threshold can be used as the search for the to-be-searched question. As a result, it is the target question in the target test paper that matches the search question.
- the question type of the target question is also an oral question, then it can be confirmed that the question to be searched is indeed an oral question, thereby determining that the to-be-searched question is an oral question to be corrected.
- an algorithm for performing shortest edit distance matching on feature vectors belongs to a conventional calculation method in the art, and details are not described herein.
- These two questions use the feature vector obtained by stem vectorization to be very feature vectors.
- a secondary search is performed in the target test paper for the subject.
- the search criterion is the shortest editing distance of the text.
- oral calculation problem A Since the shortest editing distance does not calculate the weight, it is easy to find the target question corresponding to the question in the target test paper That is, oral calculation problem A. Since the type of oral calculation problem A is marked as oral calculation problem, it is determined that the problem is indeed oral calculation problem.
- the question type of the target question may be oral calculation, and the position of the target question in the target test paper is the same as the position of the question to be searched in the test paper.
- the subject to be searched is a subject to be corrected.
- the position of the search question and the target question is confirmed, that is, the position of the question identified as the oral question in the test paper to be searched is compared with the position of the target question in the target paper.
- the same position indicates that the target question is indeed the correct search result of the searched question.
- This can avoid the recognition of the searched question as another similar question in the target test paper due to the difference in vectors during recognition.
- the area where the oral question to be corrected is located in the test paper to be searched is the same as the area where the target question is located in the target paper, which indicates that the two are in the same position.
- Step S15 For each verbal question to be corrected, the preset verbal calculation engine is used to calculate the verbal question to be corrected, and the calculation result of the verbal calculation engine is output as the answer to the verbal question to be corrected. Corrections.
- the preset verbal calculation engine may include a pre-trained first recognition model, the first recognition model is a neural network-based model, and is the same as the second recognition model, and the first recognition model may be based on a hole convolution and The attention model is established. Specifically, hole convolution is used to extract the features of the corrected oral calculation problem, and then the extracted features are decoded into characters through the attention model.
- step S15 using a preset calculation engine to calculate the calculation question to be revised may include: first, identifying the numbers, letters, characters, characters, and characters in the calculation question to be revised through the pre-trained first recognition model; Type of calculation, which may include: four mixed operations, estimation, division with remainder, fraction calculation, unit conversion, vertical calculation, decentralized calculation; then, according to the identified numbers, letters, characters, characters, and calculations The calculation is performed based on the type, and the calculation result of the oral calculation question to be corrected is obtained.
- the oral calculation engine can recognize "3", “8", "5", “ ⁇ ", “8” through the first recognition model.
- the calculation type is four mixed operations, and then the calculation result is automatically calculated.
- step S15 may further include: checking whether the calculation result of the oral calculation engine is consistent with the reference answer corresponding to the oral calculation question to be corrected on the target test paper, and if they are consistent, output the The calculation result of the oral calculation engine serves as the answer to the oral calculation question to be corrected.
- the calculation result of the oral calculation engine is displayed in the area of the oral calculation question to be corrected.
- a prompt message is displayed in the area for correcting the verbal question.
- the prompt message can be: "Answer to be determined, please correct manually”.
- the present invention is directed to the test paper to be searched.
- the feature vector of the search question is obtained according to the text content of each topic of the search question, and then the feature vector of each search question is used from the question bank.
- the search criterion is the shortest editing distance.
- the target type of the target question is also a verbal calculation question.
- the topic to be searched is a verbal calculation question for correction
- a preset verbal calculation engine to calculate the verbal correction question for correction and output the calculation result as the answer to the verbal calculation question for correction. It can be seen that, for the question to be corrected, because the feature vectors obtained according to the text content of the question are less distinguishable from each other, it is more likely that the reference answer in the target test paper searched from the question bank does not match the question to be corrected. Large, so the second search to determine the verbal calculation question to be corrected and calculation through the verbal calculation engine can improve the accuracy of the verbal calculation question.
- the present invention provides a device for correcting oral calculation questions.
- the device may include:
- the detection and recognition module 21 may be configured to detect images of the test papers to be searched, detect areas of each searchable question on the search papers, determine a topic type of each searchable topic, and identify a region of each searchable topic.
- the topic search module 22 may be used to obtain the feature vector of the topic to be searched according to the text content of the topic of each topic to be searched, and perform a search in the question bank according to the characteristic vector of the topic to be searched to find the topic to be searched Closest problem
- the test paper determining module 23 may be configured to summarize all the searched-out test papers that are closest to the topic, and determine the test papers that meet the preset conditions as the target test papers that match the search-tested papers;
- the oral calculation problem determination module 24 may be configured to include the characteristics of the to-be-searched questions for each of the to-be-searched questions whose oral-to-speech questions are included in the to-be-searched test paper.
- the vector is matched with the feature vector of each question in the target test paper by the shortest edit distance to determine the target question in the target test paper that matches the question to be searched. If the type of the target question is oral calculation, then it is determined
- the subject to be searched is the subject to be corrected;
- the oral calculation problem correction module 25 can be used to calculate the oral calculation problem to be corrected using a preset oral calculation engine for each to be corrected oral calculation problem, and output the calculation result of the oral calculation engine as the answer of the oral calculation problem to be corrected. Correction of the counting question to be corrected on the test paper to be searched.
- the oral calculation question determining module 25 may also be used to calculate the type of the target question as a oral calculation, and the position of the target question in the target test paper and the target question to be searched for in the target question. When the positions in the search paper are the same, it is determined that the subject to be searched is a subject to be corrected.
- the test paper determining module 23 may be further configured to, when there is no target test paper satisfying a preset condition, when the test paper to be searched includes a search question with a question type of oral calculation question, The to-be-searched question whose type is an oral question is determined to be an oral question to be revised.
- the preset oral calculation engine is used to calculate the to-be-reviewed oral question and output the calculation result of the pending oral question as the pending Correct the answer of the verbal calculation question, and complete the correction of the verbal calculation question to be corrected on the test paper to be searched.
- the oral calculation question correction module 25 may also be used to check whether the calculation result of the oral calculation engine is consistent with the reference answer corresponding to the oral calculation question to be corrected on the target test paper. If they are consistent, the oral calculation is output. The calculation result of the engine serves as the answer to the verbal calculation question to be corrected.
- the oral calculation question correction module 25 may be further used when the calculation result of the oral calculation engine is inconsistent with the reference answer of the oral calculation question to be corrected on the target test paper, and output is used to indicate the oral calculation to be corrected.
- the prompt information that the reference answer of the question is inconsistent to remind the examiner of the test paper to pay attention to the question to be corrected.
- the preset verbal calculation engine may include a pre-trained first recognition model, and the first recognition model is a model based on a neural network;
- the oral calculation question correcting module 25 may be specifically configured to identify the numbers, letters, characters, characters, and calculation types in the oral calculation question to be corrected through the pre-trained first recognition model.
- the calculation types include: four mixed Calculation, estimation, division with remainder, fractional calculation, unit conversion, vertical calculation, and detached calculation; calculations are performed based on the identified numbers, letters, characters, characters, and calculation types to obtain the calculation result of the oral question to be corrected.
- the topic search module 22 may include:
- a feature vector obtaining unit may be used to input the text content of the stem of each topic to be searched into a pre-trained stem vectorization model to obtain the feature vector of the stem of each topic to be searched as each topic to be searched Feature vector, wherein the problem vectorization model is a neural network-based model;
- a question finding unit may be used to search the question bank for each question to be searched, find a feature vector matching the feature vector of the question to be searched, and determine the question corresponding to the matching feature vector in the question bank as the The closest subject to search.
- the problem vectorization model can be obtained by training in the following steps:
- a neural network model is used to extract two-dimensional feature vectors of the text content of the stem in each question sample, thereby training to obtain the stem vectorized model.
- the device may further include:
- the pre-processing module can be used to build an index information table for the feature vectors of each question on the test paper in the question bank in advance;
- the topic search unit may be specifically configured to find a feature vector matching the feature vector of the to-be-searched topic in the index information table for each to-be-searched topic; and place the matched feature vector in the index information.
- the corresponding question in the table is determined to be the closest question to the question to be searched.
- the preprocessing module may be further configured to group feature vectors of different lengths according to lengths before establishing the index information table;
- the topic search unit may be specifically configured to find, for each topic to be searched, in a group having the same or similar length as the feature vector of the topic to be searched in the index information table, to find a feature vector similar to the feature vector of the topic to be searched Matching feature vector.
- test paper determining module 23 may be specifically configured to determine a test paper with the highest frequency of occurrence and greater than a first preset threshold as a target test paper that matches the test paper to be searched.
- the detection and identification module 21 may be specifically configured to detect the image of the test paper to be searched by using a pre-trained detection model, and detect an area of each search question on the test paper, where
- the detection model is a model based on a neural network.
- the detection and recognition module 21 may be specifically configured to use a pre-trained second recognition model to identify the content of the stem text in each region of the search question, where the second recognition model is based on a neural network Model.
- Embodiment 1 of the present invention further provides an electronic device.
- the electronic device includes a processor 301, a communication interface 302, a memory 303, and a communication bus 304.
- the processor 301, the communication interface 302, and the memory 303 pass through the communication bus.
- 304 completes mutual communication
- a memory 303 configured to store a computer program
- the processor 301 is configured to execute the following steps when executing a program stored in the memory 303:
- Step S11 Detect the images of the test papers to be searched, detect the areas of each searchable question on the searchable papers, determine the type of each of the searchable questions, and identify the dry text in the area of each searchable question content;
- Step S12 Obtain a feature vector of the searched question according to the text content of each question to be searched, and perform a search in the question bank according to the feature vector of the searched question to find the closest question to the searched question;
- Step S13 Summarize all the papers found closest to the searched questions, and determine the papers that meet the preset conditions as the target papers that match the papers to be searched;
- Step S14 In the case that the search question paper includes a search question with a question type of oral calculation, for each search question with a question type of oral calculation, the feature vector of the search question and the target test paper The feature vectors of each question in the subject are matched with the shortest edit distance to determine the target question in the target test paper that matches the question to be searched. If the question type of the target question is oral calculation question, then the question to be searched is determined to be Correct the oral calculation questions;
- Step S15 For each verbal question to be corrected, a preset verbal calculation engine is used to calculate the verbal question to be corrected, and the calculation result of the verbal engine is output as the answer to the verbal question to be corrected, and the test paper to be completed is completed. The correction of the verbal calculation subject to be corrected.
- the communication bus mentioned in the above electronic device may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc.
- PCI Peripheral Component Interconnect
- EISA Extended Industry Standard Architecture
- the communication bus can be divided into an address bus, a data bus, a control bus, and the like.
- the figure only uses a thick line to represent, but it does not mean that there is only one bus or one type of bus.
- the communication interface is used for communication between the aforementioned electronic device and other devices.
- the memory may include random access memory (Random Access Memory, RAM), and may also include non-volatile memory (Non-Volatile Memory, NVM), such as at least one disk memory.
- NVM non-Volatile Memory
- the memory may also be at least one storage device located far from the foregoing processor.
- the aforementioned processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc .; it may also be a digital signal processor (Digital Signal Processing, DSP), special integration Circuit (Application Specific Integrated Circuit, ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
- CPU central processing unit
- NP network processor
- DSP Digital Signal Processing
- ASIC Application Specific Integrated Circuit
- FPGA Field-Programmable Gate Array
- the first embodiment of the present invention also provides a computer-readable storage medium.
- a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method for correcting a topic for oral calculations are implemented.
- FIG. 4 is a schematic flowchart of a method for correcting a topic for an oral calculation problem according to another embodiment of the present invention. Please refer to FIG. 4.
- a method for correcting a topic for oral calculation can include the following steps:
- Step S41 Detect the images of the test papers to be searched, detect the areas of each searchable question on the searchable papers, determine the type of each searchable question, and identify the stemmed text in the area of each searchable question content.
- the image of the test paper to be searched may be an image containing the test paper to be searched.
- the image of the test paper to be searched can be detected by using a detection model, and the regions of each search question on the test paper to be searched are detected, and the detection model is a model based on a neural network.
- the detection model may be obtained, for example, by training samples in a test sample training set based on a deep convolutional neural network (Convolutional Neural Networks, CNN).
- each topic to be searched will be cut into a single image, or not actually cut.
- each topic area to be searched is divided into a single area image for processing, and it will be sorted according to the position information of the topic. .
- the classification type of each to-be-searched topic can be determined using a classification recognition model, which is a model based on a neural network.
- the classification recognition model may be obtained, for example, by training samples in a test sample training set based on a deep convolutional neural network, and the questions in each sample are labeled with a question type.
- the types of questions can be divided into operation questions, oral calculation questions, blank questions, multiple choice questions, and application questions.
- the text content of the stem in the area of the subject to be searched can also be identified using a second recognition model, which is a model based on a neural network.
- a second recognition model which is a model based on a neural network.
- the component may include a stem, an answer, and / or a picture, and then identify the text content of the stem through the second recognition model.
- the second recognition model may be established based on the hole convolution and the attention model. Specifically, the hole convolution is used to extract the features of the stem, answer, and / or annotation box corresponding to the picture, and then the extraction is performed by the attention model. The resulting features are decoded into characters.
- Step S42 Use a preset verbal calculation engine to perform calculation processing on the area containing the calculation formula and / or formula in the search test paper to obtain the calculation result of each area.
- the preset verbal calculation engine may include a pre-trained first recognition model, the first recognition model is a neural network-based model, and is the same as the second recognition model, and the first recognition model may be based on a hole convolution and The attention model is established. Specifically, hole convolution is used to extract the features of the corrected oral calculation problem, and then the extracted features are decoded into characters through the attention model.
- Step S43 Obtain the feature vector of the subject to be searched according to the text content of the subject of the subject to be searched, and perform a search in the question bank according to the feature vector of the subject to be searched to find the closest subject of the subject to be searched.
- the step S43 may further include:
- Step S431 inputting the text content of the stem of each topic to be searched into a pre-trained stem vectorization model to obtain the feature vector of each topic of the subject to be searched as the feature vector of each topic to be searched, where
- the problem vectorization model is a model based on a neural network.
- the content of the text in the question to be searched is "4. Huawei walks for 3 minutes and is half of the whole journey. How many meters is his home from school? (6 points)", and enter the text content into the pre-trained questions.
- Stem vectorization model In the sent2vec model, the feature vector of the problem stem is obtained, and the feature vector can be expressed as [x0, x1, x2 ..., xn].
- the problem vectorization model may be a neural network-based model, such as a CNN model, and the problem vectorization model may be obtained by training in the following steps: labeling and processing each problem sample in a problem sample training set.
- the text content of the stem in each sample is extracted; a two-dimensional feature vector extraction is performed on the text content of the stem in each sample using a neural network model, thereby training the stem vectorized model.
- the specific training process belongs to the prior art, and is not described in detail here.
- step S432 for each question to be searched, a search is performed in the question bank to find a feature vector matching the feature vector of the question to be searched, and the question corresponding to the matching feature vector in the question bank is determined to be the most relevant to the question to be searched. Close topic.
- the feature vector matching the feature vector of the question to be searched can be found in the question bank by means of a vector approximate search, specifically the feature vector that is closest to the feature vector of the question to be searched is found in the question bank.
- the similarity measure between different vectors is usually calculated by calculating the "Distance" between the vectors.
- the commonly used distance calculation methods are: Euclidean distance, Manhattan distance, and angle cosine ( Cosine) and so on.
- the calculation method adopted in the second embodiment is the included angle cosine.
- an index information table may also be established in advance for the feature vectors of each question on the test paper in the question bank.
- the index information table can store the feature vector of each question in the question bank, the specific content of the question, and the ID of the test paper where the question is located.
- step S432 may further include: for each to-be-searched topic, searching in the index information table for a feature vector matching the feature vector of the to-be-searched topic; and matching the matching feature vector in the index information table
- the corresponding question in Chinese is determined to be the closest question to the question to be searched.
- the closest question is found in the index information table, and the specific content of the closest question (including the stem and answer of the question can be obtained at this time). And / or picture), and the ID information of the paper closest to the question.
- feature vectors of different lengths may also be grouped according to length.
- the index information table may first locate a group having the same or similar length as the feature vector of the topic to be searched (here, the group of similar length refers to the length of the feature vector of the topic to be searched and the index information table (The difference in length of the feature vector is less than a specific value or a preset value), and then in the index information table, find the feature vector that is the same as or similar to the feature vector of the topic to be searched Matching feature vectors.
- the feature vectors having the same length can be divided into a group when grouping, and the feature vectors having a length within a certain range can also be divided into a group, which is not limited in the present invention. It can be seen that the feature vectors of different lengths are grouped according to the length, which can make the query in the corresponding group according to the length of the feature vector when searching for topics in the later stage, and improve the speed of topic search. It can be understood that the difference in the length of the feature vector is caused by the difference in the number of words in the stem.
- Step S44 Summarize all the papers that are closest to the searched items, and determine the papers that meet the preset conditions as the target papers that match the papers to be searched. Specifically, the aggregated test papers can be compared with a preset condition to obtain information about whether there are target test papers that meet the preset conditions, and when there are target test papers that meet the preset conditions, corresponding ones that meet the preset conditions can be obtained. Examination paper.
- determining a test paper that satisfies a preset condition as a target test paper that matches the test paper to be searched specifically may be: determining a test paper that has the highest frequency of occurrence and is larger than a first preset threshold as a target that matches the test paper to be searched for. Examination paper. In practice, because each question in the question bank has the corresponding test paper ID information and position information in the current test paper, you can determine which test paper the closest question belongs to according to the ID of the test paper that is closest to the question. The test paper ID having the largest frequency of occurrence and larger than the first preset threshold may be determined, so as to determine the test paper ID as a matching target test paper.
- the frequency of occurrence of a certain test paper can be calculated in the following way: the ratio of the number of to-be-searched questions closest to the question to the total number of to-be-searched questions in the to-be-searched paper, or the questions that match the to-be-searched paper The ratio of the number to the total number of topics to be searched in the search paper. It can be understood that if the frequency of the most frequently occurring test paper is less than the first preset threshold, it indicates that the number of the most frequently occurring test papers and the searched papers are too few. At this time, it can be considered that the There are target papers that match the papers to be searched.
- step S44 when the test paper to be searched includes a search question with a question type of oral calculation, the search question with a question type of oral calculation can be determined
- the preset calculation engine is used to calculate the question to be revised and output the calculation result of the question to be revised as the answer to the question to be revised. Describes the corrections to be performed on the test papers to be corrected.
- Step S45 In the case where the test paper to be searched contains a question to be searched with a question type of oral calculation, for each question to be searched with a question type of oral calculation, the feature vector of the searched question and each question in the target test paper The feature vector of the shortest edit distance is matched to determine the target question in the target test paper that matches the question to be searched. If the question type of the target question is a verbal question, it is determined that the queried question is a verbal question to be corrected.
- the process of matching the shortest edit distance for the searched question whose question type is oral calculation can be called the process of secondary search, and the secondary search can further confirm the oral calculation in the test paper to be searched.
- the secondary search for each to-be-searched question whose type of question is oral calculation, the shortest edit distance between the target test paper and the to-be-searched question that is the smallest and less than the second preset threshold can be used as the search for the to-be-searched question. As a result, it is the target question in the target test paper that matches the search question.
- the question type of the target question is also an oral question, then it can be confirmed that the question to be searched is indeed an oral question, thereby determining that the to-be-searched question is an oral question to be corrected.
- an algorithm for performing shortest edit distance matching on feature vectors belongs to a conventional calculation method in the art, and details are not described herein.
- These two questions use the feature vector obtained by stem vectorization to be very feature vectors.
- a secondary search is performed in the target test paper for the subject.
- the search criterion is the shortest editing distance of the text.
- oral calculation problem A Since the type of oral calculation problem A is marked as oral calculation problem, it is determined that the problem is indeed oral calculation problem.
- the question type of the target question may be oral calculation, and the position of the target question in the target test paper is the same as the position of the question to be searched in the test paper.
- the subject to be searched is a subject to be corrected.
- the position of the search question and the target question is confirmed, that is, the position of the question identified as the oral question in the test paper to be searched is compared with the position of the target question in the target paper.
- the same position indicates that the target question is indeed the correct search result of the searched question.
- This can avoid the recognition of the searched question as another similar question in the target test paper due to the difference in vectors during recognition.
- the area where the verbal question to be corrected is located in the paper to be searched is the same as the area where the target question is located in the target paper, which means that the two are in the same position.
- Step S46 For each calculation question to be corrected, the calculation result corresponding to the calculation question area to be corrected is used as the answer to the calculation question to be corrected, and the calculation result is to be calculated outside the calculation question area outside all the calculation questions. Discard and complete the correction of the pending calculation questions on the search paper.
- step S42 the calculation engine will return the calculation results of many areas.
- step S46 for each calculation question to be corrected, it will find from the calculation results of many areas that the area sufficiently overlaps with the area of the calculation question to be corrected. The result of calculation is the answer to the question to be corrected.
- step S46 may further include: checking whether the calculation result of the oral calculation engine is consistent with the reference answer corresponding to the oral calculation question to be corrected on the target test paper, and if they are consistent, output the The calculation result of the oral calculation engine serves as the answer to the oral calculation question to be corrected.
- the calculation result of the oral calculation engine is displayed in the area of the oral calculation question to be corrected.
- a prompt message is displayed in the area of the question.
- the prompt message can be: "Answer to be determined, please correct it manually”.
- the present invention is directed to the test papers to be searched, and the oral calculation engine is used to process the test papers to be searched.
- the feature vectors of the topics to be searched are obtained according to the text content of each topic to be searched.
- the feature vector finds the target test paper from the question library that matches the test paper to be searched.
- the secondary search is performed based on the feature vector of the question in the target test paper.
- the search criteria is the shortest edit distance.
- the matching question type of the target question is also an oral question
- confirm that the question to be searched is the oral question to be corrected
- use the calculation result corresponding to the oral engine in the area of the oral question to be corrected as the answer of the oral question to be revised and use the oral engine
- the calculation results outside the area of all the accounts to be corrected are discarded. It can be seen that, for the question to be corrected, because the feature vectors obtained according to the text content of the question are less distinguishable from each other, it is more likely that the reference answer in the target test paper searched from the question bank does not match the question to be corrected. Large, so the second search to determine the verbal calculation question to be corrected and using the calculation engine corresponding to the verbal calculation question area in the area to be corrected as the answer can improve the accuracy of the verbal calculation question.
- the present invention provides a device for correcting oral calculation questions.
- the device may include:
- the detection and recognition module 51 may be configured to detect images of the test papers to be searched, detect the areas of the searchable topics on the searched papers, determine the type of the searchable topics, and identify the areas of the searchable topics.
- the calculation module 52 may be configured to use a preset oral calculation engine to perform calculation processing on the area containing the formula and / or formula in the test paper to be searched to obtain the calculation result of each area;
- the question finding module 53 may be configured to obtain a feature vector of the question to be searched according to the text content of each question to be searched, and perform a search in the question bank according to the feature vector of the question to be searched to find the question to be searched Closest problem
- the test paper determination module 54 may be configured to summarize all the searched-out test papers that are closest to the topic, and determine the test papers that meet the preset conditions as the target test papers that match the searched-for papers;
- the oral calculation problem determining module 55 may be configured to: in a case where the to-be-searched test paper includes a to-be-searched question with a question type of the oral calculation question, for each to-be-searched question with the question type of the oral calculation question, the characteristics of the to-be-searched question The vector is matched with the feature vector of each question in the target test paper by the shortest edit distance to determine the target question in the target test paper that matches the question to be searched. If the type of the target question is oral calculation, then it is determined The subject to be searched is the subject to be corrected;
- the oral calculation problem correction module 56 may be used for each oral calculation problem to be corrected, and use the calculation result corresponding to the oral calculation engine in the area to be corrected as the answer of the oral calculation problem to be corrected, and the oral calculation engine is All calculation results outside the area of the oral question to be corrected are discarded, and the correction of the oral question to be corrected on the test paper to be corrected is completed.
- the oral calculation question determining module 55 may also be used to calculate the type of the target question as a oral calculation, and the position of the target question in the target test paper and the target question to be searched for in the target question. When the positions in the search paper are the same, it is determined that the subject to be searched is a subject to be corrected.
- the test paper determination module 54 may also be used in a case where there is no target test paper that satisfies a preset condition, and when the test paper to be searched includes a search question with a question type of oral calculation, the question type The question to be searched for the oral calculation question is determined as the oral calculation question to be corrected. For each oral calculation question to be corrected, the calculation result corresponding to the oral calculation engine in the area of the oral calculation question to be corrected is used as the answer to the oral calculation question to be corrected. The calculation result of the oral calculation engine outside all areas of the oral calculation question to be corrected is discarded, and the correction of the oral calculation question to be corrected on the to-be-searched test paper is completed.
- the oral calculation question correction module 56 may also be used to check whether the calculation result of the oral calculation engine is consistent with the reference answer corresponding to the oral calculation question to be corrected on the target test paper. If they are consistent, the oral calculation is output. The calculation result of the engine serves as the answer to the verbal calculation question to be corrected.
- the oral calculation question correction module 56 may be further used when the calculation result of the oral calculation engine is inconsistent with the reference answer of the oral calculation question to be corrected on the target test paper, and the output is used to indicate that the oral calculation question is to be corrected Prompt information that the reference answers of the oral calculation questions are inconsistent, so as to remind the examiners of the test papers to pay attention to the oral calculation questions to be corrected.
- the preset verbal calculation engine may include a pre-trained first recognition model, and the first recognition model is a neural network-based model;
- the calculation module 52 may be specifically configured to identify the numbers, letters, characters, characters, and calculation types in the area containing the calculation and / or formula in the test paper to be searched by using the pre-trained first recognition model.
- the calculation types include: four mixed operations, estimation, division with remainder, fraction calculation, unit conversion, vertical calculation, and free calculation; calculations are performed according to the identified numbers, letters, characters, characters, and calculation types to obtain each area. Calculation results.
- the topic search module 53 may include:
- a feature vector obtaining unit may be used to input the text content of the stem of each topic to be searched into a pre-trained stem vectorization model to obtain the feature vector of the stem of each topic to be searched as each topic to be searched Feature vector, wherein the problem vectorization model is a neural network-based model;
- a question finding unit may be used to search the question bank for each question to be searched, find a feature vector matching the feature vector of the question to be searched, and determine the question corresponding to the matching feature vector in the question bank as the The closest subject to search.
- the problem vectorization model can be obtained by training in the following steps:
- a neural network model is used to extract two-dimensional feature vectors of the text content of the stem in each question sample, thereby training to obtain the stem vectorized model.
- the device may further include:
- the pre-processing module can be used to build an index information table for the feature vectors of each question on the test paper in the question bank in advance;
- the topic search unit may be specifically configured to find a feature vector matching the feature vector of the to-be-searched topic in the index information table for each to-be-searched topic; and place the matched feature vector in the index information.
- the corresponding question in the table is determined to be the closest question to the question to be searched.
- the preprocessing module may be further configured to group feature vectors of different lengths according to lengths before establishing the index information table;
- the topic search unit may be specifically configured to find, for each topic to be searched, in a group having the same or similar length as the feature vector of the topic to be searched in the index information table to find a feature vector similar to the feature vector of the topic to be searched Matching feature vector.
- test paper determination module 54 may be specifically configured to determine a test paper with the highest frequency of occurrence and greater than a first preset threshold as a target test paper that matches the test paper to be searched.
- the detection and identification module 51 may be specifically configured to detect the image of the test paper to be searched by using a pre-trained detection model, and detect an area of each search question on the test paper, where
- the detection model is a model based on a neural network.
- the detection and recognition module 51 may be specifically configured to use a pre-trained second recognition model to identify the text content of the stem in the area of each search question, where the second recognition model is based on a neural network Model.
- Embodiment 2 of the present invention also provides an electronic device, which can be referred to FIG. 3 correspondingly, and includes a processor 301, a communication interface 302, a memory 303, and a communication bus 304.
- the processor 301, the communication interface 302, and the memory 303 pass through the communication bus.
- 304 completes mutual communication
- a memory 303 configured to store a computer program
- the processor 301 is configured to execute the following steps when executing a program stored in the memory 303:
- Step S41 Detect the images of the test papers to be searched, detect the areas of each searchable question on the searchable papers, determine the type of each searchable question, and identify the stemmed text in the area of each searchable question content;
- Step S42 using a preset verbal calculation engine to perform calculation processing on the area containing the calculation formula and / or formula in the test paper to be searched to obtain the calculation result of each area;
- Step S43 obtaining the feature vector of the subject to be searched according to the text content of the subject of each subject to be searched, and searching in the question bank according to the feature vector of the subject to be searched to find the closest subject of the subject to be searched;
- Step S44 Summarize all the papers found closest to the searched questions, and determine the papers that meet the preset conditions as the target papers that match the papers to be searched;
- Step S45 In the case that the search question paper includes a search question with a question type of oral calculation, for each search question with a question type of oral calculation, the feature vector of the search question and the target test paper The feature vectors of each question in the subject are matched with the shortest edit distance to determine the target question in the target test paper that matches the question to be searched. If the question type of the target question is oral calculation question, then the question to be searched is determined to be Correct the oral calculation questions;
- Step S46 For each verbal calculation question to be corrected, use the calculation result corresponding to the verbal calculation engine in the area to be corrected, as the answer to the verbal calculation question to be modified, and place the verbal engine in all the verbal calculation question areas to be corrected. The other calculation results are discarded, and the correction of the calculation question to be corrected on the test paper to be corrected is completed.
- the communication bus mentioned in the above electronic device may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc.
- PCI Peripheral Component Interconnect
- EISA Extended Industry Standard Architecture
- the communication bus can be divided into an address bus, a data bus, a control bus, and the like.
- the figure only uses a thick line to represent, but it does not mean that there is only one bus or one type of bus.
- the communication interface is used for communication between the aforementioned electronic device and other devices.
- the memory may include random access memory (Random Access Memory, RAM), and may also include non-volatile memory (Non-Volatile Memory, NVM), such as at least one disk memory.
- NVM non-Volatile Memory
- the memory may also be at least one storage device located far from the foregoing processor.
- the aforementioned processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc .; it may also be a digital signal processor (Digital Signal Processing, DSP), special integration Circuit (Application Specific Integrated Circuit, ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
- CPU central processing unit
- NP network processor
- DSP Digital Signal Processing
- ASIC Application Specific Integrated Circuit
- FPGA Field-Programmable Gate Array
- the second embodiment of the present invention also provides a computer-readable storage medium.
- a computer program is stored in the computer-readable storage medium.
- the computer program is executed by a processor, the steps of the method for correcting an oral question are described.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Artificial Intelligence (AREA)
- Multimedia (AREA)
- Evolutionary Computation (AREA)
- General Engineering & Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Computational Linguistics (AREA)
- Software Systems (AREA)
- Computing Systems (AREA)
- Life Sciences & Earth Sciences (AREA)
- Business, Economics & Management (AREA)
- Mathematical Physics (AREA)
- Biophysics (AREA)
- Molecular Biology (AREA)
- Biomedical Technology (AREA)
- Educational Technology (AREA)
- Educational Administration (AREA)
- Databases & Information Systems (AREA)
- Medical Informatics (AREA)
- Entrepreneurship & Innovation (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Evolutionary Biology (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Image Analysis (AREA)
Abstract
一种针对口算题的题目批改方法及装置,根据各个待搜索题目的题干的文字内容获得待搜索题目的特征向量,然后利用各个待搜索题目的特征向量从题库中查找与待搜索试卷相匹配的目标试卷,对于题目类型为口算题的待搜索题目,在目标试卷内部基于题目的特征向量进行二次查找,查找的标准为最短编辑距离最小,若匹配到的目标题目的题目类型也是口算题,则确认待搜索题目为待批改口算题目,同时,利用预设的口算引擎对待批改口算题目进行计算并输出计算结果作为待批改口算题目的答案。
Description
本发明涉及人工智能技术领域,尤其涉及一种针对口算题的题目批改方法、装置、电子设备和计算机可读存储介质。
随着计算机技术和教育信息化的不断推进,计算机技术已经逐步应用于日常教育教学的各项活动中,例如在教学评测场景下得到了相应的应用。国内现有的基础教育、学生学习状况的主要考察形式仍是各种类型的考试或测试,在此状况下,教师背负着很大的批改试卷的工作压力。
目前,智能终端类产品有许多解决批改作业和试卷的搜题APP,将包含待批改试卷的影像输入搜题APP,以便搜题APP根据试卷的影像内容从题库中搜索到与试卷的影像中的各个题目相对应的题目。
现有的题目搜索方法,可以根据题目的题干的文字内容生成题目的特征向量,根据该特征向量从题库中进行搜索。在生成特征向量时,不同的文字(token)基于词频所产生的权重不同,在题干的文字内容中出现越频繁表明该文字(token)越不重要(如“的”字在题干中出现次数很多,则认定“的”字不重要),则将该文字(token)的权重设置的越低。
然而,对于口算题而言,口算题的题干的文字内容大多为数字和计算符号,而数字和计算符号的词频相对较高,即口算题的题干的文字内容中缺乏具有区分度的高权重的文字(token),这会导致不同的口算题所对应的特征向量彼此之间的区分度较小,一旦识别引擎出现微小的识别错误,就会导致口算题匹配到另一个不同的口算题,进而导致口算题目的批改出错。可见,针对口算题的题目批改容易出现错误,准确度不高。
发明内容
本发明的目的在于提供一种针对口算题的题目批改方法、装置、电子设备和计算机可读存储介质,以解决现有的题目批改方式针对口算题进行批改 容易出错,准确度不高的问题。
为解决上述技术问题,本发明提供了一种针对口算题的题目批改方法,所述方法包括:
步骤S11:对待搜索试卷的影像进行检测,检测出所述待搜索试卷上的各个待搜索题目的区域,确定各个待搜索题目的题目类型,并识别出各个待搜索题目的区域中题干的文字内容;
步骤S12:根据每一待搜索题目的题干的文字内容,获得该待搜索题目的特征向量,并根据该待搜索题目的特征向量在题库中进行搜索,查找该待搜索题目最接近的题目;
步骤S13:汇总查找到的所有待搜索题目的最接近题目所在的试卷,并将汇总的试卷与预设条件比较,若存在满足预设条件的目标试卷,则将满足预设条件的试卷确定为与所述待搜索试卷匹配的目标试卷;
步骤S14:在所述待搜索试卷中包含题目类型为口算题的待搜索题目的情况下,针对每一题目类型为口算题的待搜索题目,将该待搜索题目的特征向量与所述目标试卷中的各个题目的特征向量进行最短编辑距离匹配,确定所述目标试卷中与该待搜索题目相匹配的目标题目,若所述目标题目的题目类型为口算题,则确定该待搜索题目为待批改口算题目;以及
步骤S15:针对每一待批改口算题目,利用预设的口算引擎对该待批改口算题目进行计算,输出所述口算引擎的计算结果作为该待批改口算题目的答案,从而完成对所述待搜索试卷上待批改口算题目的批改。
可选的,在步骤S14中,在所述目标题目的题目类型为口算题,且所述目标题目在所述目标试卷中的位置与该待搜索题目在所述待搜索试卷中的位置相同的情况下,确定该待搜索题目为待批改口算题目。
可选的,在步骤S13中,若不存在满足预设条件的目标试卷,并且在所述待搜索试卷中包含题目类型为口算题的待搜索题目时,则将题目类型为口算题的待搜索题目确定为待批改口算题目,并执行步骤S15。
可选的,步骤S15还包括:检验所述口算引擎的计算结果与该待批改口算题目在所述目标试卷上对应的参考答案是否一致,如果一致则输出所述口 算引擎的计算结果作为该待批改口算题目的答案。
可选的,当所述口算引擎的计算结果与该待批改口算题目在所述目标试卷上的参考答案不一致时,输出用于表示与该待批改口算题目的参考答案不一致的提示信息。
可选的,所述预设的口算引擎包括预先训练的第一识别模型,所述第一识别模型是基于神经网络的模型;
步骤S15中利用预设的口算引擎对该待批改口算题目进行计算,包括:
通过所述预先训练的第一识别模型识别出该待批改口算题目中的数字、字母、文字、字符以及计算类型,所述计算类型包括:四则混合运算、估算、带余数除法、分数计算、单位换算、竖式计算和脱式计算中的一种;以及
根据所识别出的数字、字母、文字、字符以及计算类型进行计算,得到该待批改口算题目的计算结果。
可选的,所述步骤S12包括:
步骤S121,将每一待搜索题目的题干的文字内容输入预先训练的题干向量化模型中,得到每一待搜索题目的题干的特征向量,作为每一待搜索题目的特征向量,其中,所述题干向量化模型是基于神经网络的模型;以及
步骤S122,针对每一待搜索题目,在题库中进行搜索,查找与该待搜索题目的特征向量相匹配的特征向量,将题库中相匹配的特征向量对应的题目确定为与该待搜索题目最接近的题目。
可选的,所述题干向量化模型通过以下步骤训练得到:
对一题目样本训练集中每个题目样本进行标注处理,标注出每个题目样本中题干的文字内容;以及
利用神经网络模型对每个题目样本中题干的文字内容进行二维特征向量提取,从而训练得到所述题干向量化模型。
可选的,在执行所述步骤S12之前,所述针对口算题的题目批改方法还包括:对题库中试卷上的各个题目的特征向量建立索引信息表;
步骤S122包括:
针对每一待搜索题目,在所述索引信息表中查找与该待搜索题目的特征 向量相匹配的特征向量;以及
将相匹配的特征向量在所述索引信息表中对应的题目确定为与该待搜索题目最接近的题目。
可选的,在建立所述索引信息表之前,所述针对口算题的题目批改方法还包括:将不同长度的特征向量按照长度进行分组;
所述针对每一待搜索题目,在所述索引信息表中查找与该待搜索题目的特征向量相匹配的特征向量,包括:
针对每一待搜索题目,在所述索引信息表中与该待搜索题目的特征向量长度相同或相近的分组内,查找与该待搜索题目的特征向量相匹配的特征向量。
可选的,步骤S13中,将满足预设条件的试卷确定为与所述待搜索试卷匹配的目标试卷,包括:
将出现频率最大且大于第一预设阈值的试卷确定为与所述待搜索试卷匹配的目标试卷。
可选的,步骤S11中,对待搜索试卷的影像进行检测,检测出所述待搜索试卷上的各个待搜索题目的区域,包括:
利用预先训练好的检测模型对所述待搜索试卷的影像进行检测,检测出所述待搜索试卷上的各个待搜索题目的区域,其中,所述检测模型是基于神经网络的模型。
可选的,步骤S11中,识别出各个待搜索题目的区域中题干的文字内容,包括:
利用预先训练好的第二识别模型识别各个待搜索题目的区域中题干的文字内容,其中,所述第二识别模型是基于神经网络的模型。
可选的,在执行步骤S11之后,执行步骤S12之前,所述针对口算题的题目批改方法还包括:
利用预设的口算引擎对所述待搜索试卷中包含算式和/或公式的区域进行计算处理,得到各个区域的计算结果;
其中,在步骤S15中,针对每一待批改口算题目,将所述口算引擎在该 待批改口算题目区域对应的计算结果,作为该待批改口算题目的答案,从而完成对所述待搜索试卷上待批改口算题目的批改。
为达到上述目的,本发明还提供了一种针对口算题的题目批改装置,所述装置包括:
检测识别模块,用于对待搜索试卷的影像进行检测,检测出所述待搜索试卷上的各个待搜索题目的区域,确定各个待搜索题目的题目类型,并识别出各个待搜索题目的区域中题干的文字内容;
题目查找模块,用于根据每一待搜索题目的题干的文字内容,获得该待搜索题目的特征向量,并根据该待搜索题目的特征向量在题库中进行搜索,查找该待搜索题目最接近的题目;
试卷确定模块,用于汇总查找到的所有待搜索题目的最接近题目所在的试卷,并将汇总的试卷与预设条件比较,若存在满足预设条件的目标试卷,则将满足预设条件的试卷确定为与所述待搜索试卷匹配的目标试卷;
口算题确定模块,用于在所述待搜索试卷中包含题目类型为口算题的待搜索题目的情况下,针对每一题目类型为口算题的待搜索题目,将该待搜索题目的特征向量与所述目标试卷中的各个题目的特征向量进行最短编辑距离匹配,确定所述目标试卷中与该待搜索题目相匹配的目标题目,若所述目标题目的题目类型为口算题,则确定该待搜索题目为待批改口算题目;以及
口算题批改模块,用于针对每一待批改口算题目,利用预设的口算引擎对该待批改口算题目进行计算,输出所述口算引擎的计算结果作为该待批改口算题目的答案,从而完成对所述待搜索试卷上待批改口算题目的批改。
可选的,所述口算题确定模块,还用于在所述目标题目的题目类型为口算题,且所述目标题目在所述目标试卷中的位置与该待搜索题目在所述待搜索试卷中的位置相同的情况下,确定该待搜索题目为待批改口算题目。
可选的,所述试卷确定模块,还用于在不存在满足预设条件的目标试卷,并且在所述待搜索试卷中包含题目类型为口算题的待搜索题目时,将题目类型为口算题的待搜索题目确定为待批改口算题目。
可选的,所述口算题批改模块,还用于检验所述口算引擎的计算结果与 该待批改口算题目在所述目标试卷上对应的参考答案是否一致,如果一致则输出所述口算引擎的计算结果作为该待批改口算题目的答案。
可选的,所述口算题批改模块,还用于当所述口算引擎的计算结果与该待批改口算题目在所述目标试卷上的参考答案不一致时,输出用于表示与该待批改口算题目的参考答案不一致的提示信息。
可选的,所述预设的口算引擎包括预先训练的第一识别模型,所述第一识别模型是基于神经网络的模型;
所述口算题批改模块,用于通过所述预先训练的第一识别模型识别出该待批改口算题目中的数字、字母、文字、字符以及计算类型,所述计算类型包括:四则混合运算、估算、带余数除法、分数计算、单位换算、竖式计算和脱式计算中的一种;根据所识别出的数字、字母、文字、字符以及计算类型进行计算,得到该待批改口算题目的计算结果。
可选的,所述题目查找模块,包括:
特征向量获得单元,用于将每一待搜索题目的题干的文字内容输入预先训练的题干向量化模型中,得到每一待搜索题目的题干的特征向量,作为每一待搜索题目的特征向量,其中,所述题干向量化模型是基于神经网络的模型;
题目查找单元,用于针对每一待搜索题目,在题库中进行搜索,查找与该待搜索题目的特征向量相匹配的特征向量,将题库中相匹配的特征向量对应的题目确定为与该待搜索题目最接近的题目。
可选的,所述题干向量化模型通过以下步骤训练得到:
对一题目样本训练集中每个题目样本进行标注处理,标注出每个题目样本中题干的文字内容;
利用神经网络模型对每个题目样本中题干的文字内容进行二维特征向量提取,从而训练得到所述题干向量化模型。
可选的,所述装置还包括:
预处理模块,用于预先对题库中试卷上的各个题目的特征向量建立索引信息表;
所述题目查找单元,具体用于针对每一待搜索题目,在所述索引信息表中查找与该待搜索题目的特征向量相匹配的特征向量;将相匹配的特征向量在所述索引信息表中对应的题目确定为与该待搜索题目最接近的题目。
可选的,所述预处理模块,还用于在建立所述索引信息表之前,将不同长度的特征向量按照长度进行分组;
所述题目查找单元,具体用于针对每一待搜索题目,在所述索引信息表中与该待搜索题目的特征向量长度相同或相近的分组内,查找与该待搜索题目的特征向量相匹配的特征向量。
可选的,所述试卷确定模块,具体用于将出现频率最大且大于第一预设阈值的试卷确定为与所述待搜索试卷匹配的目标试卷。
可选的,所述检测识别模块,具体用于利用预先训练好的检测模型对所述待搜索试卷的影像进行检测,检测出所述待搜索试卷上的各个待搜索题目的区域,其中,所述检测模型是基于神经网络的模型。
可选的,所述检测识别模块,具体用于利用预先训练好的第二识别模型识别各个待搜索题目的区域中题干的文字内容,其中,所述第二识别模型是基于神经网络的模型。
可选的,所述针对口算题的题目批改装置还包括:
计算模块,用于利用预设的口算引擎对所述待搜索试卷中包含算式和/或公式的区域进行计算处理,得到各个区域的计算结果;
其中,所述口算题批改模块用于针对每一待批改口算题目,将所述口算引擎在该待批改口算题目区域对应的计算结果,作为该待批改口算题目的答案,从而完成对所述待搜索试卷上待批改口算题目的批改。
为达到上述目的,本发明还提供了一种电子设备,包括处理器、通信接口、存储器和通信总线,其中,处理器、通信接口和存储器通过通信总线完成相互间的通信;
存储器,用于存放计算机程序;
处理器,用于执行存储器上所存放的程序时,实现如上任一所述针对口算题的题目批改方法的方法步骤。
为达到上述目的,本发明还提供了一种计算机可读存储介质,其特征在于,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现如上任一所述针对口算题的题目批改方法的方法步骤。
为达到上述目的,本发明还提供了一种针对口算题的题目批改方法,所述方法包括:
步骤S41:对待搜索试卷的影像进行检测,检测出所述待搜索试卷上的各个待搜索题目的区域,确定各个待搜索题目的题目类型,并识别出各个待搜索题目的区域中题干的文字内容;
步骤S42:利用预设的口算引擎对所述待搜索试卷中包含算式和/或公式的区域进行计算处理,得到各个区域的计算结果;
步骤S43:根据每一待搜索题目的题干的文字内容,获得该待搜索题目的特征向量,并根据该待搜索题目的特征向量在题库中进行搜索,查找该待搜索题目最接近的题目;
步骤S44:汇总查找到的所有待搜索题目的最接近题目所在的试卷,并将汇总的试卷与预设条件比较,若存在满足预设条件的目标试卷,则将满足预设条件的试卷确定为与所述待搜索试卷匹配的目标试卷;
步骤S45:在所述待搜索试卷中包含题目类型为口算题的待搜索题目的情况下,针对每一题目类型为口算题的待搜索题目,将该待搜索题目的特征向量与所述目标试卷中的各个题目的特征向量进行最短编辑距离匹配,确定所述目标试卷中与该待搜索题目相匹配的目标题目,若所述目标题目的题目类型为口算题,则确定该待搜索题目为待批改口算题目;以及
步骤S46:针对每一待批改口算题目,将所述口算引擎在该待批改口算题目区域对应的计算结果,作为该待批改口算题目的答案,从而完成对所述待搜索试卷上待批改口算题目的批改。
为达到上述目的,本发明还提供了一种针对口算题的题目批改装置,所述装置包括:
检测识别模块,用于对待搜索试卷的影像进行检测,检测出所述待搜索试卷上的各个待搜索题目的区域,确定各个待搜索题目的题目类型,并识别 出各个待搜索题目的区域中题干的文字内容;
计算模块,用于利用预设的口算引擎对所述待搜索试卷中包含算式和/或公式的区域进行计算处理,得到各个区域的计算结果;
题目查找模块,用于根据每一待搜索题目的题干的文字内容,获得该待搜索题目的特征向量,并根据该待搜索题目的特征向量在题库中进行搜索,查找该待搜索题目最接近的题目;
试卷确定模块,用于汇总查找到的所有待搜索题目的最接近题目所在的试卷,并将汇总的试卷与预设条件比较,若存在满足预设条件的目标试卷,则将满足预设条件的试卷确定为与所述待搜索试卷匹配的目标试卷;
口算题确定模块,用于在所述待搜索试卷中包含题目类型为口算题的待搜索题目的情况下,针对每一题目类型为口算题的待搜索题目,将该待搜索题目的特征向量与所述目标试卷中的各个题目的特征向量进行最短编辑距离匹配,确定所述目标试卷中与该待搜索题目相匹配的目标题目,若所述目标题目的题目类型为口算题,则确定该待搜索题目为待批改口算题目;以及
口算题批改模块,用于针对每一待批改口算题目,将所述口算引擎在该待批改口算题目区域对应的计算结果,作为该待批改口算题目的答案,从而完成对所述待搜索试卷上待批改口算题目的批改。
与现有技术相比,本发明针对待搜索试卷,首先根据各个待搜索题目的题干的文字内容获得待搜索题目的特征向量,然后利用各个待搜索题目的特征向量从题库中查找与待搜索试卷相匹配的目标试卷,而对于题目类型为口算题的待搜索题目,在目标试卷内部基于题目的特征向量进行二次查找,查找的标准为最短编辑距离最小,若匹配到的目标题目的题目类型也是口算题,则确认待搜索题目为待批改口算题目,再利用预设的口算引擎对待批改口算题目进行计算并输出计算结果作为待批改口算题目的答案。可见,对于待批改口算题目,由于根据题干的文字内容获得的特征向量彼此间区分度较小,导致从题库中查找的目标试卷中的参考答案与待批改口算题目不匹配的可能性也较大,因此二次查找确定待批改口算题目并通过口算引擎进行计算,可以提高口算题目的批改准确度。
图1是本发明一实施例提供的针对口算题的题目批改方法的流程示意图;
图2是本发明一实施例题供的针对口算题的题目批改装置的结构示意图;
图3是本发明一实施例提供的电子设备的结构示意图;
图4是本发明另一实施例提供的针对口算题的题目批改方法的流程示意图;
图5是本发明另一实施例题供的针对口算题的题目批改装置的结构示意图。
以下结合附图和具体实施例对本发明提出的一种针对口算题的题目批改方法、装置、电子设备及计算机可读存储介质作进一步详细说明。根据权利要求书和下面说明,本发明的优点和特征将更清楚。
为解决现有技术的问题,本发明实施例提供了一种针对口算题的题目批改方法、装置、电子设备及计算机可读存储介质。
需要说明的是,本发明实施例的针对口算题的题目批改方法可应用于本发明实施例的针对口算题的题目批改装置,该针对口算题的题目批改装置可被配置于电子设备上。其中,该电子设备可以是个人计算机、移动终端等,该移动终端可以是手机、平板电脑等具有各种操作系统的硬件设备。
【实施例一】
图1是本发明一实施例提供的一种针对口算题的题目批改方法的流程示意图。请参考图1,一种针对口算题的题目批改方法可以包括如下步骤:
步骤S11:对待搜索试卷的影像进行检测,检测出待搜索试卷上的各个待搜索题目的区域,确定各个待搜索题目的题目类型,并识别出各个待搜索题目的区域中题干的文字内容。
待搜索试卷的影像可以为包含待搜索试卷的图像。具体的,可以利用检测模型对待搜索试卷的影像进行检测,检测出待搜索试卷上的各个待搜索题 目的区域,所述检测模型是基于神经网络的模型。其中,检测模型例如可以是基于深度卷积神经网络(Convolutional Neural Networks,CNN)对试卷样本训练集中的样本进行训练得到的。利用训练好的检测模型从待搜索试卷的影像中提取二维特征向量,在二维特征向量的每个网格生成不同形状的锚点,使用标注框(Groundtruth Boxes)将检测出的各个待搜索题目的区域进行标注,还可以将标注框与生成的锚点作回归(regression)处理,以使标注框更贴近题目的实际位置。识别完题目区域后会将每道待搜索题目进行切割为单个影像,或者不实际切割,而在处理时将每个待搜索题目区域区分开为单个区域影像进行处理,会根据题目位置信息进行排序。
检测出各个待搜索题目的区域后,可以利用分类识别模型确定各个待搜索题目的题目类型,所述分类识别模型是基于神经网络的模型。其中,分类识别模型例如可以是基于深度卷积神经网络对试卷样本训练集中的样本进行训练得到的,每一样本中的题目均标注有题目类型。题目类型可以分为操作题、口算题、填空题、选择题、应用题等。
同时,还可以利用第二识别模型识别出待搜索题目的区域中题干的文字内容,所述第二识别模型是基于神经网络的模型。首先标注出待搜索题目中的各个组成部分,组成部分可以包括题干、答题和/或图片,进而通过第二识别模型识别出题目中题干的文字内容。其中,第二识别模型可以是基于空洞卷积和注意力模型建立的,具体的,采用空洞卷积对题干、答题和/或图片对应的标注框进行特征提取,再通过注意力模型将提取到的特征解码成字符。
步骤S12:根据每一待搜索题目的题干的文字内容,获得该待搜索题目的特征向量,并根据该待搜索题目的特征向量在题库中进行搜索,查找该待搜索题目最接近的题目。
具体的,所述步骤S12进一步可以包括:
步骤S121,将每一待搜索题目的题干的文字内容输入预先训练的题干向量化模型中,得到每一待搜索题目的题干的特征向量,作为每一待搜索题目的特征向量,其中,所述题干向量化模型是基于神经网络的模型。
举例而言,例如待搜索题目中题干的文字内容为“4.小明走3分钟刚好到 全程的一半,他家距离学校多少米?(6分)”,将该文字内容输入预先训练的题干向量化模型—sent2vec模型中,获得该题干的特征向量,特征向量可以表示为[x0,x1,x2…,xn]。
其中,所述题干向量化模型可以是基于神经网络的模型,如CNN模型,所述题干向量化模型可以通过以下步骤训练得到:对一题目样本训练集中每个题目样本进行标注处理,标注出每个题目样本中题干的文字内容;利用神经网络模型对每个题目样本中题干的文字内容进行二维特征向量提取,从而训练得到所述题干向量化模型。其中,具体的训练过程属于现有技术,在此不做赘述。
步骤S122,针对每一待搜索题目,在题库中进行搜索,查找与该待搜索题目的特征向量相匹配的特征向量,将题库中相匹配的特征向量对应的题目确定为与该待搜索题目最接近的题目。
其中,可以通过向量近似搜索的方式,在题库中查找与该待搜索题目的特征向量相匹配的特征向量,具体为在题库中查找与该待搜索题目的特征向量距离最近的特征向量。可以理解的是,不同向量之间的相似性度量(Similarity Measurement)通常采用的方法就是计算向量间的“距离(Distance)”,常用的距离计算方式有:欧式距离、曼哈顿距离、夹角余弦(Cosine)等。本实施例一中采用的计算方式是夹角余弦。
优选的,为便于特征向量的查找,还可以预先对题库中试卷上的各个题目的特征向量建立索引信息表。索引信息表中可以存储题库中各个题目的特征向量、题目的具体内容以及题目所在试卷的ID等。
相应的,步骤S122进一步可以包括:针对每一待搜索题目,在所述索引信息表中查找与该待搜索题目的特征向量相匹配的特征向量;将相匹配的特征向量在所述索引信息表中对应的题目确定为与该待搜索题目最接近的题目。
可以理解的是,在索引信息表中查找到相匹配的特征向量后,在所述索引信息表中找到最接近的题目,此时可以获得最接近题目的具体内容(包括题目的题干、答案和/或图片),以及该最接近题目所在试卷的ID信息。
优选的,在建立所述索引信息表之前,还可以将不同长度的特征向量按照长度进行分组,这样,在所述索引信息表中查找与该待搜索题目的特征向量相匹配的特征向量时,可以首先在所述索引信息表中定位到与该待搜索题目的特征向量的长度相同或相近的分组(在此,所述长度相近的分组指待搜索题目的特征向量的长度与索引信息表中的特征向量的长度差小于一特定值或一预设值),进而在所述索引信息表中与该待搜索题目的特征向量长度相同或相近的分组内,查找与该待搜索题目的特征向量相匹配的特征向量。其中,分组时可以将长度相同的特征向量分为一组,也可以将长度在某个范围内的特征向量分成一组,本发明对此不做限定。可见,将不同长度的特征向量按照长度分组,可以使得后期搜索题目时根据特征向量的长度在相应分组内进行查询,提高题目搜索速度。可以理解的是,特征向量的长度不同是因为题干的文字数量不同导致的。
步骤S13:汇总查找到的所有待搜索题目的最接近题目所在的试卷,将满足预设条件的试卷确定为与待搜索试卷匹配的目标试卷。具体的,可通过将汇总的试卷与一预设条件比较,从而得到是否存在满足预设条件的目标试卷的信息,以及在存在满足预设条件的目标试卷时,得到相应的满足预设条件的试卷。
其中,将满足预设条件的试卷确定为与所述待搜索试卷匹配的目标试卷,具体可以为:将出现频率最大且大于第一预设阈值的试卷确定为与所述待搜索试卷匹配的目标试卷。实际在处理时,由于题库中每道题目都有相应的试卷ID信息和在当前试卷里的位置信息,因此可以根据最接近题目所在的试卷ID来判断最接近题目是属于哪张试卷的,进而可以确定出现频率最大且大于第一预设阈值的试卷ID,从而将该试卷ID确定为匹配的目标试卷。其中,某一试卷的出现频率可以用以下方式计算:最接近题目在该试卷的待搜索题目的数量与待搜索试卷中待搜索题目总数的比值,或者,该试卷与待搜索试卷相匹配的题目数量与待搜索试卷中待搜索题目总数的比值。可以理解的是,若出现频率最大的试卷的出现频率小于所述第一预设阈值,表示该出现频率最大的试卷与待搜索试卷中相匹配的题目数量太少,此时可以认为题库中不 存在与待搜索试卷匹配的目标试卷。
进一步的,在步骤S13不存在满足预设条件的目标试卷的情况下,在所述待搜索试卷中包含题目类型为口算题的待搜索题目时,可以将题目类型为口算题的待搜索题目确定为待批改口算题目,针对每一待批改口算题目,利用预设的口算引擎对该待批改口算题目进行计算并输出该待批改口算题目的计算结果作为该待批改口算题目的答案,完成对所述待搜索试卷上待批改口算题目的批改。
步骤S14:在待搜索试卷中包含题目类型为口算题的待搜索题目的情况下,针对每一题目类型为口算题的待搜索题目,将该待搜索题目的特征向量与目标试卷中的各个题目的特征向量进行最短编辑距离匹配,确定目标试卷中与该待搜索题目相匹配的目标题目,若目标题目的题目类型为口算题,则确定该待搜索题目为待批改口算题目。
具体的,针对题目类型为口算题的待搜索题目,进行最短编辑距离匹配的过程可以称之为二次查找的过程,通过二次查找可以进一步确认待搜索试卷中的口算题。在二次查找时,针对每一题目类型为口算题的待搜索题目,可以将目标试卷中与该待搜索题目的最短编辑距离最小且小于第二预设阈值的题目作为该待搜索题目的搜索结果,也就是目标试卷中与该待搜索题目相匹配的目标题目。如果目标题目的题目类型也是口算题,则可以确认该待搜索题目确实为口算题,从而确定该待搜索题目为待批改口算题目。其中,对特征向量进行最短编辑距离匹配的算法属于本领域常规的计算方法,在此不做赘述。
举例而言,例如口算题A:“385×8-265=()”和口算题B:“375×8-265=()”,这两个题目利用题干向量化所获得的特征向量非常近似,因此,若待搜索试卷中某一题目为“385×8-265=()”,在步骤S12中很容易将题库中的口算题B确定为该题目的最接近题目,即此时对该题目的搜索结果是不准确的。为了提高准确度,针对该题目在目标试卷中进行二次查找,查找的标准为文字的最短编辑距离最小,由于最短编辑距离不计算权重,可以很容易找到该题目在目标试卷中对应的目标题目也就是口算题A,由于口算题A的题 目类型标注为口算题,从而确定该题目确实为口算题。
进一步的,在步骤S14中,还可以在所述目标题目的题目类型为口算题,且所述目标题目在所述目标试卷中的位置与该待搜索题目在所述待搜索试卷中的位置相同的情况下,确定该待搜索题目为待批改口算题目。可以理解的是,对待搜索题目和目标题目的位置进行确认,也就是将待搜索试卷中识别为口算题的题目在待搜索试卷中的位置和目标题目在目标试卷中的位置进行比较,两者位置相同表示目标题目确实是该待搜索题目的正确搜索结果,这样可以避免识别时由于向量差异,错误地将该待搜索题目识别为目标试卷中另一道近似的题目。举例而言,待批改口算题在待搜索试卷中所处的区域,与目标题目在目标试卷中所处的区域一致,则表示二者的位置相同。
步骤S15:针对每一待批改口算题目,利用预设的口算引擎对该待批改口算题目进行计算,输出口算引擎的计算结果作为该待批改口算题目的答案,完成对待搜索试卷上待批改口算题目的批改。
其中,所述预设的口算引擎可以包括预先训练的第一识别模型,所述第一识别模型是基于神经网络的模型,与第二识别模型相同,第一识别模型可以是基于空洞卷积和注意力模型建立的,具体的,采用空洞卷积对待批改口算题目进行特征提取,再通过注意力模型将提取到的特征解码成字符。
步骤S15中利用预设的口算引擎对该待批改口算题目进行计算,可以包括:首先,通过所述预先训练的第一识别模型识别出该待批改口算题目中的数字、字母、文字、字符以及计算类型,所述计算类型可以包括:四则混合运算、估算、带余数除法、分数计算、单位换算、竖式计算、脱式计算;然后,根据所识别出的数字、字母、文字、字符以及计算类型进行计算,得到该待批改口算题目的计算结果。举例而言,例如待批改口算题为“385×8-265=()”,口算引擎通过第一识别模型可以识别出“3”、“8”、“5”、“×”、“8”、“-”、“2”、“6”、“5”、“=”、“(”、“”、“)”,计算类型为四则混合运算,进而再自动计算得到计算结果。
进一步的,为保证口算题批改结果准确,步骤S15还可以包括:检验所述口算引擎的计算结果与该待批改口算题目在所述目标试卷上对应的参考答 案是否一致,如果一致则输出所述口算引擎的计算结果作为该待批改口算题目的答案。
进一步的,当所述口算引擎的计算结果与该待批改口算题目在所述目标试卷上的参考答案不一致时,输出用于表示与该待批改口算题目的参考答案不一致的提示信息,以提示试卷批改者注意该待批改口算题目。
举例而言,若口算引擎的计算结果与该待批改口算题目在所述目标试卷上对应的参考答案一致,在该待批改口算题目的区域内显示口算引擎的计算结果,若不一致,在该待批改口算题目的区域内显示提示信息,提示信息可以为:“答案待确定,请手动批改”字样。
综上所述,与现有技术相比,本发明针对待搜索试卷,首先根据各个待搜索题目的题干的文字内容获得待搜索题目的特征向量,然后利用各个待搜索题目的特征向量从题库中查找与待搜索试卷相匹配的目标试卷,而对于题目类型为口算题的待搜索题目,在目标试卷内部基于题目的特征向量进行二次查找,查找的标准为最短编辑距离最小,若匹配到的目标题目的题目类型也是口算题,则确认待搜索题目为待批改口算题目,再利用预设的口算引擎对待批改口算题目进行计算并输出计算结果作为待批改口算题目的答案。可见,对于待批改口算题目,由于根据题干的文字内容获得的特征向量彼此间区分度较小,导致从题库中查找的目标试卷中的参考答案与待批改口算题目不匹配的可能性也较大,因此二次查找确定待批改口算题目并通过口算引擎进行计算,可以提高口算题目的批改准确度。
相应于上述针对口算题的题目批改方法实施例,本发明提供了一种针对口算题的题目批改装置,参见图2,该装置可以包括:
检测识别模块21,可以用于对待搜索试卷的影像进行检测,检测出所述待搜索试卷上的各个待搜索题目的区域,确定各个待搜索题目的题目类型,并识别出各个待搜索题目的区域中题干的文字内容;
题目查找模块22,可以用于根据每一待搜索题目的题干的文字内容,获得该待搜索题目的特征向量,并根据该待搜索题目的特征向量在题库中进行搜索,查找该待搜索题目最接近的题目;
试卷确定模块23,可以用于汇总查找到的所有待搜索题目的最接近题目所在的试卷,将满足预设条件的试卷确定为与所述待搜索试卷匹配的目标试卷;
口算题确定模块24,可以用于在所述待搜索试卷中包含题目类型为口算题的待搜索题目的情况下,针对每一题目类型为口算题的待搜索题目,将该待搜索题目的特征向量与所述目标试卷中的各个题目的特征向量进行最短编辑距离匹配,确定所述目标试卷中与该待搜索题目相匹配的目标题目,若所述目标题目的题目类型为口算题,则确定该待搜索题目为待批改口算题目;
口算题批改模块25,可以用于针对每一待批改口算题目,利用预设的口算引擎对该待批改口算题目进行计算,输出所述口算引擎的计算结果作为该待批改口算题目的答案,完成对所述待搜索试卷上待批改口算题目的批改。
可选的,所述口算题确定模块25,还可以用于在所述目标题目的题目类型为口算题,且所述目标题目在所述目标试卷中的位置与该待搜索题目在所述待搜索试卷中的位置相同的情况下,确定该待搜索题目为待批改口算题目。
可选的,所述试卷确定模块23,还可以用于在不存在满足预设条件的目标试卷的情况下,在所述待搜索试卷中包含题目类型为口算题的待搜索题目时,将题目类型为口算题的待搜索题目确定为待批改口算题目,针对每一待批改口算题目,利用预设的口算引擎对该待批改口算题目进行计算并输出该待批改口算题目的计算结果作为该待批改口算题目的答案,完成对所述待搜索试卷上待批改口算题目的批改。
可选的,所述口算题批改模块25,还可以用于检验所述口算引擎的计算结果与该待批改口算题目在所述目标试卷上对应的参考答案是否一致,如果一致则输出所述口算引擎的计算结果作为该待批改口算题目的答案。
可选的,所述口算题批改模块25,还可以用于当所述口算引擎的计算结果与该待批改口算题目在所述目标试卷上的参考答案不一致时,输出用于表示该待批改口算题目的参考答案不一致的提示信息,以提示试卷批改者注意该待批改口算题目。
可选的,所述预设的口算引擎可以包括预先训练的第一识别模型,所述 第一识别模型是基于神经网络的模型;
所述口算题批改模块25,具体可以用于通过所述预先训练的第一识别模型识别出该待批改口算题目中的数字、字母、文字、字符以及计算类型,所述计算类型包括:四则混合运算、估算、带余数除法、分数计算、单位换算、竖式计算、脱式计算;根据所识别出的数字、字母、文字、字符以及计算类型进行计算,得到该待批改口算题目的计算结果。
可选的,所述题目查找模块22,可以包括:
特征向量获得单元,可以用于将每一待搜索题目的题干的文字内容输入预先训练的题干向量化模型中,得到每一待搜索题目的题干的特征向量,作为每一待搜索题目的特征向量,其中,所述题干向量化模型是基于神经网络的模型;
题目查找单元,可以用于针对每一待搜索题目,在题库中进行搜索,查找与该待搜索题目的特征向量相匹配的特征向量,将题库中相匹配的特征向量对应的题目确定为与该待搜索题目最接近的题目。
可选的,所述题干向量化模型可以通过以下步骤训练得到:
对一题目样本训练集中每个题目样本进行标注处理,标注出每个题目样本中题干的文字内容;
利用神经网络模型对每个题目样本中题干的文字内容进行二维特征向量提取,从而训练得到所述题干向量化模型。
可选的,所述装置还可以包括:
预处理模块,可以用于预先对题库中试卷上的各个题目的特征向量建立索引信息表;
所述题目查找单元,具体可以用于针对每一待搜索题目,在所述索引信息表中查找与该待搜索题目的特征向量相匹配的特征向量;将相匹配的特征向量在所述索引信息表中对应的题目确定为与该待搜索题目最接近的题目。
可选的,所述预处理模块,还可以用于在建立所述索引信息表之前,将不同长度的特征向量按照长度进行分组;
所述题目查找单元,具体可以用于针对每一待搜索题目,在所述索引信 息表中与该待搜索题目的特征向量长度相同或相近的分组内,查找与该待搜索题目的特征向量相匹配的特征向量。
可选的,所述试卷确定模块23,具体可以用于将出现频率最大且大于第一预设阈值的试卷确定为与所述待搜索试卷匹配的目标试卷。
可选的,所述检测识别模块21,具体可以用于利用预先训练好的检测模型对所述待搜索试卷的影像进行检测,检测出所述待搜索试卷上的各个待搜索题目的区域,其中,所述检测模型是基于神经网络的模型。
可选的,所述检测识别模块21,具体可以用于利用预先训练好的第二识别模型识别各个待搜索题目的区域中题干的文字内容,其中,所述第二识别模型是基于神经网络的模型。
本发明实施例一还提供了一种电子设备,如图3所示,包括处理器301、通信接口302、存储器303和通信总线304,其中,处理器301,通信接口302,存储器303通过通信总线304完成相互间的通信,
存储器303,用于存放计算机程序;
处理器301,用于执行存储器303上所存放的程序时,实现如下步骤:
步骤S11:对待搜索试卷的影像进行检测,检测出所述待搜索试卷上的各个待搜索题目的区域,确定各个待搜索题目的题目类型,并识别出各个待搜索题目的区域中题干的文字内容;
步骤S12:根据每一待搜索题目的题干的文字内容,获得该待搜索题目的特征向量,并根据该待搜索题目的特征向量在题库中进行搜索,查找该待搜索题目最接近的题目;
步骤S13:汇总查找到的所有待搜索题目的最接近题目所在的试卷,将满足预设条件的试卷确定为与所述待搜索试卷匹配的目标试卷;
步骤S14:在所述待搜索试卷中包含题目类型为口算题的待搜索题目的情况下,针对每一题目类型为口算题的待搜索题目,将该待搜索题目的特征向量与所述目标试卷中的各个题目的特征向量进行最短编辑距离匹配,确定所述目标试卷中与该待搜索题目相匹配的目标题目,若所述目标题目的题目类型为口算题,则确定该待搜索题目为待批改口算题目;
步骤S15:针对每一待批改口算题目,利用预设的口算引擎对该待批改口算题目进行计算,输出所述口算引擎的计算结果作为该待批改口算题目的答案,完成对所述待搜索试卷上待批改口算题目的批改。
关于该方法各个步骤的具体实现以及相关解释内容可以参见上述图1所示的方法实施例,在此不做赘述。
另外,处理器301执行存储器303上所存放的程序而实现的针对口算题的题目批改方法的其他实现方式,与前述方法实施例部分所提及的实现方式相同,这里也不再赘述。
上述电子设备提到的通信总线可以是外设部件互连标准(Peripheral Component Interconnect,PCI)总线或扩展工业标准结构(Extended Industry Standard Architecture,EISA)总线等。该通信总线可以分为地址总线、数据总线、控制总线等。为便于表示,图中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
通信接口用于上述电子设备与其他设备之间的通信。
存储器可以包括随机存取存储器(Random Access Memory,RAM),也可以包括非易失性存储器(Non-Volatile Memory,NVM),例如至少一个磁盘存储器。可选的,存储器还可以是至少一个位于远离前述处理器的存储装置。
上述的处理器可以是通用处理器,包括中央处理器(Central Processing Unit,CPU)、网络处理器(Network Processor,NP)等;还可以是数字信号处理器(Digital Signal Processing,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。
本发明实施例一还提供了一种计算机可读存储介质,该计算机可读存储介质内存储有计算机程序,该计算机程序被处理器执行时实现上述的针对口算题的题目批改方法的步骤。
【实施例二】
图4是本发明另一实施例提供的针对口算题的题目批改方法的流程示意 图。请参考图4,一种针对口算题的题目批改方法可以包括如下步骤:
步骤S41:对待搜索试卷的影像进行检测,检测出所述待搜索试卷上的各个待搜索题目的区域,确定各个待搜索题目的题目类型,并识别出各个待搜索题目的区域中题干的文字内容。
待搜索试卷的影像可以为包含待搜索试卷的图像。具体的,可以利用检测模型对待搜索试卷的影像进行检测,检测出待搜索试卷上的各个待搜索题目的区域,所述检测模型是基于神经网络的模型。其中,检测模型例如可以是基于深度卷积神经网络(Convolutional Neural Networks,CNN)对试卷样本训练集中的样本进行训练得到的。利用训练好的检测模型从待搜索试卷的影像中提取二维特征向量,在二维特征向量的每个网格生成不同形状的锚点,使用标注框(Groundtruth Boxes)将检测出的各个待搜索题目的区域进行标注,还可以将标注框与生成的锚点作回归(regression)处理,以使标注框更贴近题目的实际位置。识别完题目区域后会将每道待搜索题目进行切割为单个影像,或者不实际切割,而在处理时将每个待搜索题目区域区分开为单个区域影像进行处理,会根据题目位置信息进行排序。
检测出各个待搜索题目的区域后,可以利用分类识别模型确定各个待搜索题目的题目类型,所述分类识别模型是基于神经网络的模型。其中,分类识别模型例如可以是基于深度卷积神经网络对试卷样本训练集中的样本进行训练得到的,每一样本中的题目均标注有题目类型。题目类型可以分为操作题、口算题、填空题、选择题、应用题等。
同时,还可以利用第二识别模型识别出待搜索题目的区域中题干的文字内容,所述第二识别模型是基于神经网络的模型。首先标注出待搜索题目中的各个组成部分,组成部分可以包括题干、答题和/或图片,进而通过第二识别模型识别出题目中题干的文字内容。其中,第二识别模型可以是基于空洞卷积和注意力模型建立的,具体的,采用空洞卷积对题干、答题和/或图片对应的标注框进行特征提取,再通过注意力模型将提取到的特征解码成字符。
步骤S42:利用预设的口算引擎对待搜索试卷中包含算式和/或公式的区域进行计算处理,得到各个区域的计算结果。
其中,所述预设的口算引擎可以包括预先训练的第一识别模型,所述第一识别模型是基于神经网络的模型,与第二识别模型相同,第一识别模型可以是基于空洞卷积和注意力模型建立的,具体的,采用空洞卷积对待批改口算题目进行特征提取,再通过注意力模型将提取到的特征解码成字符。
步骤S42中利用预设的口算引擎对待搜索试卷中包含算式和/或公式的区域进行计算处理,可以包括:通过所述预先训练的第一识别模型识别出所述待搜索试卷中包含算式和/或公式的区域内的数字、字母、文字、字符以及计算类型,所述计算类型包括:四则混合运算、估算、带余数除法、分数计算、单位换算、竖式计算、脱式计算;根据所识别出的数字、字母、文字、字符以及计算类型进行计算,得到各个区域的计算结果。举例而言,例如待搜索试卷中某一区域包含“385×8-265=()”,针对该区域,口算引擎通过第一识别模型可以识别出“3”、“8”、“5”、“×”、“8”、“-”、“2”、“6”、“5”、“=”、“(”、“”、“)”,计算类型为四则混合运算,进而再自动计算得到该区域的计算结果。
步骤S43:根据每一待搜索题目的题干的文字内容,获得该待搜索题目的特征向量,并根据该待搜索题目的特征向量在题库中进行搜索,查找该待搜索题目最接近的题目。
具体的,所述步骤S43进一步可以包括:
步骤S431,将每一待搜索题目的题干的文字内容输入预先训练的题干向量化模型中,得到每一待搜索题目的题干的特征向量,作为每一待搜索题目的特征向量,其中,所述题干向量化模型是基于神经网络的模型。
举例而言,例如待搜索题目中题干的文字内容为“4.小明走3分钟刚好到全程的一半,他家距离学校多少米?(6分)”,将该文字内容输入预先训练的题干向量化模型—sent2vec模型中,获得该题干的特征向量,特征向量可以表示为[x0,x1,x2…,xn]。
其中,所述题干向量化模型可以是基于神经网络的模型,如CNN模型,所述题干向量化模型可以通过以下步骤训练得到:对一题目样本训练集中每个题目样本进行标注处理,标注出每个题目样本中题干的文字内容;利用神 经网络模型对每个题目样本中题干的文字内容进行二维特征向量提取,从而训练得到所述题干向量化模型。其中,具体的训练过程属于现有技术,在此不做赘述。
步骤S432,针对每一待搜索题目,在题库中进行搜索,查找与该待搜索题目的特征向量相匹配的特征向量,将题库中相匹配的特征向量对应的题目确定为与该待搜索题目最接近的题目。
其中,可以通过向量近似搜索的方式,在题库中查找与该待搜索题目的特征向量相匹配的特征向量,具体为在题库中查找与该待搜索题目的特征向量距离最近的特征向量。可以理解的是,不同向量之间的相似性度量(Similarity Measurement)通常采用的方法就是计算向量间的“距离(Distance)”,常用的距离计算方式有:欧式距离、曼哈顿距离、夹角余弦(Cosine)等。本实施例二中采用的计算方式是夹角余弦。
优选的,为便于特征向量的查找,还可以预先对题库中试卷上的各个题目的特征向量建立索引信息表。索引信息表中可以存储题库中各个题目的特征向量、题目的具体内容以及题目所在试卷的ID等。
相应的,步骤S432进一步可以包括:针对每一待搜索题目,在所述索引信息表中查找与该待搜索题目的特征向量相匹配的特征向量;将相匹配的特征向量在所述索引信息表中对应的题目确定为与该待搜索题目最接近的题目。
可以理解的是,在索引信息表中查找到相匹配的特征向量后,在所述索引信息表中找到最接近的题目,此时可以获得最接近题目的具体内容(包括题目的题干、答案和/或图片),以及该最接近题目所在试卷的ID信息。
优选的,在建立所述索引信息表之前,还可以将不同长度的特征向量按照长度进行分组,这样,在所述索引信息表中查找与该待搜索题目的特征向量相匹配的特征向量时,可以首先在所述索引信息表中定位到与该待搜索题目的特征向量的长度相同或相近的分组(在此,所述长度相近的分组指待搜索题目的特征向量的长度与索引信息表中的特征向量的长度差小于一特定值或一预设值),进而在所述索引信息表中与该待搜索题目的特征向量长度相同 或相近的分组内,查找与该待搜索题目的特征向量相匹配的特征向量。其中,分组时可以将长度相同的特征向量分为一组,也可以将长度在某个范围内的特征向量分成一组,本发明对此不做限定。可见,将不同长度的特征向量按照长度分组,可以使得后期搜索题目时根据特征向量的长度在相应分组内进行查询,提高题目搜索速度。可以理解的是,特征向量的长度不同是因为题干的文字数量不同导致的。
步骤S44:汇总查找到的所有待搜索题目的最接近题目所在的试卷,将满足预设条件的试卷确定为与待搜索试卷匹配的目标试卷。具体的,可通过将汇总的试卷与一预设条件比较,从而得到是否存在满足预设条件的目标试卷的信息,以及在存在满足预设条件的目标试卷时,得到相应的满足预设条件的试卷。
其中,将满足预设条件的试卷确定为与所述待搜索试卷匹配的目标试卷,具体可以为:将出现频率最大且大于第一预设阈值的试卷确定为与所述待搜索试卷匹配的目标试卷。实际在处理时,由于题库中每道题目都有相应的试卷ID信息和在当前试卷里的位置信息,因此可以根据最接近题目所在的试卷ID来判断最接近题目是属于哪张试卷的,进而可以确定出现频率最大且大于第一预设阈值的试卷ID,从而将该试卷ID确定为匹配的目标试卷。其中,某一试卷的出现频率可以用以下方式计算:最接近题目在该试卷的待搜索题目的数量与待搜索试卷中待搜索题目总数的比值,或者,该试卷与待搜索试卷相匹配的题目数量与待搜索试卷中待搜索题目总数的比值。可以理解的是,若出现频率最大的试卷的出现频率小于所述第一预设阈值,表示该出现频率最大的试卷与待搜索试卷中相匹配的题目数量太少,此时可以认为题库中不存在与待搜索试卷匹配的目标试卷。
进一步的,在步骤S44不存在满足预设条件的目标试卷的情况下,在所述待搜索试卷中包含题目类型为口算题的待搜索题目时,可以将题目类型为口算题的待搜索题目确定为待批改口算题目,针对每一待批改口算题目,利用预设的口算引擎对该待批改口算题目进行计算并输出该待批改口算题目的计算结果作为该待批改口算题目的答案,完成对所述待搜索试卷上待批改口 算题目的批改。
步骤S45:在待搜索试卷中包含题目类型为口算题的待搜索题目的情况下,针对每一题目类型为口算题的待搜索题目,将该待搜索题目的特征向量与目标试卷中的各个题目的特征向量进行最短编辑距离匹配,确定目标试卷中与该待搜索题目相匹配的目标题目,若目标题目的题目类型为口算题,则确定该待搜索题目为待批改口算题目。
具体的,针对题目类型为口算题的待搜索题目,进行最短编辑距离匹配的过程可以称之为二次查找的过程,通过二次查找可以进一步确认待搜索试卷中的口算题。在二次查找时,针对每一题目类型为口算题的待搜索题目,可以将目标试卷中与该待搜索题目的最短编辑距离最小且小于第二预设阈值的题目作为该待搜索题目的搜索结果,也就是目标试卷中与该待搜索题目相匹配的目标题目。如果目标题目的题目类型也是口算题,则可以确认该待搜索题目确实为口算题,从而确定该待搜索题目为待批改口算题目。其中,对特征向量进行最短编辑距离匹配的算法属于本领域常规的计算方法,在此不做赘述。
举例而言,例如口算题A:“385×8-265=()”和口算题B:“375×8-265=()”,这两个题目利用题干向量化所获得的特征向量非常近似,因此,若待搜索试卷中某一题目为“385×8-265=()”,在步骤S13中很容易将题库中的口算题B确定为该题目的最接近题目,即此时对该题目的搜索结果是不准确的。为了提高准确度,针对该题目在目标试卷中进行二次查找,查找的标准为文字的最短编辑距离最小,由于最短编辑距离不计算权重,可以很容易找到该题目在目标试卷中对应的目标题目也就是口算题A,由于口算题A的题目类型标注为口算题,从而确定该题目确实为口算题。
进一步的,在步骤S45中,还可以在所述目标题目的题目类型为口算题,且所述目标题目在所述目标试卷中的位置与该待搜索题目在所述待搜索试卷中的位置相同的情况下,确定该待搜索题目为待批改口算题目。可以理解的是,对待搜索题目和目标题目的位置进行确认,也就是将待搜索试卷中识别为口算题的题目在待搜索试卷中的位置和目标题目在目标试卷中的位置进行 比较,两者位置相同表示目标题目确实是该待搜索题目的正确搜索结果,这样可以避免识别时由于向量差异,错误地将该待搜索题目识别为目标试卷中另一道近似的题目。举例而言,待批改口算题目在待搜索试卷中所处的区域,与目标题目在目标试卷中所处的区域一致,则表示二者的位置相同。
步骤S46:针对每一待批改口算题目,将口算引擎在该待批改口算题目区域对应的计算结果,作为该待批改口算题目的答案,并将口算引擎在所有待批改口算题目区域以外的计算结果丢弃,完成对待搜索试卷上待批改口算题目的批改。
具体的,步骤S42中口算引擎会返回很多区域的计算结果,在步骤S46中,针对每一待批改口算题目,会从很多区域的计算结果中找到和该待批改口算题目区域充分重叠的区域对应的计算结果,即为该待批改口算题目的答案。
进一步的,为保证口算题批改结果准确,步骤S46还可以包括:检验所述口算引擎的计算结果与该待批改口算题目在所述目标试卷上对应的参考答案是否一致,如果一致则输出所述口算引擎的计算结果作为该待批改口算题目的答案。
进一步的,当所述口算引擎的计算结果与该待批改口算题目在所述目标试卷上的参考答案不一致时,输出用于表示与该待批改口算题目的参考答案不一致的提示信息,以提示试卷批改者注意该待批改口算题目。
举例而言,若口算引擎的计算结果与该待批改口算题目在目标试卷上对应的参考答案一致,在该待批改口算题目的区域内显示口算引擎的计算结果,若不一致,在该待批改口算题目的区域内显示提示信息,提示信息可以为:“答案待确定,请手动批改”字样。
与现有技术相比,本发明针对待搜索试卷,利用口算引擎对待搜索试卷进行处理,同时根据各个待搜索题目的题干的文字内容获得待搜索题目的特征向量,然后利用各个待搜索题目的特征向量从题库中查找与待搜索试卷相匹配的目标试卷,而对于题目类型为口算题的待搜索题目,在目标试卷内部基于题目的特征向量进行二次查找,查找的标准为最短编辑距离最小,若匹 配到的目标题目的题目类型也是口算题,则确认待搜索题目为待批改口算题目,将口算引擎在待批改口算题目区域对应的计算结果作为待批改口算题目的答案,并将口算引擎在所有待批改口算题目区域以外的计算结果丢弃。可见,对于待批改口算题目,由于根据题干的文字内容获得的特征向量彼此间区分度较小,导致从题库中查找的目标试卷中的参考答案与待批改口算题目不匹配的可能性也较大,因此二次查找确定待批改口算题目并采用口算引擎在待批改口算题目区域对应的计算结果作为答案,可以提高口算题目的批改准确度。
相应于上述针对口算题的题目批改方法实施例,本发明提供了一种针对口算题的题目批改装置,参见图5,该装置可以包括:
检测识别模块51,可以用于对待搜索试卷的影像进行检测,检测出所述待搜索试卷上的各个待搜索题目的区域,确定各个待搜索题目的题目类型,并识别出各个待搜索题目的区域中题干的文字内容;
计算模块52,可以用于利用预设的口算引擎对所述待搜索试卷中包含算式和/或公式的区域进行计算处理,得到各个区域的计算结果;
题目查找模块53,可以用于根据每一待搜索题目的题干的文字内容,获得该待搜索题目的特征向量,并根据该待搜索题目的特征向量在题库中进行搜索,查找该待搜索题目最接近的题目;
试卷确定模块54,可以用于汇总查找到的所有待搜索题目的最接近题目所在的试卷,将满足预设条件的试卷确定为与所述待搜索试卷匹配的目标试卷;
口算题确定模块55,可以用于在所述待搜索试卷中包含题目类型为口算题的待搜索题目的情况下,针对每一题目类型为口算题的待搜索题目,将该待搜索题目的特征向量与所述目标试卷中的各个题目的特征向量进行最短编辑距离匹配,确定所述目标试卷中与该待搜索题目相匹配的目标题目,若所述目标题目的题目类型为口算题,则确定该待搜索题目为待批改口算题目;
口算题批改模块56,可以用于针对每一待批改口算题目,将所述口算引擎在该待批改口算题目区域对应的计算结果,作为该待批改口算题目的答案, 并将所述口算引擎在所有待批改口算题目区域以外的计算结果丢弃,完成对所述待搜索试卷上待批改口算题目的批改。
可选的,所述口算题确定模块55,还可以用于在所述目标题目的题目类型为口算题,且所述目标题目在所述目标试卷中的位置与该待搜索题目在所述待搜索试卷中的位置相同的情况下,确定该待搜索题目为待批改口算题目。
可选的,所述试卷确定模块54,还可以用于不存在满足预设条件的目标试卷的情况下,在所述待搜索试卷中包含题目类型为口算题的待搜索题目时,将题目类型为口算题的待搜索题目确定为待批改口算题目,针对每一待批改口算题目,将所述口算引擎在该待批改口算题目区域对应的计算结果,作为该待批改口算题目的答案,并将所述口算引擎在所有待批改口算题目区域以外的计算结果丢弃,完成对所述待搜索试卷上待批改口算题目的批改。
可选的,所述口算题批改模块56,还可以用于检验所述口算引擎的计算结果与该待批改口算题目在所述目标试卷上对应的参考答案是否一致,如果一致则输出所述口算引擎的计算结果作为该待批改口算题目的答案。
可选的,所述口算题批改模块56,还可以用于当所述口算引擎的计算结果与该待批改口算题目在所述目标试卷上的参考答案不一致时,输出用于表示与该待批改口算题目的参考答案不一致的提示信息,以提示试卷批改者注意该待批改口算题目。
可选的,所述预设的口算引擎可以包括预先训练的第一识别模型,所述第一识别模型是基于神经网络的模型;
所述计算模块52,具体可以用于通过所述预先训练的第一识别模型识别出所述待搜索试卷中包含算式和/或公式的区域内的数字、字母、文字、字符以及计算类型,所述计算类型包括:四则混合运算、估算、带余数除法、分数计算、单位换算、竖式计算、脱式计算;根据所识别出的数字、字母、文字、字符以及计算类型进行计算,得到各个区域的计算结果。
可选的,所述题目查找模块53,可以包括:
特征向量获得单元,可以用于将每一待搜索题目的题干的文字内容输入预先训练的题干向量化模型中,得到每一待搜索题目的题干的特征向量,作 为每一待搜索题目的特征向量,其中,所述题干向量化模型是基于神经网络的模型;
题目查找单元,可以用于针对每一待搜索题目,在题库中进行搜索,查找与该待搜索题目的特征向量相匹配的特征向量,将题库中相匹配的特征向量对应的题目确定为与该待搜索题目最接近的题目。
可选的,所述题干向量化模型可以通过以下步骤训练得到:
对一题目样本训练集中每个题目样本进行标注处理,标注出每个题目样本中题干的文字内容;
利用神经网络模型对每个题目样本中题干的文字内容进行二维特征向量提取,从而训练得到所述题干向量化模型。
可选的,所述装置还可以包括:
预处理模块,可以用于预先对题库中试卷上的各个题目的特征向量建立索引信息表;
所述题目查找单元,具体可以用于针对每一待搜索题目,在所述索引信息表中查找与该待搜索题目的特征向量相匹配的特征向量;将相匹配的特征向量在所述索引信息表中对应的题目确定为与该待搜索题目最接近的题目。
可选的,所述预处理模块,还可以用于在建立所述索引信息表之前,将不同长度的特征向量按照长度进行分组;
所述题目查找单元,具体可以用于针对每一待搜索题目,在所述索引信息表中与该待搜索题目的特征向量长度相同或相近的分组内,查找与该待搜索题目的特征向量相匹配的特征向量。
可选的,所述试卷确定模块54,具体可以用于将出现频率最大且大于第一预设阈值的试卷确定为与所述待搜索试卷匹配的目标试卷。
可选的,所述检测识别模块51,具体可以用于利用预先训练好的检测模型对所述待搜索试卷的影像进行检测,检测出所述待搜索试卷上的各个待搜索题目的区域,其中,所述检测模型是基于神经网络的模型。
可选的,所述检测识别模块51,具体可以用于利用预先训练好的第二识别模型识别各个待搜索题目的区域中题干的文字内容,其中,所述第二识别 模型是基于神经网络的模型。
本发明实施例二还提供了一种电子设备,可相应参考图3,包括处理器301、通信接口302、存储器303和通信总线304,其中,处理器301,通信接口302,存储器303通过通信总线304完成相互间的通信,
存储器303,用于存放计算机程序;
处理器301,用于执行存储器303上所存放的程序时,实现如下步骤:
步骤S41:对待搜索试卷的影像进行检测,检测出所述待搜索试卷上的各个待搜索题目的区域,确定各个待搜索题目的题目类型,并识别出各个待搜索题目的区域中题干的文字内容;
步骤S42:利用预设的口算引擎对所述待搜索试卷中包含算式和/或公式的区域进行计算处理,得到各个区域的计算结果;
步骤S43:根据每一待搜索题目的题干的文字内容,获得该待搜索题目的特征向量,并根据该待搜索题目的特征向量在题库中进行搜索,查找该待搜索题目最接近的题目;
步骤S44:汇总查找到的所有待搜索题目的最接近题目所在的试卷,将满足预设条件的试卷确定为与所述待搜索试卷匹配的目标试卷;
步骤S45:在所述待搜索试卷中包含题目类型为口算题的待搜索题目的情况下,针对每一题目类型为口算题的待搜索题目,将该待搜索题目的特征向量与所述目标试卷中的各个题目的特征向量进行最短编辑距离匹配,确定所述目标试卷中与该待搜索题目相匹配的目标题目,若所述目标题目的题目类型为口算题,则确定该待搜索题目为待批改口算题目;
步骤S46:针对每一待批改口算题目,将所述口算引擎在该待批改口算题目区域对应的计算结果,作为该待批改口算题目的答案,并将所述口算引擎在所有待批改口算题目区域以外的计算结果丢弃,完成对所述待搜索试卷上待批改口算题目的批改。
关于该方法各个步骤的具体实现以及相关解释内容可以参见上述图4所示的方法实施例,在此不做赘述。
另外,处理器301执行存储器303上所存放的程序而实现的批改试卷中 口算题的方法的其他实现方式,与前述方法实施例部分所提及的实现方式相同,这里也不再赘述。
上述电子设备提到的通信总线可以是外设部件互连标准(Peripheral Component Interconnect,PCI)总线或扩展工业标准结构(Extended Industry Standard Architecture,EISA)总线等。该通信总线可以分为地址总线、数据总线、控制总线等。为便于表示,图中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
通信接口用于上述电子设备与其他设备之间的通信。
存储器可以包括随机存取存储器(Random Access Memory,RAM),也可以包括非易失性存储器(Non-Volatile Memory,NVM),例如至少一个磁盘存储器。可选的,存储器还可以是至少一个位于远离前述处理器的存储装置。
上述的处理器可以是通用处理器,包括中央处理器(Central Processing Unit,CPU)、网络处理器(Network Processor,NP)等;还可以是数字信号处理器(Digital Signal Processing,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。
本发明实施例二还提供了一种计算机可读存储介质,该计算机可读存储介质内存储有计算机程序,该计算机程序被处理器执行时实现上述的针对口算题的题目批改方法的步骤。
需要说明的是,本说明书中的各个实施例均采用相关的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于装置、电子设备、计算机可读存储介质实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
上述描述仅是对本发明较佳实施例的描述,并非对本发明范围的任何限定,本发明领域的普通技术人员根据上述揭示内容做的任何变更、修饰,均属于权利要求书的保护范围。
Claims (22)
- 一种针对口算题的题目批改方法,其特征在于,所述方法包括:步骤S11:对待搜索试卷的影像进行检测,检测出所述待搜索试卷上的各个待搜索题目的区域,确定各个待搜索题目的题目类型,并识别出各个待搜索题目的区域中题干的文字内容;步骤S12:根据每一待搜索题目的题干的文字内容,获得该待搜索题目的特征向量,并根据该待搜索题目的特征向量在题库中进行搜索,查找该待搜索题目最接近的题目;步骤S13:汇总查找到的所有待搜索题目的最接近题目所在的试卷,并将汇总的试卷与预设条件比较,若存在满足预设条件的目标试卷,则将满足预设条件的试卷确定为与所述待搜索试卷匹配的目标试卷;步骤S14:在所述待搜索试卷中包含题目类型为口算题的待搜索题目的情况下,针对每一题目类型为口算题的待搜索题目,将该待搜索题目的特征向量与所述目标试卷中的各个题目的特征向量进行最短编辑距离匹配,确定所述目标试卷中与该待搜索题目相匹配的目标题目,若所述目标题目的题目类型为口算题,则确定该待搜索题目为待批改口算题目;以及步骤S15:针对每一待批改口算题目,利用预设的口算引擎对该待批改口算题目进行计算,输出所述口算引擎的计算结果作为该待批改口算题目的答案,从而完成对所述待搜索试卷上待批改口算题目的批改。
- 如权利要求1所述的针对口算题的题目批改方法,其特征在于,在步骤S14中,在所述目标题目的题目类型为口算题,且所述目标题目在所述目标试卷中的位置与该待搜索题目在所述待搜索试卷中的位置相同的情况下,确定该待搜索题目为待批改口算题目。
- 如权利要求1所述的针对口算题的题目批改方法,其特征在于,在步骤S13中,若不存在满足预设条件的目标试卷,并且在所述待搜索试卷中包含题目类型为口算题的待搜索题目时,则将题目类型为口算题的待搜索题目确定为待批改口算题目,并执行步骤S15。
- 如权利要求1所述的针对口算题的题目批改方法,其特征在于,步骤S15还包括:检验所述口算引擎的计算结果与该待批改口算题目在所述目标试卷上对应的参考答案是否一致,如果一致则输出所述口算引擎的计算结果作为该待批改口算题目的答案。
- 如权利要求4所述的针对口算题的题目批改方法,其特征在于,当所述口算引擎的计算结果与该待批改口算题目在所述目标试卷上的参考答案不一致时,输出用于表示与该待批改口算题目的参考答案不一致的提示信息。
- 如权利要求1所述的针对口算题的题目批改方法,其特征在于,所述预设的口算引擎包括预先训练的第一识别模型,所述第一识别模型是基于神经网络的模型;步骤S15中利用预设的口算引擎对该待批改口算题目进行计算,包括:通过所述预先训练的第一识别模型识别出该待批改口算题目中的数字、字母、文字、字符以及计算类型,所述计算类型包括:四则混合运算、估算、带余数除法、分数计算、单位换算、竖式计算和脱式计算中的一种;以及根据所识别出的数字、字母、文字、字符以及计算类型进行计算,得到该待批改口算题目的计算结果。
- 如权利要求1所述的针对口算题的题目批改方法,其特征在于,所述步骤S12包括:步骤S121,将每一待搜索题目的题干的文字内容输入预先训练的题干向量化模型中,得到每一待搜索题目的题干的特征向量,作为每一待搜索题目的特征向量,其中,所述题干向量化模型是基于神经网络的模型;以及步骤S122,针对每一待搜索题目,在题库中进行搜索,查找与该待搜索题目的特征向量相匹配的特征向量,将题库中相匹配的特征向量对应的题目确定为与该待搜索题目最接近的题目。
- 如权利要求7所述的针对口算题的题目批改方法,其特征在于,所述题干向量化模型通过以下步骤训练得到:对一题目样本训练集中每个题目样本进行标注处理,标注出每个题目样本中题干的文字内容;以及利用神经网络模型对每个题目样本中题干的文字内容进行二维特征向量提取,从而训练得到所述题干向量化模型。
- 如权利要求7所述的针对口算题的题目批改方法,其特征在于,在执行所述步骤S12之前,所述针对口算题的题目批改方法还包括:对题库中试卷上的各个题目的特征向量建立索引信息表;步骤S122包括:针对每一待搜索题目,在所述索引信息表中查找与该待搜索题目的特征向量相匹配的特征向量;以及将相匹配的特征向量在所述索引信息表中对应的题目确定为与该待搜索题目最接近的题目。
- 如权利要求9所述的针对口算题的题目批改方法,其特征在于,在建立所述索引信息表之前,所述针对口算题的题目批改方法还包括:将不同长度的特征向量按照长度进行分组;所述针对每一待搜索题目,在所述索引信息表中查找与该待搜索题目的特征向量相匹配的特征向量,包括:针对每一待搜索题目,在所述索引信息表中与该待搜索题目的特征向量长度相同或相近的分组内,查找与该待搜索题目的特征向量相匹配的特征向量。
- 如权利要求1所述的针对口算题的题目批改方法,其特征在于,步骤S13中,将满足预设条件的试卷确定为与所述待搜索试卷匹配的目标试卷,包括:将出现频率最大且大于第一预设阈值的试卷确定为与所述待搜索试卷匹配的目标试卷。
- 如权利要求1所述的针对口算题的题目批改方法,其特征在于,步骤S11中,对待搜索试卷的影像进行检测,检测出所述待搜索试卷上的各个待搜索题目的区域,包括:利用预先训练好的检测模型对所述待搜索试卷的影像进行检测,检测出所述待搜索试卷上的各个待搜索题目的区域,其中,所述检测模型是基于神 经网络的模型。
- 如权利要求1所述的针对口算题的题目批改方法,其特征在于,步骤S11中,识别出各个待搜索题目的区域中题干的文字内容,包括:利用预先训练好的第二识别模型识别各个待搜索题目的区域中题干的文字内容,其中,所述第二识别模型是基于神经网络的模型。
- 如权利要求1~13中任一项所述的针对口算题的题目批改方法,其特征在于,在执行步骤S11之后,执行步骤S12之前,所述针对口算题的题目批改方法还包括:利用预设的口算引擎对所述待搜索试卷中包含算式和/或公式的区域进行计算处理,得到各个区域的计算结果;其中,在步骤S15中,针对每一待批改口算题目,将所述口算引擎在该待批改口算题目区域对应的计算结果,作为该待批改口算题目的答案,从而完成对所述待搜索试卷上待批改口算题目的批改。
- 一种针对口算题的题目批改装置,其特征在于,所述装置包括:检测识别模块,用于对待搜索试卷的影像进行检测,检测出所述待搜索试卷上的各个待搜索题目的区域,确定各个待搜索题目的题目类型,并识别出各个待搜索题目的区域中题干的文字内容;题目查找模块,用于根据每一待搜索题目的题干的文字内容,获得该待搜索题目的特征向量,并根据该待搜索题目的特征向量在题库中进行搜索,查找该待搜索题目最接近的题目;试卷确定模块,用于汇总查找到的所有待搜索题目的最接近题目所在的试卷,并将汇总的试卷与预设条件比较,若存在满足预设条件的目标试卷,则将满足预设条件的试卷确定为与所述待搜索试卷匹配的目标试卷;口算题确定模块,用于在所述待搜索试卷中包含题目类型为口算题的待搜索题目的情况下,针对每一题目类型为口算题的待搜索题目,将该待搜索题目的特征向量与所述目标试卷中的各个题目的特征向量进行最短编辑距离匹配,确定所述目标试卷中与该待搜索题目相匹配的目标题目,若所述目标题目的题目类型为口算题,则确定该待搜索题目为待批改口算题目;以及口算题批改模块,用于针对每一待批改口算题目,利用预设的口算引擎对该待批改口算题目进行计算,输出所述口算引擎的计算结果作为该待批改口算题目的答案,从而完成对所述待搜索试卷上待批改口算题目的批改。
- 如权利要求15所述的针对口算题的题目批改装置,其特征在于,所述口算题确定模块,还用于在所述目标题目的题目类型为口算题,且所述目标题目在所述目标试卷中的位置与该待搜索题目在所述待搜索试卷中的位置相同的情况下,确定该待搜索题目为待批改口算题目。
- 如权利要求15所述的针对口算题的题目批改装置,其特征在于,所述试卷确定模块,还用于在不存在满足预设条件的目标试卷,并且在所述待搜索试卷中包含题目类型为口算题的待搜索题目时,将题目类型为口算题的待搜索题目确定为待批改口算题目。
- 如权利要求15所述的针对口算题的题目批改装置,其特征在于,所述口算题批改模块,还用于检验所述口算引擎的计算结果与该待批改口算题目在所述目标试卷上对应的参考答案是否一致,如果一致则输出所述口算引擎的计算结果作为该待批改口算题目的答案;所述口算题批改模块,还用于当所述口算引擎的计算结果与该待批改口算题目在所述目标试卷上的参考答案不一致时,输出用于表示与该待批改口算题目的参考答案不一致的提示信息。
- 如权利要求15所述的针对口算题的题目批改装置,其特征在于,所述预设的口算引擎包括预先训练的第一识别模型,所述第一识别模型是基于神经网络的模型;所述口算题批改模块,用于通过所述预先训练的第一识别模型识别出该待批改口算题目中的数字、字母、文字、字符以及计算类型,所述计算类型包括:四则混合运算、估算、带余数除法、分数计算、单位换算、竖式计算和脱式计算中的一种;根据所识别出的数字、字母、文字、字符以及计算类型进行计算,得到该待批改口算题目的计算结果。
- 如权利要求15~19中任一项所述的针对口算题的题目批改装置,其特征在于,所述针对口算题的题目批改装置还包括:计算模块,用于利用预设的口算引擎对所述待搜索试卷中包含算式和/或公式的区域进行计算处理,得到各个区域的计算结果;其中,所述口算题批改模块用于针对每一待批改口算题目,将所述口算引擎在该待批改口算题目区域对应的计算结果,作为该待批改口算题目的答案,从而完成对所述待搜索试卷上待批改口算题目的批改。
- 一种电子设备,其特征在于,包括处理器、通信接口、存储器和通信总线,其中,所述处理器、所述通信接口和所述存储器通过所述通信总线完成相互间的通信;所述存储器用于存放计算机程序;所述处理器用于执行存储器上所存放的程序时,实现权利要求1-14任一所述的方法步骤。
- [根据细则26改正12.10.2019]
一种计算机可读存储介质,其特征在于,所述计算机可读存储介质内存储有计算机程序,所述计算机程序被执行时实现权利要求1-14任一项所述的方法。
Priority Applications (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
EP19865656.3A EP3859558A4 (en) | 2018-09-26 | 2019-09-11 | ANSWER MARKING PROCEDURE FOR HEADPHONES, DEVICE, ELECTRONIC DEVICE AND STORAGE MEDIA |
JP2021517407A JP7077483B2 (ja) | 2018-09-26 | 2019-09-11 | 暗算問題に対する問題添削方法、装置、電子機器及び記憶媒体 |
US16/756,468 US11721229B2 (en) | 2018-09-26 | 2019-09-11 | Question correction method, device, electronic equipment and storage medium for oral calculation questions |
Applications Claiming Priority (4)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811125659.4 | 2018-09-26 | ||
CN201811125659.4A CN109189895B (zh) | 2018-09-26 | 2018-09-26 | 一种针对口算题的题目批改方法及装置 |
CN201811125657.5A CN109284355B (zh) | 2018-09-26 | 2018-09-26 | 一种批改试卷中口算题的方法及装置 |
CN201811125657.5 | 2018-09-26 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2020063347A1 true WO2020063347A1 (zh) | 2020-04-02 |
Family
ID=69951164
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2019/105321 WO2020063347A1 (zh) | 2018-09-26 | 2019-09-11 | 针对口算题的题目批改方法、装置、电子设备和存储介质 |
Country Status (4)
Country | Link |
---|---|
US (1) | US11721229B2 (zh) |
EP (1) | EP3859558A4 (zh) |
JP (1) | JP7077483B2 (zh) |
WO (1) | WO2020063347A1 (zh) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20230195723A1 (en) * | 2020-05-20 | 2023-06-22 | Nippon Telegraph And Telephone Corporation | Estimation apparatus, learning apparatus, estimation method, learning method and program |
CN111639630B (zh) * | 2020-06-23 | 2023-07-18 | 北京字节跳动网络技术有限公司 | 一种作业批改方法及装置 |
KR102645590B1 (ko) * | 2022-08-03 | 2024-03-11 | 주식회사 프로키언 | 인공지능 기반의 수학 문제 코드 제공 모델 생성 방법과 해당 모델을 이용한 수학 문제 생성 방법 및 장치 |
WO2024029708A1 (ko) * | 2022-08-03 | 2024-02-08 | 주식회사 프로키언 | 인공지능 기반의 수학 문제 코드 제공 모델 생성 방법과 해당 모델을 이용한 수학 문제 생성 방법 및 장치 |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2013097722A (ja) * | 2011-11-04 | 2013-05-20 | Nippon Telegr & Teleph Corp <Ntt> | テキスト要約装置、方法及びプログラム |
CN103164994A (zh) * | 2013-03-15 | 2013-06-19 | 南京信息工程大学 | 一种运算类习题的批改及反馈方法 |
CN106096564A (zh) * | 2016-06-17 | 2016-11-09 | 福建网龙计算机网络信息技术有限公司 | 一种数学自动批改方法 |
CN108052504A (zh) * | 2017-12-26 | 2018-05-18 | 科大讯飞股份有限公司 | 数学主观题解答结果的结构分析方法及系统 |
CN109189895A (zh) * | 2018-09-26 | 2019-01-11 | 杭州大拿科技股份有限公司 | 一种针对口算题的题目批改方法及装置 |
CN109284355A (zh) * | 2018-09-26 | 2019-01-29 | 杭州大拿科技股份有限公司 | 一种批改试卷中口算题的方法及装置 |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007286409A (ja) | 2006-04-18 | 2007-11-01 | Hitachi Ltd | 採点支援装置 |
US8666730B2 (en) * | 2009-03-13 | 2014-03-04 | Invention Machine Corporation | Question-answering system and method based on semantic labeling of text documents and user questions |
JP2013101501A (ja) | 2011-11-08 | 2013-05-23 | Sharp Corp | 照合装置、照合装置の制御方法、入力装置、試験システム、制御プログラム、および記録媒体 |
US9805614B2 (en) * | 2012-09-17 | 2017-10-31 | Crowdmark Inc. | System and method for enabling crowd-sourced examination marking |
KR101459285B1 (ko) | 2014-04-04 | 2014-11-12 | 김종명 | 문장유사도 판단방법 및 장치, 시험채점방법 및 장치 |
CN105955962B (zh) * | 2016-05-10 | 2019-11-05 | 北京新唐思创教育科技有限公司 | 题目相似度的计算方法及装置 |
CN107832758A (zh) | 2017-11-06 | 2018-03-23 | 泉州市雄蓝教育科技有限公司 | 智能生成答题卡以及服务器终端自动阅卷评分的考试系统 |
-
2019
- 2019-09-11 EP EP19865656.3A patent/EP3859558A4/en not_active Withdrawn
- 2019-09-11 US US16/756,468 patent/US11721229B2/en active Active
- 2019-09-11 JP JP2021517407A patent/JP7077483B2/ja active Active
- 2019-09-11 WO PCT/CN2019/105321 patent/WO2020063347A1/zh unknown
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2013097722A (ja) * | 2011-11-04 | 2013-05-20 | Nippon Telegr & Teleph Corp <Ntt> | テキスト要約装置、方法及びプログラム |
CN103164994A (zh) * | 2013-03-15 | 2013-06-19 | 南京信息工程大学 | 一种运算类习题的批改及反馈方法 |
CN106096564A (zh) * | 2016-06-17 | 2016-11-09 | 福建网龙计算机网络信息技术有限公司 | 一种数学自动批改方法 |
CN108052504A (zh) * | 2017-12-26 | 2018-05-18 | 科大讯飞股份有限公司 | 数学主观题解答结果的结构分析方法及系统 |
CN109189895A (zh) * | 2018-09-26 | 2019-01-11 | 杭州大拿科技股份有限公司 | 一种针对口算题的题目批改方法及装置 |
CN109284355A (zh) * | 2018-09-26 | 2019-01-29 | 杭州大拿科技股份有限公司 | 一种批改试卷中口算题的方法及装置 |
Non-Patent Citations (1)
Title |
---|
See also references of EP3859558A4 * |
Also Published As
Publication number | Publication date |
---|---|
JP2021530066A (ja) | 2021-11-04 |
EP3859558A1 (en) | 2021-08-04 |
EP3859558A4 (en) | 2022-06-22 |
JP7077483B2 (ja) | 2022-05-30 |
US11721229B2 (en) | 2023-08-08 |
US20210192965A1 (en) | 2021-06-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2020063347A1 (zh) | 针对口算题的题目批改方法、装置、电子设备和存储介质 | |
CN109284355B (zh) | 一种批改试卷中口算题的方法及装置 | |
CN109271401B (zh) | 一种题目搜索、批改方法、装置、电子设备和存储介质 | |
US11508251B2 (en) | Method and system for intelligent identification and correction of questions | |
CN109583429B (zh) | 一种批改试卷中应用题的方法及装置 | |
CN109189895B (zh) | 一种针对口算题的题目批改方法及装置 | |
CN109670504B (zh) | 一种手写答案识别批改方法及装置 | |
US20230015054A1 (en) | Text classification method, electronic device and computer-readable storage medium | |
KR100699663B1 (ko) | 음성 인식 모델링을 사용하는 자동 언어 평가 시스템 및 방법 | |
CN110705302B (zh) | 命名实体的识别方法、电子设备及计算机存储介质 | |
WO2021212801A1 (zh) | 面向电商产品的评价对象识别方法、装置及存储介质 | |
CN106919551B (zh) | 一种情感词极性的分析方法、装置及设备 | |
WO2022057708A1 (zh) | 自动填写答案的方法、电子设备和可读存储介质 | |
WO2022156065A1 (zh) | 一种文本情感分析方法、装置、设备及存储介质 | |
CN108241727A (zh) | 新闻可信度评价方法及设备 | |
CN110659352B (zh) | 试题考点识别方法及其系统 | |
CN110413961A (zh) | 基于分类模型进行文本评分的方法、装置和计算机设备 | |
US12026453B2 (en) | Annotation method, relation extraction method, storage medium and computing device | |
CN113420122A (zh) | 分析文本的方法、装置、设备及存储介质 | |
CN113468034A (zh) | 数据质量评估方法、装置、存储介质和电子设备 | |
US11749128B2 (en) | Answer correction method and device | |
US20240112236A1 (en) | Information processing device, information processing method, and computer-readable storage medium storing program | |
CN112116181B (zh) | 课堂质量模型的训练方法、课堂质量评价方法及装置 | |
CN114691907B (zh) | 一种跨模态检索的方法、设备及介质 | |
WO2023024898A1 (zh) | 题目辅助方法、题目辅助装置和题目辅助系统 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 19865656 Country of ref document: EP Kind code of ref document: A1 |
|
ENP | Entry into the national phase |
Ref document number: 2021517407 Country of ref document: JP Kind code of ref document: A |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
ENP | Entry into the national phase |
Ref document number: 2019865656 Country of ref document: EP Effective date: 20210426 |