Question answer selection method and device and electronic equipment
1. A method for selecting answers to questions is characterized by comprising the following steps:
acquiring topic information uploaded by a user, and splitting the topic information into one or more sections;
extracting key information of each section;
determining whether each measure belongs to prompt information or a question according to the content of the measure, and judging the type of the question corresponding to the measure when the measure belongs to the question;
and for each section belonging to the question, selecting the answer with the highest matching degree with the question of the section based on the subject information, the key information of the section and the question type corresponding to the section.
2. The method for question answer selection according to claim 1, wherein the question type includes at least one of the following:
numerical solving problems, judging type problems, open type problems without fixed answers, non-text description problems.
3. The method for selecting answers to questions as set forth in claim 1,
inputting the one or more sections into a key information extraction model to obtain key information of each section;
inputting the one or more sections into a question type judgment model to determine whether each section belongs to prompt information or a question, and if the section belongs to the question, outputting a question type;
wherein, optionally, the key information extraction model is a deep learning-based TextCNN neural network model,
wherein, optionally, the question type judging model is a TextCNN neural network model based on deep learning.
4. The method for selecting a topic answer according to claim 1, wherein the obtaining of the topic information uploaded by the user comprises:
receiving a picture file uploaded by a user; and inputting the picture file into a topic information extraction model, and outputting topic information in the picture file by the topic information extraction model.
5. The topic answer selection method of claim 1, wherein the splitting the topic information into one or more sections comprises:
inputting the title information into a separator judgment model, and outputting labels of the separators in the title information by the separator judgment model, wherein the labels comprise punctuated sentences and non-punctuated sentences;
splitting the topic information into one or more sections based on the tags of the delimiters.
6. The method for selecting a topic answer according to claim 5, wherein: the separator judgment model is a sequence labeling model and comprises an input layer, a coding layer and an output layer;
optionally, the encoding layer adopts a bidirectional long and short memory network LSTM encoder, and the output layer adopts a serialized labeling algorithm CRF.
7. A title retrieval method, characterized in that the method comprises:
uploading question information, wherein the question information comprises a plurality of questions;
receiving answers retrieved for each section obtained by a server according to the method of any of claims 1-6.
8. An answer selection device based on key information, the device comprising:
the information extraction module is used for acquiring the topic information uploaded by a user and splitting the topic information into one or more sections;
the key information extraction module is used for extracting key information of each measure;
the question type determining module is used for determining whether each measure belongs to prompt information or a question according to the content of the measure and judging the question type corresponding to the measure when the measure belongs to the question;
and the answer selecting module is used for selecting the answer with the highest matching degree with the question of the measure based on the question information, the key information corresponding to the measure and the question type corresponding to the measure.
9. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-6.
10. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-6.
Background
In the traditional teaching mode, the students finish homework and examination papers and then are manually judged by teachers, the efficiency is relatively low, and the students cannot know whether answer questions are correct or not in the first time.
With the development of internet technology, various applications of photographing and searching questions gradually appear at present, so that students can obtain answers and a question solving process of test questions by photographing and judge whether the students do the questions correctly or not without waiting for judgment of teachers when independently learning and doing the questions.
However, a very large number of test questions and answers are collected in the answer library, and some test questions correspond to multiple answers, such as "7 years old of Ming today, dad 26 years old of Ming, dad is old of today? The "answers include" age 33 "and" 7+26 ═ 33 ", where the system does not know which answer is more reasonable and more accurate, and there is a possibility that the given answer is not completely correct or does not correspond exactly, giving the user a poor experience.
Disclosure of Invention
Technical problem to be solved
The invention aims to solve the problem that when one test question corresponds to a plurality of answers in the existing answer library, the given answers are not completely correct or not accurately matched, so that the user experience is not good.
(II) technical scheme
In order to solve the above technical problem, an aspect of the present invention provides a question answer selecting method, including:
acquiring topic information uploaded by a user, and splitting the topic information into one or more sections;
extracting key information of each section;
determining whether each measure belongs to prompt information or a question according to the content of the measure, and judging the type of the question corresponding to the measure when the measure belongs to the question;
and for the sections belonging to the question, selecting the answer with the highest matching degree with the question of each section based on the subject information, the key information of the section and the question type corresponding to the section.
In an exemplary embodiment of the invention, the problem topic comprises at least one of the following:
numerical solving problems, judging type problems, open type problems without fixed answers, non-text description problems.
In an exemplary embodiment of the present invention, the one or more sections are input to a key information extraction model to acquire key information of each of the sections;
inputting the one or more sections into a question type judgment model to determine the question type corresponding to each section;
wherein, optionally, the key information extraction model is a deep learning-based TextCNN neural network model,
wherein, optionally, the question type judging model is a TextCNN neural network model based on deep learning.
In an exemplary embodiment of the present invention, the obtaining of the title information uploaded by the user includes:
receiving a picture file uploaded by a user; and inputting the picture file into a topic information extraction model, and outputting topic information in the picture file by the topic information extraction model.
In an exemplary embodiment of the present invention, the splitting the topic information into one or more sections includes:
inputting the title information into a separator judgment model, and outputting labels of the separators in the title information by the separator judgment model, wherein the labels comprise punctuated sentences and non-punctuated sentences;
splitting the topic information into one or more sections based on the tags of the delimiters.
In an exemplary embodiment of the present invention, the delimiter judgment model is a sequence annotation model, and includes an input layer, an encoding layer, and an output layer;
optionally, the encoding layer adopts a bidirectional long and short memory network LSTM encoder, and the output layer adopts a serialized labeling algorithm CRF.
The second aspect of the present invention provides a title retrieval method, including: uploading question information, wherein the question information comprises a plurality of questions; receiving answers retrieved for each section obtained by the server according to any of the methods.
The third aspect of the present invention provides an answer selecting device based on key information, the device comprising:
the information extraction module is used for acquiring the topic information uploaded by a user and splitting the topic information into one or more sections;
a key information extraction module for extracting key information of each section;
the question type determining module is used for determining whether each measure belongs to prompt information or a question according to the content of the measure and judging the question type corresponding to the measure when the measure belongs to the question;
and the answer selecting module is used for selecting the answer with the highest matching degree with the question of the measure based on the question information, the key information corresponding to the measure and the question type corresponding to the measure.
A fourth aspect of the present invention provides an electronic device, comprising:
one or more processors;
storage means for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement any of the methods described herein.
A fifth aspect of the invention proposes a computer-readable medium, on which a computer program is stored, characterized in that said program, when being executed by a processor, implements any of the methods described.
(III) advantageous effects
According to the method and the device, the question is split, the question is refined into one or more sections, the question type and the key information of the sections are determined, the best-matched answer is selected from the multiple answers according to the question type and the key information, the accuracy of the answer is improved, the matching is more accurate, and the user experience is better.
Drawings
FIG. 1 is a schematic diagram of an application scenario structure of the present invention;
FIG. 2 is a flowchart illustrating an answer selection method for application questions based on key information according to an embodiment of the present invention;
FIG. 3 is a flow diagram illustrating the splitting of an application topic in an embodiment of the present invention;
FIG. 4 is a schematic flow chart of an embodiment of the present invention;
FIG. 5 is a schematic diagram of an apparatus for selecting answers to application questions based on key information according to an embodiment of the present invention;
FIG. 6 is a schematic structural diagram of an electronic device of one embodiment of the invention;
fig. 7 is a schematic diagram of a computer-readable recording medium of an embodiment of the present invention.
Detailed Description
In describing particular embodiments, specific details of structures, properties, effects, or other features are set forth in order to provide a thorough understanding of the embodiments by one skilled in the art. However, it is not excluded that a person skilled in the art may implement the invention in a specific case without the above-described structures, performances, effects or other features.
The flow chart in the drawings is only an exemplary flow demonstration, and does not represent that all the contents, operations and steps in the flow chart are necessarily included in the scheme of the invention, nor does it represent that the execution is necessarily performed in the order shown in the drawings. For example, some operations/steps in the flowcharts may be divided, some operations/steps may be combined or partially combined, and the like, and the execution order shown in the flowcharts may be changed according to actual situations without departing from the gist of the present invention.
The block diagrams in the figures generally represent functional entities and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different network and/or processing unit devices and/or microcontroller devices.
The same reference numerals denote the same or similar elements, components, or parts throughout the drawings, and thus, a repetitive description thereof may be omitted hereinafter. It will be further understood that, although the terms first, second, third, etc. may be used herein to describe various elements, components, or sections, these elements, components, or sections should not be limited by these terms. That is, these phrases are used only to distinguish one from another. For example, a first device may also be referred to as a second device without departing from the spirit of the present invention. Furthermore, the term "and/or", "and/or" is intended to include all combinations of any one or more of the listed items.
In order to solve the technical problems, the question answer selection method can be applied to test question photographing judgment scenes and devices, after a user uploads a test question photo with an answer, judgment can be carried out according to the question content and the answer content of the user, the right and wrong judgment can be directly carried out, and waiting for a teacher to manually judge is not needed.
Fig. 1 is a schematic diagram of an application scenario structure of the present invention. As shown in fig. 1, a user downloads and installs a client in a terminal 101 or a terminal 102, and uploads a photo of a test question with an answer written thereto to an application server 103 through a network 105 using the client. The terminals 101, 102 include, but are not limited to, smart phones, tablet computers, laptop portable computers, desktop computers, and the like. Network 105 may include various connection types, such as wired, wireless communication links, wired communication links including fiber optic cables, and the like, for example.
In the application server 103, the answer library 104 is searched according to the contents of the test questions. Stored in the answer library 104 are questions and answers according to respective test questions.
After retrieving the answer corresponding to the test question, the application server 103 presents the answer to the user, and the user determines whether the answer is correct according to the answer.
The topic answer selection method of the present application can be applied to different subjects, such as subjects of mathematics, language, foreign language, history, and the like, and in the embodiment of the present embodiment, the actual scene applied to mathematics is mainly taken as an example for description, and it should be clear to those skilled in the art that the technical solution of the present embodiment can also be applied to other subjects.
In the embodiment, the application questions are used as an example for explanation, but it should be understood by those skilled in the art that the question answer selecting method of the present application can also be applied to other question types, such as filling, selecting, judging, asking and answering questions, etc.
Further, the topic answer selection method is based on key information extraction, and primary answer matching is conducted based on the extracted key information.
Further, the topic answer selection method of the application is realized based on a neural network model.
Furthermore, the topic answer selection method is mainly applied to application topics.
The answer to the title of the present application is described below with reference to the accompanying drawings by referring to specific embodiments. The following description will be given mainly by taking the application title as an example.
Fig. 2 is a schematic flowchart of an application question answer selection method based on key information according to an embodiment of the present invention, as shown in fig. 2, the method includes:
s201, acquiring topic information uploaded by a user, and splitting the topic information into one or more sections.
In this embodiment, the user usually takes a picture of a problem encountered in the learning process and uploads the picture, and the server extracts the topic information in the picture after receiving the picture uploaded by the user. Taking the application questions as an example, the general application questions have long question contents, many prompt messages, and may also contain one or more questions, and in order to accurately match answers, the application questions need to be split into several small questions, and answer matching is performed respectively. For example, "knowing that three sides of the triangle ABC, AB, BC and AC are equal, solving the angle of ≤ a, the angle of ≤ B and the angle of ≤ C" includes 3 questions.
The sentence described by the title may be a question or a prompt. The type of question may include at least one of: numerical solving problems, judging type problems, open type problems without fixed answers, non-text description problems.
For example, the obtaining of the title information uploaded by the user in step S201 may include: receiving a picture file uploaded by a user; and inputting the picture file into a topic information extraction model, and outputting topic information in the picture file by the topic information extraction model.
In the present embodiment, a recognition model based on a neural network is constructed in advance, and the topics in the picture are recognized by the recognition model. The recognition model based on the Neural Network is a CPTN (connected Text forward Network, natural scene Text detection) combined with a CRNN (cyclic Convolutional Neural Network) Neural Network model. The recognition model is trained using a large amount of historical print text data and handwritten text data.
For example, the splitting the application topic information in step S201 may specifically include the following steps, as shown in fig. 3:
and S2011, inputting the topic information into a separator judgment model, and outputting labels of the separators in the topic information by the separator judgment model, wherein the labels comprise punctuations and non-punctuations.
In this embodiment, the separator is a punctuation mark in the application topic information, and one separator is provided for each punctuation mark. If the label of the separator output by the separator judgment model is a punctuation, the judgment indicates that the separation is needed, and if the label is a non-punctuation, the surface does not need to be separated.
On the basis of the above technical solution, further, the delimiter judgment model is a sequence annotation model, and includes an input layer, an encoding layer, and an output layer.
On the basis of the technical scheme, the coding layer adopts a two-way long and short memory network LSTM coder, and the output layer adopts a serialization labeling algorithm CRF.
In this embodiment, the input layer converts the input content of the user into a vector, the coding layer performs feature extraction on the converted word vector code, and the output layer outputs a tag result.
Vectorization of text, i.e., the use of numerical features to represent text, because computers cannot directly understand natural language. In order to make a computer understand natural language, it is necessary to map text information into a digitized semantic space, which we can refer to as a word vector space. There are many algorithms for converting text into vectors, such as TF-IDF, BOW, One-Hot, word2vec, etc. In the embodiment, the vectorization of the text adopts a word2vec algorithm, the word2vec model is an unsupervised learning model, and the mapping of the text information to the semantic space can be realized by using the training of an unmarked corpus. In this embodiment, punctuation symbols are also converted to fixed vector values.
And the coding layer extracts the features of the oppositely quantized text, the output layer restrains the extracted features, the accuracy is improved, and finally the labels of the separators are output.
Because context needs to be considered for the judgment of the separators, the coding layer adopts the two-way long and short memory network LSTM coder, which can better consider the words before and after the sentence, such as 'I do not feel good weather today', wherein 'not' is to limit the following 'good weather', which means negation of good weather, the two-way long and short memory network model can better capture the dependency relationship of longer distance, and the two-way long and short memory network model can also consider the limitation of the following words to the preceding words, such as 'cold weather is not in use today', wherein 'is to modify and limit cold'.
The output layer using the CRF layer may add some constraints to ensure that the final prediction result is valid. The constraints can be obtained by the automatic learning of the CRF layer during the training of data, and with the useful constraints, the wrong prediction sequence can be greatly reduced, and the accuracy of the output layer is improved.
S2012, the topic information is split into one or more application topic sections based on the labels of the separators.
For example, in the present embodiment, after the label of the separator is determined, the application topic information may be split.
For example, the question information of the application question is "knowing that three sides of a triangle ABC, AB, BC and AC are equal, how much the angle of? "after the separator judgment model is input in this case, the output result is 1, 0, 0, 0, 1, 1, 1, 1. Here, 1 indicates that the tag is a punctuation, and 0 indicates that the tag is a non-punctuation. The application question can be divided into 5 application question sections of "known triangle ABC", "existence of AB, BC and AC, three sides are equal", "how much the angle of < A", "how much the angle of < B" and how much the angle of < C ".
And S202, extracting key information of each measure.
On the basis of the technical scheme, further, the key information extraction model can be a TextCNN neural network model based on deep learning.
In the present embodiment, the information of the application topic measure is subjected to key information extraction using the TextCNN neural network model based on deep learning. The key information extraction model is trained by using a large amount of historical application problem data. In this embodiment, the extracted key information is a unit, for example, the application topic "7 years old of Xiaoming this year, 26 years old of dad greater than Xiaoming, and several years old of dad this year? "key information in the topic is" age: year of year "; in the application problem of 'knowing that three sides of triangle ABC, AB, BC and AC are equal, the key information of the problem is' angle: degree ".
S203, determining whether each measure belongs to the prompt message or the question according to the content of the measure, and judging the question type corresponding to the measure when the measure belongs to the question.
Illustratively, the topic judgment model may be a deep learning-based TextCNN neural network model.
In the present embodiment, the question type to which the question measure is applied is determined using the TextCNN neural network model based on deep learning. The question type judging model is formed by training a large amount of historical application question data. And the question type judging model determines whether each section belongs to prompt information or a question, and if the section belongs to the question, the question type is output. In this embodiment, possible outputs of the question type determination model include numerical questions, question-and-answer questions, open questions, non-text description questions, and prompt information.
The numerical problem is a problem of solving various numerical values, such as the aforementioned problem of finding ages and years. Whether the question belongs to the judgment type subjects, such as ' Xiaoming 7 o ' clock half-out, which requires 20 minutes for him to go to school, whether he can arrive at school before 8 o ' clock ', ' 20 candies exist, Xiaoming takes 8 candies, Xiaomao takes the rest of candies, and ask for a fair distribution. Open questions are questions that have no fixed answer, such as "drawing a figure with an area of 36 square centimeters". Non-textual description questions refer to the problem of orientation or how marked on axes, such as roads and buildings, are drawn on a graph, going from a starting point to an ending point. The prompt message refers to the content of the application program that describes the text, such as "Xiaoming is 7 years old today" and "dad is 26 years old than Xiaoming" in the foregoing.
S204, for the sections belonging to the question, selecting the answer with the highest matching degree with the question of each section from a plurality of answers based on the question information, the key information of the sections and the question type corresponding to the sections.
The alternative answers can be preliminarily retrieved according to case information of the titles; or, the candidate answer may be obtained according to an existing common retrieval method, and the candidate answer may have a problem that the matching degree is not high or a plurality of matches exist. And selecting an answer with the highest matching degree with the question of each measure from a plurality of candidate answers based on the key information of the measure and the question type corresponding to the measure. In this embodiment, a plurality of relevant answers collected by the historical search may be collected to form an answer library of alternative answers. The answers in the answer library are classified according to different question types, and a plurality of questions may have basically the same question information and only slightly differ from the last question, for example, "20 candies exist, 8 candies exist in the case of small hair, the remaining candies exist in the case of small hair, the fair distribution is asked," 20 candies exist, 8 candies exist in the case of small hair, the remaining candies exist in the case of small hair, and a plurality of small hair are asked, the two questions are very close to each other, but one question can be a question or not, and the other question is a numerical question. The classification in the answer library is thus determined by applying the question type corresponding to the question section. And then matching answers in an answer library by using a matching model based on the application question information, and finally determining the answers based on the key information corresponding to the sections of the application questions.
In the present embodiment, the one or more sections are input to a key information extraction model to acquire key information of each of the sections; inputting the one or more sections into a question type judgment model to determine the question type corresponding to each section; the key information extraction model is a deep learning-based TextCNN neural network model, and the question type judgment model is a deep learning-based TextCNN neural network model. The following is a detailed description of the scheme by an embodiment, and the flow is shown in fig. 4.
S401, uploading a picture file by a user;
s402, inputting the picture file into an information extraction model to obtain application topic information, wherein the topic information is' Xiaoming 7 years old this year, dad 26 years old than Xiaoming, dad several years old this year? ";
s403, inputting the application topic information into a separator judgment model, and outputting 1, 1, 1 by the separator judgment model;
s404, according to the separator labels, the application topic information is divided into three application topic subsections, namely ' Xiaoming this year is 7 years old ', ' dad is 26 years old than Xiaoming Ming ', and ' dad ' S year old ';
s405, inputting the three application question sections into a key information extraction model to obtain key information corresponding to the three application question sections, wherein the key information is' age: year of year ";
s406, inputting the three application question subsections into a question type judgment model to obtain question types corresponding to the three application question subsections, namely prompt information, prompt information and numerical value questions;
s407, searching a numerical question answer set in the answer library, matching answers from the numerical question answer set using a matching model, where the answers include "33 years old" and "7 +26 ═ 33", and selecting the answer "33 years old" based on the key information.
Fig. 5 is a schematic structural diagram of an application question answer selecting device 500 based on key information according to an embodiment of the present invention, as shown in fig. 5, including:
the information extraction module 501 is configured to acquire topic information uploaded by a user, and split the topic information into one or more sections.
In this embodiment, the user usually takes a picture of a problem encountered in the learning process and uploads the picture, and the server extracts the topic information in the picture after receiving the picture uploaded by the user. Taking the application questions as an example, the general application questions have long question contents, many prompt messages, and may also contain one or more questions, and in order to accurately match answers, the application questions need to be split into several small questions, and answer matching is performed respectively. For example, "knowing that three sides of the triangle ABC, AB, BC and AC are equal, solving the angle of ≤ a, the angle of ≤ B and the angle of ≤ C" includes 3 questions.
On the basis of the above technical solution, further, the problem form includes at least one of the following: numerical solving of the problem, judgment of the type problem, open type problem without fixed answers, non-text description problem and prompt information.
On the basis of the technical scheme, further, acquiring the topic information uploaded by the user comprises the following steps: receiving a picture file uploaded by a user; and inputting the picture file into a topic information extraction model, and outputting topic information in the picture file by the topic information extraction model.
In the present embodiment, a recognition model based on a neural network is constructed in advance, and the topics in the picture are recognized by the recognition model. The recognition model based on the Neural Network is a CPTN (connected Text forward Network, natural scene Text detection) combined with a CRNN (cyclic Convolutional Neural Network) Neural Network model. The recognition model is trained using a large amount of historical print text data and handwritten text data.
On the basis of the above technical solution, further, the splitting of the application topic information specifically includes the following steps, as shown in fig. 3:
and S2011, inputting the application topic information into a separator judgment model, and outputting labels of the separators in the application topic information by the separator judgment model, wherein the labels comprise punctuations and non-punctuations.
In this embodiment, the separator is a punctuation mark in the application topic information, and one separator is provided for each punctuation mark. If the label of the separator output by the separator judgment model is a punctuation, the judgment indicates that the separation is needed, and if the label is a non-punctuation, the surface does not need to be separated.
On the basis of the above technical solution, further, the delimiter judgment model is a sequence annotation model, and includes an input layer, an encoding layer, and an output layer.
On the basis of the technical scheme, the coding layer adopts a two-way long and short memory network LSTM coder, and the output layer adopts a serialization labeling algorithm CRF.
In this embodiment, the input layer converts the input content of the user into a vector, the coding layer performs feature extraction on the converted word vector code, and the output layer outputs a tag result.
Vectorization of text, i.e., the use of numerical features to represent text, because computers cannot directly understand natural language. In order to make a computer understand natural language, it is necessary to map text information into a digitized semantic space, which we can refer to as a word vector space. There are many algorithms for converting text into vectors, such as TF-IDF, BOW, One-Hot, word2vec, etc. In the embodiment, the vectorization of the text adopts a word2vec algorithm, the word2vec model is an unsupervised learning model, and the mapping of the text information to the semantic space can be realized by using the training of an unmarked corpus. In this embodiment, punctuation symbols are also converted to fixed vector values.
And the coding layer extracts the features of the oppositely quantized text, the output layer restrains the extracted features, the accuracy is improved, and finally the labels of the separators are output.
Because context needs to be considered for the judgment of the separators, the coding layer adopts the two-way long and short memory network LSTM coder, which can better consider the words before and after the sentence, such as 'I do not feel good weather today', wherein 'not' is to limit the following 'good weather', which means negation of good weather, the two-way long and short memory network model can better capture the dependency relationship of longer distance, and the two-way long and short memory network model can also consider the limitation of the following words to the preceding words, such as 'cold weather is not in use today', wherein 'is to modify and limit cold'.
The output layer using the CRF layer may add some constraints to ensure that the final prediction result is valid. The constraints can be obtained by the automatic learning of the CRF layer during the training of data, and with the useful constraints, the wrong prediction sequence can be greatly reduced, and the accuracy of the output layer is improved.
S2012, splitting the application topic information into one or more application topic sections based on the labels of the separators.
In this embodiment, after the label of the separator is determined, the application topic information can be split.
For example, the question information of the application question is "knowing that three sides of a triangle ABC, AB, BC and AC are equal, how much the angle of? "after the separator judgment model is input in this case, the output result is 1, 0, 0, 0, 1, 1, 1, 1. Here, 1 indicates that the tag is a punctuation, and 0 indicates that the tag is a non-punctuation. The application question can be divided into 5 application question sections of "known triangle ABC", "existence of AB, BC and AC, three sides are equal", "how much the angle of < A", "how much the angle of < B" and how much the angle of < C ".
A splitting module 502 for extracting key information of each of the sections.
On the basis of the technical scheme, further, the key information extraction model is a TextCNN neural network model based on deep learning.
In the present embodiment, the information of the application topic measure is subjected to key information extraction using the TextCNN neural network model based on deep learning. The key information extraction model is trained by using a large amount of historical application problem data. In this embodiment, the extracted key information is a unit, for example, the application topic "7 years old of Xiaoming this year, 26 years old of dad greater than Xiaoming, and several years old of dad this year? "key information in the topic is" age: year of year "; in the application problem of 'knowing that three sides of triangle ABC, AB, BC and AC are equal, the key information of the problem is' angle: degree ".
A question type determining module 503, configured to determine whether each section belongs to the prompt message or the question according to the content of the section, and determine the question type corresponding to the section when the section belongs to the question.
On the basis of the technical scheme, the question type judgment model is a TextCNN neural network model based on deep learning.
In the present embodiment, the question type to which the question measure is applied is determined using the TextCNN neural network model based on deep learning. The question type judging model is formed by training a large amount of historical application question data. In the present embodiment, the question types are a numerical question, a question of question or not, an open question, a non-text description question, and a prompt message.
The numerical problem is a problem of solving various numerical values, such as the aforementioned problem of finding ages and years. Whether the question belongs to the judgment type subjects, such as ' Xiaoming 7 o ' clock half-out, which requires 20 minutes for him to go to school, whether he can arrive at school before 8 o ' clock ', ' 20 candies exist, Xiaoming takes 8 candies, Xiaomao takes the rest of candies, and ask for a fair distribution. Open questions are questions that have no fixed answer, such as "drawing a figure with an area of 36 square centimeters". Non-textual description questions refer to the problem of orientation or how marked on axes, such as roads and buildings, are drawn on a graph, going from a starting point to an ending point. The prompt message refers to the content of the application program that describes the text, such as "Xiaoming is 7 years old today" and "dad is 26 years old than Xiaoming" in the foregoing.
An answer selecting module 504, configured to select, from a plurality of answers, an answer with the highest degree of matching with the question of each measure based on the question information, the key information of the measure, and the question type corresponding to the measure.
In the present embodiment, a plurality of answers collected in history are collected to constitute an answer library. The answers in the answer library are classified according to different question types, and a plurality of questions may have basically the same question information and only slightly differ from the last question, for example, "20 candies exist, 8 candies exist in the case of small hair, the remaining candies exist in the case of small hair, the fair distribution is asked," 20 candies exist, 8 candies exist in the case of small hair, the remaining candies exist in the case of small hair, and a plurality of small hair are asked, the two questions are very close to each other, but one question can be a question or not, and the other question is a numerical question. The classification in the answer library is thus determined by applying the question type corresponding to the question section. And then matching answers in an answer library by using a matching model based on the application question information, and finally determining the answers based on the key information corresponding to the sections of the application questions.
In the present embodiment, the one or more sections are input to a key information extraction model to acquire key information of each of the sections; inputting the one or more sections into a question type judgment model to determine the question type corresponding to each section; the key information extraction model is a deep learning-based TextCNN neural network model, and the question type judgment model is a deep learning-based TextCNN neural network model.
FIG. 6 is a block diagram illustrating an electronic device in accordance with an example embodiment.
As shown in fig. 6, the electronic device is in the form of a general purpose computing device. The processor can be one or more and can work together. The invention also does not exclude that distributed processing is performed, i.e. the processors may be distributed over different physical devices. The electronic device of the present invention is not limited to a single entity, and may be a sum of a plurality of entity devices.
The memory stores a computer executable program, typically machine readable code. The computer readable program may be executed by the processor to enable an electronic device to perform the method of the invention, or at least some of the steps of the method.
The memory may include volatile memory, such as Random Access Memory (RAM) and/or cache memory, and may also be non-volatile memory, such as read-only memory (ROM).
Optionally, in this embodiment, the electronic device further includes an I/O interface, which is used for data exchange between the electronic device and an external device. The I/O interface may be a local bus representing one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, and/or a memory storage device using any of a variety of bus architectures.
It should be understood that the electronic device shown in fig. 6 is only one example of the present invention, and elements or components not shown in the above example may be further included in the electronic device of the present invention. For example, some electronic devices further include a display unit such as a display screen, and some electronic devices further include a human-computer interaction element such as a button, a keyboard, and the like. Electronic devices are considered to be covered by the present invention as long as the electronic devices are capable of executing a computer-readable program in a memory to implement the method of the present invention or at least a part of the steps of the method.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, as shown in fig. 7, the technical solution according to the embodiment of the present invention may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, or a network device, etc.) to execute the above method according to the embodiment of the present invention.
The software product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable storage medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable storage medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
The computer readable medium carries one or more programs which, when executed by a device, cause the computer readable medium to perform the functions of: starting a virtual interaction function based on a starting instruction of a user; acquiring a real-time video of the user based on a virtual interaction function; inputting the real-time video into an action recognition model to generate an action recognition label, wherein the action recognition model is realized through a deep learning model; generating a virtual object according to the action identification label; and drawing the target virtual object in a real-time video of the user for displaying.
Those skilled in the art will appreciate that the modules described above may be distributed in the apparatus according to the description of the embodiments, or may be modified accordingly in one or more apparatuses unique from the embodiments. The modules of the above embodiments may be combined into one module, or further split into multiple sub-modules.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiment of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the embodiment of the present invention.
Exemplary embodiments of the present invention are specifically illustrated and described above. It is to be understood that the invention is not limited to the precise construction, arrangements, or instrumentalities described herein; on the contrary, the invention is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.
- 上一篇:石墨接头机器人自动装卡簧、装栓机
- 下一篇:教育题目自动批改方法、装置和电子设备