Title Determination Method and Device
By back-translation of the first question of the source language and using the confidence of the problem-solving model to screen out the accurate second question, the problem of high cost and large error in the construction of data sets in the existing technology of foreign language application questions is solved, and the accurate creation of multilingual question banks and the provision of training data is achieved.
Patent Information
- Application Number
- CN202210689994.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-17
- Publication Date
- 2025-06-13
- Estimated Expiration
- 2042-06-17
AI Technical Summary
In the prior art, the cost of building a data set of foreign language application questions is too high, and the error of foreign language application questions obtained by translation is large, which cannot effectively meet users' needs for multilingual questions.
By obtaining the first question of the source language, the back-translation process is performed to obtain the second question of the target language and the third question of the source language. Then, the third question is input to the problem-solving model to obtain confidence and answers to the question. According to the confidence level, whether the second question meets the question usage conditions, thereby screening out the accurate second question as the target question.
It realizes the creation of a multilingual foreign language question bank based on the existing Chinese question bank, which reduces the cost of manually collecting data and improves the accuracy of the data, ensures that users can obtain accurate multilingual questions, and supports training of problem-solving models in the target language.
Smart Images

Figure CN115081463B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and particularly to a method for generating questions. This application also relates to a question generation device, a computing device, and a computer-readable storage medium. Background Art
[0002] With the development of modern information technology and the needs of the education market, intelligent education, as a new educational concept, is being continuously promoted and popularized. Intelligent education is an educational method that adaptively provides users with learning based on user data and a large amount of question bank information. Therefore, the underlying of intelligent education is to have a large amount of question information. Currently, the question bank includes a sufficient number of Chinese questions, which can ensure that different Chinese test questions are provided for users. However, the number of questions in other languages is very scarce. When users want to do questions in other languages, the Chinese question bank cannot guarantee to provide services for users.
[0003] In the prior art, the method of language translation is used to translate Chinese questions into questions in the corresponding language. However, due to translation errors, the translated foreign language questions are inaccurate and there are discrepancies with the Chinese questions, making it impossible for users to study normally. Therefore, how to generate accurate corresponding foreign language questions based on the existing Chinese questions is an urgent problem to be solved currently. Summary of the Invention
[0004] In view of this, the embodiments of this application provide a method for determining questions. This application also relates to a question determination device, a computing device, and a computer-readable storage medium, so as to solve the problems in the prior art that the cost of constructing a foreign language application question dataset is too high and the error of the translated foreign language application questions is relatively large.
[0005] According to the first aspect of the embodiments of this application, a method for determining questions is provided, including:
[0006] Obtain a first question belonging to the source language;
[0007] Through back-translating the first question, obtain a second question belonging to the target language and a third question belonging to the source language;
[0008] Input the third question into a problem-solving model for processing to obtain a confidence level and a question answer, where the confidence level is used to characterize the correctness rate of the question answer relative to the third question;
[0009] When it is determined according to the confidence level that the second question meets the question usage conditions, use the second question as the target question.
[0010] According to the second aspect of the embodiments of this application, a question determination device is provided, including:
[0011] An acquisition module, configured to acquire a first question belonging to the source language;
[0012] A back-translation module, configured to obtain a second question belonging to the target language and a third question belonging to the source language by performing back-translation processing on the first question;
[0013] An obtaining module, configured to input the third question into a problem-solving model for processing to obtain a confidence level and a question answer, where the confidence level is used to characterize the correct rate of the question answer relative to the third question;
[0014] A judgment module, configured to use the second question as a target question when it is determined according to the confidence level that the second question meets the question usage conditions.
[0015] According to a third aspect of the embodiments of the present application, a computing device is provided, including a memory, a processor, and computer instructions stored on the memory and executable on the processor. When the processor executes the computer instructions, the steps of the question determination method are implemented.
[0016] According to a fourth aspect of the embodiments of the present application, a computer-readable storage medium is provided, which stores computer instructions. When the computer instructions are executed by a processor, the steps of the question determination method are implemented.
[0017] The question determination method provided by the present application includes acquiring a first question belonging to the source language; obtaining a second question belonging to the target language and a third question belonging to the source language by performing back-translation processing on the first question; inputting the third question into a problem-solving model for processing to obtain a confidence level and a question answer, where the confidence level is used to characterize the correct rate of the question answer relative to the third question; and using the second question as a target question when it is determined according to the confidence level that the second question meets the question usage conditions.
[0018] An embodiment of the present application realizes obtaining a second question in the target language and a third question in the source language by performing back-translation processing on the first question in the source language. Since there are translation errors between the second question and the third question obtained by the back-translation processing, in this solution, the third question is input into the problem-solving model to obtain the confidence level output by the problem-solving model, and based on the confidence level, the correct rate of the question answer output by the problem-solving model for the third question is determined and mapped to the translation correct rate of the second question, so as to determine whether the second question meets the question usage conditions, realize the filtering of the second question, and make it possible to create a question bank in the target language based on the second question with a higher translation accuracy, improving the accuracy of the data. Description of the Drawings
[0019] Figure 1It is a flowchart of a question determination method provided by an embodiment of the present application;
[0020] Figure 2 It is a processing flowchart of a question determination method applied to constructing a Japanese word problem dataset provided by an embodiment of the present application;
[0021] Figure 3 It is a schematic structural diagram of a question determination device provided by an embodiment of the present application;
[0022] Figure 4 It is a structural block diagram of a computing device provided by an embodiment of the present application. Detailed implementation manners
[0023] Many specific details are set forth in the following description in order to provide a thorough understanding of the present application. However, the present application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the connotation of the present application. Therefore, the present application is not limited by the specific implementations disclosed below.
[0024] The terms used in one or more embodiments of the present application are for the purpose of describing specific embodiments only and are not intended to limit one or more embodiments of the present application. The singular forms "a", "the", and "said" used in one or more embodiments of the present application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used in one or more embodiments of the present application refers to and includes any or all possible combinations of one or more of the associated listed items.
[0025] It should be understood that although the terms first, second, etc. may be used in one or more embodiments of the present application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of the present application, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "when" or "while" or "in response to determining".
[0026] First, the noun terms related to one or more embodiments of the present application are explained.
[0027] mT5 model: Multilingual T5, the multilingual version of the T5 model. The pre-trained corpus of the mT5 model covers 101 languages, including Chinese.
[0028] The T5 model: The full English name is Transfer Text-to-Text Transformer, which is used to convert NLP (Natural Language Processing) tasks into Text-to-Text tasks.
[0029] With the development of artificial intelligence technology and the continuous maturity of natural language processing technology, intelligent problem-solving models are usually used in practical applications to answer various questions. Currently, questions answered by intelligent problem-solving models can achieve text translation, article understanding, math problem solving, etc. In the application of math problem solving, since the existing math problem datasets mainly focus on the two most widely used languages, Chinese and English. Therefore, problem-solving models often solve Chinese word problems or English word problems. For word problems in some other languages, due to the small number of questions, corresponding problem-solving models cannot be effectively trained.
[0030] In practical applications, when users in some other countries and regions (such as Japan and South Korea) want to use their own language to do some math problem exercises, due to the lack of a large number of math problems in the corresponding language to support the question bank, normal question generation, problem-solving practice, etc. services cannot be provided for users, resulting in the loss of some customers.
[0031] Based on this, in this application, a question determination method is provided. According to this method, different-language foreign language question banks can be created based on the existing Chinese question bank, so that question generation practice can be carried out based on the foreign language question bank and training data can be provided for the training of problem-solving models for foreign language word problems. This application also involves a question determination device, a computing device, and a computer-readable storage medium, which will be described in detail one by one in the following embodiments.
[0032] Figure 1 The flowchart of a question determination method provided by an embodiment of the present application is shown, which specifically includes the following steps:
[0033] Step 102: Obtain a first question belonging to the source language.
[0034] Among them, the source language can be understood as the language corresponding to a large number of existing questions, and the first question can be understood as the word problem to be translated, that is, the word problem corresponding to the source language. In practical applications, since there are already a large number of word problems corresponding to the Chinese language in the existing question bank, the Chinese language can be set as the source language and the Chinese questions can be used as the first questions. It should be noted that when obtaining the first question, the answer or calculation formula corresponding to the first question can also be obtained. For example, when the first question is "There are 30 people in the class, 20 of them are girls. How many boys are there?", the answer corresponding to this question is "10" and the corresponding calculation formula is "30 - 20".
[0035] In specific implementation, the source language can be set according to the number of questions corresponding to each language in the question bank in actual conditions. After a language with more questions is set as the source language, questions in other languages can be generated based on a large number of questions in the source language to ensure the number of questions in other languages.
[0036] In a specific embodiment of the present application, the source language is Chinese, and a question is selected and obtained from a Chinese question bank as the first question. The first question is an application question, and the content is "The school divides 135 exercise books into three classes on average. How many exercise books are there in each class?"
[0037] Step 104: back-translate the first question to obtain a second question in the target language and a third question in the source language.
[0038] Among them, the back translation process can be understood as translating language A into language B, and then translating language B back to language A. In the process of natural language processing, we often face the problem of lack of data, so data enhancement is needed. Among them, the back translation process is to translate the source language into the target language, and then translate it back to the source language, so as to achieve the effect of expanding the data set. The second question can be understood as the translation of the first question belonging to the source language to the question in the target language. The second question in the target language is the last question to be obtained in this scheme; the third question is the back translation of the second question belonging to the target language to the question in the source language. According to the translation content of the third question, the translation accuracy of the first question to the second question can be deduced and judged.
[0039] In practical applications, the first question is back-translated to obtain the second question in the target language and the third question in the source language. For example, if the source language is Chinese and the target language is Japanese, the first question is "There are 30 students in the class, 20 of whom are girls. How many are boys?" After back-translating the first question, the second question in the target language is "There are 30 people in the class, 20 of whom are girls, and who are the boys?" The second question is then translated back to the source language to obtain the third question "There are 30 students in the class, 20 of whom are girls. How many are boys?" It can be found that the third question obtained after back-translation is not much different from the first question in terms of meaning. Therefore, the translation content of the second question is relatively accurate and can be used as the target question to be adopted in the end.
[0040] In a specific embodiment of the present application, following the above example, by back-translating the first question, a second question in the target language is obtained, the content of which is "In the 3-year class at school, there are 135 workbooks with an average of 135 points. In the 1-year class, which workbook is the best?", and a third question in the source language is obtained, the content of which is "The school is divided into three classes with an average of 135 workbooks. How many workbooks are there in each class?".
[0041] Specifically, by back-translating the first question, a second question in the target language and a third question in the source language are obtained. The specific implementation method is as follows: Step 1042 to Step 1044:
[0042] Step 1042: Translate the first topic into a target language to obtain a second topic in the target language.
[0043] Specifically, the target language is the language corresponding to the questions that need to be collected in this solution. Since the number of questions in the target language is small, they can be obtained by translating based on the existing source language questions. Further, the specific implementation method is as follows:
[0044] Translating the first topic based on a translation interface to obtain a target language translation result set including at least one initial second topic in the target language;
[0045] At least one second topic is selected from the target language translation result set according to a preset second topic selection rule.
[0046] The translation interface can be understood as an open interface that provides translation services, based on which the first topic can be translated into a second topic in the target language. Each translation interface can translate multiple second topics with the same meaning into a first topic and provide them to the user for selection.
[0047] In specific implementation, when translating the first topic, multiple translation interfaces can be used to translate it, so as to obtain a target language translation result set containing multiple second topics. When back-translating, the second topic to be translated can be selected from the target language translation result set according to the preset second topic selection rules.
[0048] The preset second topic selection rule can be understood as a rule for selecting the second topic from the target language translation result set. The preset second topic selection rule can be to select the initial second topic of the first translation result as the second topic from the multiple second topics provided by each translation interface; or it can be to arbitrarily select a preset number of initial second topics as the second topic in the target language translation result set. For example, after the translation interface A and the translation interface B translate the first topic respectively, the target language translation result set obtained includes the translation results A1 and A2 of the translation interface A, and the translation results B1 and B2 of the translation interface B. According to the preset second topic selection rule, 2 translation results are arbitrarily selected as the second topic, and the selection results can be A1 and A2, A1 and B1, A1 and B2, A2 and B1, A2 and B2, B1 and B2. The preset second topic selection rule can select the corresponding initial second topic as the second topic according to actual needs.
[0049] In a specific embodiment of the present application, following the above example, the first question is translated based on translation interface A and translation interface B, and each translation interface provides a translation result to obtain a Japanese language translation result set including two initial second questions belonging to the Japanese language, wherein the contents of the two initial second questions in the set are respectively "Is there an average of 135 points in the exercise book at the 3-year club at school, but which book is the average score at the 1-year club?" and "Is there an average of 135 points in the exercise book at the 3-year club at school, but which book is the average score at the 1-year club?", and both initial second questions are selected as the second questions in the Japanese language translation result set according to the preset second question selection rule.
[0050] In summary, since the second question is obtained by translating the first question through a translation interface, and multiple translation interfaces can be set, each translation interface can be set to obtain multiple translation results, thereby expanding the number of questions in the target language with a limited number of first questions, which facilitates the subsequent training of the target language problem-solving model with the support of a large number of questions in the target language.
[0051] Step 1044: Translate the second topic into the source language to obtain a third topic in the source language.
[0052] Correspondingly, after obtaining the second topic by translating the first topic into the target language, back-translation into the source language may be performed based on the obtained second topic to obtain a third topic in the source language.
[0053] Specifically, translating the second topic into the source language to obtain a third topic in the source language includes:
[0054] Translate the second question based on the translation interface to obtain a source language translation result set containing at least one initial third question belonging to the source language;
[0055] Select at least one third question from the source language translation result set according to the preset third question selection rule.
[0056] Among them, the translation interface used when translating the second question into the source language can be the same as or different from the translation interface used when translating the first question into the target language. Different from the process of obtaining the second question in the target language through the above translation, since the second question is the target question that needs to expand the data set, multiple translation interfaces can be selected for translation, and each translation interface can also translate multiple translation results, so as to achieve the purpose of expanding the data set. When the second question is back-translated into the source language, the obtained third question is mainly used to judge the translation accuracy of the second question, so as to filter out the second question with a large translation error. Therefore, when translating the second question into the third question, one corresponding third question can be translated for each second question, and the third question is used to filter and judge the second question with a correlation relationship, so as to achieve the purpose of excluding the second question with a large translation error.
[0057] In a specific embodiment of the present application, following the above example, translate the second question based on translation interface A to obtain a source language translation result set containing two initial third questions belonging to the source language, which are "The school divides 135 workbooks equally among three classes. How many workbooks does each class get?" and "The school divides 135 workbooks into 3 classes on average. How many workbooks does each class get?". Select two initial third questions from the source language translation result set as the third questions according to the preset third question selection rule, and each third question corresponds to a second question with a translation correlation relationship.
[0058] Based on this, after obtaining the third question by translating the second question into the source language, the third question can be input into the problem-solving model in the source language, and the output result of the problem-solving model can be obtained. Based on the output result, a translation error filtering judgment is made on the second question, so as to achieve the purpose of excluding the second question with a large translation error.
[0059] Step 106: Input the third question into the problem-solving model for processing to obtain a confidence level and a question answer, where the confidence level is used to characterize the correctness of the question answer relative to the third question.
[0060] Among them, the problem-solving model can be understood as a pre-trained model, which is used to solve application problems. In actual applications, the mT5 model can be trained on the basis of the mT5 model to obtain the problem-solving model after training. Since the mT5 model itself contains 101 languages, target questions of any language type and the corresponding question answers can be obtained for training the mT5 model. Since there are currently only a large number of questions in the Chinese language, most of the problem-solving models are Chinese problem-solving models.
[0061] Furthermore, in order to train a problem-solving model that meets the usage requirements, it is necessary to continuously provide samples for multiple rounds of iterative training, and at the same time, it is necessary to optimize the problem-solving model in combination with the loss function. Therefore, in the data preparation stage, a large number of training sample questions and the corresponding sample question answers of the training sample questions need to be prepared to avoid the problems of overfitting or incomplete training of the problem-solving model by increasing the sample quantity and richness.
[0062] Specifically, the problem-solving model in this application can be trained in the following ways, including:
[0063] Obtain training sample questions and the corresponding sample question answers of the training sample questions;
[0064] Input the training sample questions into the initial problem-solving model to obtain the predicted question answers output by the initial problem-solving model;
[0065] Calculate the loss value of the problem-solving model based on the predicted question answers and the sample question answers;
[0066] Adjust the model parameters of the initial problem-solving model according to the model loss value, and continue to train the initial problem-solving model until the model training stop condition is reached.
[0067] Among them, the training sample questions and the corresponding sample question answers are both training data for training the model. The predicted question answers can be understood as the output results obtained after inputting the training sample questions into the problem-solving model. The predicted question answers may be inconsistent with the sample question answers. Therefore, by calculating the model loss value and adjusting the model parameters, the effect of improving the output accuracy of the model can be achieved.
[0068] In a specific embodiment of this application, training sample questions Q and the corresponding sample question answers q of the training sample questions Q are obtained. The training sample questions Q are input into the initial problem-solving model, and the predicted result output by the model is q1. The loss value of the problem-solving model is calculated based on the sample question answers q and the predicted question answers q1. The model parameters are adjusted according to the loss value, and the initial problem-solving model is continuously trained until the model training stop condition is reached.
[0069] Specifically, the model training stop conditions include:
[0070] The loss value of the model is less than a preset loss value threshold; and / or
[0071] The number of training rounds reaches a preset number of training rounds.
[0072] Among them, the preset loss value threshold can be understood as the expected loss value set by the user. When it is less than this preset loss value threshold, it means that the current model has been trained and meets the standards expected by the user.
[0073] The number of training rounds can be understood as the number of times the model uses sample data for training; the preset number of training rounds can be understood as the number of times the model uses sample data for training set by the user. After the model uses sample data to reach the preset number of training rounds, the model stops training.
[0074] In a specific embodiment of the present application, taking the example of stopping training the problem-solving model by the loss value being less than the preset loss value threshold, if the preset loss value threshold is 0.5, then when the calculated loss value is less than 0.5, it is determined that the problem-solving model has been trained.
[0075] In another specific embodiment of the present application, taking the example of using the preset number of training rounds to stop training the problem-solving model, if the preset number of training rounds is 20 rounds, when the number of training rounds of the sample data reaches 20 rounds, it is determined that the problem-solving model has been trained.
[0076] Based on this, through a large number of training sample questions and the corresponding sample question answers, by increasing the sample quantity and richness, the problems of overfitting or incomplete training of the problem-solving model are avoided, ensuring the accuracy of the model after training.
[0077] Furthermore, the confidence level can be understood as the credibility of the problem-solving model for the output result, or it can also be understood as the probability that the output result is the correct result. When the confidence level is low, it indicates that the output result corresponding to this confidence level is inaccurate, facilitating the user to choose to recalculate the answer to the question. At the same time, in this solution, the confidence level is not only used to represent the correct rate of the question answer relative to the third question, but can also represent the correct rate of the back-translation of the third question relative to the first question, so as to infer and determine whether the second question in the back-translation process is correctly translated. When the confidence level is high, it can be determined that the corresponding translated second question meets the translation requirements and can be used as the target question.
[0078] In a specific embodiment of the present application, following the above example, the two third questions are respectively input into the problem-solving model for processing. Inputting the third question 1 obtains the corresponding question answer of 40 and the confidence level of 0.5, and inputting the third question 2 obtains the corresponding question answer of 45 and the confidence level of 0.8.
[0079] Based on this, by inputting the third question into the problem-solving model, the confidence level and the answer to the question are obtained. According to the confidence level, the correctness rate of the answer to the question relative to the third question can be determined. And since the third question is obtained by translating the second question, the confidence level can also reflect the translation effect or translation error of the third question relative to the second question and the second question relative to the first question. Thus, it can be determined whether the second question meets the question usage conditions based on this confidence level, effectively ensuring the translation accuracy of the second question and facilitating the subsequent training of the problem-solving model in the target language.
[0080] Step 108: When it is determined that the second question meets the question usage conditions according to the confidence level, use the second question as the target question.
[0081] Among them, the second question meeting the question usage conditions can be understood as the translation result of the second question being accurate with small errors. When the second question meets the question usage conditions, the second question can be used as the target question. Later, the second question can be added to the question bank to set questions for users or used to train the problem-solving model in the target language.
[0082] In a specific embodiment of the present application, following the above example, according to the confidence level corresponding to the third question 2, it is determined that the corresponding second question 2 with an association relationship meets the question usage conditions, and the second question 2 corresponding to the third question 2 is used as the target question.
[0083] Furthermore, the question usage conditions refer to whether the question meets the translation standard, that is, whether the translation is accurate. Since the correctness rate of the answer to the question relative to the third question is first judged according to the confidence level and the translation accuracy rate of the second question is reflected, a confidence level threshold can be set in advance, and the pre-set confidence level threshold is used to judge whether the second question meets the question usage conditions.
[0084] Specifically, when it is determined that the second question meets the question usage conditions according to the confidence level, using the second question as the target question includes:
[0085] Comparing the confidence level with the pre-set confidence level threshold;
[0086] When the confidence level is greater than or equal to the pre-set confidence level threshold, it is determined that the second question having an association relationship with the third question meets the question usage conditions, and the second question is used as the target question.
[0087] Among them, the preset confidence threshold can be understood as the expected confidence set by the user. When it is greater than or equal to the preset confidence threshold, it means that the second question meets the question usage conditions; when it is less than the preset confidence threshold, it means that the second question does not meet the question usage conditions. The association relationship between the third question and the second question can be understood as that there is a corresponding translation relationship between the second question and the third question. For example, if the third question a is obtained by translating the second question b, it can be said that the third question and the second question have an association relationship.
[0088] Correspondingly, in another case, when the second question does not meet the usage conditions, the second question should be discarded. Specifically, the method further includes:
[0089] When the confidence is less than the preset confidence threshold, it is determined that the second question having an association relationship with the third question does not meet the question usage conditions, and the second question is deleted.
[0090] In a specific embodiment of the present application, continuing with the above example, according to the confidence of 0.5 corresponding to the third question 1, which is less than the preset confidence threshold of 0.6, it is determined that the corresponding second question 1 having an association relationship does not meet the question usage conditions, and the second question 1 is deleted.
[0091] Based on this, by comparing the preset confidence threshold with the confidence output by the model, it is possible to effectively filter out the second questions with large translation errors and not meeting the question usage conditions, ensure the accuracy of the second questions after screening, provide effective data for the subsequent target language problem-solving model, and improve the model training efficiency. According to the question determination method provided by this solution, a corresponding target language dataset can be generated based on the existing source language dataset, reducing the cost of manually collecting data. At the same time, the translation errors of the translated target language dataset are filtered, and the data with large translation errors are deleted, improving the accuracy of the data.
[0092] Further, after obtaining multiple target questions according to the above method, a target question set including the target questions can be constructed, and a corresponding target language problem-solving model can be trained based on the target question set. Specifically, the method further includes:
[0093] Determine a target question set including the target questions, select target sample questions in the target question set, and obtain the digital arithmetic expressions corresponding to the target sample questions;
[0094] Extract the digital units in the target sample questions, and determine the character marking units corresponding to the digital units;
[0095] Update the digital arithmetic expression according to the character marking unit to obtain a sample character expression;
[0096] The initial problem-solving model is trained using the sample character expressions and the target sample questions until a target language problem-solving model that meets the training stop condition is obtained.
[0097] Among them, the target questions in the target question set are all filtered target questions, and the target sample questions are selected from the target question set as training data for training the target language problem-solving model. In practical applications, the target sample questions refer to questions that describe relevant facts in language or text, reflect certain mathematical relationships, such as quantitative relationships, positional relationships, etc., and solve unknown quantities. Numerical formulas can be understood as the correct calculation formulas corresponding to the target sample questions.
[0098] In a specific embodiment of the present application, the target sample title is "The school has 135 volumes of exercise books, the average is 3 クラスに分けていますが, how many volumes are there for each クラスにありますか?", and the corresponding numerical formula is "135 / 3".
[0099] The digital unit can be understood as the number in the target sample title. Using the above example, the digital unit in the target sample title can be "135, 3". The character marking unit can be understood as the digital unit used to mark the target sample title. The character marking unit can be a letter or a Chinese character, which is not limited in this embodiment. Using the above example, for the extracted digital units "135" and "3", the character marking unit corresponding to "135" is determined to be "d1", and the character marking unit corresponding to "3" is determined to be "d2".
[0100] After determining the character marking unit corresponding to the numeric unit in the target sample question, the numeric formula corresponding to the acquired target sample question is updated according to the character marking unit to generate a sample character expression, wherein the sample character expression is a sample required in the process of training the target language problem-solving model, which refers to the content output by the target language problem-solving model that is expected to be trained. Based on this, in an embodiment of the present application, the number in the numeric formula can be replaced by the character marking unit to obtain a sample character expression.
[0101] In one embodiment of the present application, following the above example, the numerical formula corresponding to the target sample title "The school has 135 exercise books. Is there an average of 3 points in each class? Which book is in each class?" is "135 / 3", and the character marking unit corresponding to the numerical unit "135" in the determined target sample title is "d1", and the character marking unit corresponding to the numerical unit "3" in the determined target sample title is "d2". The numerical formula "135 / 3" is updated according to the character marking units "d1" and "d2", and the obtained sample character expression is "d1 / d2".
[0102] Among them, the initial problem-solving model refers to the problem-solving model being trained. At this time, there may be differences between the character expressions output by the initial problem-solving model and the sample character expressions. The target language problem-solving model refers to the problem-solving model that has been trained. At this time, the target language problem-solving model can be applied in subsequent problem-solving scenarios, and the character expressions it outputs are consistent with the sample character expressions. The training stop condition can be the number of training iterations or loss value comparison. In practical applications, the training stop condition can be set according to requirements, and this application does not make any limitations here.
[0103] Specifically, on the basis of obtaining the target sample questions and sample character expressions, the initial problem-solving model can be trained using the sample character expressions obtained after updating the digital arithmetic expressions in the obtained target sample questions and the obtained target sample questions, so that the initial problem-solving model can learn the correlation between the target sample questions and the target character expressions. Then, through continuous iteration and optimization, a target language problem-solving model that meets the training stop condition can be obtained.
[0104] In summary, the problem determination method provided by this application filters through translation accuracy to obtain a set of target questions, which is beneficial to improving the efficiency of the subsequent target language problem-solving model and solves the problems of less training data and high acquisition cost for the target language. And for the training of the target language problem-solving model in this application, the initial problem-solving model is trained using the sample character expressions and the stem sample until a target problem-solving model that meets the training stop condition is obtained. This effectively guarantees the prediction accuracy of the trained problem-solving model, thereby improving the problem-solving accuracy of the problem-solving model and the training efficiency of the problem-solving model, so as to obtain a problem-solving model with high accuracy in a short time.
[0105] Further, after obtaining the target language problem-solving model, the target language problem-solving model can be applied to the problem-solving scenario for target language application problems. Specifically, the method further includes:
[0106] Obtain the question to be solved and extract the digital units in the question to be solved;
[0107] Input the question to be solved into the target language problem-solving model for processing to obtain a target character expression;
[0108] Update the target character expression according to the digital unit to obtain a target digital arithmetic expression;
[0109] Determine the target answer of the question to be solved according to the target digital arithmetic expression.
[0110] Among them, the unsolved questions can be understood as questions that are ready to be solved. The unsolved questions can be questions uploaded by users, or questions selected by the question-setting system from the question bank when setting questions for users.
[0111] In an embodiment of the present application, a question to be solved is obtained. The question to be solved is an exercise question when the user learns Japanese application questions. The question to be solved is "There are 135 exercise books in the school, and the average is 3 クラスに分けていますが, and each クラスにありますか?" Extract the numerical units in the problem to be solved, which are "135" and "3" respectively.
[0112] In actual application scenarios, when the user wants to view the answer corresponding to the question, he can click the answer view button. At this time, the question practice system will input the question to be solved into the target threshold problem-solving model for processing to obtain the corresponding target character expression.
[0113] In one embodiment of the present application, the problem to be solved is input into the Japanese problem-solving model for processing, and the target character expression "d1 / d2" is obtained. The target character expression is updated according to the extracted digital units to obtain the target digital formula "135 / 3". The target answer to the problem to be solved can be calculated as 45 according to the target digital formula, thereby providing the user with the correct answer to this problem.
[0114] The present application provides a method for determining a question, including: obtaining a first question in a source language; obtaining a second question in a target language and a third question in the source language by back-translating the first question; inputting the third question into a question-solving model for processing to obtain a confidence and a question answer, wherein the confidence is used to characterize the accuracy of the question answer relative to the third question; and in the case where it is determined according to the confidence that the second question meets the question usage conditions, taking the second question as the target question. By back-translating the first question in the source language, a second question in the target language and a third question in the source language are obtained. Since there are translation errors in the second and third questions obtained by the back-translation process, in this solution, the third question is input into the question-solving model to obtain the confidence output by the question-solving model, and based on the confidence, it is determined whether the second question meets the question usage conditions, and the second question with a relatively accurate translation is selected as the target question, so that a question bank in the target language can be created based on the second question with a high translation accuracy rate in the future, thereby providing training data for training the question-solving model in the target language, and also allowing users to practice questions from the question bank in the target language.
[0115] The following combination Figure 2 Taking the application of the topic determination method provided by the present application in constructing a Japanese application question dataset as an example, the topic determination method is further described. Figure 2A processing flow chart of a method for determining a topic for constructing a Japanese application problem dataset provided by an embodiment of the present application is shown, which specifically includes the following steps:
[0116] Step 202: Get the first question in Chinese.
[0117] Among them, the content of the first question is "Number A is 20, number B is 5 less than number A, what is number B?"
[0118] Step 204: The first topic is translated based on translation interface A and translation interface B to obtain a Japanese translation result set including an initial second topic in Japanese.
[0119] Among them, the initial second question a1 obtained by translating the first question based on the translation interface A is "the number of the first is 20, the number of the second is the number of the first and the number of the first is 5 小なくて, and the number of the second is the number of the first and second question a1 ”, the initial second question b1 obtained by translating the first question based on the translation interface B is “Aのnumberは20で,二のnumberはAのnumberより5小なくて,二のnumberはいくらです”. Select the initial second topic a1 and the initial second topic b1 as the second topic a1 and the second topic b1 according to the preset second topic selection rules, and generate a Japanese translation result set.
[0120] Step 206: The second topic in the Japanese translation result set is translated based on the translation interface A to obtain a Chinese translation result set including an initial third topic in Chinese.
[0121] Among them, based on the translation interface A, the second question a1 and the second question b1 in the Japanese translation result set are translated into Chinese, and the initial third question a2 is obtained as "Number A is 20, number B is 5 less than number A, what is number B?", and the initial third question b2 is obtained as "Number A is 20, number B is 5 less than number A, what is number B?". According to the preset third question selection rule, the initial third question a2 and the initial third question b2 are determined to be the third question a2 and the third question b2 respectively, and a Chinese translation result set is generated.
[0122] Step 208: Input the third question into the question-solving model for processing to obtain the confidence level and the answer to the question.
[0123] Among them, the third question a2 is input into the problem-solving model for processing, and the corresponding answer is 15 and the confidence level is 0.8. The third question b2 is input into the problem-solving model for processing, and the corresponding answer is 10 and the confidence level is 0.5.
[0124] Step 210: Compare the confidence level with a preset confidence threshold.
[0125] Among them, the preset confidence threshold is obtained as 0.6, and the confidence levels of the third question a2 and the third question b2 are compared with the preset confidence threshold.
[0126] Step 212: The confidence level corresponding to the third question a2 is greater than the preset confidence threshold. It is determined that the second question a1 associated with the third question a2 meets the question usage conditions, and the second question a1 is taken as the target question. The confidence level corresponding to the third question b2 is less than the preset confidence threshold. It is determined that the second question b1 associated with the third question b2 does not meet the question usage conditions, and the second question b1 is deleted.
[0127] Step 214: Add the second question a1 that meets the question usage conditions to the Japanese word problem dataset.
[0128] Among them, the Japanese word problem dataset contains all Japanese questions that meet the question usage conditions. Adding the second question a1 that meets the conditions to the Japanese word problem dataset, a Japanese problem-solving model can be trained based on the questions in the Japanese word problem dataset in the future, providing sufficient training data for training the model. It can also be used as a Japanese word problem question bank based on the Japanese word problem dataset. When the user practices Japanese word problems, Japanese word problems that meet the user's requirements can be selected from the Japanese word problem dataset.
[0129] A question determination method applied to constructing a Japanese word problem dataset provided by this application includes: obtaining a first question belonging to Chinese, translating the first question based on translation interface A and translation interface B to obtain a Japanese translation result set containing an initial second question belonging to Japanese, translating the second question in the Japanese translation result set based on translation interface A to obtain a Chinese translation result set containing an initial third question belonging to Chinese, inputting the third question into a problem-solving model for processing to obtain a confidence level and a question answer, comparing the confidence level with the preset confidence threshold, the confidence level corresponding to the third question a2 is greater than the preset confidence threshold, determining that the second question a1 associated with the third question a2 meets the question usage conditions, taking the second question a1 as the target question, the confidence level corresponding to the third question b2 is less than the preset confidence threshold, determining that the second question b1 associated with the third question b2 does not meet the question usage conditions, deleting the second question b1, and adding the second question a1 that meets the question usage conditions to the Japanese word problem dataset.
[0130] By performing back-translation on the Chinese title, a Japanese title is obtained, and during the back-translation process, multiple translation interfaces are used for translation to achieve the purpose of data expansion and reduce the cost of manually collecting data. Since there are translation errors between the Japanese title obtained through back-translation and the Chinese title, in this solution, the Chinese title is input into the problem-solving model to obtain the confidence level output by the problem-solving model. Based on the confidence level, it is deduced and judged whether the Japanese title meets the title usage conditions, and the Japanese title with relatively accurate translation is selected as the target title, so that a question bank in the target language can be created based on the Japanese title with a relatively high translation accuracy in the follow-up. Thus, training data can be provided for training the problem-solving model in the target language, and questions can also be set for users from the question bank in the target language for practice.
[0131] Corresponding to the above method embodiment, the present application also provides an embodiment of a title determination device. Figure 3 Fig. shows a schematic structural diagram of a title determination device provided by an embodiment of the present application. As Figure 3 shown, the device includes:
[0132] An acquisition module 302, configured to acquire a first title belonging to the source language;
[0133] A back-translation module 304, configured to obtain a second title belonging to the target language and a third title belonging to the source language by performing back-translation on the first title;
[0134] An obtaining module 306, configured to input the third title into a problem-solving model for processing to obtain a confidence level and a question answer, where the confidence level is used to characterize the correctness rate of the question answer relative to the third title;
[0135] A judgment module 308, configured to use the second title as the target title when it is determined according to the confidence level that the second title meets the title usage conditions.
[0136] Optionally, the back-translation module 304 is further configured to:
[0137] Translate the first title into the target language to obtain a second title belonging to the target language;
[0138] Translate the second title into the source language to obtain a third title belonging to the source language.
[0139] Optionally, the back-translation module 304 is further configured to:
[0140] Translate the first title based on a translation interface to obtain a target language translation result set including at least one initial second title belonging to the target language;
[0141] Select at least one second question from the set of translation results in the target language according to the preset second question selection rule.
[0142] Optionally, the back translation module 304 is further configured to:
[0143] Translate the second question based on the translation interface to obtain a set of source language translation results including at least one initial third question belonging to the source language;
[0144] Select at least one third question from the set of source language translation results according to the preset third question selection rule.
[0145] Optionally, the judgment module 308 is further configured to:
[0146] Compare the confidence level with a preset confidence threshold;
[0147] In the case where the confidence level is greater than or equal to the preset confidence threshold, determine that the second question having an associated relationship with the third question meets the question usage condition, and use the second question as the target question.
[0148] Optionally, the judgment module 308 is further configured to:
[0149] In the case where the confidence level is less than the preset confidence threshold, determine that the second question having an associated relationship with the third question does not meet the question usage condition, and delete the second question.
[0150] Optionally, the device further includes a first training module, configured to:
[0151] Obtain training sample questions and sample question answers corresponding to the training sample questions;
[0152] Input the training sample questions into the initial problem-solving model to obtain predicted question answers output by the initial problem-solving model;
[0153] Calculate the problem-solving model loss value based on the predicted question answers and the sample question answers;
[0154] Adjust the model parameters of the initial problem-solving model according to the model loss value, and continue to train the initial problem-solving model until the model training stop condition is reached.
[0155] Optionally, the device further includes a second training module, configured to:
[0156] Determine a set of target questions including the target question, select target sample questions from the set of target questions, and obtain digital arithmetic expressions corresponding to the target sample questions;
[0157] Extract the digital units from the title of the target sample question, and determine the character marking units corresponding to the digital units;
[0158] Update the digital arithmetic expression according to the character marking units to obtain a sample character expression;
[0159] Use the sample character expression and the title of the target sample question to train the initial problem-solving model until a target language problem-solving model that meets the training stop condition is obtained.
[0160] Optionally, the device further includes a problem-solving module configured to:
[0161] Obtain a question to be solved, and extract the digital units in the question to be solved;
[0162] Input the question to be solved into the target language problem-solving model for processing to obtain a target character expression, where the elements of the target character marking units in the target character expression are related to the order of the digital units in the question to be solved;
[0163] Update the target character expression according to the digital units to obtain a target digital arithmetic expression;
[0164] Determine the target answer to the question to be solved according to the target digital arithmetic expression.
[0165] A question determination device provided in the present application includes: an acquisition module configured to acquire a first question belonging to the source language; a back-translation module configured to obtain a second question belonging to the target language and a third question belonging to the source language by performing a back-translation process on the first question; an obtaining module configured to input the third question into a problem-solving model for processing to obtain a confidence level and a question answer, where the confidence level is used to characterize the correctness rate of the question answer relative to the third question; a judgment module configured to use the second question as the target question when it is determined according to the confidence level that the second question meets the question usage condition. By performing a back-translation process on the first question belonging to the source language, a second question belonging to the target language and a third question belonging to the source language are obtained. Since there are translation errors between the second question and the third question obtained by the back-translation process, in this solution, the third question is input into the problem-solving model to obtain the confidence level output by the problem-solving model, and it is deduced and judged whether the second question meets the question usage condition based on the confidence level, and the second question with relatively accurate translation is selected as the target question, so that a question bank in the target language can be created based on the second question with relatively high translation accuracy, thereby providing training data for training the target language problem-solving model and also allowing users to generate questions for practice from the question bank in the target language.
[0166] The above is a schematic solution of a question determination device according to this embodiment. It should be noted that the technical solution of the question determination device and the technical solution of the above-mentioned question determination method belong to the same concept. For the details not described in the technical solution of the question determination device, reference can be made to the description of the technical solution of the above-mentioned question determination method.
[0167] Figure 4 FIG. 4 shows a structural block diagram of a computing device 400 according to an embodiment of the present application. The components of the computing device 400 include, but are not limited to, a memory 410 and a processor 420. The processor 420 is connected to the memory 410 through a bus 430, and a database 450 is used to store data.
[0168] The computing device 400 further includes an access device 440, and the access device 440 enables the computing device 400 to communicate via one or more networks 460. Examples of these networks include a Public Switched Telephone Network (PSTN), a Local Area Network (LAN), a Wide Area Network (WAN), a Personal Area Network (PAN), or a combination of communication networks such as the Internet. The access device 440 may include one or more of any type of wired or wireless network interfaces (e.g., a Network Interface Card (NIC)), such as an IEEE802.11 Wireless Local Area Network (WLAN) wireless interface, a Worldwide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, a Near Field Communication (NFC) interface, and so on.
[0169] In an embodiment of the present application, the above-mentioned components of the computing device 400 and Figure 4 other components not shown in the figure may also be connected to each other, for example, through a bus. It should be understood that Figure 4 the structural block diagram of the computing device shown is only for illustrative purposes and is not a limitation on the scope of the present application. Those skilled in the art can add or replace other components as needed.
[0170] The computing device 400 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.) or other types of mobile devices, or a stationary computing device such as a desktop computer or a PC. The computing device 400 may also be a mobile or stationary server.
[0171] Wherein, when the processor 420 executes the computer instructions, the steps of the above-mentioned question determination method are implemented.
[0172] The above is a schematic solution of a computing device according to this embodiment. It should be noted that the technical solution of this computing device and the technical solution of the above-mentioned topic determination method belong to the same concept. For the details not described in detail in the technical solution of the computing device, reference can be made to the description of the technical solution of the above-mentioned topic determination method.
[0173] An embodiment of the present application further provides a computer-readable storage medium, which stores computer instructions, and when the computer instructions are executed by a processor, the steps of the topic determination method as described above are implemented.
[0174] The above is a schematic solution of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium and the technical solution of the above-mentioned topic determination method belong to the same concept. For the details not described in detail in the technical solution of the storage medium, reference can be made to the description of the technical solution of the above-mentioned topic determination method.
[0175] The above describes specific embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve the desired result. Additionally, the processes depicted in the figures do not necessarily require the particular order or sequential order shown to achieve the desired result. In certain implementations, multitasking and parallel processing are also possible or may be advantageous.
[0176] The computer instructions include computer program code, and the computer program code can be in the form of source code, object code, executable file, or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disc, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal, and software distribution medium, etc. It should be noted that the content included in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.
[0177] It should be noted that, for the foregoing method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations. However, those skilled in the art should know that this application is not limited by the described action sequence, because according to this application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0178] In the above embodiments, the descriptions of the respective embodiments have their own emphases. For the parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0179] The preferred embodiments of the present application disclosed above are only used to help explain the present application. The alternative embodiments do not elaborate on all details and do not limit the invention to the specific embodiments described. Obviously, many modifications and variations can be made according to the content of the present application. The present application selects and specifically describes these embodiments to better explain the principle and practical application of the present application, so that those skilled in the art can well understand and utilize the present application. The present application is only limited by the claims and their full scope and equivalents.
Claims
1. A method for determining questions, characterized in that, it includes: Obtain the first question belonging to the source language; Through back-translation processing of the first question, obtain the second question belonging to the target language and the third question belonging to the source language; Input the third question into the problem-solving model for processing to obtain a confidence level and the answer to the question, where the confidence level is used to characterize the correctness rate of the answer to the question relative to the third question and the correctness rate of the back-translation of the third question relative to the first question; When it is determined according to the confidence level that the second question meets the question usage conditions, use the second question as the target question.
2. The method according to claim 1, characterized in that, Through back-translation processing of the first question, obtaining the second question belonging to the target language and the third question belonging to the source language includes: Translate the first question into the target language to obtain the second question belonging to the target language; Translate the second question into the source language to obtain the third question belonging to the source language.
3. The method according to claim 2, characterized in that, Translate the first question into the target language to obtain the second question belonging to the target language, including: Translate the first question based on the translation interface to obtain a target language translation result set including at least one initial second question belonging to the target language; Select at least one second question from the target language translation result set according to the preset second question selection rule.
4. The method according to claim 2, characterized in that, Translate the second question into the source language to obtain the third question belonging to the source language, including: Translate the second question based on the translation interface to obtain a source language translation result set including at least one initial third question belonging to the source language; Select at least one third question from the source language translation result set according to the preset third question selection rule.
5. The method according to claim 2, characterized in that, When it is determined according to the confidence level that the second question meets the question usage conditions, using the second question as the target question includes: Compare the confidence level with a preset confidence level threshold; When the confidence level is greater than or equal to the preset confidence level threshold, determine that the second question having an association relationship with the third question meets the question usage conditions and use the second question as the target question.
6. The method according to claim 5, characterized in that, The method further includes: When the confidence level is less than the preset confidence level threshold, determine that the second question having an association relationship with the third question does not meet the question usage conditions and delete the second question.
7. The method according to any one of claims 1-6, characterized in that, The problem-solving model can be trained in the following ways, including: Obtain training sample questions and the corresponding sample question answers for the training sample questions; Input the training sample questions into the initial problem-solving model to obtain the predicted question answers output by the initial problem-solving model; Calculate the loss value of the problem-solving model based on the predicted question answers and the sample question answers; Adjust the model parameters of the initial problem-solving model according to the model loss value, and continue to train the initial problem-solving model until the model training stop condition is reached.
8. The method according to claim 1, wherein, the method further includes: determine a target problem set including the target problem, select a target sample problem from the target problem set, and obtain the digital arithmetic expression corresponding to the target sample problem; extract the digital units in the target sample problem, and determine the character marking units corresponding to the digital units; update the digital arithmetic expression according to the character marking units to obtain a sample character expression; use the sample character expression and the target sample problem to train the initial problem-solving model until a target language problem-solving model that meets the training stop condition is obtained.
9. The method according to claim 8, wherein, the method further includes: obtain the problem to be solved, and extract the digital units in the problem to be solved; input the problem to be solved into the target language problem-solving model for processing to obtain a target character expression; update the target character expression according to the digital units to obtain a target digital arithmetic expression; determine the target answer of the problem to be solved according to the target digital arithmetic expression.
10. A problem determination device, wherein, it includes: an acquisition module configured to acquire a first problem belonging to the source language; a back-translation module configured to obtain a second problem belonging to the target language and a third problem belonging to the source language by performing back-translation processing on the first problem; an obtaining module configured to input the third problem into a problem-solving model for processing to obtain a confidence level and a problem answer, where the confidence level is used to characterize the correctness rate of the problem answer relative to the third problem and the correctness rate of the back-translation of the third problem relative to the first problem; a judgment module configured to use the second problem as the target problem when it is determined according to the confidence level that the second problem meets the problem usage condition.
11. A computing device, including a memory, a processor, and computer instructions stored on the memory and executable on the processor, wherein, when the processor executes the computer instructions, the steps of the method according to any one of claims 1-9 are implemented.
12. A computer-readable storage medium storing computer instructions, wherein, when the computer instructions are executed by a processor, the steps of the method according to any one of claims 1-9 are implemented.
13. A computer program product, wherein, it includes computer instructions, and when the computer instructions are executed by a processor, the steps of the method according to any one of claims 1-9 are implemented.
Citation Information
Patent Citations
Training method and device of problem solving model and problem solving method and device
CN111783423A
Processing method and system of mathematical application question answering model and storage medium
CN112784536A