A method, device and storage medium for automatically solving Chinese-English translation test questions

By training the pre-trained language model, an automatic problem-solving model was obtained, which solved the problem that Chinese-English translation test questions in the existing technology cannot be solved and corrected automatically, and automatic answering and correcting are realized, reducing the teacher's workload and Students provide tutoring.

CN114970569BActive Publication Date: 2025-02-14BEIJING YUNSIZHIXUE TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210515567.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-12
Publication Date
2025-02-14
Estimated Expiration
2042-05-12

AI Technical Summary

Technical Problem

The existing Chinese-English translation test questions cannot be automatically solved and corrected, which increases the workload of English teachers and lacks tutoring during the answering process.

Method used

By training the pre-trained language model of the corpus based on large-scale Chinese and English texts, an automatic problem-solving model is obtained, and text preprocessing and encoding processing is performed for Chinese-English translation test questions, and the problem-solving answers are automatically generated.

Benefits of technology

It realizes automatic answering and correction of Chinese-English translation test questions, reduces the workload of English teachers, and provides students with tutoring for answers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114970569B_ABST
    Figure CN114970569B_ABST
Patent Text Reader

Abstract

The present invention discloses an automatic problem-solving method, device and storage medium for Chinese-English translation test questions, the automatic problem-solving method for Chinese-English translation test questions comprising: training a corpus for a pre-trained language model based on Chinese and English texts to obtain an automatic problem-solving model; performing text preprocessing on the Chinese-English translation test question text to obtain a unified format test question text; performing encoding processing on the unified format test question text based on the automatic problem-solving model to obtain an encoded text, the encoded text containing masked characters filled in the answer part to be translated in the corresponding Chinese-English translation test question; searching and decoding the masked characters in the encoded text based on the automatic problem-solving model to automatically generate the answer to the Chinese-English translation test question. The present invention helps students to provide guidance in the process of answering Chinese-English translation test questions, and compares the answer results of Chinese-English translation test questions with the automatic answer results to achieve automatic correction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of natural language processing, and in particular to an automatic problem-solving method, device and storage medium for Chinese-English translation test questions. Background Art

[0002] In order to help primary and secondary school students better master and use English, the English training test papers for primary and secondary schools contain a large number of Chinese-English translation test papers. There are various types of Chinese-English translation test papers, such as Figure 1 Given a Chinese sentence and part of an English sentence, fill in the missing words in the English sentence according to the Chinese sentence; Figure 2 The Chinese sentence is given to describe the usage scenario, and the English sentence is translated according to the usage scenario prompt.

[0003] Existing Chinese-English translation test questions are generally answered manually. When students are answering Chinese-English translation test questions, people without certain English experience cannot provide guidance. When English teachers correct Chinese-English translation test questions, they need to correct them manually one by one, and cannot correct them automatically in batches, which increases the correction workload of English teachers.

[0004] In view of this, the present patent is proposed, which aims to solve the problem of automatic solution of Chinese-English translation test questions, to help provide guidance to students in the process of answering Chinese-English translation test questions, and to realize automatic correction of the answer results of Chinese-English translation test questions. Summary of the invention

[0005] In order to solve the above problems, the present invention provides a method, device and storage medium for automatically solving Chinese-English translation test questions. Specifically, the following technical solutions are adopted:

[0006] An automatic method for solving Chinese-English translation test questions, comprising:

[0007] Based on the Chinese and English texts, the pre-trained language model is trained to obtain an automatic problem-solving model;

[0008] Perform text preprocessing on the Chinese-to-English translation test text to obtain the test text in a unified format;

[0009] Based on the automatic problem-solving model, encoding is performed on the unified format test question text to obtain an encoded text, wherein the encoded text contains filling masking characters for the part of the answer to be translated in the corresponding Chinese-to-English translation test question;

[0010] Based on the automatic problem-solving model, the masked characters in the encoded text are searched and decoded to automatically generate the answer to the Chinese-English translation test question.

[0011] As an optional embodiment of the present invention, in the automatic problem-solving method for a Chinese-English translation test question described in the present invention, the automatic problem-solving model is obtained by training a pre-trained language model based on a corpus of Chinese and English texts, including:

[0012] Unify large-scale common parallel corpora into Chinese + English sentence pairs;

[0013] A pre-trained language model is trained based on the Chinese+English sentence pairs to obtain a primary automatic problem-solving model.

[0014] As an optional embodiment of the present invention, in the automatic problem-solving method for a Chinese-to-English translation test question described in the present invention, the automatic problem-solving model is obtained by training the corpus based on the Chinese-English text for the pre-trained language model, including:

[0015] Obtain corpus texts related to Chinese-English translation questions in the set field, and organize them into Chinese+English sentence pairs;

[0016] Based on the Chinese+English sentence pairs uniformly organized in the set field, the primary automatic problem-solving model is enhanced and trained to obtain an enhanced automatic problem-solving model;

[0017] Optionally, when the set field is the field of education, the corpus texts related to Chinese-to-English translation test questions in the field of education include question banks, textbooks, and corpus similar to the field of education filtered out from general parallel corpora by a model.

[0018] As an optional embodiment of the present invention, in the automatic problem-solving method for a Chinese-to-English translation test question described in the present invention, the automatic problem-solving model is obtained by training the corpus based on the Chinese-English text for the pre-trained language model, including:

[0019] Designing MASK tasks based on the characteristics of Chinese-English translation questions converts various types of Chinese-English translation questions into a unified input + output format;

[0020] The enhanced automatic problem-solving model is continued to be trained based on the MASK task to finally obtain an automatic problem-solving model.

[0021] As an optional embodiment of the present invention, in the automatic problem-solving method of a Chinese-to-English translation test question described in the present invention, the MASK task is designed according to the characteristics of the Chinese-to-English translation test questions to convert various types of Chinese-to-English translation test questions into a unified input+output format, including:

[0022] The characteristics of the Chinese-English translation test are that certain hints are given to complete the remaining words that need to be translated;

[0023] The MASK task converts the Chinese-to-English translation test questions into a unified input+output format:

[0024] [Sentence start identifier] Chinese sentence part [Sentence end identifier] + English sentence part + [MASK] part [Sentence end identifier];

[0025] The [MASK] part corresponds to the missing word position that needs to be completed in the English sentence in the Chinese-to-English translation test.

[0026] As an optional embodiment of the present invention, in the automatic problem-solving method of a Chinese-to-English translation test question described in the present invention, the MASK task is designed according to the characteristics of the Chinese-to-English translation test questions to convert various types of Chinese-to-English translation test questions into a unified input+output format, including:

[0027] The characteristics of the Chinese-English translation test are that the whole sentence is translated by giving partial scene prompts;

[0028] The MASK task converts the Chinese-to-English translation test questions into a unified input+output format:

[0029] [Sentence start identifier] + [Question identifier] scene prompts the Chinese sentence part [Sentence end identifier] + English sentence part [Sentence end identifier].

[0030] As an optional implementation mode of the present invention, in the automatic problem-solving method for a Chinese-to-English translation test question of the present invention, the text preprocessing of the Chinese-to-English translation test question text to obtain the unified format test question text includes:

[0031] Scanning the Chinese-to-English translation test text to be answered to obtain the original OCR text;

[0032] Performing structural processing on the original OCR text to obtain a structured OCR text;

[0033] Based on the structured OCR text, a unified MASK text is constructed.

[0034] As an optional embodiment of the present invention, in the automatic problem-solving method for a Chinese-to-English translation test question described in the present invention, the masked characters in the encoded text are searched and decoded based on the automatic problem-solving model, and beam search is used to search and decode in the automatic generation of the answer to the Chinese-to-English translation test question.

[0035] The present invention also provides an automatic problem-solving device for Chinese-English translation test questions, comprising:

[0036] The automatic problem-solving model training module trains the pre-trained language model based on large-scale Chinese and English text corpora to obtain the automatic problem-solving model;

[0037] And an automatic problem-solving module, the automatic problem-solving module comprising:

[0038] A text format processing unit performs text preprocessing on the Chinese-to-English translation test text to obtain a unified format test text;

[0039] A text encoding processing unit, which performs encoding processing on the unified format test text based on the automatic problem-solving model to obtain an encoded text, wherein the encoded text contains filling masking characters for the part of the answer to be translated in the corresponding Chinese-to-English translation test question;

[0040] And a text decoding processing unit searches and decodes the masked characters in the encoded text based on the automatic problem-solving model, and automatically generates a solution to the Chinese-to-English translation test question.

[0041] The present invention also provides a storage medium storing a computer executable program, and when the computer executable program is executed, the automatic problem-solving method for Chinese-English translation test questions is implemented.

[0042] Compared with the prior art, the present invention has the following beneficial effects:

[0043] The invention discloses an automatic problem-solving method for Chinese-English translation test questions. The method obtains an automatic problem-solving model by training a pre-trained language model based on a large-scale Chinese-English text pair corpus. The automatic problem-solving model is used to realize automatic solution of Chinese-English translation test questions. This helps to provide guidance to students in the process of answering Chinese-English translation test questions, and realizes automatic correction by comparing the answer results of Chinese-English translation test questions with the automatic solution results. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 An example of a question type of a Chinese-English translation test question in an embodiment of the present invention;

[0045] Figure 2 Another example of a Chinese-English translation test question in an embodiment of the present invention;

[0046] Figure 3 A flow chart of a method for automatically solving a Chinese-to-English translation test question according to an embodiment of the present invention;

[0047] Figure 4 A flow chart of training an automatic problem-solving model in an automatic problem-solving method for a Chinese-to-English translation test question according to an embodiment of the present invention;

[0048] Figure 5 In the automatic problem-solving method for Chinese-English translation test questions in the embodiment of the present invention, the parallel corpus is uniformly organized into Chinese+English sentence pairs;

[0049] Figure 6 In the automatic problem-solving method for Chinese-to-English translation test questions in the embodiment of the present invention, corpus texts related to Chinese-to-English translation test questions in the field of education are uniformly organized into Chinese+English sentence pair examples;

[0050] Figure 7 A problem-solving flow chart of an automatic problem-solving model in an automatic problem-solving method for a Chinese-to-English translation test question according to an embodiment of the present invention. DETAILED DESCRIPTION

[0051] To make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be described clearly and completely in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them.

[0052] Therefore, the following detailed description of the embodiments of the present invention is not intended to limit the scope of the invention claimed for protection, but merely represents some embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0053] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features and technical solutions in the embodiments may be combined with each other.

[0054] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.

[0055] In the description of the present invention, it should be noted that the orientation or positional relationship indicated by the terms "upper", "lower", etc. is based on the orientation or positional relationship shown in the drawings, or the orientation or positional relationship in which the invention product is usually placed when in use, or the orientation or positional relationship commonly understood by those skilled in the art. Such terms are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", etc. are only used to distinguish the description, and cannot be understood as indicating or implying relative importance.

[0056] See also Figure 3 As shown, the automatic problem-solving method of a Chinese-English translation test question of this embodiment includes:

[0057] Based on large-scale Chinese and English text corpora, the pre-trained language model is trained to obtain an automatic problem-solving model;

[0058] Perform text preprocessing on the Chinese-to-English translation test text to obtain the test text in a unified format;

[0059] Based on the automatic problem-solving model, encoding is performed on the unified format test question text to obtain an encoded text, wherein the encoded text contains filling masking characters for the part of the answer to be translated in the corresponding Chinese-to-English translation test question;

[0060] Based on the automatic problem-solving model, the masked characters in the encoded text are searched and decoded to automatically generate the answer to the Chinese-English translation test question.

[0061] The present embodiment provides an automatic problem-solving method for Chinese-English translation test questions, which obtains an automatic problem-solving model by training a pre-trained language model based on a large-scale Chinese-English text pair corpus, and realizes automatic solution of Chinese-English translation test questions by using the automatic problem-solving model, thereby facilitating guidance for students in the process of answering Chinese-English translation test questions, and realizing automatic correction by comparing the answer results of Chinese-English translation test questions with the automatic solution results.

[0062] The Chinese-English translation test questions in this embodiment are mainly for primary and secondary school students. The types of Chinese-English translation test questions are as follows: Figure 1 As shown in the figure, give some hints to complete the remaining words that need to be translated (cloze test), or as Figure 2 As shown, partial scene prompts are given to translate the entire sentence (scenario translation). In view of the characteristics of the above test questions, the pre-trained language model used in this embodiment is the UniLM model.

[0063] UniLM is a pre-trained language model, known as the unified pre-trained language model. It can complete unidirectional, sequence-to-sequence, and bidirectional prediction tasks. It can be said to combine the advantages of both AR and AE language models. Unilm has achieved the best results in the sampling of abstract summarization, generative question answering, and language generation datasets.

[0064] UniLM is also a multi-layer Transformer network that can complete three pre-training objectives at the same time. The UniLM model predicts the mask word based on the context of the mask word, which is also a cloze task. For different training objectives, the context is different.

[0065] The language model is trained unidirectionally, and the context of the mask word is the words on its side, the left or the right.

[0066] For bidirectional training of language models, the context of the mask word is the words on the left and right sides.

[0067] In the Seq-to-Seq language model, the seq on the left is called the source sequence, and the seq on the right is called the target sequence. What we want to predict is the target sequence, so its context is all the source sequences and the target sequence predicted on its left side.

[0068] The goal of UniLM model pre-training is to train different language models. In a cloze task, some WordPieces are randomly selected to be replaced with [MASK], and then the corresponding output vector is calculated through the Transformer network. The output vector is then fed into the softmax classifier to predict the word [MASK]. The goal of UniLM parameter optimization is to minimize the cross entropy between the predicted value and the true value of the [MASK] token. It is worth noting that since the cloze task is used, the same training process can be used for all language models (whether unidirectional or bidirectional).

[0069] One-way language model:

[0070] The unidirectional language model adopts the training objectives from left to right and from right to left respectively. Taking the left to right as an example, for example, to predict the mask in the sequence 'X1X2[MASK]X4', only the information of X1, X2 and itself is available, and the information of X4 is not available.

[0071] Bidirectional Language Model:

[0072] The bidirectional language model, taking 'X1X2[MASK]X4' as an example, in which X1, X2, X4 and its own information are all available, so compared with the unidirectional language model, it can generate better context-related token representations.

[0073] Sequence-to-Sequence Language Models:

[0074] The sequence on the left is actually our known sequence, called source sequence, and the sequence on the right is the sequence we want, called target sequence. The sequence on the left belongs to the encoding stage, so the context information of each other can be seen; the sequence on the right belongs to the decoding stage, and the information of the source sequence, the information on the left side of the target sequence, and its own information can be seen. Taking T1T2->T3T4T5 as an example, our input becomes [SOS]T1T2[EOS]T3T4T5[EOS], T1 and T2 can see each other, and can see [SOS] and [EOS] on both sides; while T4 can see [SOS], T1, T2, [EOS], T3, and its own information.

[0075] During training, tokens in both the source sequence and the target sequence are randomly replaced with [MASK] to achieve the purpose of model learning and training. While predicting [MASK], because the two sentence pairs are packaged together, the model actually learns the close relationship between the two sentences. This is very useful in NLG tasks, such as abstract summarization.

[0076] UniLM model has three major advantages:

[0077] Three different training objectives, network parameters shared.

[0078] It is precisely because of the sharing of network parameters that the model avoids overfitting to a single language model, making the learned model more general and more universal.

[0079] Because it adopts the Seq-to-Seq language model, it can complete NLU tasks while also being able to complete NLG tasks, such as abstract summarization and question-answer generation.

[0080] As an optional implementation of this embodiment, see Figure 4 As shown, in the automatic problem-solving method for a Chinese-English translation test described in this embodiment, the automatic problem-solving model obtained by training the UniLM model based on a large-scale Chinese-English text pair corpus includes:

[0081] Unify large-scale common parallel corpora into Chinese + English sentence pairs, see Figure 5 As shown;

[0082] The UniLM model is trained based on the Chinese+English sentence pairs to obtain a primary automatic problem-solving model.

[0083] Corpus is the basic resource of corpus linguistics research, and is also the main resource of empirical language research method. It is applied to lexicon compilation, language teaching, traditional language research, and research based on statistics or examples in natural language processing. According to the language of the corpus, the corpus can also be divided into monolingual (Monolingual), bilingual (Bilingual) and multilingual (Multilingual). Bilingual and multilingual corpora can also be divided into parallel (aligned) corpora and comparative corpora according to the organizational form of the corpus. The corpus of the former constitutes the translation relationship, which is mostly used in application fields such as machine translation and bilingual dictionary compilation, and the latter collects different language texts expressing the same content together, which is mostly used in language contrast research. The automatic problem-solving model training of the present embodiment is in order to realize the automatic problem-solving of Chinese-English translation test questions, and therefore adopts large-scale general parallel corpus training UniLM model.

[0084] Furthermore, the automatic problem-solving method for Chinese-English translation test questions described in this embodiment is particularly aimed at automatically solving Chinese-English translation test questions in a set field. Specifically, this embodiment takes the field of education as an example. Based on the characteristics of the Chinese-English translation test questions in the field of education, the automatic problem-solving model obtained by training the UniLM model based on a large-scale Chinese-English text pair corpus in this embodiment includes:

[0085] Obtain the corpus texts related to Chinese-English translation test questions in the field of education, and organize them into Chinese + English sentence pairs, see Figure 6 As shown;

[0086] Based on the Chinese + English sentence pairs uniformly organized in the field of education, the primary automatic problem-solving model is enhanced and trained to obtain an enhanced automatic problem-solving model;

[0087] The corpus texts related to the Chinese-English translation test questions in the field of education include a question bank, textbooks, and corpus similar to the field of education filtered out from the general parallel corpus through a model.

[0088] The Chinese-English translation test questions in this embodiment include: Figure 1 As shown in the figure, give some hints to complete the remaining words that need to be translated (cloze test), or as Figure 2 As shown, partial scene prompts are given to translate the entire sentence (scenario translation). Therefore, the automatic problem-solving method for Chinese-to-English translation test questions in this embodiment performs enhanced training on the question type characteristics of Chinese-to-English translation test questions to improve the accuracy of automatic problem-solving of Chinese-to-English translation test questions in the field of education.

[0089] As an optional implementation of this embodiment, in the automatic problem-solving method for a Chinese-to-English translation test described in this embodiment, the automatic problem-solving model obtained by training the UniLM model based on a large-scale Chinese-English text pair corpus includes:

[0090] Designing MASK tasks based on the characteristics of Chinese-English translation questions converts various types of Chinese-English translation questions into a unified input + output format;

[0091] The enhanced automatic problem-solving model is continued to be trained based on the MASK task to finally obtain an automatic problem-solving model.

[0092] In language models, it is often necessary to predict the next word from the previous word. However, if you want to apply selfattention in LM or use contextual information at the same time, in order not to leak the label information to be predicted, you need to use a mask to "cover" it. Different masking methods also correspond to papers. In the process of automatic problem-solving models, NLU tasks need to be performed. The role of NLU tasks is to enable machines to accurately understand the natural language generated by humans. For NLG tasks, S1: source segment, S2: target segment, the input is "[SOS]S1[EOS]S2[EOS]". We also randomly mask some spans as in pre-training, with the goal of maximizing the probability of our masked token under a given context. It is worth noting that [EOS], which marks the end of the target sequence, can also be masked, because this allows the model to learn when to generate [EOS], which can mark the end of text generation.

[0093] Specifically, in the automatic problem-solving method for a Chinese-to-English translation test question described in this embodiment, the design of a span mask task according to the characteristics of the Chinese-to-English translation test question type to convert various types of Chinese-to-English translation test questions into a unified input+output format includes:

[0094] The characteristics of the Chinese-English translation test are that certain hints are given to complete the remaining words that need to be translated;

[0095] The span mask task converts the Chinese-to-English translation test question into a unified input+output format of: [sentence start identifier] Chinese sentence part [sentence end identifier] + English sentence part + [MASK] part [sentence end identifier];

[0096] The [MASK] part corresponds to the missing word position that needs to be completed in the English sentence in the Chinese-to-English translation test.

[0097] against Figure 1The example Chinese-English translation test question in the span mask task is converted into the following format: [SOS]I love the park with a swimming pool. [EOS]I love the park[MASK][MASK][MASK]a swimming pool.[EOS].

[0098] Specifically, in the automatic problem-solving method for a Chinese-to-English translation test question described in this embodiment, the design of a span mask task according to the characteristics of the Chinese-to-English translation test question type to convert various types of Chinese-to-English translation test questions into a unified input+output format includes:

[0099] The characteristics of the Chinese-English translation test are that the whole sentence is translated by giving partial scene prompts;

[0100] The span mask task converts the Chinese-to-English translation test questions into a unified input+output format:

[0101] [Sentence start identifier] + [Question identifier] scene prompts the Chinese sentence part [Sentence end identifier] + English sentence part [Sentence end identifier].

[0102] against Figure 2 The example Chinese-English translation test question in the span mask task is converted into the following format: [SOS][ASK]: You want to know which musician your friend likes the most [EOS] Who is your favorite musician? [EOS].

[0103] Common identifiers for natural language processing:

[0104] <unk>: Low frequency words or words not in the vocabulary;

[0105] <pad>:Complete characters;

[0106] <go> / <sos>: sentence start identifier;

[0107] <eos>: sentence end identifier;

[0108] [SEP]: separator between two sentences;

[0109] [MASK]: Fill the masked characters.

[0110] As an optional implementation of this embodiment, in the automatic problem-solving method for a Chinese-to-English translation test question described in this embodiment, the text preprocessing is performed on the Chinese-to-English translation test question text to obtain a unified format test question text, including:

[0111] Scanning the Chinese-to-English translation test text to be answered to obtain the original OCR text;

[0112] Performing structural processing on the original OCR text to obtain a structured OCR text;

[0113] Based on the structured OCR text, a unified MASK text is constructed.

[0114] The automatic problem-solving method for Chinese-to-English translation test questions in this embodiment realizes the automatic solution of Chinese-to-English translation test questions based on the automatic problem-solving model generated by training. In the process of automatic solution, it is first necessary to preprocess the Chinese-to-English translation test question text and construct a unified MASK text for use in the automatic problem-solving model to realize automatic problem-solving.

[0115] OCR (optical character recognition) technology mainly recognizes text in images as editable strings. Early OCR technology mainly recognized some simple document images. Due to the development of deep learning, the current OCR technology has been widely used in text recognition of images in various complex scenarios. However, the result recognized by OCR technology is only a string of editable strings, which does not contain any structured information. On the whole, business processing requires different types of text recognition. Therefore, structured processing is performed on the original OCR text, which can specifically process the original OCR text of the Chinese-English translation test text to obtain more accurate information, ensure the accuracy of solving problems using the automatic problem-solving model, and improve the efficiency of automatic problem-solving.

[0116] Furthermore, in the automatic problem-solving method for a Chinese-to-English translation test described in this embodiment, the search and decoding are performed on the masked characters in the encoded text based on the automatic problem-solving model, and a search algorithm beam search is used for search and decoding in automatically generating the answer to the Chinese-to-English translation test question.

[0117] Beam Search is a heuristic graph search algorithm, usually used in the case of a large graph solution space. In order to reduce the space and time occupied by the search, some nodes with poor quality are cut off at each step of depth expansion, and some nodes with higher quality are retained. This reduces space consumption and improves time efficiency, but the disadvantage is that there may be potential optimal solutions that are discarded. Therefore, the Beam Search algorithm is incomplete and is generally used in systems with large solution spaces.

[0118] This algorithm is commonly used in scenarios such as machine translation and speech recognition. When the system data set is large, computing resources are limited, and there is no unique optimal solution, this algorithm can quickly find a solution that is close to the most correct solution.

[0119] This embodiment also provides an automatic problem-solving device for Chinese-English translation test questions, including:

[0120] The automatic problem-solving model training module trains the pre-trained language model based on large-scale Chinese and English text corpora to obtain the automatic problem-solving model;

[0121] And an automatic problem-solving module, the automatic problem-solving module comprising:

[0122] A text format processing unit performs text preprocessing on the Chinese-to-English translation test text to obtain a unified format test text;

[0123] A text encoding processing unit, which performs encoding processing on the unified format test text based on the automatic problem-solving model to obtain an encoded text, wherein the encoded text contains filling masking characters for the part of the answer to be translated in the corresponding Chinese-to-English translation test question;

[0124] And a text decoding processing unit searches and decodes the masked characters in the encoded text based on the automatic problem-solving model, and automatically generates a solution to the Chinese-to-English translation test question.

[0125] In the present embodiment, an automatic problem-solving device for Chinese-English translation test questions is provided. The automatic problem-solving model training module obtains an automatic problem-solving model by training a pre-trained language model based on a large-scale Chinese-English text pair corpus. The automatic problem-solving module realizes automatic answering of Chinese-English translation test questions by using the automatic problem-solving model, which helps to provide guidance to students in the process of answering Chinese-English translation test questions, and realizes automatic correction by comparing the answer results of Chinese-English translation test questions with the automatic answer results.

[0126] The Chinese-English translation test questions in this embodiment are mainly for primary and secondary school students. The types of Chinese-English translation test questions are as follows: Figure 1 As shown in the figure, give some hints to complete the remaining words that need to be translated (cloze test), or as Figure 2 As shown, partial scene prompts are given to translate the entire sentence (scenario translation). In view of the characteristics of the above test questions, the pre-trained language model trained by the automatic problem-solving model training module in this embodiment adopts the UniLM model.

[0127] As an optional implementation of this embodiment, see Figure 4 As shown, in the automatic problem-solving device for Chinese-English translation test questions described in this embodiment, the automatic problem-solving model training module is based on a large-scale Chinese-English text pair corpus to train the UniLM model to obtain an automatic problem-solving model, including:

[0128] Unify large-scale common parallel corpora into Chinese + English sentence pairs, see Figure 5 As shown;

[0129] The UniLM model is trained based on the Chinese+English sentence pairs to obtain a primary automatic problem-solving model.

[0130] Furthermore, the automatic problem-solving device for Chinese-English translation test questions described in this embodiment is particularly aimed at automatically solving Chinese-English translation test questions in the field of education. Based on the characteristics of the Chinese-English translation test questions in the field of education, the automatic problem-solving model training module described in this embodiment is based on a large-scale Chinese-English text pair corpus to train the UniLM model to obtain an automatic problem-solving model, which includes:

[0131] Obtain the corpus texts related to Chinese-English translation test questions in the field of education, and organize them into Chinese + English sentence pairs, see Figure 6 As shown;

[0132] Based on the Chinese + English sentence pairs uniformly organized in the field of education, the primary automatic problem-solving model is enhanced and trained to obtain an enhanced automatic problem-solving model;

[0133] The corpus texts related to the Chinese-English translation test questions in the field of education include a question bank, textbooks, and corpus similar to the field of education filtered out from the general parallel corpus through a model.

[0134] The Chinese-English translation test questions in this embodiment include: Figure 1 As shown in the figure, give some hints to complete the remaining words that need to be translated (cloze test), or as Figure 2 As shown, partial scene prompts are given to translate the entire sentence (scenario translation). Therefore, the automatic problem-solving model training module of the Chinese-to-English translation test in this embodiment performs enhanced training on the question type characteristics of the Chinese-to-English translation test to improve the accuracy of automatic problem-solving of the Chinese-to-English translation test in the education field.

[0135] As an optional implementation of this embodiment, the automatic problem-solving model training module described in this embodiment trains the UniLM model based on a large-scale Chinese-English text pair corpus to obtain an automatic problem-solving model, including:

[0136] Designing MASK tasks based on the characteristics of Chinese-English translation questions converts various types of Chinese-English translation questions into a unified input + output format;

[0137] The enhanced automatic problem-solving model is continued to be trained based on the MASK task to finally obtain an automatic problem-solving model.

[0138] In language models, it is often necessary to predict the next word from the previous word. However, if you want to apply selfattention in LM or use contextual information at the same time, in order not to leak the label information to be predicted, you need to use a mask to "cover" it. Different masking methods also correspond to papers. In the process of automatic problem-solving models, NLU tasks need to be performed. The role of NLU tasks is to enable machines to accurately understand the natural language generated by humans. For NLG tasks, S1: source segment, S2: target segment, the input is "[SOS]S1[EOS]S2[EOS]". We also randomly mask some spans as in pre-training, with the goal of maximizing the probability of our masked token under a given context. It is worth noting that [EOS], which marks the end of the target sequence, can also be masked, because this allows the model to learn when to generate [EOS], which can mark the end of text generation.

[0139] Specifically, in the automatic problem-solving device for Chinese-to-English translation test questions described in this embodiment, the automatic problem-solving model training module designs MASK tasks according to the characteristics of the Chinese-to-English translation test questions to convert various types of Chinese-to-English translation test questions into a unified input+output format, including:

[0140] The characteristics of the Chinese-English translation test are that certain hints are given to complete the remaining words that need to be translated;

[0141] The MASK task converts the Chinese-to-English translation test questions into a unified input+output format:

[0142] [Sentence start identifier] Chinese sentence part [Sentence end identifier] + English sentence part + [MASK] part [Sentence end identifier];

[0143] The [MASK] part corresponds to the missing word position that needs to be completed in the English sentence in the Chinese-to-English translation test.

[0144] against Figure 1 The example Chinese-English translation test question in the span mask task is converted into the following format: [SOS]I love the park with a swimming pool. [EOS]I love the park[MASK][MASK][MASK]a swimming pool.[EOS].

[0145] Specifically, in the automatic problem-solving device for Chinese-to-English translation test questions described in this embodiment, the automatic problem-solving model training module designs a span mask task according to the characteristics of the Chinese-to-English translation test questions to convert various types of Chinese-to-English translation test questions into a unified input+output format, including:

[0146] The characteristics of the Chinese-English translation test are that the whole sentence is translated by giving partial scene prompts;

[0147] The span mask task converts the Chinese-to-English translation test questions into a unified input+output format:

[0148] [Sentence start identifier] + [Question identifier] scene prompts the Chinese sentence part [Sentence end identifier] + English sentence part [Sentence end identifier].

[0149] against Figure 2 The example Chinese-English translation test question in the span mask task is converted into the following format: [SOS][ASK]: Do you want to know which musician your friend likes the most? [EOS]Who is your favorite musician? [EOS].

[0150] As an optional implementation of this embodiment, in the automatic problem-solving device for a Chinese-to-English translation test question described in this embodiment, the text format processing unit performs text preprocessing on the Chinese-to-English translation test question text to obtain a unified format test question text including:

[0151] Scanning the Chinese-to-English translation test text to be answered to obtain the original OCR text;

[0152] Performing structural processing on the original OCR text to obtain a structured OCR text;

[0153] Based on the structured OCR text, a unified MASK text is constructed.

[0154] The automatic problem-solving device for Chinese-to-English translation test questions in this embodiment realizes automatic answering of Chinese-to-English translation test questions based on the automatic problem-solving model generated by training. In the process of automatic answering, it is first necessary to preprocess the Chinese-to-English translation test question text and construct a unified MASK text for use in the automatic problem-solving model to realize automatic problem-solving.

[0155] Furthermore, in the automatic problem-solving device for a Chinese-to-English translation test described in this embodiment, the search algorithm beam search is used for search decoding in the automatic problem-solving model for searching and decoding masked characters in the encoded text, and the answer to the Chinese-to-English translation test is automatically generated.

[0156] This embodiment also provides a storage medium storing a computer executable program. When the computer executable program is executed, the automatic solution method for a Chinese-to-English translation test question is implemented.

[0157] The storage medium described in the present embodiment may include a data signal propagated in a baseband or as a part of a carrier wave, wherein a readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The readable storage medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by an instruction execution system, an apparatus, or a device or used in combination with it. The program code contained on the readable storage medium may be transmitted with any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the above.

[0158] This embodiment also provides an electronic device, including a processor and a memory, wherein the memory is used to store a computer executable program, and when the computer program is executed by the processor, the processor executes the automatic solution method for a Chinese-English translation test question.

[0159] The electronic device is presented in the form of a general-purpose computing device. The processor may be one or more than one and work in coordination. The present invention does not exclude distributed processing, that is, the processor may be dispersed in different physical devices. The electronic device of the present invention is not limited to a single entity, but may also be the sum of multiple physical devices.

[0160] The memory stores a computer executable program, which is usually a machine-readable code. The computer-readable program can be executed by the processor to enable the electronic device to perform the method of the present invention, or at least part of the steps in the method.

[0161] The memory includes a volatile memory, such as a random access memory unit (RAM) and / or a cache memory unit, and may also be a non-volatile memory, such as a read-only memory unit (ROM).

[0162] It should be understood that the electronic device of the present invention may also include elements or components not shown in the above examples. For example, some electronic devices also include display units such as display screens, and some electronic devices also include human-computer interaction elements such as buttons, keyboards, etc. As long as the electronic device can execute the computer-readable program in the memory to implement the method of the present invention or at least part of the steps of the method, it can be considered as an electronic device covered by the present invention.

[0163] Through the above description of the implementation mode, it is easy for those skilled in the art to understand that the present invention can be implemented by hardware capable of executing a specific computer program, such as the system of the present invention, and the electronic processing unit, server, client, mobile phone, control unit, processor, etc. contained in the system. The present invention can also be implemented by computer software that executes the method of the present invention, such as control software executed by a microprocessor, an electronic control unit, a client, a server, etc. However, it should be noted that the computer software that executes the method of the present invention is not limited to being executed by one or a specific hardware entity, and it can also be implemented in a distributed manner by unspecified specific hardware. For computer software, the software product can be stored in a computer-readable storage medium (which can be a CD-ROM, a U disk, a mobile hard disk, etc.), and can also be distributed and stored on the network, as long as it can enable the electronic device to execute the method according to the present invention.

[0164] The above embodiments are only used to illustrate the present invention and are not intended to limit the technical solutions described in the present invention. Although the present invention has been described in detail with reference to the above embodiments, the present invention is not limited to the above specific implementation methods. Therefore, any modification or equivalent replacement of the present invention; and all technical solutions and improvements thereof that do not depart from the spirit and scope of the invention are included in the scope of the claims of the present invention.< / eos> < / sos> < / go> < / pad> < / unk>

Claims

1. A method for automatically solving Chinese-English translation test questions, characterized in that: include: Based on the Chinese and English texts, the pre-trained language model is trained to obtain an automatic problem-solving model; Perform text preprocessing on the Chinese-to-English translation test text to obtain the test text in a unified format; Based on the automatic problem-solving model, encoding is performed on the unified format test question text to obtain an encoded text, wherein the encoded text contains filling masking characters for the part of the answer to be translated in the corresponding Chinese-to-English translation test question; Searching and decoding the masked characters in the encoded text based on the automatic problem-solving model to automatically generate the answer to the Chinese-to-English translation test question; The automatic problem-solving model is obtained by training the corpus based on the pre-trained language model based on the Chinese and English texts, including: Unify large-scale common parallel corpora into Chinese + English sentence pairs; Based on the Chinese + English sentence pairs, a pre-trained language model is trained to obtain a primary automatic problem-solving model; The automatic problem-solving model is obtained by training the corpus based on the pre-trained language model based on the Chinese and English texts, including: Obtain corpus texts related to Chinese-English translation questions in the set field, and organize them into Chinese+English sentence pairs; Based on the Chinese+English sentence pairs uniformly organized in the set field, the primary automatic problem-solving model is enhanced and trained to obtain an enhanced automatic problem-solving model; When the set field is the field of education, the corpus texts related to the Chinese-English translation test questions in the field of education include question banks, textbooks, and corpus similar to the field of education filtered out from the general parallel corpus by the model; The automatic problem-solving model is obtained by training the corpus based on the pre-trained language model based on the Chinese and English texts, including: Designing MASK tasks based on the characteristics of Chinese-English translation questions converts various types of Chinese-English translation questions into a unified input + output format; Continue to train the enhanced automatic problem-solving model based on the MASK task, and finally obtain an automatic problem-solving model; The MASK task is designed according to the characteristics of the Chinese-English translation test questions to convert various types of Chinese-English translation test questions into a unified input + output format, including: The characteristics of the Chinese-English translation test are that certain hints are given to complete the remaining words that need to be translated; The MASK task converts the Chinese-to-English translation test questions into a unified input+output format: [Sentence start identifier] Chinese sentence part [Sentence end identifier] + English sentence part + [MASK] part [Sentence end identifier]; The [MASK] part corresponds to the missing word position in the English sentence in the Chinese-to-English translation test; The characteristics of the Chinese-English translation test are that the whole sentence is translated by giving partial scene prompts; The MASK task converts the Chinese-to-English translation test questions into a unified input+output format: [Sentence start identifier] + [Question identifier] scene prompts the Chinese sentence part [Sentence end identifier] + English sentence part [Sentence end identifier].

2. The automatic problem-solving method for Chinese-to-English translation test according to claim 1, characterized in that: The text preprocessing is performed on the Chinese-to-English translation test text to obtain the test text in a unified format, including: Scanning the Chinese-to-English translation test text to be answered to obtain the original OCR text; Performing structural processing on the original OCR text to obtain a structured OCR text; Based on the structured OCR text, a unified MASK text is constructed.

3. The automatic problem-solving method for Chinese-to-English translation test according to claim 2, characterized in that: The automatic problem-solving model is used to search and decode masked characters in the encoded text, and beam search is used to search and decode in automatically generating answers to Chinese-to-English translation questions.

4. An automatic problem-solving device for Chinese-English translation test, characterized in that: include: The automatic problem-solving model training module trains the pre-trained language model based on large-scale Chinese and English text corpora to obtain the automatic problem-solving model; And an automatic problem-solving module, the automatic problem-solving module comprising: A text format processing unit performs text preprocessing on the Chinese-to-English translation test text to obtain a unified format test text; A text encoding processing unit, which performs encoding processing on the unified format test text based on the automatic problem-solving model to obtain an encoded text, wherein the encoded text contains filling masking characters for the part of the answer to be translated in the corresponding Chinese-to-English translation test question; and a text decoding processing unit, which searches and decodes the masked characters in the encoded text based on the automatic problem-solving model to automatically generate a solution to the Chinese-to-English translation test question; The automatic problem-solving model is obtained by training the corpus based on the pre-trained language model based on the Chinese and English texts, including: Unify large-scale common parallel corpora into Chinese + English sentence pairs; Based on the Chinese + English sentence pairs, a pre-trained language model is trained to obtain a primary automatic problem-solving model; The automatic problem-solving model is obtained by training the corpus based on the pre-trained language model based on the Chinese and English texts, including: Obtain corpus texts related to Chinese-English translation questions in the set field, and organize them into Chinese+English sentence pairs; Based on the Chinese+English sentence pairs uniformly organized in the set field, the primary automatic problem-solving model is enhanced and trained to obtain an enhanced automatic problem-solving model; When the set field is the field of education, the corpus texts related to the Chinese-English translation test questions in the field of education include question banks, textbooks, and corpus similar to the field of education filtered out from the general parallel corpus by the model; The automatic problem-solving model is obtained by training the corpus based on the pre-trained language model based on the Chinese and English texts, including: Designing MASK tasks based on the characteristics of Chinese-English translation questions converts various types of Chinese-English translation questions into a unified input + output format; Continue to train the enhanced automatic problem-solving model based on the MASK task, and finally obtain an automatic problem-solving model; The MASK task is designed according to the characteristics of the Chinese-English translation test questions to convert various types of Chinese-English translation test questions into a unified input + output format, including: The characteristics of the Chinese-English translation test are that certain hints are given to complete the remaining words that need to be translated; The MASK task converts the Chinese-to-English translation test questions into a unified input+output format: [Sentence start identifier] Chinese sentence part [Sentence end identifier] + English sentence part + [MASK] part [Sentence end identifier]; The [MASK] part corresponds to the missing word position in the English sentence in the Chinese-to-English translation test; The characteristics of the Chinese-English translation test are that the whole sentence is translated by giving partial scene prompts; The MASK task converts the Chinese-to-English translation test questions into a unified input+output format: [Sentence start identifier] + [Question identifier] scene prompts the Chinese sentence part [Sentence end identifier] + English sentence part [Sentence end identifier].

5. A storage medium storing a computer executable program, characterized in that: When the computer executable program is executed, the automatic problem-solving method for Chinese-to-English translation test questions as described in any one of claims 1 to 3 is implemented.

Citation Information

Patent Citations

  • An English word and case joint prediction method based on neural machine translation

    CN109190131A

  • Natural language problem generation method in civil construction information field based on Transformer

    CN112559702A

  • Neural machine translation method based on pre-training bilingual word vector

    CN113297841A