Translated text generation method and device, storage medium and electronic equipment
By acquiring the user's vocabulary library and generating adaptive translation and teaching information, it solves the problem of insufficient vocabulary in foreign language learning on portable devices and improves learning efficiency and effectiveness.
Patent Information
- Application Number
- CN202410611069.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-16
- Publication Date
- 2024-08-30
AI Technical Summary
The foreign language translation function in existing portable electronic devices fails to effectively consider the user's vocabulary, resulting in reduced learning enthusiasm and efficiency when faced with unfamiliar vocabulary.
By obtaining the user's vocabulary library, the input text is translated based on the library, a second language text is generated, and teaching expansion information is provided for key terms to improve the user's understanding and learning efficiency.
Translating according to the user's vocabulary improves the efficiency of foreign language learning, and enhances the learning effect through teaching expanded information for key terms, gradually expanding the user's vocabulary.
Smart Images

Figure CN118569276A
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and more specifically, to a translation text generation method, device, storage medium and electronic device in the field of computer technology. Background Art
[0002] Nowadays, many people use portable electronic devices to learn foreign languages. For example, children and students can use portable electronic devices to learn foreign languages, thereby improving the convenience of foreign language learning for students. However, most of the existing technologies provide mechanical foreign language translation functions in portable electronic devices, and the user's vocabulary is not considered during translation. When faced with unfamiliar words in the translated sentences, the user cannot learn and master them in time, which reduces the user's learning enthusiasm and learning efficiency. It is necessary to provide a translation text generation method that is suitable for the user's vocabulary and is convenient and fast. Summary of the invention
[0003] The embodiments of the present application provide a translation text generation method, device, storage medium and electronic device. The method can translate a first language text into a second language text according to the vocabulary mastered by the user, improve the user's understanding and learning efficiency of the second language, and can provide targeted teaching for key words.
[0004] In a first aspect, an embodiment of the present application provides a method for generating a translation text, the method comprising:
[0005] Acquire a first language text input by a user, and acquire a second language basic vocabulary library corresponding to the user;
[0006] Translating the first language text based on the basic vocabulary database to obtain a second language text, wherein the first language text and the second language text have the same meaning but are in different languages;
[0007] Acquire key words in the second language text, and generate teaching extension information for the key words;
[0008] The second language text and the teaching extension information are displayed.
[0009] In a second aspect, an embodiment of the present application provides a translation text generation device, the device comprising:
[0010] A vocabulary library determination unit, used to obtain a first language text input by a user, and obtain a second language basic vocabulary library corresponding to the user;
[0011] A translation processing unit, configured to translate the first language text based on the basic vocabulary library to obtain a second language text, wherein the first language text and the second language text have the same text meaning but use different languages;
[0012] A teaching extension unit, configured to obtain key words in the second language text and generate teaching extension information for the key words;
[0013] A display processing unit is used to display the second language text and the teaching extension information.
[0014] In a third aspect, an embodiment of the present application provides a computer storage medium, wherein the computer storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executing the above-mentioned method steps.
[0015] In a fourth aspect, an embodiment of the present application provides an electronic device, which may include: a processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the above-mentioned method steps.
[0016] In one or more embodiments of the present application, a first language text input by a user is obtained, a second language basic vocabulary library corresponding to the user is obtained, the first language text is translated based on the basic vocabulary library to obtain a second language text, the first language text and the second language text have the same text meaning but use different languages, key words in the second language text are obtained, teaching extension information for the key words is generated, and the second language text and the teaching extension information are displayed. The first language text is translated into the second language text according to the vocabulary mastered by the user, which improves the user's understanding and learning efficiency of the second language, and can provide targeted teaching for key words. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0018] Figure 1 This is a schematic diagram of a scenario in which a translation text generation device provided in an embodiment of the present application is used;
[0019] Figure 2 It is a flowchart of a translation text generation method provided in an embodiment of the present application;
[0020] Figure 3 It is a flowchart of a translation text generation method provided in an embodiment of the present application;
[0021] Figure 4 This is an example schematic diagram of opening a translation text generation interface provided in an embodiment of the present application;
[0022] Figure 5 It is a structural schematic diagram of a translation text generation device provided in an embodiment of the present application;
[0023] Figure 6 It is a structural diagram of a translation processing unit provided in an embodiment of the present application;
[0024] Figure 7 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0025] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0026] The translation text generation method provided in the embodiment of the present application can be implemented by a computer program and can be run on a translation text generation device based on the von Neumann system. The computer program can be integrated in an application or run as an independent tool application. The translation text generation device can be an electronic device such as a mobile phone or a watch. For example, the translation text generation device can be a wearable device such as a smart watch. The translation text generation device can also be a module or application program in an electronic device for implementing the translation text generation method. The user can use the translation text generation device to perform a translation operation to translate the first language text into the second language text. The first language text and the second language text have the same text meaning but the languages used are different. The first language and the second language can be the initial settings of the translation text generation device, and can also be set by the user or relevant staff. For example, the first language can be the language or mother tongue that the user has mastered, and the second language can be the language that the user wants to learn. For example, children can use translation text generation devices such as smart watches to learn English, and the first language can be set to Chinese and the second language can be set to English. The translation text generation device can also be only provided with the second language text. No matter how the user inputs the first language text, the translation text generation device can use the second language to translate the first language text into the second language text.
[0027] Please also see Figure 1, a scene diagram of a translation text generation device used in an embodiment of the present application is provided, the translation text generation device can be a wearable device such as a smart watch, for example, when the user is a child or other young user, the translation text generation device can be a children's smart watch used by children, which can help younger children improve their English learning efficiency in daily life. When the user is in a second language environment and needs to communicate with others, but cannot use the second language to describe his or her meaning, or when the user wants to learn how to express in the second language, the user can input a translation instruction containing the first language text, and the input method of the translation instruction can be voice input or text input. For example, the user can input a translation instruction "Please tell me how to express it in English that today is a good weather" to the translation text generation device, and the translation text generation device can detect that the first language text that the user wants to translate is "Today is a good weather", and the first language is Chinese and the second language is English, then English can be used for translation to obtain the second language text "The weather is nice today.", so that the user can learn language translation or communicate with others in the second language anytime and anywhere.
[0028] It is understandable that the user may use the second language text after obtaining it, so the second language text needs to be a text that the user can roughly understand. However, since the second language may be a language that the user has not yet fully mastered and is still in the learning stage, the translation text generation device will try its best to use the vocabulary of the second language mastered by the user for translation when translating the first language text. For example, the translation text generation device can obtain the second language basic vocabulary library corresponding to the user. The basic vocabulary library can be a database of second language vocabulary that the user has mastered. For example, if the user is a young user such as a child and the second language is English, the second language basic vocabulary library can be 3,000 basic English words, etc. The translation text generation device can try its best to use the words in the second language basic vocabulary library to translate the first language text, thereby generating a second language text.
[0029] The translation text generation method provided by the present application is described in detail below with reference to specific embodiments.
[0030] See also Figure 2 , which is a flowchart of a method for generating a translation text according to an embodiment of the present application. Figure 2 As shown, the method of the embodiment of the present application may include the following steps S101-S104.
[0031] S101, obtaining a first language text input by a user, and obtaining a second language basic vocabulary library corresponding to the user.
[0032] Specifically, the user can input the first language text that he wants to translate into the translation text generating device. In order to make the translated second language text better understood and used by the user, the translation text generating device can obtain the second language basic vocabulary library corresponding to the user. The basic vocabulary library can be a database of second language vocabulary that the user has mastered. For example, if the user is a young user such as a child and the second language is English, the second language basic vocabulary library can be 3,000 basic English words.
[0033] The user may input a translation instruction including the first language text, the translation instruction may be input in the form of voice input or text input, and the translation instruction may be used to instruct the translation text generating device to translate the first language text.
[0034] S102: translating the first language text based on the basic vocabulary database to obtain a second language text.
[0035] Specifically, in order to enable the first language text obtained after the translation process to be understood and used by the user, the translation text generating device can translate the first language text based on the basic vocabulary library to obtain the second language text, that is, try to use the second language vocabulary in the basic vocabulary library to translate the first language text and generate the second language text. The first language text and the second language text have the same text meaning but use different languages.
[0036] S103, obtaining key words in the second language text, and generating teaching extension information for the key words.
[0037] Specifically, in order to further teach the words in the second language description text, the translation text generation device can obtain the key words in the second language description text. The key words can be important components in the second language description text, or words that the user needs to focus on learning and deepen the impression, such as nouns, verbs or adjectives in the second language description text. It can be understood that learning about tenses is often very important in language learning, so the key words can also be tense-related words such as past tense, future tense or ongoing tense. The translation text generation device can generate teaching expansion information for the key words, and the teaching expansion information is used to teach the user for the key words, and can include the phonetic information, translation information and popular science interpretation information of the key words. The phonetic information can be used to indicate the pronunciation of the key words, the translation information can be the first language translation of the key words, and the popular science interpretation information can be a detailed explanation of the meaning of the key words in the first language.
[0038] It is understandable that sometimes the first language text cannot be translated using the basic vocabulary library and words outside the basic vocabulary library need to be used to generate the second language text. Therefore, if there are words outside the basic vocabulary library in the second language text, the translation text generation device can determine the words as keywords.
[0039] S104, displaying the second language text and teaching extension information.
[0040] Specifically, the translation text generation device can display the second language text and the teaching extension information, for example, it can be displayed on the display screen of the electronic device for the user to view, so as to achieve the purpose of providing language teaching to the user.
[0041] In an embodiment of the present application, a first language text input by a user is obtained, a second language basic vocabulary library corresponding to the user is obtained, the first language text is translated based on the basic vocabulary library to obtain a second language text, the first language text and the second language text have the same text meaning but use different languages, key words in the second language text are obtained, teaching extension information for the key words is generated, and the second language text and the teaching extension information are displayed. The first language text is translated into the second language text according to the vocabulary mastered by the user, which improves the user's understanding and learning efficiency of the second language, and can provide targeted teaching for key words.
[0042] See also Figure 3 , which is a flowchart of a method for generating a translation text according to an embodiment of the present application. Figure 3 As shown, the method of the embodiment of the present application may include the following steps S201-S205.
[0043] S201, obtaining a first language text input by a user, and obtaining a second language basic vocabulary library corresponding to the user.
[0044] Specifically, the user can input the first language text that he wants to translate into the translation text generation device. In order to make the translated second language text better understood and used by the user, the translation text generation device can obtain the second language basic vocabulary library corresponding to the user. The basic vocabulary library can be a database of second language vocabulary that the user has mastered. For example, if the user is a young user such as a child and the second language is English, the second language basic vocabulary library can be 3,000 basic English words, etc. Among them, the user can input a translation instruction, and the input method of the translation instruction can be voice input or text input. The translation instruction can be used to instruct the translation text generation device to translate the first language text.
[0045] Optionally, the translation instruction may be a voice instruction or a text instruction including the first language text and instruction keywords. The translation text generation method may identify whether the instruction is a translation instruction by the instruction keywords. For example, the instruction keywords may be “how to express it in English”, “how to say it in English”, etc. For example, the translation instruction including the first language text may be “please tell me how to express that today is a good weather in English”, wherein the instruction keyword is “how to express it in English”, and the first language text is “today is a good weather”.
[0046] Optionally, the translation instruction can also be a translation text generation function call instruction, which is used to instruct the translation text generation device to display a translation text generation interface on the display screen. The translation text generation interface is used for the user to interact with the translation text generation device. The translation text generation device can also display the subsequently generated second language text and teaching extension information on the translation text generation interface. Please also refer to Figure 4 , an example schematic diagram of opening a translation text generation interface is provided for an embodiment of the present application. The translation text generation device can display icons corresponding to various functions on the display screen, such as a text message function icon, a calendar function icon, and a translation text function icon, etc. The user can use the corresponding function by clicking the icon. Therefore, when the user wants to use the translation text generation function, he can click the translation text function icon on the display screen, and then send a translation text generation function call-out instruction to the translation text generation device. When the translation text generation device receives the translation text generation function call-out instruction, the translation text generation interface can be opened. A prompt statement can be displayed on the translation text generation interface, and the prompt statement is used to indicate that the user can enter the first language text. For example, the prompt statement can be "Please tell me what you want to translate", and the input method of the first language text can be voice input or text input.
[0047] It is understandable that when the user is a child or other young user, the translation text generation device can be a children's smart watch used by children. In order to improve the interest of young users in language learning and to assist young users in better operating the translation text generation device, the translation text generation device can display a digital human on the translation text generation interface, and then the digital human outputs a voice containing a prompt sentence. Subsequently, the digital human can also output the generated second language text, so that the digital human communicates with the user to help the user learn the language, thereby improving the interest and enthusiasm of the user's learning. Among them, the digital human can be a cartoon image with language communication function, which can be driven by an intelligent large language model so that the digital human has the ability to understand and generate natural language text, understand context, generate coherent text, and communicate with the user.
[0048] Optionally, the first language and the second language may be initial settings of the translation text generation device, or may be set by the user or relevant staff, for example, the first language may be a language that the user has mastered or a native language, and the second language may be a language that the user wants to learn. The translation text generation device may also be provided with only the second language text, and no matter what language the user uses to input the first language text, the translation text generation device may use the second language to translate the first language text into the second language text.
[0049] Optionally, the translation text generating device may also determine the first language and the second language based on a translation instruction input by the user that includes a first language text. It is understandable that since the translation instruction includes the first language text and instruction keywords, the instruction keywords may include second language keywords. For example, the instruction keyword may be "how to express in English", in which the second language keyword is "English". The translation text generating device may determine that the second language is English based on the second language keyword. It is understandable that the translation text generating device may directly determine the first language based on the first language text.
[0050] Optionally, the translation text generating device can obtain the second language basic vocabulary library corresponding to the user according to the user's age. For example, if the user is a child between 6 and 8 years old, that is, the user can be a primary school student in grades one to three, then the translation text generating device can obtain 1,000 basic English words as the basic vocabulary library. If the user is a child between 9 and 12 years old, that is, the user can be a primary school student in grades four to six, then the translation text generating device can obtain 3,000 basic English words as the basic vocabulary library.
[0051] S202: Acquire key words in the second language text.
[0052] Specifically, in order to further teach the words in the second language description text, the translation text generation device can obtain key words in the second language description text. The key words can be important components in the second language description text, or they can be words that users need to focus on learning and deepen their impressions, such as nouns, verbs or adjectives in the second language description text.
[0053] Optionally, the user sometimes only needs the translation text generating device to translate a certain word, so if the second language text is a single word, the translation text generating device can determine the second language text as a key word. For example, when the first language is Chinese and the second language is English, the user does not know what the English word for "weather" is. The user can input the first language text "weather", and the translation text generating device will generate the corresponding second language text "weather". At this time, the second language text is only a single word, and the second language text can be directly determined as a key word.
[0054] Optionally, the user sometimes needs the translation text generating device to translate a certain phrase, so if the second language text is a single phrase, the translation text generating device can determine the second language text as a key word. For example, when the first language is Chinese and the second language is English, the user does not know how to describe the action of "opening the door" in English. The user can input the first language text "open the door", and the translation text generating device will generate the corresponding second language text "open the door". At this time, the second language text is not a complete sentence or a single word but a single phrase, and the translation text generating device can directly determine the second language text as a key word.
[0055] Optionally, in addition to words and phrases, the second language text can also be a complete sentence, and it is understandable that a complete sentence is a complete sentence with a subject, a predicate and an object. In order to accurately find key words from the second language text, the translation text generation device can first determine teachable vocabulary in the second language text, and the teachable vocabulary can include one or more of nouns, verbs or adjectives, thereby eliminating the conjunctions that do not need to be targetedly taught to the user. Then determine the key words in the teachable vocabulary, it is understandable that the user has limited energy for language learning each time, and the display screen size of the translation text generation device is limited, if too many key words are displayed, it will cause the user's fatigue, and it will also reduce the user's learning efficiency and learning enthusiasm, so the translation text generation device can determine no more than a preset number of key words from the teachable vocabulary, wherein the preset number can be the initial setting of the translation text generation device, and can also be set by the user or relevant staff, for example, it can be 3.
[0056] Optionally, sometimes there may be a situation where the first language text cannot be translated using the basic vocabulary library and it is necessary to use words outside the basic vocabulary library to generate the second language text. The translation text generation device can detect whether there is a first word outside the basic vocabulary library in the teachable vocabulary. It can be understood that the first word does not exist in the basic vocabulary library, so the user may not have seen the first word. In order to broaden the vocabulary, etc., it is necessary to teach the user about the first word. Therefore, if there is a first word outside the basic vocabulary library in the teachable vocabulary, the translation text generation device can determine the first word as a keyword.
[0057] Optionally, although the first word does not exist in the basic vocabulary library, after the second language text containing the first word is displayed to the user and the teaching expansion information of the first word is displayed, the first word is no longer an unfamiliar word to the user. The translation text generation device can use the first word to update the basic vocabulary library, that is, add the first word to the user's basic vocabulary library, thereby achieving the purpose of gradually expanding the vocabulary during the user's use of the translation text generation device.
[0058] Optionally, learning about tenses is often very important in language learning, so the translation text generation device can detect whether there is a second word with a preset tense in the teachable vocabulary, where the preset tense can be past future tense, present continuous tense, past continuous tense, present perfect tense, past perfect tense, etc.
[0059] Optionally, for users who are in the language learning stage, words with longer word lengths are more difficult to learn and remember, so the translation text generation device can further teach the user about the words with longer word lengths in the second language text. The translation text generation device can detect whether there is a third word with a word length greater than a preset length in the teachable vocabulary. If so, the third word can be determined as a keyword, wherein the preset length can be an initial setting of the translation text generation device, and can also be set by the user or relevant staff, for example, it can be 6 letters in length. For example, the second language text is "The weather is nice today.", wherein the single length of "weather" is 7 letters in length, which is greater than the preset length, so "weather" can be confirmed as a keyword.
[0060] Optionally, since the translation text generation device can display the number of key words, for example, the number of key words is not more than the preset number, the translation text generation device can select key words from the teachable vocabulary according to the priority of the word type, for example, the priority of the word type from high to low can be the first word, the second word, the third word, the noun, the adjective, etc. If there is a first word outside the basic vocabulary library in the teachable vocabulary, the first word is determined as a key word, if the number of key words is less than the preset number, and there is a second word of a preset tense in the teachable vocabulary, the second word is determined as a key word, if the number of key words is less than the preset number, and there is a third word with a word length greater than the preset length in the teachable vocabulary, the third word is determined as a key word, if the number of key words is still less than the preset number, and there is a noun in the teachable vocabulary, the noun in the teachable vocabulary is determined as a key word, and so on, the key words are determined from the teachable vocabulary according to the priority of the word type, and it is ensured that the number of key words does not exceed the preset number.
[0061] S203, obtaining phonetic symbol information, translation information and popular science interpretation information of the key words.
[0062] Specifically, the translation text generation device can generate teaching extension information for key words. The teaching extension information is used to teach users about key words and may include phonetic information, translation information, and popular science interpretation information of the key words. The phonetic information can be used to indicate the pronunciation of the key words, the translation information can be the first language translation of the key words, and the popular science interpretation information can be a detailed explanation of the meaning of the key words in the first language.
[0063] S204, generating teaching expansion information for key words based on the phonetic symbol information, translation information and popular science interpretation information.
[0064] Specifically, the translation text generation device can generate teaching extension information for key words based on phonetic information, translation information and popular science interpretation information, and the teaching extension information can also include sentence construction of the key words, thereby helping users to further understand how to use the key words.
[0065] For example, if the translation text generating device identifies the word "weather" as a key word, the translation text generating device may generate the phonetic symbol information of "weather". The translation information "weather" also includes the popular science explanation information "weather is an uncountable noun, which refers to the meteorological conditions of a certain area at a certain time, including temperature, humidity, wind speed, wind direction, precipitation, etc." The teaching extension information can also include sentence formation and sentence formation translation of key words, such as "I like to go hiking when the weather is good." and "I like to go hiking when the weather is good."
[0066] Optionally, if the second language text is a single word, that is, the second language text is a key word, the translation text generation device can also generate phrases, fixed collocations and sentence construction containing the key words, and then generate teaching extension information for the key words in combination with phonetic symbol information, translation information and popular science interpretation information. For example, if the second language text, that is, the key word is "weather", the teaching extension information can also include phrases and phrase translations of the key words, such as "bad weather, bad weather", "good weather er, good weather", "weather conditions, weather conditions" and "weather report, weather report" etc. The teaching extension information can also include sentence construction of key words, such as "The weather was beautiful today, we decided to go for a hike.", "The weather forecast predicts heavy rain tom orrow.", and the first language translation of sentence construction, i.e. "The weather is very good today, we decided to go hiking." and "The weather forecast predicts heavy rain tomorrow."
[0067] Optionally, if the second language text is a word phrase, that is, the second language text is a key word, the translation text generation device can also generate related phrases and sentence construction of the key word. For example, if the second language text, that is, the key word, is "open the door", the teaching extension information can also include related phrases of the key word, and related phrase translations, such as "knock on the door, knock on the door", for associative learning for users. The teaching extension information can also include sentence construction of key words, such as "Please open the door, I need to come in.", and the first language translation of the sentence construction, such as "Please open the door, I need to come in." It is understandable that since the teaching extension information includes related phrases of key words, it can also include sentence construction of related phrases and the first language translation of the sentence construction, such as "She knocked on the door but no one answered." and "She knocked on the door, but no one answered."
[0068] S205, displaying the second language text and teaching extension information.
[0069] Specifically, the translation text generation device can display the second language text and the teaching extension information, for example, it can be displayed on the display screen of the electronic device for the user to view, thereby achieving the purpose of providing language teaching to the user.
[0070] Optionally, since the translation text generation device can open a translation text generation interface on the display screen based on the user's translation text generation function call-out instruction, the translation text generation device can display the second language text and teaching extension information on the translation text generation interface.
[0071] Optionally, the translation text generation device can display a digital human on the translation text generation interface, and use the digital human to communicate with the user to perform translation processing, so the translation text generation device can use the digital human to output the second language text and teaching expansion information. Since the user may be a young user such as a child, in order to enable the digital human and the user to communicate better, after the second language text and teaching expansion information are output, the digital human can add a closing remark such as "I hope these explanations and examples can help you better understand this phrase! If you have any other questions, please feel free to let me know." to inspire the user to continue asking questions to learn the language.
[0072] In the embodiment of the present application, the first language text input by the user is obtained, and the second language basic vocabulary library corresponding to the user is obtained, so that the second language text obtained by the translation can be better understood and used by the user, and the key words in the second language text are obtained, and the phonetic information, translation information and popular science interpretation information of the key words are obtained to help the user further understand the use method of the key words. And the second language text can be a single word, a single phrase or a complete sentence, and different key words can be determined. Methods for generating teaching extension information can be used, and teaching extension information for key words can be generated based on phonetic information, translation information and popular science interpretation information, and the second language text and teaching extension information are displayed. The first language text is translated into a second language text according to the vocabulary mastered by the user, which improves the user's understanding and learning efficiency of the second language, and can be targeted at teaching. And the first word outside the basic vocabulary library can be used to update the basic vocabulary library, reaching the purpose of gradually widening the vocabulary during the user's use of the translation text generation device.
[0073] The following will be combined with the attached Figure 5 -Attached Figure 6 , the translation text generation device provided in the embodiment of the present application is introduced in detail. It should be noted that the attached Figure 4 -Attached Figure 6 The translation text generation device in the present application is used to execute Figure 2 and Figure 3 For the convenience of explanation, only the part related to the embodiment of the present application is shown. For the specific technical details not disclosed, please refer to the present application. Figure 2 and Figure 3 The embodiment shown.
[0074] See also Figure 5 , which shows a schematic diagram of the structure of a translation text generation device provided by an exemplary embodiment of the present application. The translation text generation device can be implemented as all or part of the device through software, hardware or a combination of both. The device 1 includes a vocabulary library determination unit 11, a translation processing unit 12, a teaching expansion unit 13 and a display processing unit 14.
[0075] The vocabulary library determination unit 11 is used to obtain the first language text input by the user and obtain the second language basic vocabulary library corresponding to the user;
[0076] A translation processing unit 12, configured to translate the first language text based on the basic vocabulary library to obtain a second language text, wherein the first language text and the second language text have the same text meaning but use different languages;
[0077] For details, please refer to Figure 6 , which is a schematic diagram of the structure of a translation processing unit provided in an embodiment of the present application. Figure 6 As shown, the translation processing unit 12 may include:
[0078] The word acquisition subunit 121 is used to acquire key words in the second language text, and acquire phonetic symbol information, translation information and popular science interpretation information of the key words;
[0079] Optionally, the word acquisition subunit 121 is specifically configured to determine the second language text as a key word if the second language text is a single word.
[0080] Optionally, the word acquisition subunit 121 is specifically configured to determine the second language text as a key word if the second language text is a single phrase.
[0081] Optionally, the word acquisition subunit 121 is specifically used to acquire teachable words in the second language text if the second language text is a complete sentence, and the teachable words may include one or more of nouns, verbs, and adjectives;
[0082] Key words are identified within the teachable vocabulary.
[0083] Optionally, the word acquisition subunit 121 is specifically configured to determine the first word as a key word if there is a first word outside the basic vocabulary library in the teachable vocabulary;
[0084] If there is a second word of a preset tense in the teachable vocabulary, determining the second word as a key word;
[0085] If there is a third word in the teachable vocabulary whose length is greater than a preset length, the third word is determined as a key word.
[0086] The teaching extension subunit 122 is used to generate teaching extension information for the key words based on the phonetic symbol information, the translation information and the popular science interpretation information.
[0087] Optionally, the word acquisition subunit 121 is further configured to use the first word to update the basic vocabulary library.
[0088] A teaching extension unit 13, configured to obtain key words in the second language text and generate teaching extension information for the key words;
[0089] The display processing unit 14 is used to display the second language text and the teaching extension information.
[0090] In the present embodiment, the first language text input by the user is obtained, and the second language basic vocabulary library corresponding to the user is obtained, so that the second language text obtained by the translation can be better understood and used by the user, and the key words in the second language text are obtained, and the phonetic information, translation information and popular science interpretation information of the key words are obtained to help the user further understand the use method of the key words. And the second language text can be a single word, a single phrase or a complete sentence, and different key words determination methods and teaching extension information generation methods can be adopted, and the teaching extension information for the key words is generated based on the phonetic information, translation information and popular science interpretation information, and the second language text and the teaching extension information are displayed. The first language text is translated into the second language text according to the vocabulary mastered by the user, which improves the user's understanding and learning efficiency of the second language, and the key words can be targeted at teaching. And the first word outside the basic vocabulary library can be used to update the basic vocabulary library, and the purpose of gradually widening the vocabulary is achieved during the user's use of the translation text generation device.
[0091] It should be noted that the translation text generation device provided in the above embodiment only uses the division of the above functional modules as an example when executing the translation text generation method. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the translation text generation device provided in the above embodiment and the translation text generation method embodiment belong to the same concept, and the implementation process thereof is detailed in the method embodiment, which will not be repeated here.
[0092] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0093] The present application also provides a computer storage medium, which can store multiple instructions, and the instructions are suitable for being loaded and executed by a processor as described above. Figure 1-Figure 4 The specific implementation process of the translation text generation method in the embodiment shown can be found in Figure 1-Figure 4 The specific description of the illustrated embodiment will not be repeated here.
[0094] The present application also provides a computer program product, which stores at least one instruction, and the at least one instruction is loaded and executed by the processor as described above. Figure 1-Figure 4 The specific implementation process of the translation text generation method in the embodiment shown can be found in Figure 1-Figure 4 The specific description of the illustrated embodiment will not be repeated here.
[0095] Please refer to Figure 7 , which shows a block diagram of the structure of an electronic device provided by an exemplary embodiment of the present application. The electronic device in the present application may include one or more of the following components: a processor 110, a memory 120, an input device 130, an output device 140, and a bus 150. The processor 110, the memory 120, the input device 130, and the output device 140 may be connected via the bus 150.
[0096] The processor 110 may include one or more processing cores. The processor 110 uses various interfaces and lines to connect various parts of the entire electronic device, and executes various functions and processes data of the terminal 100 by running or executing instructions, programs, code sets or instruction sets stored in the memory 120, and calling data stored in the memory 120. Optionally, the processor 110 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 110 can integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. Among them, the CPU mainly processes the operating system, user pages, and applications; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 110, but may be implemented separately through a communication chip.
[0097] The memory 120 may include a random access memory (RAM) or a read-only memory (ROM). Optionally, the memory 120 includes a non-transitory computer-readable medium (Non-Transitory Computer-Readable Storage Medium). The memory 120 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 120 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc. The operating system may be an Android system, including a system deeply developed based on the Android system, an IOS system developed by Apple, including a system deeply developed based on the IOS system or other systems.
[0098] The memory 120 can be divided into an operating system space and a user space. The operating system runs in the operating system space, and native and third-party applications run in the user space. In order to ensure that different third-party applications can achieve good operating results, the operating system allocates corresponding system resources to different third-party applications. However, the requirements for system resources in different application scenarios in the same third-party application are also different. For example, in the local resource loading scenario, the third-party application has higher requirements for disk reading speed; in the animation rendering scenario, the third-party application has higher requirements for GPU performance. The operating system and third-party applications are independent of each other, and the operating system often cannot perceive the current application scenario of the third-party application in a timely manner, resulting in the operating system being unable to perform targeted system resource adaptation according to the specific application scenario of the third-party application.
[0099] In order for the operating system to distinguish the specific application scenarios of third-party applications, it is necessary to open up data communication between third-party applications and the operating system so that the operating system can obtain the current scenario information of third-party applications at any time, and then perform targeted system resource adaptation based on the current scenario.
[0100] The input device 130 is used to receive input commands or data, and includes but is not limited to a keyboard, a mouse, a camera, a microphone, or a touch device. The output device 140 is used to output commands or data, and includes but is not limited to a display device and a speaker. In one example, the input device 130 and the output device 140 can be combined, and the input device 130 and the output device 140 are touch screen displays.
[0101] The touch display screen can be designed as a full screen, a curved screen or a special-shaped screen. The touch display screen can also be designed as a combination of a full screen and a curved screen, or a combination of a special-shaped screen and a curved screen, which is not limited in the embodiments of the present application.
[0102] In addition, those skilled in the art will appreciate that the structure of the electronic device shown in the above drawings does not constitute a limitation on the electronic device, and the electronic device may include more or fewer components than shown, or combine certain components, or arrange the components differently. For example, the electronic device also includes a radio frequency circuit, an input unit, a sensor, an audio circuit, a wireless fidelity (WiFi) module, a power supply, a Bluetooth module and other components, which will not be described in detail here.
[0103] exist Figure 7 In the electronic device shown, the processor 110 may be used to call the translation text generation application stored in the memory 120, and specifically perform the following operations:
[0104] Acquire a first language text input by a user, and acquire a second language basic vocabulary library corresponding to the user;
[0105] Translating the first language text based on the basic vocabulary database to obtain a second language text, wherein the first language text and the second language text have the same meaning but are in different languages;
[0106] Acquire key words in the second language text, and generate teaching extension information for the key words;
[0107] The second language text and the teaching extension information are displayed.
[0108] In one embodiment, when the processor 110 acquires the key words in the second language text and generates the teaching extension information for the key words, the processor 110 specifically performs the following operations:
[0109] Obtaining key words in the second language text, and obtaining phonetic symbol information, translation information, and popular science interpretation information of the key words;
[0110] The teaching expansion information for the key words is generated based on the phonetic symbol information, the translation information and the popular science interpretation information.
[0111] In one embodiment, when the processor 110 acquires the key words in the second language text, the processor 110 specifically performs the following operations:
[0112] If the second language text is a single word, the second language text is determined as a key word.
[0113] In one embodiment, when the processor 110 acquires the key words in the second language text, the processor 110 specifically performs the following operations:
[0114] If the second language text is a single phrase, the second language text is determined as a key word.
[0115] In one embodiment, when the processor 110 acquires the key words in the second language text, the processor 110 specifically performs the following operations:
[0116] If the second language text is a complete sentence, obtaining teachable vocabulary in the second language text, wherein the teachable vocabulary may include one or more of nouns, verbs, and adjectives;
[0117] Key words are identified within the teachable vocabulary.
[0118] In one embodiment, when executing the process of acquiring and determining key words in the teachable vocabulary, the processor 110 specifically performs the following operations:
[0119] If the teachable vocabulary contains a first word outside the basic vocabulary library, determining the first word as a key word;
[0120] If there is a second word of a preset tense in the teachable vocabulary, determining the second word as a key word;
[0121] If there is a third word in the teachable vocabulary whose length is greater than a preset length, the third word is determined as a key word.
[0122] In one embodiment, when executing the translation text generation method, the processor 110 further performs the following operations:
[0123] The basic vocabulary library is updated using the first word.
[0124] In the present embodiment, the first language text input by the user is obtained, and the second language basic vocabulary library corresponding to the user is obtained, so that the second language text obtained by the translation can be better understood and used by the user, and the key words in the second language text are obtained, and the phonetic information, translation information and popular science interpretation information of the key words are obtained to help the user further understand the use method of the key words. And the second language text can be a single word, a single phrase or a complete sentence, and different key words determination methods and teaching extension information generation methods can be adopted, and the teaching extension information for the key words is generated based on the phonetic information, translation information and popular science interpretation information, and the second language text and the teaching extension information are displayed. The first language text is translated into the second language text according to the vocabulary mastered by the user, which improves the user's understanding and learning efficiency of the second language, and the key words can be targeted at teaching. And the first word outside the basic vocabulary library can be used to update the basic vocabulary library, and the purpose of gradually widening the vocabulary is achieved during the user's use of the translation text generation device.
[0125] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only storage memory, or a random access memory, etc.
[0126] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.
[0127] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in the embodiments of this specification are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions. For example, the first language text, basic vocabulary library, etc. involved in this specification are all obtained with full authorization.
Claims
1. A method for generating a translation text, characterized in that: The method comprises: Acquire a first language text input by a user, and acquire a second language basic vocabulary library corresponding to the user; Translating the first language text based on the basic vocabulary database to obtain a second language text, wherein the first language text and the second language text have the same meaning but are in different languages; Acquire key words in the second language text, and generate teaching extension information for the key words; The second language text and the teaching extension information are displayed.
2. The method according to claim 1, characterized in that The step of obtaining key words in the second language text and generating teaching extension information for the key words includes: Obtaining key words in the second language text, and obtaining phonetic symbol information, translation information, and popular science interpretation information of the key words; The teaching expansion information for the key words is generated based on the phonetic symbol information, the translation information and the popular science interpretation information.
3. The method according to claim 2, characterized in that The obtaining of key words in the second language text includes: If the second language text is a single word, the second language text is determined as a key word.
4. The method according to claim 2, characterized in that: The obtaining of key words in the second language text includes: If the second language text is a single phrase, the second language text is determined as a key word.
5. The method according to claim 2, characterized in that: The obtaining of key words in the second language text includes: If the second language text is a complete sentence, obtaining teachable vocabulary in the second language text, wherein the teachable vocabulary may include one or more of nouns, verbs, and adjectives; Key words are identified within the teachable vocabulary.
6. The method according to claim 5, characterized in that Determining key words in the teachable vocabulary includes: If the teachable vocabulary contains a first word outside the basic vocabulary library, determining the first word as a key word; If there is a second word of a preset tense in the teachable vocabulary, determining the second word as a key word; If there is a third word in the teachable vocabulary whose length is greater than a preset length, the third word is determined as a key word.
7. The method according to claim 6, characterized in that The method further comprises: The basic vocabulary library is updated using the first word.
8. A translation text generation device, characterized in that: The device comprises: A vocabulary library determination unit, used to obtain a first language text input by a user, and obtain a second language basic vocabulary library corresponding to the user; A translation processing unit, configured to translate the first language text based on the basic vocabulary library to obtain a second language text, wherein the first language text and the second language text have the same text meaning but use different languages; A teaching extension unit, configured to obtain key words in the second language text and generate teaching extension information for the key words; A display processing unit is used to display the second language text and the teaching extension information.
9. A computer storage medium, characterized in that The computer storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the method steps according to any one of claims 1 to 7.
10. An electronic device, characterized in that: include: A processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the method steps as claimed in any one of claims 1 to 7.
