Translation method, wearable device, electronic device and storage medium

By determining the target translation mode, building a vocabulary mapping table and target features, the problem of low dialect translation efficiency in existing technology has been solved, and more accurate and efficient dialect translations are achieved, ensuring the precise communication of dialect culture.

CN119378575APending Publication Date: 2025-01-28BEIJING SUPERHEXA CENTURY TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411584606.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-07
Publication Date
2025-01-28

AI Technical Summary

Technical Problem

The existing translation methods are low in dialect translation efficiency, resulting in the loss and misunderstanding of cultural information.

Method used

By determining the target translation mode of source dialects and target language, the vocabulary mapping table and target features are constructed to achieve more accurate and efficient dialect translation.

Benefits of technology

It has significantly improved the targeted and efficiency of dialect translation, avoids the loss and misunderstanding of cultural information, and ensures the precise spread of dialect culture.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119378575A_ABST
    Figure CN119378575A_ABST
Patent Text Reader

Abstract

The invention provides a translation method, wearable equipment, electronic equipment and a storage medium, and belongs to the technical field of translations, the method comprises the following steps: determining a target translation mode based on a first language and a second language; the first language is a target language, and the second language is a source language; determining a vocabulary mapping table and a target feature set based on the target translation mode; and translating the target audio based on the vocabulary mapping table and the target feature set. According to the translation method, the wearable device, the electronic device and the storage medium provided by the invention, the translation efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure belongs to the field of translation technology, and more specifically, to a translation method, a wearable device, an electronic device and a storage medium. Background Art

[0002] Dialects are living carriers of regional culture, containing unique folk customs, traditions and values. Accurate dialect translation methods can dig out and spread these cultural treasures, prevent them from being buried in the wave of globalization, and enable the rich local culture to be inherited and developed. In terms of social communication, there are many dialects in China, and people from different regions often have language barriers when communicating. Effective dialect translation methods can promote smooth communication between people in different dialect areas in the fields of business, tourism, education, etc., enhance mutual understanding and integration between regions, and are of great significance to the harmonious development of society.

[0003] However, existing translation methods still have the problem of low efficiency in dialect translation. Summary of the invention

[0004] The purpose of the present disclosure is to provide a translation method, a wearable device, an electronic device and a storage medium to improve translation efficiency.

[0005] A first aspect of the embodiments of the present disclosure provides a translation method, including: The target translation mode is determined based on the first language and the second language. The first language is the target language and the second language is the source language.

[0006] A vocabulary mapping table and a target feature set are determined based on the target translation mode.

[0007] The target audio is translated based on the vocabulary mapping table and the target feature set.

[0008] A second aspect of the embodiments of the present disclosure provides a wearable device, including: The first calculation module is used to determine a target translation mode based on a first language and a second language, wherein the first language is a target language and the second language is a source language.

[0009] The second calculation module is used to determine a vocabulary mapping table and a target feature set based on a target translation mode.

[0010] The translation module is used to translate the target audio based on the vocabulary mapping table and the target feature set.

[0011] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor implements the steps of the above-mentioned translation method when executing the computer program.

[0012] According to a fourth aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned translation method are implemented.

[0013] The translation method, wearable device, electronic device and storage medium provided by the embodiments of the present disclosure have the following beneficial effects: On the one hand, the disclosed embodiments significantly improve the pertinence of dialect translation by determining the translation mode specifically for the source dialect and the target language. This customized processing mode can more accurately capture the unique vocabulary, grammar, and phonetic features of the dialect, thereby effectively avoiding the loss and misunderstanding of cultural information and ensuring the accurate dissemination of dialect culture.

[0014] On the other hand, the disclosed embodiment improves translation efficiency and quality by constructing a vocabulary mapping table and a target feature set. The vocabulary mapping table can quickly match dialect vocabulary with corresponding expressions in the target language, while the target feature set can more accurately handle translations at complex levels such as pronunciation and grammar, making the translation results more accurate and fluent. Different dialects are very different and have different prominent features. Considering the characteristics of the dialect to formulate a corresponding feature set, rather than uniformly processing all dialect types, is conducive to improving translation efficiency.

[0015] The disclosed embodiments can not only meet the diverse needs of business communication, tourism exchange, and educational dissemination, but also effectively promote regional cultural exchanges and social integration, and are of great significance for promoting harmonious social development. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, 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 disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0017] Figure 1 A flowchart of a translation method provided by an embodiment of the present disclosure; Figure 2 A structural block diagram of a wearable device provided in one embodiment of the present disclosure; Figure 3 A schematic block diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0018] In the following description, specific details such as specific system structures and technologies are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present disclosure. However, it should be clear to those skilled in the art that the present disclosure may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obstructing the description of the present disclosure with unnecessary details.

[0019] In order to make the purpose, technical solutions and advantages of the present disclosure more clear, specific embodiments will be described below in conjunction with the accompanying drawings.

[0020] Please refer to Figure 1 , Figure 1 This is a flowchart of a translation method provided by an embodiment of the present disclosure. The method may include S101 to S103.

[0021] S101: Determine a target translation mode based on a first language and a second language, wherein the first language is a target language and the second language is a source language.

[0022] In this embodiment, the first language is the language of the first user, the first user is a user wearing a wearable device, and the wearable device may include smart glasses, smart helmets, etc. The second language is the language of the second user (i.e., the language to be translated), and the second user is a user who communicates face-to-face with the first user. The target translation mode includes a translation method between the first language and the second language, such as directly translating the first language into the second language (or translating the second language into the first language), or translating the first language into an intermediate language, translating the intermediate language into the second language (or translating the second language into the intermediate language, and translating the intermediate language into the first language). The intermediate language may be a standard language.

[0023] In this embodiment, the source language (i.e., the first language) and the target language (i.e., the second language) are determined. If neither of them is a standard language, the language characteristics of the source language and the target language are analyzed, such as the similarities and differences in pronunciation, vocabulary, grammar, etc. If the similarity is high (the similarity is higher than or equal to the similarity threshold), a direct translation mode can be adopted; if the difference is large (the similarity is lower than the similarity threshold), an intermediate conversion step can be introduced or a more complex translation strategy can be adopted for translation. The standard language can include standard Mandarin or other languages ​​that can be used as a reference benchmark.

[0024] For example, sample data of different languages ​​can be collected to establish a language feature database. Language similarity is calculated by comparing the features of the first language and the second language. The corresponding translation mode is determined based on the similarity result, and the corresponding translation module is called for processing.

[0025] S102: Determine a vocabulary mapping table and a target feature set based on the target translation mode.

[0026] In this embodiment, multiple vocabulary mapping tables and feature sets can be constructed in the preparation stage, including: obtaining an audio data set corresponding to each language based on the language type, extracting a first feature set corresponding to the language type based on the audio data set, and establishing a vocabulary mapping table corresponding to the language type.

[0027] In this embodiment, the audio data set refers to a large number of audio sample sets in a specific language, including speech content in various scenarios, such as daily conversations, news broadcasts, film and television works, etc., which are used to extract the first feature set of the language and build a vocabulary mapping table. The vocabulary mapping table is a vocabulary correspondence table established for a specific language, such as the correspondence between the vocabulary of the specific language and the vocabulary of another language, and can also include the correspondence between the audio data of the specific language and the text data, so as to quickly search for the corresponding translation vocabulary during the translation process.

[0028] In this embodiment, the standard feature set may be determined based on the standard language. The vocabulary mapping table may include a vocabulary mapping table for a first language, a second language, or an intermediate language. The target feature set may include a first feature set for the first language, the second language, or the intermediate language.

[0029] Exemplarily, according to the target translation mode, the vocabulary mapping table and feature set of the corresponding language type (i.e., the first language, the second language, or the intermediate language) can be selected from the pre-constructed vocabulary mapping tables and the first feature set corresponding to the multiple language types, and the vocabulary mapping table and feature set can be integrated to form the final vocabulary mapping table and the target feature set.

[0030] For example, Shanghainese (first language) is to be translated into Cantonese (second language). In the preparation stage, audio data sets of Shanghainese are collected, including street interviews, Shanghai opera, local news in Shanghai, etc., and the first feature set of Shanghainese is extracted, such as unique tone changes, vocabulary pronunciation characteristics, etc., and a vocabulary mapping table between Shanghainese and related languages ​​such as Mandarin and Cantonese is established. The same process is done for Cantonese. When translating, if the target translation mode is determined to be a translation from Shanghainese to Cantonese, the vocabulary mapping table and feature set related to Shanghainese and Cantonese are selected from the pre-built vocabulary mapping table and feature set for translation.

[0031] S103: Translate the target audio based on the vocabulary mapping table and the target feature set.

[0032] In this embodiment, the target audio refers to the audio content that needs to be translated.

[0033] Exemplarily, a predetermined vocabulary mapping table is used to find the corresponding vocabulary in the target audio in the target language, and the speech features, grammatical structure, etc. of the audio are adjusted and optimized according to the target feature set to ensure the accuracy and naturalness of the translation. For example, speech recognition is performed on the target audio, vocabulary translation is performed on the target audio according to the first language and second language vocabulary mapping table, and grammatical adjustment and other processing are performed on the translated text in combination with the target feature set. The translated text is converted into an audio output in the target language through speech synthesis.

[0034] From the above, it can be concluded that, on the one hand, this embodiment significantly improves the pertinence of dialect translation by determining the translation mode specifically for the source dialect and the target language. This customized processing mode can more accurately capture the unique vocabulary, grammar and phonetic features of the dialect, thereby effectively avoiding the loss and misunderstanding of cultural information and ensuring the accurate dissemination of dialect culture.

[0035] On the other hand, this embodiment improves translation efficiency and quality by constructing a vocabulary mapping table and a target feature set. The vocabulary mapping table can quickly match dialect vocabulary with corresponding expressions in the target language, while the target feature set can more accurately handle translations at complex levels such as pronunciation and grammar, making the translation results more accurate and fluent. Different dialects are very different and have different prominent features. Considering the characteristics of the dialect to formulate a corresponding feature set, rather than uniformly processing all dialect types, is conducive to improving translation efficiency.

[0036] This embodiment can not only meet the diverse needs of business communication, tourism exchange and educational dissemination, but also effectively promote the exchange of regional culture and social integration, and is of great significance for promoting the harmonious development of society.

[0037] In one embodiment of the present disclosure, before determining the target translation mode based on the first language and the second language, the translation method further includes: In response to receiving the first translation instruction, a second language is determined based on the regional information and the historical translation information.

[0038] In response to receiving the second translation instruction, a second language is determined based on the regional information, the historical translation information and the first audio. The first audio and the target audio are both audio to be translated.

[0039] In this embodiment, the first translation instruction is a simple signal that triggers translation, and the second translation instruction is more complex. The regional information can be the user's current geographical location, such as latitude and longitude information or region name obtained through mobile phone positioning. Different regions usually have their own specific main languages ​​or dialects. For example, in Guangdong, Cantonese is a more commonly used language.

[0040] The historical translation information may include data such as the language type and frequency of the user's past translations recorded by the wearable device. If the user frequently translates a specific language in a certain area, the second language that may be needed at the moment can be inferred based on this historical record.

[0041] In this embodiment, after receiving the trigger instruction of the first user, the first translation instruction or the second translation instruction can be generated according to the trigger instruction. If the first user presses the translation button or is triggered by the first voice, the first translation instruction is generated. If the first user presses the translation button and presses another specific button at the same time, or presses the translation button twice, or is triggered by the second voice, the second translation instruction is generated. Wherein, the first voice and the second voice are both pre-set trigger signals. When the first voice or the second voice is recognized, the corresponding translation instruction is generated.

[0042] For example, a tourist is traveling in Fujian and uses a wearable device with a dialect translation function. When he hears local people talking on the street and wants to translate, he presses the translation button on the device, and the device receives a first translation instruction. The wearable device is connected to the tourist's mobile phone, and based on the location (geographic information) of the tourist's mobile phone in Fujian and the historical record of the tourist using the device to translate Minnan dialect into Mandarin, it is determined that the source language (second language) is Minnan dialect.

[0043] If a tourist encounters a complex situation, such as feeling that the automatically determined language is inaccurate, he presses the translation button and then another specific function button, and the device receives a second translation instruction. The target language can be re-determined based on the regional information, historical translation information, and the short audio clip currently heard (the first audio).

[0044] For example, this design is reasonable and practical. After understanding the function settings, if the language you want to translate is one you have frequently translated in the past, you can directly choose the first method. If the user is in a new area and the language he wants to translate is a new language, he can directly choose the second method. It fully considers user needs, combines the user's personal will and personal choice, is more humane, and can improve translation efficiency in this way, avoiding indiscriminate language type identification every time a translation is performed.

[0045] In this embodiment, determining the second language based on the regional information and the historical translation information includes: The second language sequence is determined based on the regional information and the historical translation information. The second language sequence includes a plurality of language types arranged in a priority order.

[0046] The language type that comes first in the second language sequence is taken as the second language.

[0047] In this embodiment, the second language sequence is a list of multiple possible language types determined based on the region information and historical translation information, and these language types are arranged in order of priority. The priority can be determined based on factors such as the frequency of historical translations, the use of the main language in the region, etc. For example, in a specific region, the frequency of Northeastern dialect appearing in historical translations is the highest, so Northeastern dialect has the highest priority in the second language sequence.

[0048] For example, Xiao Li was assigned by the company to work in the Chengdu branch. Through the regional information of Xiao Li's mobile phone, it was determined that he was in Chengdu. At the same time, the historical translation information was analyzed and it was found that Xiao Li often translated Sichuan dialect into Mandarin for communication in the past half month, and the frequency was much higher than other language types. Therefore, the second language sequence was determined to be [Sichuan dialect, English, other dialects, etc.], and Sichuan dialect ranked first in the sequence due to its recent high frequency of historical translation. So when Xiao Li heard people around him talking in Chengdu, the audio content he heard was translated into Mandarin by default according to the translation method of Sichuan dialect, which facilitated him to communicate smoothly with local colleagues and partners when working in a different place.

[0049] In this embodiment, determining the second language based on the regional information, the historical translation information and the first audio includes: A second language sequence is determined based on the regional information and the historical translation information.

[0050] A target audio parameter is determined based on the first audio, and a matching degree matrix between the target audio parameter and a plurality of language types in a second language sequence is calculated.

[0051] A first matching degree is calculated based on the matching degree matrix. The first matching degree is the highest matching degree.

[0052] The language type corresponding to the first matching degree is used as the second language.

[0053] In this embodiment, the target audio parameters include a series of values ​​extracted from the first audio that can characterize the audio features. The target audio parameters may include the frequency distribution, tone features, speech speed, timbre, etc. of the audio, and the target audio parameters may be used to distinguish different language types.

[0054] The matching matrix can be a two-dimensional table, in which the rows represent different language types in the second language sequence and the columns represent different audio parameter dimensions. Each element in the matrix represents the degree of matching between a specific language type and a specific audio parameter, which can be calculated by a certain algorithm or formula. Based on the matching matrix, the matching degree between each language type and the target audio parameter can be calculated, and the matching degree with the largest value is selected from multiple matching degrees as the first matching degree, which represents the comprehensive highest matching degree between the first audio and a certain language type in all considered parameter dimensions. The language type corresponding to the first matching degree is taken as the second language.

[0055] This embodiment, by combining multiple information sources, can more accurately determine the type of language that the user currently needs to translate. This embodiment fully considers the user's personal habits and historical behaviors, making the translation service more personalized and intelligent, and improving the user experience. This embodiment further enhances the flexibility and adaptability of the system by introducing real-time analysis of the first audio, and can make more accurate judgments in complex or special situations. This embodiment also embodies a humanized design concept, respects the user's personal will and choice, and makes the translation process more convenient and efficient.

[0056] In summary, this embodiment not only improves the accuracy of translation, but also enhances the personalization and intelligence of services, bringing users a better translation experience.

[0057] In one embodiment of the present disclosure, determining a target translation mode based on a first language and a second language includes: If neither the first language nor the second language is a standard language, a language similarity between the first language and the second language is determined.

[0058] The target translation mode is determined based on language similarity.

[0059] In this embodiment, determining the target translation mode based on language similarity includes: If the language similarity is greater than or equal to the first threshold, the target translation mode is determined to be the first translation mode. The first translation mode is bilingual translation.

[0060] If the language similarity is less than the first threshold, the target translation mode is determined to be the second translation mode. The first translation mode is multilingual translation.

[0061] In this embodiment, the standard language refers to a language that is widely used in a large range and has a standardized grammar and vocabulary system, such as Mandarin. As a universal communication tool, the standard language has high versatility and standardization. Language similarity is an indicator to measure the similarity between two languages ​​in terms of pronunciation, vocabulary, grammar, etc. For example, if two languages ​​have many common words, similar grammatical structures and similar pronunciation characteristics, then their language similarity will be higher. The first threshold is used to distinguish the similarity between two languages, thereby determining different translation modes. When the language similarity reaches or exceeds the first threshold, a translation mode is adopted; when the language similarity is lower than this value, another translation mode is adopted.

[0062] Exemplarily, it is first determined whether the first language and the second language are standard languages, and if neither is the standard language, the language similarity between them is calculated. The target translation mode is determined according to the comparison result of the language similarity with the first threshold.

[0063] In this embodiment, bilingual translation includes one-to-one translation between a first language and a second language, and multilingual translation includes translation between a first language, a second language, and an intermediate language, such as translating Cantonese into Mandarin, and then translating Mandarin into Chengdu dialect.

[0064] For example, a Sichuanese working in Guangdong hears his colleagues speaking Cantonese. First, it is determined that Cantonese and Sichuan dialect (such as Chengdu dialect) are not standard languages, and the language similarity between the two is calculated. If the similarity is less than the first threshold, the target translation mode is determined to be multilingual translation. First, Cantonese is translated into Mandarin as an intermediate language, and then Mandarin is translated into Chengdu dialect. In this way, the Sichuan user can understand what his colleagues are saying. This makes it easier for him to communicate with colleagues in different regions when working in different places.

[0065] This embodiment can.

[0066] In one embodiment of the present disclosure, determining a vocabulary mapping table and a target feature set based on a target translation mode includes: If the target translation mode is bilingual translation, then: a first vocabulary mapping table is determined based on the first language and the second language, and the first vocabulary mapping table is used as the vocabulary mapping table. Also, a first feature set is determined from a standard feature set based on the first language and the second language, and the first feature set is used as the target feature set.

[0067] If the target translation mode is multilingual translation, then: a second vocabulary mapping table is determined based on the first language, the second language and the standard language, and the second vocabulary mapping table is used as the vocabulary mapping table. Also, a second feature set is determined from the standard feature set based on the first language and the standard language, a third feature set is determined from the standard feature set based on the second language and the standard language, and a target feature set is determined based on the second feature set and the third feature set.

[0068] In this embodiment, the target audio is translated based on the vocabulary mapping table and the target feature set, including: If the first matching degree is greater than or equal to the second threshold, the target audio is translated based on the vocabulary mapping table and the target feature set.

[0069] If the first matching degree is less than the second threshold, the second language is determined to be the first fusion language, a second matching degree is determined based on the matching degrees of the target audio parameters and the multiple language types, and the language type corresponding to the second matching degree is used as the second fusion language.

[0070] The vocabulary mapping table and the target feature set are updated based on the first fused language and the second fused language, and the target audio is translated based on the updated vocabulary mapping table and the target feature set.

[0071] In this embodiment, the standard feature set includes audio features in multiple dimensions; determining a first feature set from the standard feature set based on a first language and a second language includes: selecting multiple target audio features based on the difference degree of the audio features in multiple dimensions of the first language and the second language, and using the multiple target audio features as the target feature set. Selecting multiple target audio features based on the difference degree of the audio features in multiple dimensions of the first language and the second language includes: if the difference degree is greater than or equal to a third threshold, marking the audio feature corresponding to the difference degree as a target audio feature.

[0072] In this embodiment, in the preparation stage, calculate the language similarity between multiple language types, and determine a pattern matching relationship table based on the language similarity between multiple language types. The pattern matching relationship table includes the mapping relationship between a first language, a second language, and a translation pattern. For example: if the first language is Cantonese and the second language is Hunan dialect, the corresponding translation pattern is multilingual translation.

[0073] In the preparation stage, determine the corresponding vocabulary mapping table based on different combinations of language types, for example, construct a vocabulary mapping table between Cantonese and Hunan dialect.

[0074] Exemplarily, a tourist from Hunan travels to Guangdong. It is determined that neither Hunan dialect (the first language) nor Cantonese (the second language) is a standard language, and the language similarity is low. The target translation pattern is determined to be multilingual translation, and Mandarin is introduced as the standard language (the intermediate language).

[0075] First, determine a second vocabulary mapping table based on Hunan dialect, Cantonese, and Mandarin. For example, "恰饭" in Hunan dialect corresponds to "吃饭" in Mandarin, and "食饭" in Cantonese also corresponds to "吃饭" in Mandarin. Determine a second feature set and a third feature set from the standard feature set based on Hunan dialect and Mandarin, Cantonese and Mandarin respectively. For example, the differences in some tone features between Hunan dialect and Mandarin, the unique pronunciation features of Cantonese and Mandarin, etc. Combine these feature sets to determine the target feature set.

[0076] When a Cantonese audio (the target audio) is received, first calculate the matching degree between the target audio parameters and multiple language types such as Cantonese and Mandarin to obtain a first matching degree. If the first matching degree is less than a second threshold, determine Cantonese as the first fusion language. Then calculate the matching degree between the target audio parameters and other language types again to determine a second matching degree. Suppose it is found that the matching degree with Hakka is relatively high, and Hakka is used as the second fusion language. The first fusion language and the second fusion language refer to: the source language may not be a standard dialect, but a fusion evolution between multiple language types. For example, a user lives in the north for 10 years and then in the south for 5 years, and their language system may combine the language characteristics of the north and the south. For example, the first fusion language is Cantonese and the second fusion language is Hunan dialect.

[0077] Update the vocabulary mapping table and target feature set based on Cantonese and Hakka. For example, add the vocabulary correspondence between Cantonese and Hakka, and between Hunan dialect and Hakka in the vocabulary mapping table. Add the audio features of Hakka and the difference features of Hunan dialect and Cantonese to the target feature set. Finally, translate the target audio based on the updated vocabulary mapping table and target feature set to help tourists better understand the local language and enhance their travel experience.

[0078] This embodiment significantly improves translation efficiency and accuracy by intelligently matching translation modes, constructing accurate vocabulary mapping tables and target feature sets. In bilingual translation, the first vocabulary mapping table and the first feature set are directly used to achieve fast and accurate translation; in multilingual translation, the accuracy and fluency of translation are ensured by introducing standard language as an intermediate bridge, combining the second vocabulary mapping table and the comprehensive feature set. At the same time, this embodiment can also intelligently identify and integrate multiple language features according to the matching degree between audio parameters and language types, dynamically update the vocabulary mapping table and the target feature set, and further improve the adaptability and accuracy of translation. This not only provides users with a more natural and smooth translation experience, but also effectively promotes smooth communication between people in different dialect areas, and enhances mutual understanding and integration. In addition, this embodiment also has strong flexibility and scalability, can adapt to translation tasks of different scenarios and needs, and bring users more convenient and efficient translation services.

[0079] Corresponding to the translation method of the above embodiment, Figure 2 This is a structural block diagram of a wearable device provided in one embodiment of the present disclosure. For ease of explanation, only the parts related to the embodiment of the present disclosure are shown. Figure 2 The wearable device 20 includes: a first calculation module 21, a second calculation module 22 and a translation module 23.

[0080] The first calculation module 21 is used to determine a target translation mode based on a first language and a second language, wherein the first language is a target language and the second language is a source language.

[0081] The second calculation module 22 is used to determine a vocabulary mapping table and a target feature set based on a target translation mode.

[0082] The translation module 23 is used to translate the target audio based on the vocabulary mapping table and the target feature set.

[0083] In one embodiment of the present disclosure, before determining the target translation mode based on the first language and the second language, the wearable device 20 further includes: The language identification module is used to determine a second language based on the regional information and the historical translation information in response to receiving the first translation instruction.

[0084] In response to receiving the second translation instruction, a second language is determined based on the regional information, the historical translation information and the first audio. The first audio and the target audio are both audio to be translated.

[0085] In one embodiment of the present disclosure, the language identification module is specifically used to determine a second language sequence based on the regional information and the historical translation information. The second language sequence includes multiple language types arranged in order of priority.

[0086] The language type that comes first in the second language sequence is taken as the second language.

[0087] In one embodiment of the present disclosure, the language identification module is further configured to determine a second language sequence based on the regional information and the historical translation information.

[0088] A target audio parameter is determined based on the first audio, and a matching degree matrix between the target audio parameter and a plurality of language types in a second language sequence is calculated.

[0089] A first matching degree is calculated based on the matching degree matrix. The first matching degree is the highest matching degree.

[0090] The language type corresponding to the first matching degree is used as the second language.

[0091] In an embodiment of the present disclosure, the first calculation module 21 is specifically configured to determine the language similarity between the first language and the second language if neither the first language nor the second language is a standard language.

[0092] The target translation mode is determined based on language similarity.

[0093] In one embodiment of the present disclosure, the first calculation module 21 is further configured to determine that the target translation mode is a first translation mode if the language similarity is greater than or equal to a first threshold. The first translation mode is bilingual translation.

[0094] If the language similarity is less than the first threshold, the target translation mode is determined to be the second translation mode. The first translation mode is multilingual translation.

[0095] In one embodiment of the present disclosure, the second calculation module 22 is specifically configured to: if the target translation mode is bilingual translation, determine a first vocabulary mapping table based on the first language and the second language, and use the first vocabulary mapping table as the vocabulary mapping table; and determine a first feature set from a standard feature set based on the first language and the second language, and use the first feature set as the target feature set.

[0096] If the target translation mode is multilingual translation, then: a second vocabulary mapping table is determined based on the first language, the second language and the standard language, and the second vocabulary mapping table is used as the vocabulary mapping table. Also, a second feature set is determined from the standard feature set based on the first language and the standard language, a third feature set is determined from the standard feature set based on the second language and the standard language, and a target feature set is determined based on the second feature set and the third feature set.

[0097] See also Figure 3 , Figure 3 A schematic block diagram of an electronic device provided by an embodiment of the present disclosure. Figure 3 The electronic device 300 in the embodiment shown may include: one or more processors 301, one or more input devices 302, one or more output devices 303 and one or more memories 304. The processors 301, input devices 302, output devices 303 and memories 304 communicate with each other via a communication bus 305. The memory 304 is used to store computer programs, which include program instructions. The processor 301 is used to execute the program instructions stored in the memory 304. The processor 301 is configured to call the program instructions to execute the functions of the modules in the above-mentioned device embodiments, such as Figure 2 The functions of modules 21 to 23 are shown.

[0098] It should be understood that in the embodiment of the present disclosure, the processor 301 may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0099] The input device 302 may include a touch panel, a fingerprint collection sensor (for collecting the user's fingerprint information and fingerprint direction information), a microphone, etc., and the output device 303 may include a display (LCD, etc.), a speaker, etc.

[0100] The memory 304 may include a read-only memory and a random access memory, and provide instructions and data to the processor 301. A portion of the memory 304 may also include a non-volatile random access memory. For example, the memory 304 may also store information about the device type.

[0101] In a specific implementation, the processor 301, input device 302, and output device 303 described in the embodiments of the present disclosure may execute the implementation methods described in the first and second embodiments of the translation method provided in the embodiments of the present disclosure, and may also execute the implementation methods of the electronic device 300 described in the embodiments of the present disclosure, which will not be repeated here.

[0102] In another embodiment of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by the processor, all or part of the processes in the above-mentioned embodiment method are implemented, and the computer program can also be completed by instructing the relevant hardware through the computer program. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by the processor, the steps of each of the above-mentioned method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc.

[0103] The computer-readable storage medium may be an internal storage unit of the electronic device of any of the aforementioned embodiments, such as a hard disk or memory of the electronic device. The computer-readable storage medium may also be an external storage device of the electronic device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device. Furthermore, the computer-readable storage medium may also include both an internal storage unit of the electronic device and an external storage device. The computer-readable storage medium is used to store computer programs and other programs and data required by the electronic device. The computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.

[0104] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this disclosure.

[0105] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the electronic devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0106] In the several embodiments provided in the present application, it should be understood that the disclosed electronic devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces or units, or it can be an electrical, mechanical or other form of connection.

[0107] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of the present disclosure.

[0108] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0109] The above are only specific embodiments of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present disclosure, and these modifications or replacements should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.

Claims

1. A translation method, characterized in that: include: Determine the target translation mode based on the first and second languages; The first language is a target language, and the second language is a source language; Determining a vocabulary mapping table and a target feature set based on the target translation mode; The target audio is translated based on the vocabulary mapping table and the target feature set.

2. The translation method according to claim 1, characterized in that: Before determining the target translation mode based on the first language and the second language, the method further includes: In response to receiving the first translation instruction, determining a second language based on the regional information and the historical translation information; In response to receiving a second translation instruction, the second language is determined based on the regional information, the historical translation information and the first audio; the first audio and the target audio are both audios to be translated.

3. The translation method according to claim 2, characterized in that: The determining of the second language based on the regional information and the historical translation information includes: Determining a second language sequence based on the regional information and the historical translation information; the second language sequence includes a plurality of language types arranged in order of priority; The language type in the first position in the second language sequence is used as the second language.

4. The translation method according to claim 3, characterized in that: The determining the second language based on the regional information, the historical translation information and the first audio includes: determining the second language sequence based on the regional information and the historical translation information; Determine a target audio parameter based on the first audio, and calculate a matching degree matrix between the target audio parameter and a plurality of language types in the second language sequence; Calculate a first matching degree based on the matching degree matrix; the first matching degree is the highest matching degree; The language type corresponding to the first matching degree is used as the second language.

5. The translation method according to claim 1, characterized in that: Determining the target translation mode based on the first language and the second language includes: If neither the first language nor the second language is a standard language, determining a language similarity between the first language and the second language; The target translation mode is determined based on the language similarity.

6. The translation method according to claim 5, characterized in that: The determining the target translation mode based on the language similarity includes: If the language similarity is greater than or equal to a first threshold, determining that the target translation mode is a first translation mode; the first translation mode is bilingual translation; If the language similarity is less than the first threshold, the target translation mode is determined to be the second translation mode; and the first translation mode is multilingual translation.

7. The translation method according to claim 6, characterized in that: The determining of a vocabulary mapping table and a target feature set based on the target translation mode includes: If the target translation mode is the bilingual translation, then: determining a first vocabulary mapping table based on the first language and the second language, and using the first vocabulary mapping table as the vocabulary mapping table; and determining a first feature set from a standard feature set based on the first language and the second language, and using the first feature set as the target feature set; If the target translation mode is the multilingual translation, then: a second vocabulary mapping table is determined based on the first language, the second language and the standard language, and the second vocabulary mapping table is used as the vocabulary mapping table; and a second feature set is determined from a standard feature set based on the first language and the standard language, a third feature set is determined from the standard feature set based on the second language and the standard language, and the target feature set is determined based on the second feature set and the third feature set.

8. A wearable device, characterized in that: include: A first calculation module, configured to determine a target translation mode based on a first language and a second language; The first language is a target language, and the second language is a source language; A second computing module, configured to determine a vocabulary mapping table and a target feature set based on the target translation mode; A translation module is used to translate the target audio based on the vocabulary mapping table and the target feature set.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.