WO2022057708A1 - 自动填写答案的方法、电子设备和可读存储介质 - Google Patents

自动填写答案的方法、电子设备和可读存储介质 Download PDF

Info

Publication number
WO2022057708A1
WO2022057708A1 PCT/CN2021/117224 CN2021117224W WO2022057708A1 WO 2022057708 A1 WO2022057708 A1 WO 2022057708A1 CN 2021117224 W CN2021117224 W CN 2021117224W WO 2022057708 A1 WO2022057708 A1 WO 2022057708A1
Authority
WO
WIPO (PCT)
Prior art keywords
question
area
answer
feature vector
content
Prior art date
Application number
PCT/CN2021/117224
Other languages
English (en)
French (fr)
Inventor
何涛
罗欢
陈明权
Original Assignee
杭州大拿科技股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 杭州大拿科技股份有限公司 filed Critical 杭州大拿科技股份有限公司
Publication of WO2022057708A1 publication Critical patent/WO2022057708A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/58Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/583Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content
    • G06F16/5846Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content using extracted text
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/90335Query processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/9038Presentation of query results
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/40Document-oriented image-based pattern recognition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/40Document-oriented image-based pattern recognition
    • G06V30/41Analysis of document content
    • G06V30/414Extracting the geometrical structure, e.g. layout tree; Block segmentation, e.g. bounding boxes for graphics or text
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition

Definitions

  • the invention relates to the technical field of artificial intelligence, and in particular, to a method for automatically filling in an answer, an electronic device and a readable storage medium.
  • the purpose of the present invention is to provide a method, electronic device and readable storage medium for automatically filling in an answer, so as to solve one or more problems in the prior art.
  • the present invention provides a method for automatically filling in an answer, including:
  • the method for automatically filling in an answer when filling in the standard answer of each question into the corresponding answering area, the method for automatically filling in an answer further includes:
  • the character size of the standard answer is adjusted according to the width data and height data of the answering area of each question.
  • adjusting the character size of the standard answer according to the width data and height data of each of the answering areas includes:
  • the method for automatically filling in answers if one of the questions in the target test paper has multiple standard answers, then according to the positional arrangement of the answering areas of the question The standard answers are filled in the answering area in turn.
  • the content of the question stem area of each of the questions is identified, and each of the questions is searched in the question bank according to the content of each question stem area.
  • Standard answers to the questions include:
  • a vector search is performed in the question bank to find a target feature vector matching the feature vector of each question, and a standard answer corresponding to each target feature vector is extracted from the question bank.
  • each question Converting the content of the topic stem area of the topic into a feature vector includes:
  • Character information of each of the question stem areas is identified, and the content of the question stem areas of each question is converted into a first feature vector through a question stem vectorization model as the feature vector.
  • each Converting the content of the topic stem area into a feature vector includes:
  • the first feature vector is used as the feature vector, and for the topic containing pictures, the first feature vector and the second feature vector are spliced together as the feature vector.
  • Feature vector For the topic that does not contain pictures, the first feature vector is used as the feature vector, and for the topic containing pictures, the first feature vector and the second feature vector are spliced together as the feature vector. Feature vector.
  • a region identification model is used to detect the location region of each question on the target test paper, and the region identification model is obtained by training samples in advance.
  • the method for automatically filling in an answer before using a region recognition model to detect the image, the method for automatically filling in an answer further includes:
  • One or more of document edge recognition, text correction and binarization processing is performed on the acquired image.
  • the present invention also provides another method for automatically filling in an answer, including:
  • the location area includes the question stem area and the answering area;
  • the image After acquiring the image of the target test paper, the image is detected, and the stem area of each question on the target test paper is detected;
  • the automatic when filling in the standard answer of each question of each of the sample papers into the corresponding answering area, the automatic There are also ways to fill in the answer:
  • the character size of the standard answer is adjusted according to the width data and height data of the answering area of each of the questions of each of the sample test papers.
  • the character size of the standard answer is adjusted according to the width data and height data of the answering area of each question in each of the sample test papers.
  • the width data and height data of the answering area of each question of each of the sample test papers determine the size of the corresponding frame of the answering area
  • the content of the question stem area of each question of the target test paper is identified, and the question bank is searched for the content related to each question in the question bank.
  • the image of the sample test paper filled in with the standard answer that matches the content of the question stem area of the question, and outputting the search results to the user terminal includes:
  • a vector search is performed in the question bank to obtain an image of the sample test paper with the standard answer filled in whose feature vector matches the feature vector of each question, and the search result is output to the user end.
  • the Converting the content of the topic stem area of the topic into a feature vector includes:
  • Character information of each of the question stem areas is identified, and the content of the question stem areas of each question is converted into a first feature vector through a question stem vectorization model as the feature vector.
  • Converting the content of the topic stem area of the topic into a feature vector includes:
  • the first feature vector is used as the feature vector, and for the topic containing pictures, the first feature vector and the second feature vector are spliced together as the feature vector.
  • Feature vector For the topic that does not contain pictures, the first feature vector is used as the feature vector, and for the topic containing pictures, the first feature vector and the second feature vector are spliced together as the feature vector. Feature vector.
  • a region recognition model is used to detect the location region of each question on the sample test paper and the target test paper, and the region recognition model performs pre-processing on the sample. obtained by training.
  • the method for automatically filling in answers further includes:
  • Text correction and/or binarization processing is performed on a plurality of images of the sample test papers.
  • the present invention also provides an electronic device, including a processor and a memory, where a computer program is stored in the memory, and when the computer program is executed by the processor, the above-mentioned method for filling in an answer is implemented.
  • the present invention also provides a readable storage medium, where a computer program is stored in the readable storage medium, and when the computer program is executed by a processor, the above-mentioned method for automatically filling in an answer is implemented.
  • the location area includes a question stem area and an answer area.
  • the content of the question stem area of each question is identified, and the question bank is searched for each question according to the content of each question stem area.
  • Standard answers and fill in the standard answers for each question in the corresponding answering area. In this way, a test paper image with filled in answers can be provided according to the image of the target test paper provided by the user.
  • the present invention detects the content of the question stem area of the target test paper image, and searches for the standard answer in the question bank according to the content of the question stem area, which can avoid text input errors. When the corresponding answer cannot be found.
  • the image of the entire target test paper can be obtained each time, the content of all the question stems can be identified, and then the standard answers of all the questions can be found, which greatly improves the search efficiency compared with the prior art.
  • electronic device and readable storage medium for automatically filling in answers provided by the present invention, firstly, fill in the answers for multiple sample test papers saved in the question bank, and generate a plurality of the samples with filled-in answers The image of the test paper; then, identify the location area of each question of the multiple sample test papers stored in the question bank, the location area includes the question stem area and the answering area; Describe the content of the question stem area, and fill in the standard answer to the corresponding answer area according to the content of each question stem area of each of the sample test papers, and generate a plurality of sample test papers with the standard answers filled in.
  • the present invention detects the content of the question stem area of the target test paper image, and searches the question bank for the sample containing the answer that matches the question stem content according to the content of the question stem area.
  • the image of the test paper can avoid the situation that the corresponding answer cannot be found due to the wrong text input, and there is no need to search for each question separately, so the search efficiency can be greatly improved.
  • FIG. 1 is a flowchart of a method for automatically filling in an answer provided by an embodiment of the present invention
  • Fig. 2 is the schematic diagram that the character size in the embodiment of the present invention is adjusted with the size of the callout frame;
  • FIG. 3 is a flowchart of another method for automatically filling in an answer provided by an embodiment of the present invention.
  • the core idea of the present invention is to solve the problem that in the prior art, when searching for a question answer, the search method is inefficient and prone to errors, and the corresponding answer cannot be found if the content of some texts is different, and the answer to one question can only be searched at a time. And other issues.
  • the present invention provides a method, electronic device and readable storage medium for automatically filling in an answer.
  • the standard answer is searched in the question bank, and then the standard answer is filled in the corresponding answering area, so that According to the image of the target test paper provided by the user, the image of the test paper with the completed answers can be obtained.
  • the present invention provides another method, electronic device and readable storage medium for automatically filling in an answer.
  • the question stem content and the content of the question stem area of the target test paper are searched in the question bank.
  • the matching picture of the sample test paper containing the answers so that according to the image of the target test paper provided by the user, the test paper image with filled in the answer can be output.
  • the two methods, electronic device and readable storage medium for automatically filling in answers provided by the present invention can avoid the failure to find the corresponding answer due to wrong text input, compared with the prior art to find the answer through the text of the question stem. Case.
  • the image of the entire target test paper can be obtained each time, the content of all the question stems can be identified, and then the respective standard answers can be found through the content of all the question stems, which greatly improves the search efficiency compared with the prior art.
  • FIG. 1 it is a flowchart of a method for automatically filling in an answer provided by an embodiment of the present invention, and the method for automatically filling in an answer includes the following steps:
  • the image of the test paper with the completed answer can be provided according to the image of the target test paper provided by the user. It can be seen that, compared with the prior art, the operation is simple, the search efficiency is high, and it is not easy to make mistakes.
  • a region identification model can be used to detect the location region of each question on the target test paper, and the region identification model can be obtained by training samples in advance.
  • the region identification model can be used to identify the location area of each question in the target test paper.
  • the region identification model may be a model based on a neural network, for example, a model based on a deep convolutional neural network (Convolutional Neural Networks, CNN), which can be obtained by training samples in the test paper sample training set in advance through a neural network.
  • CNN convolutional Neural Networks
  • the location area of the topic is marked, and the annotation frame and the generated anchor point can be subjected to regression processing, so that the annotation frame is closer to the actual position of the topic.
  • each subject will be cut into a single image, or not cut, but each subject area will be divided into a single area image for processing, and will be sorted according to the subject position information.
  • one or more of document edge recognition, text correction and binarization processing is performed on the acquired image before the region recognition model is used to detect the image.
  • the target image can be extracted from the captured image, through text correction, the information recorded in the text image can be stored and transmitted more accurately, and through binarization processing, the information in the text image can be more easily read extract.
  • the document edge recognition, the text correction, and the binarization process may adopt methods well known to those skilled in the art, and details are not described herein again.
  • step S12 After detecting the location area of each item of the target test paper, step S12 is executed.
  • the content in the subject area of each topic can be identified by using an identification model, and the identification model is a model based on a neural network.
  • the identification model is a model based on a neural network.
  • each component in the question of the target test paper is marked, and the component may include the question stem, the answer and/or the picture, and then the content of the question stem in the question is identified by the recognition model.
  • the recognition model may be established based on the hole convolution and the attention model. Specifically, the hole convolution is used to extract features from the question stem, the answer, and/or the annotation frame corresponding to the picture, and then use the attention model to extract features. The obtained features are decoded.
  • step S12 after identifying the content of the stem area of each of the questions, the content of the stem area of each question can be converted into a feature vector, and then in step S13, The standard answer for each of the questions can be searched by means of vector search.
  • the content of the question stem area of each question only includes characters, so in step S12, after identifying the character information of each question stem area of the target test paper, the characters of each question stem area are identified.
  • the information is input into the question stem quantization model, and the question stem quantization model is used to convert the character information of the question stem area of each question into a first feature vector, which is used as the feature vector.
  • the character information of the stem region of each question is input into the stem vectorization model, so that the stem vectorization model converts the stem region of each question Character information is converted into a first feature vector.
  • the question-stem quantization model can also be obtained by training samples in advance.
  • the question-stem quantization model may be a neural network-based model, such as a CNN model, and the question-stem quantization model may be obtained by training through the following steps: labeling each question sample in the first question sample training set , mark the character information of the question stem in each question sample; use the neural network model to extract the two-dimensional feature vector of the character information of the question stem in each question sample, so as to train to obtain the question stem vectorization model.
  • the specific training process belongs to the prior art, and will not be repeated here.
  • step S13 After acquiring the feature vector of each question, step S13 is executed, and the standard answer of each question is searched in the question bank according to the feature vector of each question stem area. Specifically, a vector search is performed in the question bank to find a target feature vector that matches the feature vector of each of the questions, and the standard answer corresponding to each of the feature vectors is extracted from the question bank, Fill in the answer area for the corresponding question.
  • the target feature vector matching the feature vector of each topic can be found in the question bank by means of vector approximate search, specifically, the feature vector with the closest distance to the feature vector of each question is found in the question bank. It can be understood that the similarity measure between different vectors is usually used to calculate the "distance" between the vectors.
  • the commonly used distance calculation methods are: Euclidean distance, Manhattan distance, included angle cosine ( Cosine) et al.
  • the multiple standard answers are filled in the answering area in sequence according to the positional order of the answering area of the question. For example, the first row goes from left to right, then to the second row.
  • the character size of the standard answer is also adjusted according to the width data and height data of the answering area of each question. Specifically, it may include the following steps: determining the size of the labeling frame of the answering area according to the width data and height data of the answering area of each question; Fill in the standard answer to the answering area corresponding to the question in proportion, and the preset proportion does not exceed 100%. For example, as shown in Figure 2, according to the size of the callout box, the character “Song" in the first question is relatively large, and the word "B" in the second question is relatively small.
  • step S12 in addition to identifying the character information of each question stem area, the content of the question stem area of each question is converted by the question stem vectorization model
  • the question stem vectorization model In addition to the first feature vector, it also includes: using a picture vectorization model to convert the picture of the topic containing the picture into a second feature vector; for the topic that does not contain a picture, the first feature vector is used as the Feature vector, for the topic including the picture, the first feature vector and the second feature vector are spliced together as the feature vector.
  • the picture vectorization model may be a neural network-based model, such as a CNN model, and the picture vectorization model may be obtained by training through the following steps: performing labeling processing on each topic sample in the second topic sample training set, and labeling the The pictures in each topic sample; the neural network model is used to extract two-dimensional feature vectors for the pictures in each topic sample, so as to train to obtain the picture vectorization model.
  • the second topic sample training set may be the same as or different from the first topic sample training set, which is not limited in this embodiment of the present invention.
  • the specific training process belongs to the prior art, and details are not described here.
  • each picture is input into the picture vectorization model to obtain the second feature vector of each picture, and then the second feature vector of each picture is sequentially Concatenated with the first eigenvector of the stem. Since the number of pictures and the number of words in the stem of different topics are different, the length of the feature vector obtained from the topic is also different.
  • step S12 after identifying the content of the question stem area of each question, it may not be converted into a feature vector, but directly based on the identified content in the question bank to perform standardization Search for answers.
  • another embodiment of the present invention provides another method for automatically filling in an answer, as shown in FIG. 3 , including the following steps:
  • S22 Identify the content of the question stem area of each question of each of the sample test papers, and fill in the standard answer to the corresponding an answering area and generate images of a plurality of said sample test papers filled with standard answers;
  • S24 Identify the content of the question stem area of each question of the target test paper, and search the question bank for a standard answer that matches the content of the question stem area of each question.
  • the image of the test paper with the filled answer can be output according to the image of the target test paper provided by the user. It can be seen that, compared with the prior art, the operation is simple, the search efficiency is high, and it is not easy to make mistakes.
  • step S23 text correction and/or binarization processing is performed on the images of a plurality of the sample test papers.
  • text correction the information recorded in the image of the sample test paper can be stored and transmitted more accurately, and through the binarization process, the information in the image of the sample test paper can be more easily extracted.
  • the region identification model can be used to detect the location region of each question on the target test paper, and the region identification model can be obtained by training samples in advance.
  • the content of the question stem area is converted into a feature vector, and the vector search method is used to find the question bank in the question bank.
  • a sample test paper that matches the stem content is converted into a feature vector, and the vector search method is used to find the question bank in the question bank.
  • step S24 after identifying the content of the question stem area of each question in the target test paper, the question stem vectorization model is used to The content of the topic stem area of each topic is converted into a first feature vector as the feature vector.
  • step S24 further includes: identifying the character information of each question stem area, and converting the content of the question stem area of each question through the question stem vectorization model Convert into the first feature vector; use the image vectorization model to convert the picture of the topic containing the picture into the second feature vector; for the topic that does not contain the picture, take the first feature vector as the feature vector, For the topic including the picture, the first feature vector and the second feature vector are concatenated as the feature vector.
  • the region identification model, the topic stem vectorization model, and the picture vectorization model are all consistent with the foregoing descriptions, and will not be repeated here.
  • An embodiment of the present invention further provides another electronic device, including a processor and a memory, where the memory is used to store a computer program; the above steps S11 to S13 are implemented when the computer program is executed by the processor.
  • Another embodiment of the present invention provides another electronic device, including a processor and a memory, where the memory is used to store a computer program; the above steps S21 to S24 are implemented when the computer program is executed by the processor.
  • the memory may include random access memory (Random Access Memory, RAM), or may include non-volatile memory (Non-Volatile Memory, NVM), For example at least one disk storage.
  • RAM Random Access Memory
  • NVM Non-Volatile Memory
  • the memory may also be at least one storage device located away from the aforementioned processor.
  • the processor can be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a network processor (Network Processor, NP), etc.; it can also be a digital signal processor (Digital Signal Processing, DSP), dedicated integrated Circuit (Application Specific Integrated Circuit, ASIC), Field-Programmable Gate Array (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
  • FPGA Field-Programmable Gate Array
  • An embodiment of the present invention further provides a readable storage medium, where a computer program is stored in the readable storage medium, and when the computer program is executed by a processor, the foregoing steps S11 to S13 are implemented.
  • Another embodiment of the present invention provides another readable storage medium, where a computer program is stored in the another readable storage medium, and when the computer program is executed by a processor, the foregoing steps S21 to S24 are implemented.
  • the readable storage medium may be a tangible device that can hold and store instructions used by the instruction execution device, such as, but not limited to, an electrical storage device, Magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination of the above. More specific examples (non-exhaustive list) of readable storage media include: portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or Flash memory), static random access memory (SRAM), portable compact disc read only memory (CD-ROM), digital versatile disc (DVD), memory sticks, floppy disks, mechanical encoding devices, and any suitable combination of the foregoing.
  • RAM random access memory
  • ROM read only memory
  • EPROM or Flash memory erasable programmable read only memory
  • SRAM static random access memory
  • CD-ROM compact disc read only memory
  • DVD digital versatile disc
  • memory sticks floppy disks, mechanical encoding devices, and any suitable combination of the foregoing.
  • the computer programs described herein can be downloaded to various computing/processing devices from readable storage media, or to external computers or external storage devices over a network such as the Internet, a local area network, a wide area network, and/or a wireless network.
  • the network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers.
  • a network adapter card or network interface in each computing/processing device receives the computer program from the network and forwards the computer program for storage in a readable storage medium in the respective computing/processing device.
  • the computer program for carrying out the operations of the present invention may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or any other program in one or more programming languages.
  • ISA instruction set architecture
  • the computer program may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server .
  • the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (eg, through the Internet using an Internet service provider) connect).
  • LAN local area network
  • WAN wide area network
  • Internet service provider an Internet service provider
  • electronic circuits such as programmable logic circuits, field programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), that can execute computer programmable logic circuits, are personalized by utilizing state information from a computer program.
  • Program instructions are read to implement various aspects of the present invention.
  • These computer programs can also be stored in a readable storage medium, and these computer programs cause computers, programmable data processing devices and/or other devices to operate in a specific manner, so that the readable storage medium storing the computer program includes a An article of manufacture comprising instructions for implementing various aspects of the functions/acts specified in one or more blocks of the flowchart and/or block diagrams.
  • a computer program can also be loaded onto a computer, other programmable data processing apparatus, or other equipment, causing a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other equipment to produce a computer-implemented process that causes A computer program executing on a computer, other programmable data processing apparatus, or other device implements the functions/acts specified in one or more blocks of the flowcharts and/or block diagrams.
  • the method, the electronic device and the readable storage medium for automatically filling in the answer provided by the present invention convert the content of the question stem area of the target test paper into a feature vector, and look up the standard answer in the question bank in the form of the feature vector. , and then fill in the standard answer into the corresponding answering area, so that the image of the filled-in answer can be provided according to the image of the target test paper provided by the user;
  • the image of the sample test paper containing the answer corresponding to the matching eigenvector is searched in the question bank in the form of the form, so that the test paper image with the filled answer can be output according to the image of the target test paper provided by the user. Therefore, compared with the prior art, it can be To avoid the situation where the corresponding answer cannot be found due to wrong text input, it can also greatly improve the search efficiency.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Library & Information Science (AREA)
  • Artificial Intelligence (AREA)
  • Multimedia (AREA)
  • Computational Linguistics (AREA)
  • Computer Graphics (AREA)
  • Geometry (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

自动填写答案的方法、电子设备和可读存储介质,通过检测出目标试卷图像中题干区域的内容,并根据目标试卷题干区域的内容在题库中查找标准答案,而后将标准答案填写到相应作答区域,使得根据用户提供的目标试卷的图像便可提供填好答案的试卷图像;或者,对题库中的样本试卷进行标准答案填写,而后通过检测出目标试卷的图像中题干区域的内容,并根据目标试卷题干区域的内容在题库中查找题干内容相匹配的包含答案的样本试卷的图像,使得根据用户提供的目标试卷的图像便可输出填好答案的试卷图像,可避免因文字输入错误而无法查找到对应的答案的情况,也可大大提升搜索效率。

Description

自动填写答案的方法、电子设备和可读存储介质 技术领域
本发明涉及人工智能技术领域,特别涉及一种自动填写答案的方法、电子设备和可读存储介质。
背景技术
随着计算机技术和教育信息化的不断推进,计算机技术已经逐步应用于日常的教育教学各项活动中。
目前在家长进行功课辅导时,有时也会出现有些题目不会,需要上网搜索答案的情况。现有的题目搜索方法在进行题目搜索时,是根据各个题目的题干的文字内容在题库中进行查找,然而,这种搜索方式效率低,而且很容易出错,有部分文字内容不同就无法查找到对应的答案,而且每次只能搜索一个题目的答案。
发明内容
本发明的目的在于提供一种自动填写答案的方法、电子设备和可读存储介质,以解决现有技术中的一个或多个问题。
为解决上述技术问题,本发明提供一种自动填写答案的方法,包括:
获取目标试卷的图像,对所述图像进行检测,检测出所述目标试卷上各题目的位置区域,所述位置区域包括题干区域和作答区域;
识别每一所述题目的所述题干区域的内容,根据每一所述题干区域的内容在题库中搜索每一所述题目的标准答案,并将每一所述题目的所述标准答案填写到相应所述作答区域。
可选的,在所述的自动填写答案的方法中,在将每一所述题目的所述标准答案填写到相应的所述作答区域时,所述自动填写答案的方法还包括:
根据每一所述题目的所述作答区域的宽度数据和高度数据调整所述标准答案的字符大小。
可选的,在所述的自动填写答案的方法中,根据每一所述作答区域的宽 度数据和高度数据调整所述标准答案的字符大小包括:
根据每一所述题目的所述作答区域的宽度数据和高度数据确定所述作答区域的标注框尺寸;
以每一所述题目的所述标注框尺寸的预设比例填写所述标准答案至相应所述题目的所述作答区域,所述预设比例不超过100%。
可选的,在所述的自动填写答案的方法中,若所述目标试卷的一所述题目具有多个标准答案,则根据所述题目的所述作答区域的位置排列顺序将多个所述标准答案依次填写到所述作答区域。
可选的,在所述的自动填写答案的方法中,所述识别每一所述题目的所述题干区域的内容,根据每一所述题干区域的内容在题库中搜索每一所述题目的标准答案包括:
识别每一所述题目的所述题干区域的内容,并将每一所述题目的所述题干区域的内容转换为特征向量;
在题库中进行向量搜索,以查找出与每一所述题目的所述特征向量相匹配的目标特征向量,并在所述题库中提取每一所述目标特征向量所对应的标准答案。
可选的,在所述的自动填写答案的方法中,若所述目标试卷中的所述题目不包含图片,则识别每一所述题目的所述题干区域的内容,并将每一所述题目的所述题干区域的内容转换为特征向量包括:
识别每一所述题干区域的字符信息,并通过题干向量化模型将各所述题目的所述题干区域的内容转换为第一特征向量,作为所述特征向量。
可选的,在所述的自动填写答案的方法中,若所述目标试卷中的所述题目包含图片,则识别每一所述题目的所述题干区域的内容,并将每一所述题目的所述题干区域的内容转换为特征向量包括:
识别每一所述题干区域的字符信息,并通过题干向量化模型将每个所述题目的所述题干区域的内容转换为第一特征向量;
利用图片向量化模型将包含图片的所述题目的图片转换为第二特征向量;
对于不包含图片的所述题目,将所述第一特征向量作为所述特征向量, 对于包含图片的所述题目,将所述第一特征向量和所述第二特征向量进行拼接,作为所述特征向量。
可选的,在所述的自动填写答案的方法中,利用区域识别模型检测出所述目标试卷上各题目的位置区域,所述区域识别模型通过预先对样本进行训练而得到。
可选的,在所述的自动填写答案的方法中,在利用区域识别模型对所述图像进行检测之前,所述自动填写答案的方法还包括:
对获取的所述图像进行文档边缘识别、文本校正和二值化处理中的一种或多种。
基于同一思想,本发明还提供另一种自动填写答案的方法,包括:
识别题库中所保存的多个样本试卷的各题目的位置区域,所述位置区域包括题干区域和作答区域;
识别每一所述样本试卷的每一所述题目的所述题干区域的内容,并根据每一所述样本试卷的各所述题干区域的内容,填写标准答案至相应的所述作答区域,并生成填写好标准答案的多个所述样本试卷的图像;
在获取目标试卷的图像后,对所述图像进行检测,检测出所述目标试卷上各题目的题干区域;
识别所述目标试卷的每一所述题目的所述题干区域的内容,在所述题库中搜索与每一所述题目的所述题干区域的内容相匹配的填写好标准答案的所述样本试卷的图像,并将搜索结果输出给用户端。
可选的,在所述的另一种自动填写答案的方法中,在将每一所述样本试卷的每一所述题目的所述标准答案填写到相应的所述作答区域时,所述自动填写答案的方法还包括:
根据每一所述样本试卷的每一所述题目的所述作答区域的宽度数据和高度数据调整所述标准答案的字符大小。
可选的,在所述的另一种自动填写答案的方法中,根据每一所述样本试卷的每一所述题目的所述作答区域的宽度数据和高度数据调整所述标准答案的字符大小包括:
根据每一所述样本试卷的每一所述题目的所述作答区域的宽度数据和高 度数据确定相应所述作答区域的标注框尺寸;
以每一所述样本试卷的每一所述题目的所述标注框尺寸的预设比例填写所述标准答案至相应所述作答区域,所述预设比例不超过100%。
可选的,在所述的另一种自动填写答案的方法中,所述识别所述目标试卷的每一所述题目的所述题干区域的内容,在所述题库中搜索与每一所述题目的所述题干区域的内容相匹配的填写好标准答案的所述样本试卷的图像,并将搜索结果输出给用户端包括:
识别所述目标试卷的每一所述题目的所述题干区域的内容,并将每一所述题目的所述题干区域的内容转换为特征向量;
在所述题库中进行向量搜索,以获取特征向量与每一所述题目的所述特征向量相匹配的填写好标准答案的所述样本试卷的图像,并将搜索结果输出给用户端。
可选的,在所述的另一种自动填写答案的方法中,若所述目标试卷中的题目不包含图片,则识别每一所述题目的所述题干区域的内容,并通过将每一所述题目的所述题干区域的内容转换为特征向量包括:
识别每一所述题干区域的字符信息,并通过题干向量化模型将各所述题目的所述题干区域的内容转换为第一特征向量,作为所述特征向量。
可选的,在所述的另一种自动填写答案的方法中,若所述目标试卷中的题目包含图片,则识别每一所述题目的所述题干区域的内容,并将每一所述题目的所述题干区域的内容转换为特征向量包括:
识别每一所述题干区域的字符信息,并通过题干向量化模型将每个所述题目的所述题干区域的内容转换为第一特征向量;
利用图片向量化模型将包含图片的所述题目的图片转换为第二特征向量;
对于不包含图片的所述题目,将所述第一特征向量作为所述特征向量,对于包含图片的所述题目,将所述第一特征向量和所述第二特征向量进行拼接,作为所述特征向量。
可选的,在所述的另一种自动填写答案的方法中,利用区域识别模型检测出所述样本试卷和所述目标试卷上各题目的位置区域,所述区域识别模型 通过预先对样本进行训练而得到。
可选的,在所述的另一种自动填写答案的方法中,在生成填写好答案的多个所述样本试卷的图像后,所述自动填写答案的方法还包括:
对多个所述样本试卷的图像进行文本校正和/或二值化处理。
基于同一思想,本发明还提供一种电子设备,包括处理器和存储器,所述存储器上存储有计算机程序,所述计算机程序被所述处理器执行时,实现如上所述的填写答案的方法。
基于同一思想,本发明还提供一种可读存储介质,所述可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时,实现如上所述的自动填写答案的方法。
在本发明提供的一种自动填写答案的方法、电子设备和可读存储介质中,在获取目标试卷的图像后,对所述图像进行检测,检测出所述目标试卷上各题目的位置区域,所述位置区域包括题干区域和作答区域,之后,识别每一所述题目的所述题干区域的内容,并根据每一所述题干区域的内容在题库中搜索每一所述题目的标准答案,并将每一所述题目的所述标准答案填写到相应所述作答区域。如此,便可根据用户提供的目标试卷的图像提供填好答案的试卷图像。相较于现有技术通过题干的文字来查找答案,本发明通过检测目标试卷图像的题干区域的内容,并根据题干区域的内容在题库中查找标准答案,可以避免因文字输入错误而无法查找到对应的答案的情况。另外,由于每次可获取整个目标试卷的图像,因此可以识别到所有题干的内容,进而可以找到所有题目的标准答案,相对于现有技术,大大提升了搜索效率。
在本发明提供的另一种自动填写答案的方法、电子设备和可读存储介质中,首先,对题库中所保存的多个样本试卷进行答案填写,并生成填写好答案的多个所述样本试卷的图像;之后,识别题库中所保存的多个样本试卷的各题目的位置区域,所述位置区域包括题干区域和作答区域;识别每一所述样本试卷的每一所述题目的所述题干区域的内容,并根据每一所述样本试卷的各所述题干区域的内容,填写标准答案至相应的所述作答区域,并生成填写好标准答案的多个所述样本试卷的图像;在获取目标试卷的图像后,对所述图像进行检测,检测出所述目标试卷上各题目的题干区域;识别所述目标 试卷的每一所述题目的所述题干区域的内容,在所述题库中搜索与每一所述题目的所述题干区域的内容相匹配的填写好标准答案的所述样本试卷的图像,并将搜索结果输出给用户端。如此,便可根据用户提供的目标试卷的图像输出填好答案的试卷图像。相较于现有技术通过题干的文字来查找答案,本发明通过检测目标试卷图像的题干区域的内容,并根据题干区域的内容在题库中查找题干内容相匹配的包含答案的样本试卷的图像,可以避免因文字输入错误而无法查找到对应的答案的情况,而且无需每个题目分别进行搜索,因此可大大提升搜索效率。
附图说明
本领域的普通技术人员将会理解,提供的附图用于更好地理解本发明,而不对本发明的范围构成任何限定。其中:
图1为本发明实施例提供的一种自动填写答案的方法的流程图;
图2为本发明实施例中字符大小随标注框尺寸而调整的示意图;
图3为本发明实施例提供的另一种自动填写答案的方法的流程图。
具体实施方式
本发明的核心思想在于解决现有技术在进行题目答案搜索时,搜索方式效率低,而且很容易出错,有部分文字内容不同就无法查找到对应的答案,而且每次只能搜索一个题目的答案等问题。
基于上述思想,本发明提供一种自动填写答案的方法、电子设备和可读存储介质,根据目标试卷的题干区域的内容在题库中查找标准答案,而后将标准答案填写到相应作答区域,使得根据用户提供的目标试卷的图像便可获取填好答案的试卷图像。
基于同一思想,本发明提供另一种自动填写答案的方法、电子设备和可读存储介质,根据目标试卷的题干区域的内容,在题库中查找题干内容与目标试卷的题干区域的内容相匹配的包含答案的样本试卷的图片,使得根据用户提供的目标试卷的图像便可输出填好答案的试卷图像。
以上,本发明提供的两种自动填写答案的方法、电子设备和可读存储介 质,相较于现有技术通过题干的文字来查找答案,可以避免因文字输入错误而无法查找到对应的答案的情况。另外,由于每次可获取整个目标试卷的图像,因此可以识别到所有题干的内容,进而可以通过所有题干的内容找到各自的标准答案,相对于现有技术,大大提升了搜索效率。
以下结合附图和具体实施例对本发明提出的自动填写答案的方法、电子设备和可读存储介质作进一步详细说明。为使本发明的目的、特征更明显易懂,下面结合附图对本发明的技术方案作详细的说明,然而,本发明可以用不同的形式实现,不应只是局限在所述的实施例。此外,需要说明的是,本文的框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机程序指令的组合来实现。对于本领域技术人员来说公知的是,通过硬件方式实现、通过软件方式实现以及通过软件和硬件结合的方式实现都是等价的。
如图1所示,为本发明实施例提供的自动填写答案的方法的流程图,该自动填写答案的方法包括如下步骤:
S11,获取目标试卷的图像,对所述图像进行检测,检测出所述目标试卷上各题目的位置区域,所述位置区域包括题干区域和作答区域;
S12,识别每一所述题目的所述题干区域的内容;
S13,根据每一所述题干区域的内容在题库中搜索每一所述题目的标准答案,并将每一所述题目的所述标准答案填写到相应所述作答区域。
通过上述步骤S11~S13,即可根据用户提供的目标试卷的图像提供填好答案的试卷图像。可见,相较于现有技术,操作简单,查找效率高且不容易出错。
以下对上述各步骤进行详细描述。
步骤S11中,可利用区域识别模型检测出所述目标试卷上各题目的位置区域,所述区域识别模型可通过预先对样本进行训练得到。当目标试卷上的题目为多个时,利用所述区域识别模型可识别出目标试卷的每个题目的位置区域。
具体的,所述区域识别模型可为基于神经网络的模型,例如,基于深度 卷积神经网络(Convolutional Neural Networks,CNN)的模型,可通过神经网络预先对试卷样本训练集中的样本进行训练得到的。利用训练好的区域识别模型从待搜索试卷的图像中提取二维特征向量,在二维特征向量的每个网格生成不同形状的锚点,使用标注框(Groundtruth Boxes)将检测出的每个题目的位置区域进行标注,还可以将标注框与生成的锚点作回归(regression)处理,以使标注框更贴近题目的实际位置。识别完题目区域后会将每个题目进行切割为单个图像,或者不实施切割,而是在处理时将每个题目区域区分开为单个区域图像进行处理,会根据题目位置信息进行排序。
本实施例中,较佳的,在利用区域识别模型对所述图像进行检测之前,先对获取的所述图像进行文档边缘识别、文本校正和二值化处理中的一种或多种。通过文档边缘识别可将目标图像从所拍摄图像中提取出来,通过文本校正,可使得文本图像记载的信息被更加准确的存储和传输,通过二值化处理,可使得文本图像中的信息更易被提取。所述文档边缘识别、所述文本校正和所述二值化处理可采用本领域人员所熟知的方法,在此不再赘述。
在检测出目标试卷每个题目的位置区域后,执行步骤S12。步骤S12中,可利用识别模型识别出各题目的题干区域中的内容,所述识别模型是基于神经网络的模型。首先标注出目标试卷题目中的各个组成部分,组成部分可以包括题干、答题和/或图片,进而通过识别模型识别出题目中题干的内容。其中,所述识别模型可以是基于空洞卷积和注意力模型建立的,具体的,采用空洞卷积对题干、答题和/或图片对应的标注框进行特征提取,再通过注意力模型将提取到的特征进行解码。
可选的,步骤S12中,在识别每一所述题目的所述题干区域的内容之后,可将每一所述题目的所述题干区域的内容转换为特征向量,进而步骤S13中,可采用向量搜索的方式搜索每一所述题目的标准答案。
在所述目标试卷的题目不包含图片时,各题目的题干区域的内容仅包括字符,故而步骤S12中,在识别出目标试卷各题干区域的字符信息后,将各题干区域的字符信息输入题干向量化模型,利用题干向量化模型将每一所述题目的所述题干区域的字符信息转换为第一特征向量,作为所述特征向量。具体的,将每一所述题目的所述题干区域的字符信息输入至所述题干向量化 模型,以使所述题干向量化模型将每一所述题目的所述题干区域的字符信息转换为第一特征向量。所述题干向量化模型也可通过预先对样本进行训练得到。具体的,所述题干向量化模型可以是基于神经网络的模型,如CNN模型,所述题干向量化模型可以通过以下步骤训练得到:对第一题目样本训练集中每个题目样本进行标注处理,标注出每个题目样本中题干的字符信息;利用神经网络模型对每个题目样本中题干的字符信息进行二维特征向量提取,从而训练得到所述题干向量化模型。其中,具体的训练过程属于现有技术,在此不做赘述。
在获取各题目的所述特征向量后,执行步骤S13,根据每一所述题干区域的特征向量在题库中搜索每一所述题目的标准答案。具体的,在题库中进行向量搜索,以查找出与每一所述题目的所述特征向量相匹配的目标特征向量,并在所述题库中提取每一所述特征向量所对应的标准答案,填写到相应所述题目的所述作答区域。
其中,可以通过向量近似搜索的方式,在题库中查找与每个题目的特征向量相匹配的目标特征向量,具体为在题库中查找与每个题目的特征向量距离最近的特征向量。可以理解的是,不同向量之间的相似性度量(Similarity Measurement)通常采用的方法就是计算向量间的“距离(Distance)”,常用的距离计算方式有:欧式距离、曼哈顿距离、夹角余弦(Cosine)等。
特别的,若所述目标试卷的一题目具有多个标准答案,则根据所述题目的所述作答区域的位置排列顺序将多个所述标准答案依次填写到所述作答区域。例如,第一行从左到右,然后到第二行。
另外,优选的,在将所述标准答案填写到所述作答区域时,还根据每一所述题目的所述作答区域的宽度数据和高度数据调整所述标准答案的字符大小。具体的,可包括如下步骤:根据每一所述题目的所述作答区域的宽度数据和高度数据确定所述作答区域的标注框尺寸;以每一所述题目的所述标注框尺寸的预设比例填写所述标准答案至相应所述题目的所述作答区域,所述预设比例不超过100%。例如,如图2所示,根据标注框的尺寸,第一题的“宋”字相对较大,第二题的“B”字相对较小。
本领域技术人员可以理解的是,待填写答案的目标试卷中经常会有包含 图片的题目,此时,图片也是题干区域的一个重要组成部分,因此,在进行题目的答案的搜索时结合题干中的字符信息和图片进行搜索,可以进一步提高搜索的准确度。
鉴于此,对于题目包含图片的目标试卷,步骤S12中,除了识别每一所述题干区域的字符信息,并通过题干向量化模型将每个所述题目的所述题干区域的内容转换为第一特征向量外,还包括:利用图片向量化模型将包含图片的所述题目的图片转换为第二特征向量;对于不包含图片的所述题目,将所述第一特征向量作为所述特征向量,对于包含图片的所述题目,将所述第一特征向量和所述第二特征向量进行拼接,作为所述特征向量。
其中,所述图片向量化模型可以是基于神经网络的模型,如CNN模型,所述图片向量化模型可以通过以下步骤训练得到:对第二题目样本训练集中每个题目样本进行标注处理,标注出每个题目样本中的图片;利用神经网络模型对每个题目样本中的图片进行二维特征向量提取,从而训练得到所述图片向量化模型。其中,第二题目样本训练集可以与第一题目样本训练集相同,也可以不同,本发明实施例对此不做限定。另外,具体的训练过程属于现有技术,在此不做赘述。
需要说明的是,当某一待搜索题目中包含两个及以上图片时,分别将各个图片输入图片向量化模型中,得到各个图片的第二特征向量,然后依次将各个图片的第二特征向量与题干的第一特征向量拼接在一起。由于不同题目的图片数量以及题干的文字数量不同,因此得到题目的特征向量的长度也是不同的。
对于连线类题目,这是一类比较特殊的题目,那么在进行答案填写的时候,可通过获取左侧题目最右侧字符行中线点的坐标和右侧答案最左侧字符中性点的坐标,渲染出连线连接两点。
在另外一些实施例中,步骤S12中,也可在识别每一所述题目的所述题干区域的内容后,不将其转换为特征向量,而是直接基于识别的内容在题库中进行标准答案的搜索。
基于同一思想,本发明另一实施例提供另一种自动填写答案的方法,如图3所示,包括如下步骤:
S21,识别题库中所保存的多个样本试卷的各题目的位置区域,所述位置区域包括题干区域和作答区域;
S22,识别每一所述样本试卷的每一所述题目的所述题干区域的内容,并根据每一所述样本试卷的各所述题干区域的内容,填写标准答案至相应的所述作答区域,并生成填写好标准答案的多个所述样本试卷的图像;
S23,在获取目标试卷的图像后,对所述图像进行检测,检测出所述目标试卷上各题目的题干区域;
S24,识别所述目标试卷的每一所述题目的所述题干区域的内容,在所述题库中搜索与每一所述题目的所述题干区域的内容相匹配的填写好标准答案的所述样本试卷的图像,并将搜索结果输出给用户端。
通过上述步骤S21~S24,即可根据用户提供的目标试卷的图像输出填好答案的试卷图像。可见,相较于现有技术,操作简单,查找效率高且不容易出错。
其中,较佳的,在执行步骤S23之前,对多个所述样本试卷的图像进行文本校正和/或二值化处理。通过文本校正,可使得样本试卷图像记载的信息被更加准确的存储和传输,通过二值化处理,可使得样本试卷图像中的信息更易被提取。
步骤S21及步骤S23中,同样的,可利用区域识别模型检测出所述目标试卷上各题目的位置区域,所述区域识别模型可通过预先对样本进行训练得到。
另外,与上一实施例所提供的自动填写答案的方法类似的,在获取目标试卷的题干区域的内容后,将题干区域的内容转换为特征向量,采用向量搜索的方式在题库中找到题干内容相匹配的样本试卷。
且同样的,若所述目标试卷中的题目不包含图片,则步骤S24中,在识别所述目标试卷的每一所述题目的所述题干区域的内容后,通过题干向量化模型将各所述题目的所述题干区域的内容转换为第一特征向量,作为所述特征向量。若所述目标试卷中的题目包含图片,则步骤S24还包括:识别每一所述题干区域的字符信息,并通过题干向量化模型将每个所述题目的所述题干区域的内容转换为第一特征向量;利用图片向量化模型将包含图片的所述 题目的图片转换为第二特征向量;对于不包含图片的所述题目,将所述第一特征向量作为所述特征向量,对于包含图片的所述题目,将所述第一特征向量和所述第二特征向量进行拼接,作为所述特征向量。
所述区域识别模型、所述题干向量化模型以及所述图片向量化模型与前文描述均一致,在此亦不再赘述。
本发明实施例还提供另一种电子设备,包括处理器和存储器,所述存储器用于存放计算机程序;所述计算机程序被所述处理器执行时实现上述步骤S11~S13。
关于该方法各个步骤的具体实现以及相关解释内容可以参见上述图1所示的方法实施例,在此不做赘述。
本发明另一实施例提供另一种电子设备,包括处理器和存储器,所述存储器用于存放计算机程序;所述计算机程序被所述处理器执行时实现上述步骤S21~S24。
关于该方法各个步骤的具体实现以及相关解释内容可以参见上述图3所示的方法实施例,在此不做赘述。
在本发明两个实施例所提供的所述电子设备中,所述存储器可以包括随机存取存储器(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)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。
本发明实施例还提供一种可读存储介质,所述可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时实现上述步骤S11~S13。
本发明另一实施例提供另一种可读存储介质,所述另一种可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现上述步骤S21~S24。
在本发明两个实施例提供的所述可读存储介质中,所述可读存储介质可以是可以保持和存储由指令执行设备使用的指令的有形设备,例如可以是但不限于电存储设备、磁存储设备、光存储设备、电磁存储设备、半导体存储设备或者上述的任意合适的组合。可读存储介质的更具体的例子(非穷举的列表)包括:便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、静态随机存取存储器(SRAM)、便携式压缩盘只读存储器(CD-ROM)、数字多功能盘(DVD)、记忆棒、软盘、机械编码设备以及上述的任意合适的组合。这里所描述的计算机程序可以从可读存储介质下载到各个计算/处理设备,或者通过网络、例如因特网、局域网、广域网和/或无线网下载到外部计算机或外部存储设备。网络可以包括铜传输电缆、光纤传输、无线传输、路由器、防火墙、交换机、网关计算机和/或边缘服务器。每个计算/处理设备中的网络适配卡或者网络接口从网络接收所述计算机程序,并转发该计算机程序,以供存储在各个计算/处理设备中的可读存储介质中。用于执行本发明操作的计算机程序可以是汇编指令、指令集架构(ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码,所述编程语言包括面向对象的编程语言—诸如Smalltalk、C++等,以及常规的过程式编程语言—诸如“C”语言或类似的编程语言。所述计算机程序可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络,包括局域网(LAN)或广域网(WAN),连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。在一些实施例中,通过利用计算机程序的状态信息来个性化定制电子电路,例如可编程逻辑电路、现场可编程门阵列(FPGA)或可编程逻辑阵列(PLA),该电子电路可以执行计算机可读程序指令,从而实现本发明的各个方面。
这里参照根据本发明实施例的方法、系统和计算机程序产品的流程图和/或框图描述了本发明的各个方面。应当理解,流程图和/或框图的每个方框以及流程图和/或框图中各方框的组合,都可以由计算机程序实现。这些计算机 程序可以提供给通用计算机、专用计算机或其它可编程数据处理装置的处理器,从而生产出一种机器,使得这些程序在通过计算机或其它可编程数据处理装置的处理器执行时,产生了实现流程图和/或框图中的一个或多个方框中规定的功能/动作的装置。也可以把这些计算机程序存储在可读存储介质中,这些计算机程序使得计算机、可编程数据处理装置和/或其他设备以特定方式工作,从而,存储有该计算机程序的可读存储介质则包括一个制造品,其包括实现流程图和/或框图中的一个或多个方框中规定的功能/动作的各个方面的指令。
也可以把计算机程序加载到计算机、其它可编程数据处理装置、或其它设备上,使得在计算机、其它可编程数据处理装置或其它设备上执行一系列操作步骤,以产生计算机实现的过程,从而使得在计算机、其它可编程数据处理装置、或其它设备上执行的计算机程序实现流程图和/或框图中的一个或多个方框中规定的功能/动作。
综上所述,本发明提供的自动填写答案的方法、电子设备和可读存储介质,通过将目标试卷的题干区域的内容转化为特征向量,并以特征向量的形式在题库中查找标准答案,而后将标准答案填写到相应作答区域,使得根据用户提供的目标试卷的图像便可提供填好答案的试卷图像;或者,通过将目标试卷的题干的内容转化为特征向量,并以特征向量的形式在题库中查找相匹配的特征向量所对应的包含答案的样本试卷的图片,使得根据用户提供的目标试卷的图像便可输出填好答案的试卷图像,因此,相对于现有技术,可避免因文字输入错误而无法查找到对应的答案的情况,也可大大提升搜索效率。
需要说明的是,本说明书中的各个实施例均采用相关的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于电子设备、计算机可读存储介质实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
上述描述仅是对本发明较佳实施例的描述,并非对本发明范围的任何限定,本发明领域的普通技术人员根据上述揭示内容做的任何变更、修饰,均属于权利要求书的保护范围。

Claims (19)

  1. 一种自动填写答案的方法,其特征在于,包括:
    获取目标试卷的图像,对所述图像进行检测,检测出所述目标试卷上各题目的位置区域,所述位置区域包括题干区域和作答区域;
    识别每一所述题目的所述题干区域的内容,根据每一所述题干区域的内容在题库中搜索每一所述题目的标准答案,并将每一所述题目的所述标准答案填写到相应所述作答区域。
  2. 如权利要求1所述的自动填写答案的方法,其特征在于,在将每一所述题目的所述标准答案填写到相应的所述作答区域时,所述自动填写答案的方法还包括:
    根据每一所述题目的所述作答区域的宽度数据和高度数据调整所述标准答案的字符大小。
  3. 如权利要求2所述的自动填写答案的方法,其特征在于,根据每一所述作答区域的宽度数据和高度数据调整所述标准答案的字符大小包括:
    根据每一所述题目的所述作答区域的宽度数据和高度数据确定所述作答区域的标注框尺寸;
    以每一所述题目的所述标注框尺寸的预设比例填写所述标准答案至相应所述题目的所述作答区域,所述预设比例不超过100%。
  4. 如权利要求1所述的自动填写答案的方法,其特征在于,若所述目标试卷的一所述题目具有多个标准答案,则根据所述题目的所述作答区域的位置排列顺序将多个所述标准答案依次填写到所述作答区域。
  5. 如权利要求1所述的自动填写答案的方法,其特征在于,所述识别每一所述题目的所述题干区域的内容,根据每一所述题干区域的内容在题库中搜索每一所述题目的标准答案包括:
    识别每一所述题目的所述题干区域的内容,并将每一所述题目的所述题干区域的内容转换为特征向量;
    在题库中进行向量搜索,以查找出与每一所述题目的所述特征向量相匹配的目标特征向量,并在所述题库中提取每一所述目标特征向量所对应的标 准答案。
  6. 如权利要求5所述的自动填写答案的方法,其特征在于,若所述目标试卷中的所述题目不包含图片,则识别每一所述题目的所述题干区域的内容,并将每一所述题目的所述题干区域的内容转换为特征向量包括:
    识别每一所述题干区域的字符信息,并通过题干向量化模型将各所述题目的所述题干区域的内容转换为第一特征向量,作为所述特征向量。
  7. 如权利要求5所述的自动填写答案的方法,其特征在于,若所述目标试卷中的所述题目包含图片,则识别每一所述题目的所述题干区域的内容,并将每一所述题目的所述题干区域的内容转换为特征向量包括:
    识别每一所述题干区域的字符信息,并通过题干向量化模型将每个所述题目的所述题干区域的内容转换为第一特征向量;
    利用图片向量化模型将包含图片的所述题目的图片转换为第二特征向量;
    对于不包含图片的所述题目,将所述第一特征向量作为所述特征向量,对于包含图片的所述题目,将所述第一特征向量和所述第二特征向量进行拼接,作为所述特征向量。
  8. 如权利要求1所述的自动填写答案的方法,其特征在于,利用区域识别模型检测出所述目标试卷上各题目的位置区域,所述区域识别模型通过预先对样本进行训练而得到。
  9. 如权利要求1所述的自动填写答案的方法,其特征在于,在利用区域识别模型对所述图像进行检测之前,所述自动填写答案的方法还包括:
    对获取的所述图像进行文档边缘识别、文本校正和二值化处理中的一种或多种。
  10. 一种自动填写答案的方法,其特征在于,包括:
    识别题库中所保存的多个样本试卷的各题目的位置区域,所述位置区域包括题干区域和作答区域;
    识别每一所述样本试卷的每一所述题目的所述题干区域的内容,并根据每一所述样本试卷的各所述题干区域的内容,填写标准答案至相应的所述作答区域,并生成填写好标准答案的多个所述样本试卷的图像;
    在获取目标试卷的图像后,对所述图像进行检测,检测出所述目标试卷上各题目的题干区域;
    识别所述目标试卷的每一所述题目的所述题干区域的内容,在所述题库中搜索与每一所述题目的所述题干区域的内容相匹配的填写好标准答案的所述样本试卷的图像,并将搜索结果输出给用户端。
  11. 如权利要求10所述的自动填写答案的方法,其特征在于,在将每一所述样本试卷的每一所述题目的所述标准答案填写到相应的所述作答区域时,所述自动填写答案的方法还包括:
    根据每一所述样本试卷的每一所述题目的所述作答区域的宽度数据和高度数据调整所述标准答案的字符大小。
  12. 如权利要求11所述的自动填写答案的方法,其特征在于,根据每一所述样本试卷的每一所述题目的所述作答区域的宽度数据和高度数据调整所述标准答案的字符大小包括:
    根据每一所述样本试卷的每一所述题目的所述作答区域的宽度数据和高度数据确定相应所述作答区域的标注框尺寸;
    以每一所述样本试卷的每一所述题目的所述标注框尺寸的预设比例填写所述标准答案至相应所述作答区域,所述预设比例不超过100%。
  13. 如权利要求10所述的自动填写答案的方法,其特征在于,所述识别所述目标试卷的每一所述题目的所述题干区域的内容,在所述题库中搜索与每一所述题目的所述题干区域的内容相匹配的填写好标准答案的所述样本试卷的图像,并将搜索结果输出给用户端包括:
    识别所述目标试卷的每一所述题目的所述题干区域的内容,并将每一所述题目的所述题干区域的内容转换为特征向量;
    在所述题库中进行向量搜索,以获取特征向量与每一所述题目的所述特征向量相匹配的填写好标准答案的所述样本试卷的图像,并将搜索结果输出给用户端。
  14. 如权利要求13所述的自动填写答案的方法,其特征在于,若所述目标试卷中的题目不包含图片,则识别每一所述题目的所述题干区域的内容,并通过将每一所述题目的所述题干区域的内容转换为特征向量包括:
    识别每一所述题干区域的字符信息,并通过题干向量化模型将各所述题目的所述题干区域的内容转换为第一特征向量,作为所述特征向量。
  15. 如权利要求13所述的自动填写答案的方法,其特征在于,若所述目标试卷中的题目包含图片,则识别每一所述题目的所述题干区域的内容,并将每一所述题目的所述题干区域的内容转换为特征向量包括:
    识别每一所述题干区域的字符信息,并通过题干向量化模型将每个所述题目的所述题干区域的内容转换为第一特征向量;
    利用图片向量化模型将包含图片的所述题目的图片转换为第二特征向量;
    对于不包含图片的所述题目,将所述第一特征向量作为所述特征向量,对于包含图片的所述题目,将所述第一特征向量和所述第二特征向量进行拼接,作为所述特征向量。
  16. 如权利要求10所述的自动填写答案的方法,其特征在于,利用区域识别模型检测出所述样本试卷和所述目标试卷上各题目的位置区域,所述区域识别模型通过预先对样本进行训练而得到。
  17. 如权利要求10所述的自动填写答案的方法,其特征在于,在生成填写好标准答案的多个所述样本试卷的图像后,所述自动填写答案的方法还包括:
    对多个所述样本试卷的图像进行文本校正和/或二值化处理。
  18. 一种电子设备,其特征在于,包括处理器和存储器,所述存储器上存储有计算机程序,所述计算机程序被所述处理器执行时,实现如权利要求1至17任一项所述的方法。
  19. 一种可读存储介质,其特征在于,所述可读存储介质内存储有计算机程序,所述计算机程序被处理器执行时,实现如权利要求1至17任一项所述的方法。
PCT/CN2021/117224 2020-09-15 2021-09-08 自动填写答案的方法、电子设备和可读存储介质 WO2022057708A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010968795.0 2020-09-15
CN202010968795.0A CN112069349A (zh) 2020-09-15 2020-09-15 自动填写答案的方法、电子设备和可读存储介质

Publications (1)

Publication Number Publication Date
WO2022057708A1 true WO2022057708A1 (zh) 2022-03-24

Family

ID=73695922

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/117224 WO2022057708A1 (zh) 2020-09-15 2021-09-08 自动填写答案的方法、电子设备和可读存储介质

Country Status (2)

Country Link
CN (1) CN112069349A (zh)
WO (1) WO2022057708A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115565190A (zh) * 2022-11-17 2023-01-03 江西风向标智能科技有限公司 试卷版面分析方法、系统、计算机及可读存储介质
CN117058700A (zh) * 2023-07-03 2023-11-14 北京博思创成技术发展有限公司 答题卡识别方法、装置、设备和存储介质
CN117216312A (zh) * 2023-11-06 2023-12-12 长沙探月科技有限公司 提问素材的生成方法、装置、电子设备和存储介质

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112069349A (zh) * 2020-09-15 2020-12-11 杭州大拿科技股份有限公司 自动填写答案的方法、电子设备和可读存储介质
CN113239717A (zh) * 2021-02-26 2021-08-10 北京百度网讯科技有限公司 用于处理题目的方法、装置、设备、介质和程序产品
CN113111154B (zh) * 2021-06-11 2021-10-29 北京世纪好未来教育科技有限公司 相似度评估方法、答案搜索方法、装置、设备及介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106934039A (zh) * 2017-03-15 2017-07-07 泰康保险集团股份有限公司 问卷生成方法及装置
CN109271401A (zh) * 2018-09-26 2019-01-25 杭州大拿科技股份有限公司 一种题目搜索、批改方法、装置、电子设备和存储介质
CN109326161A (zh) * 2018-12-05 2019-02-12 杭州大拿科技股份有限公司 一种试卷批改一体机
CN109712456A (zh) * 2019-01-15 2019-05-03 山东仁博信息科技有限公司 一种基于摄像头的学生纸质作业智能批阅系统
CN112069349A (zh) * 2020-09-15 2020-12-11 杭州大拿科技股份有限公司 自动填写答案的方法、电子设备和可读存储介质

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109634961B (zh) * 2018-12-05 2021-06-04 杭州大拿科技股份有限公司 一种试卷样本生成方法、装置、电子设备和存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106934039A (zh) * 2017-03-15 2017-07-07 泰康保险集团股份有限公司 问卷生成方法及装置
CN109271401A (zh) * 2018-09-26 2019-01-25 杭州大拿科技股份有限公司 一种题目搜索、批改方法、装置、电子设备和存储介质
CN109326161A (zh) * 2018-12-05 2019-02-12 杭州大拿科技股份有限公司 一种试卷批改一体机
CN109712456A (zh) * 2019-01-15 2019-05-03 山东仁博信息科技有限公司 一种基于摄像头的学生纸质作业智能批阅系统
CN112069349A (zh) * 2020-09-15 2020-12-11 杭州大拿科技股份有限公司 自动填写答案的方法、电子设备和可读存储介质

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115565190A (zh) * 2022-11-17 2023-01-03 江西风向标智能科技有限公司 试卷版面分析方法、系统、计算机及可读存储介质
CN117058700A (zh) * 2023-07-03 2023-11-14 北京博思创成技术发展有限公司 答题卡识别方法、装置、设备和存储介质
CN117058700B (zh) * 2023-07-03 2024-03-22 北京博思创成技术发展有限公司 答题卡识别方法、装置、设备和存储介质
CN117216312A (zh) * 2023-11-06 2023-12-12 长沙探月科技有限公司 提问素材的生成方法、装置、电子设备和存储介质
CN117216312B (zh) * 2023-11-06 2024-01-26 长沙探月科技有限公司 提问素材的生成方法、装置、电子设备和存储介质

Also Published As

Publication number Publication date
CN112069349A (zh) 2020-12-11

Similar Documents

Publication Publication Date Title
WO2022057708A1 (zh) 自动填写答案的方法、电子设备和可读存储介质
US10936828B2 (en) Neural machine translation systems with rare word processing
CN109271401B (zh) 一种题目搜索、批改方法、装置、电子设备和存储介质
JP7122341B2 (ja) 翻訳品質を評価するための方法と装置
WO2022111548A1 (zh) 合同审阅方法、装置及可读存储介质
CN109284355B (zh) 一种批改试卷中口算题的方法及装置
JP2016536652A (ja) モバイル機器におけるリアルタイム音声評価システム及び方法
WO2023137913A1 (zh) 基于多模态模型的视频文本摘要方法、设备及存储介质
CN109189895B (zh) 一种针对口算题的题目批改方法及装置
JP6151404B1 (ja) 学習装置、学習方法および学習プログラム
US9588952B2 (en) Collaboratively reconstituting tables
WO2020063347A1 (zh) 针对口算题的题目批改方法、装置、电子设备和存储介质
CN113360699A (zh) 模型训练方法和装置、图像问答方法和装置
CN113157959A (zh) 基于多模态主题补充的跨模态检索方法、装置及系统
JP2017199383A (ja) モデル
JP2020071839A (ja) 探索装置、探索方法、探索プログラムおよび記録媒体
JP2022185143A (ja) テキスト検出方法、テキスト認識方法及び装置
CN109522920B (zh) 基于结合语义特征的同义判别模型的训练方法及设备
CN108491387B (zh) 用于输出信息的方法和装置
CN111460224B (zh) 评论数据的质量标注方法、装置、设备及存储介质
CN112765976A (zh) 文本相似度计算方法、装置、设备及存储介质
WO2020134750A1 (zh) 一种答案批改方法及装置
CN109522451B (zh) 重复视频检测方法和装置
CN115270768A (zh) 用于文本中待纠错的目标重点词确定的方法与设备
CN116229313A (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: 21868533

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21868533

Country of ref document: EP

Kind code of ref document: A1