Translation method, related device, equipment and computer readable storage medium

By using multiple devices to cooperate in the collaborative system to translate, split and allocate target translation statements and additional translation statements in the text to be translated, the problem of poor accuracy of translation results in existing machine translation technologies is solved, and more efficient and accurate translation results are achieved.

CN113392653BActive Publication Date: 2025-03-11HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011000326.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2020-03-13
Filing Date
2020-09-21
Publication Date
2025-03-11
Estimated Expiration
2040-09-21

AI Technical Summary

Technical Problem

Existing machine translation techniques tend to lead to poor accuracy of translation results, especially when dealing with complex texts.

Method used

Multiple devices in the collaborative system are used for translation, and the text to be translated is split into target translation statements and additional translation statements, and assigned to multiple devices for translation, and finally the translation result is obtained.

Benefits of technology

By collaborating with multiple devices in the system to cooperate in the translation, the accuracy and fluency of the translation results are improved, redundant translation results are reduced, and translation efficiency is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113392653B_ABST
    Figure CN113392653B_ABST
Patent Text Reader

Abstract

The present application provides a translation method, related devices, equipment and computer-readable storage medium, which relate to the field of artificial intelligence, and specifically to the field of natural language processing. The method includes application to a collaborative system, which includes Q devices; a communication connection is established between the Q devices; the method includes: a first device obtains a text to be translated; for the text to be translated, the first device determines a target allocation result that each device in the Q devices needs to translate; at least one target allocation result includes a target translation sentence and an additional translation sentence corresponding to the target translation sentence; the first device sends a target allocation result that each device in the Q devices needs to translate respectively; the first device obtains the translation results corresponding to each of the Q devices, and obtains the target translation result of the text to be translated according to the translation results corresponding to each of the Q devices; and outputs the target translation result. Implementation of the present application can improve the accuracy of the translation result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence, and in particular to a translation method, related devices, equipment and computer-readable storage medium. Background Art

[0002] Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a branch of computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that machines have the functions of perception, reasoning and decision-making.

[0003] At present, information exchange between different languages ​​has become an important part of information communication, and the demand for various language services, especially translation services, has become more and more widespread. However, there is a serious shortage of translators, especially high-end translators, and translators need to spend a lot of time to query and translate professional vocabulary when translating, resulting in low efficiency and high cost of translation. With the continuous development of artificial intelligence technology, more and more natural language processing (Natural Language Process, NLP) tasks can be implemented using artificial intelligence technology, such as using artificial intelligence technology to implement translation tasks. Taking machine translation (Machine Traslation, MT) as an example, machine translation refers to the process of converting a sentence in one language into a sentence in another language using a terminal device (for example, the terminal device may include a mobile phone, a computer, etc.).

[0004] In the prior art, a single device (e.g., a terminal device) is usually used for machine translation. During translation, the terminal device splits the source document to be translated into at least one phrase, translates each phrase separately, and obtains a translation segment corresponding to each phrase; then, each translation segment is spliced ​​together to obtain the translation result of the source document to be translated.

[0005] In the process of implementing the present disclosure, the inventors discovered through research that the above implementation method is likely to lead to the problem of poor accuracy of translation results. Summary of the invention

[0006] The present application provides a translation method, related apparatus, device and computer-readable storage medium, which can improve the accuracy of translation results.

[0007] In a first aspect, an embodiment of the present application provides a translation method, which is applied to a collaborative system, wherein the collaborative system includes Q devices; a communication connection is established between the Q devices; Q is a positive integer greater than 1; the method includes: a first device obtains a text to be translated; for the text to be translated, the first device determines a target allocation result that each of the Q devices needs to translate; wherein at least one target allocation result includes a target translation sentence and an additional translation sentence corresponding to the target translation sentence; the position of the additional translation sentence in the text to be translated is located before the target translation sentence; the first device sends the target allocation result that needs to be translated to each of the Q devices respectively; the first device obtains the translation results corresponding to each of the Q devices, and obtains the target translation result of the text to be translated based on the translation results corresponding to each of the Q devices; and outputs the target translation result.

[0008] By implementing the embodiment of the present application, since the target allocation results that each device in the collaborative system needs to translate include a target translation sentence and an additional translation sentence corresponding to the target translation sentence, the fluency of text expression is ensured and the accuracy of the translation results can be improved.

[0009] In a possible implementation, the number of the additional translation sentences is K; and K is a positive integer greater than 1.

[0010] In a possible implementation, the target allocation result includes an i-th target allocation result, and the i-th target allocation result is used to instruct the i-th device among the Q devices to translate the i-th target allocation result; the i-th target allocation result includes a j-th target translation sentence and an additional translation sentence corresponding to the j-th target translation sentence; the first device determines the target allocation result of the text to be translated, including: the first device obtains a j-th translation sub-text; wherein the j-th translation sub-text includes a j-th target translation sentence and M additional translation sentences located before the j-th target translation sentence in the text to be translated; if the first device determines through a translation model that the translation result corresponding to the allocation result consisting of the j-th target translation sentence and the K additional translation sentences located before the j-th target translation sentence is the same as the translation result corresponding to the allocation result consisting of the j-th target translation sentence and the K additional translation sentences located before the j-th target translation sentence +1 additional translation sentences are greater than a first threshold, wherein the value of K is sequentially from 1 to M-1, and the j-th target translation sentence and the K additional translation sentences located before the j-th target translation sentence are taken as the i-th target allocation result; if the first device determines through the translation model that the similarity between the translation result corresponding to the allocation result consisting of the j-th target translation sentence and the K additional translation sentences located before the j-th target translation sentence and the translation result corresponding to the allocation result consisting of the j-th target translation sentence and the K+1 additional translation sentences located before the j-th target translation sentence is less than the first threshold, wherein the value of K is sequentially from 1 to M-1, and the j-th target translation sentence and the M additional translation sentences located before the j-th target translation sentence are taken as the i-th target allocation result. In implementing the embodiment of the present application, the first device can determine the target allocation result that each device in the collaborative system needs to translate by the similarity between the translation result corresponding to the allocation result consisting of the target translation sentence and the first K additional translation sentences corresponding to the target translation sentence and the translation result corresponding to the allocation result consisting of the target translation sentence and the first K+1 additional translation sentences corresponding to the target translation sentence. Since the target allocation result that each device in the collaborative system needs to translate includes the target translation sentence and the additional translation sentences corresponding to the target translation sentence, the fluency of the text expression is guaranteed and the accuracy of the translation result can be improved.

[0011] In a possible implementation, the target allocation result includes an i-th target allocation result, and the i-th target allocation result is used to instruct the i-th device among the Q devices to translate the i-th target allocation result; the i-th target allocation result includes a j-th target translation sentence and an additional translation sentence corresponding to the j-th target translation sentence; the first device determines the target allocation result of the text to be translated, including: the first device obtains a j-th translation subtext; wherein the j-th translation subtext includes a j-th target translation sentence and all additional translation sentences located before the j-th target translation sentence in the text to be translated; the first device determines the classification results corresponding to all additional translation sentences located before the j-th target translation sentence through a trained classifier, the classification results include sentences belonging to the same category as the j-th target translation sentence, or sentences not belonging to the same category as the j-th target translation sentence, and the additional translation sentences belonging to the same category as the j-th target translation sentence in the classification results and the j-th target translation sentence are used as the i-th target allocation result; wherein the classifier is a model trained based on at least one sample data set, and the at least one sample data set includes N categories; N is a positive integer. In implementing the embodiment of the present application, the first device can determine the target allocation results that need to be translated for each device in the collaborative system through a trained classifier. Since the target allocation results that need to be translated for each device in the collaborative system include the target translation sentence and the additional translation sentences corresponding to the target translation sentence, the fluency of the text expression is guaranteed and the accuracy of the translation results can be improved.

[0012] In a possible implementation, the obtaining of the target translation result of the text to be translated according to the translation results corresponding to each of the Q devices includes: when there are at least two translation results corresponding to the same sentence to be translated in the translation results corresponding to each of the Q devices, redundant translation results are eliminated to obtain the target translation result of the text to be translated. In the implementation of the embodiment of the present application, when there are at least two translation results corresponding to the same sentence to be translated in the translation results corresponding to each of the Q devices, redundant translation results are eliminated, which can avoid the target translation result from including redundant translation results, making the target translation result concise.

[0013] In a second aspect, an embodiment of the present application provides a translation method, which is applied to a collaborative system, wherein the collaborative system includes Q devices; a communication connection is established between the Q devices; Q is a positive integer greater than 1; the method includes: the i-th device among the Q devices receives the i-th target allocation result sent by the first device; wherein the i-th target allocation result includes the j-th target translation sentence that the i-th device needs to translate and the additional translation sentence corresponding to the j-th target translation sentence; the j-th target translation sentence and the additional translation sentence corresponding to the j-th target translation sentence include respective corresponding indication information; the j-th target translation sentence and the additional translation sentence corresponding to the j-th target translation sentence are sentences in the text to be translated; the i-th device translates the i-th target allocation result through a translation model to obtain a translation result corresponding to the j-th target translation sentence and a translation result corresponding to the additional translation sentence; the i-th device sends the translation result corresponding to the j-th target translation sentence to the first device; the first device is used to obtain the target translation result of the text to be translated based on the translation result corresponding to the j-th target translation sentence.

[0014] In implementing the embodiment of the present application, the i-th device among the Q devices can distinguish the target translation sentence and the additional translation sentence according to the indication information corresponding to each of them. After translation through the translation model, the translation result corresponding to the target translation sentence and the translation result corresponding to the additional translation sentence can be obtained. After that, the i-th device sends the translation result corresponding to the target translation sentence to the first device (that is, the i-th device will not send the translation result corresponding to the additional translation sentence to the first device), so that the first device obtains the target translation result of the text to be translated. In this implementation, even if redundant allocation results appear in the target allocation results that each of the Q devices needs to translate (for example, the same sentence to be translated is assigned to different devices among the Q devices for translation), the translation results corresponding to each device obtained by the first device will not have at least two translation results corresponding to the same sentence to be translated. At this time, there is no need to eliminate redundant translation results, which can improve the efficiency of translation.

[0015] In a third aspect, an embodiment of the present application provides a translation device, which is applied to a collaborative system, wherein the collaborative system includes Q devices; a communication connection is established between the Q devices; Q is a positive integer greater than 1; wherein the first device includes: a text acquisition unit, which is used by the first device to acquire a text to be translated; a determination unit, which is used by the first device to determine, for the text to be translated, a target allocation result that each of the Q devices needs to translate; wherein at least one target allocation result includes a target translation sentence and an additional translation sentence corresponding to the target translation sentence; the position of the additional translation sentence in the text to be translated is located before the target translation sentence; a sending unit, which is used to send the target allocation result that needs to be translated to each of the Q devices; a processing unit, which is used to obtain the translation results corresponding to each of the Q devices, and obtain the target translation result of the text to be translated based on the translation results corresponding to each of the Q devices; and an output unit, which is used to output the target translation result.

[0016] By implementing the embodiment of the present application, since the target allocation results that each device in the collaborative system needs to translate include a target translation sentence and an additional translation sentence corresponding to the target translation sentence, the fluency of text expression is ensured and the accuracy of the translation results can be improved.

[0017] In a possible implementation, the number of the additional translation sentences is K; and K is a positive integer greater than 1.

[0018] In a possible implementation, the target allocation result includes an i-th target allocation result, and the i-th target allocation result is used to instruct the i-th device among the Q devices to translate the i-th target allocation result; the i-th target allocation result includes a j-th target translation sentence and an additional translation sentence corresponding to the j-th target translation sentence; the determination unit is specifically used to: obtain a j-th translation sub-text; wherein the j-th translation sub-text includes a j-th target translation sentence and M additional translation sentences that are located before the j-th target translation sentence in the text to be translated; if it is determined through a translation model that the translation result corresponding to the allocation result consisting of the j-th target translation sentence and the K additional translation sentences that are located before the j-th target translation sentence is consistent with the translation result consisting of the j-th target translation sentence and the K+1 additional translation sentences that are located before the j-th target translation sentence The similarity between the translation results corresponding to the assigned results is greater than a first threshold, wherein the value of K is sequentially from 1 to M-1, and the j-th target translation sentence and the K additional translation sentences located before the j-th target translation sentence are taken as the i-th target assignment result; if it is determined through the translation model that the similarity between the translation result corresponding to the assignment result consisting of the j-th target translation sentence and the K additional translation sentences located before the j-th target translation sentence and the translation result corresponding to the assignment result consisting of the j-th target translation sentence and the K+1 additional translation sentences located before the j-th target translation sentence is less than the first threshold, wherein the value of K is sequentially from 1 to M-1, and the j-th target translation sentence and the M additional translation sentences located before the j-th target translation sentence are taken as the i-th target assignment result.

[0019] In a possible implementation, the target allocation result includes an i-th target allocation result, and the i-th target allocation result is used to instruct the i-th device among the Q devices to translate the i-th target allocation result; the i-th target allocation result includes a j-th target translation sentence and an additional translation sentence corresponding to the j-th target translation sentence; the determination unit is specifically used to: obtain a j-th translation subtext; wherein the j-th translation subtext includes a j-th target translation sentence and all additional translation sentences located before the j-th target translation sentence in the text to be translated; determine the classification results corresponding to all additional translation sentences located before the j-th target translation sentence through a trained classifier, the classification result includes belonging to the same category as the j-th target translation sentence, or not belonging to the same category as the j-th target translation sentence, and the additional translation sentences in the classification result that belong to the same category as the j-th target translation sentence and the j-th target translation sentence are used as the i-th target allocation result; wherein the classifier is a model trained based on at least one sample data set, and the at least one sample data set includes N categories; N is a positive integer.

[0020] In a possible implementation manner, the processing unit is specifically configured to:

[0021] When there are at least two translation results corresponding to the same sentence to be translated among the translation results corresponding to the Q devices, redundant translation results are removed to obtain a target translation result of the text to be translated.

[0022] In a fourth aspect, an embodiment of the present application provides a translation device, which is applied to a collaborative system, wherein the collaborative system includes Q devices; a communication connection is established between the Q devices; Q is a positive integer greater than 1; the i-th device of the Q devices includes:

[0023] A receiving unit, configured to receive an i-th target allocation result sent by a first device; wherein the i-th target allocation result includes a j-th target translation sentence to be translated by the i-th device and an additional translation sentence corresponding to the j-th target translation sentence; the j-th target translation sentence and the additional translation sentence corresponding to the j-th target translation sentence include respective corresponding indication information; the j-th target translation sentence and the additional translation sentence corresponding to the j-th target translation sentence are sentences in a text to be translated;

[0024] A translation unit, configured to translate the i-th target allocation result through a translation model to obtain a translation result corresponding to the j-th target translation sentence and a translation result corresponding to the additional translation sentence;

[0025] A sending unit is used to send the translation result corresponding to the j-th target translation sentence to the first device; the first device is used to obtain the target translation result of the text to be translated according to the translation result corresponding to the j-th target translation sentence.

[0026] In a fifth aspect, an embodiment of the present application further provides a translation device, which may include a memory and a processor, wherein the memory is used to store a computer program that supports the translation device to execute the above method, the computer program includes program instructions, and the processor is configured to call the program instructions to execute the method of the above first aspect.

[0027] In the sixth aspect, an embodiment of the present application also provides a translation device, which may include a memory and a processor, wherein the memory is used to store a computer program that supports the translation device to execute the above method, the computer program includes program instructions, and the processor is configured to call the program instructions to execute the method of the above second aspect.

[0028] In a seventh aspect, an embodiment of the present application further provides a computer-readable storage medium, 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 a processor, the processor executes the method of the first aspect above.

[0029] In an eighth aspect, an embodiment of the present application further provides a computer-readable storage medium, 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 a processor, the processor executes the method of the second aspect.

[0030] In a ninth aspect, an embodiment of the present application further provides a computer program, wherein the computer program includes computer software instructions, and when the computer software instructions are executed by a computer, the computer executes any one of the translation methods described in the first aspect.

[0031] In a tenth aspect, an embodiment of the present application further provides a computer program, wherein the computer program includes computer software instructions, and when the computer software instructions are executed by a computer, the computer performs any one of the translation methods described in the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 A schematic diagram of the architecture of a collaborative system provided in an embodiment of the present application;

[0033] Figure 2a A flowchart of a translation method provided in an embodiment of the present application;

[0034] Figure 2b A schematic diagram of the allocation of a target allocation result provided in an embodiment of the present application;

[0035] Figure 2c A schematic diagram of a translation process provided in an embodiment of the present application;

[0036] Figure 3 A schematic diagram of the structure of a translation device provided in an embodiment of the present application;

[0037] Figure 4 A schematic diagram of the structure of a translation device provided in an embodiment of the present application;

[0038] Figure 5 A system block diagram of multi-device collaboration provided in an embodiment of the present application;

[0039] Figure 6 A schematic diagram of the structure of a neural network processor provided in an embodiment of the present application;

[0040] Figure 7A schematic diagram of the structure of another translation device provided in an embodiment of the present application;

[0041] Figure 8 A schematic diagram of the structure of another translation device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0042] The technical solutions in the embodiments of the present application are clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments.

[0043] The terms "first", "second", and "third" etc. in the specification embodiments and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, including a series of steps or units. Methods, systems, products or equipment are not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or equipment. "And / or" is used to represent the selection of one or all between the two objects connected thereto. For example, "A and / or B" means A, B or A+B.

[0044] With the explosive growth of network text data brought about by the high-speed development of the Internet and the development of economic globalization, information exchange and information exchange between different countries have become more and more frequent. At the same time, the booming Internet provides great convenience for obtaining information exchange and information exchange in various languages ​​such as English, Chinese, French, German and Japanese. These data in various languages ​​have brought good development opportunities for the development of machine translation. The translation method, related devices and equipment provided by the embodiment of the present application are suitable for the mutual translation operation of Chinese information and information in other language forms, which is not limited here. The translation method, related devices and equipment provided by the embodiment of the present application will be described below by taking Chinese as an example to translate into English.

[0045] In the embodiment of the present application, Q devices, where Q is a positive integer greater than 1, are also referred to as multiple devices. The "multiple" here should be understood as at least 2, for example, it can be 2, 3, 8, and so on.

[0046] In an embodiment of the present application, a device refers to a device whose resource richness is greater than a certain threshold. Specifically, the resource richness of a device may refer to the capacity of the device. For example, the capabilities of a device may include memory capacity, central processing unit (CPU) processing speed, graphics processing unit (GPU) processing speed, neural network processor (NPU) processing speed, remaining power, computing power, and storage capacity, etc. In a specific implementation, the device may be a mobile phone, a smart phone, a personal digital assistant (PDA), a tablet computer, a wearable device (e.g., a watch, a bracelet), a speaker, a camera, and a device that enables devices to communicate with each other, etc.

[0047] In an embodiment of the present application, the device can translate the sentence to be translated through a translation model. Specifically, the translation model can be a neural network architecture Transformer model, which is an encoder-decoder model completely based on an attention mechanism (attention-based). The main idea is to encode the sentence to be translated (also called a "source sentence") into a vector representation through an encoder, and then use a decoder to decode the vector representation of the source sentence and translate it into its corresponding translation.

[0048] In order to better understand the translation method described in the embodiment of the present application, Figure 1 The possible application scenarios of the embodiments of the present application are briefly introduced:

[0049] Application scenario 1:

[0050] like Figure 1As shown, devices T1, T2, T3, T4 and T5 together form a collaborative system. Specifically, device T1 can be a smart phone A, device T2 can be a desktop computer, device T3 can be a portable notebook, device T4 can be a smart phone B, and device T5 can be an ordinary speaker. In actual applications, the above five devices can respond to the translation task initiated by the user for the text to be translated, and dispatch multiple devices in the collaborative system to translate the text to be translated to obtain the translation result; then, the translation result is output. For example, taking smartphone A as an example, a user can initiate a translation task for a text to be translated on smartphone A, and determine the target allocation results that each device in the collaborative system needs to translate; wherein at least one target allocation result includes a target translation sentence and an additional translation sentence corresponding to the target translation sentence, and the additional translation sentence is located before the target translation sentence in the text to be translated; then, smartphone A sends the target allocation results that need to be translated to each of the multiple devices, so that each device translates the target allocation result through the translation model to obtain the corresponding translation result; then, smartphone A can obtain the translation results corresponding to each of the multiple devices, and obtain the target translation result of the text to be translated based on the translation results corresponding to each of the Q devices, and then output the target translation result. In this implementation, on the one hand, since multiple devices in the collaborative system are fully utilized, compared with translating through a single device, the situation where the excess part cannot be translated due to the word limit can be avoided, and the translation efficiency can also be improved. On the other hand, for each device in the collaborative system, since the target allocation result allocated to it includes the target translation sentence and the additional translation sentence corresponding to the target translation sentence, the accuracy of the translation result can be improved.

[0051] It should be noted that, in one example, smartphone A can respond to a translation request for a text to be translated initiated by a user, and distribute the text to be translated to all devices in the collaborative system including smartphone A for translation, so as to obtain a translation result of the text to be translated. In one example, smartphone A can respond to a translation request for a text to be translated initiated by a user, and distribute the text to be translated to other devices in the collaborative system except smartphone A for translation, so as to obtain a translation result of the text to be translated.

[0052] In an embodiment of the present application, multiple devices in the collaborative system can be connected through a distributed bus, or can be networked through WiFi or Bluetooth, so that communication between devices can be achieved.

[0053] based on Figure 1For ease of understanding, the following first introduces how to build a collaborative system consisting of multiple devices in an embodiment of the present application. In one example, the multiple devices may include a master device and multiple slave devices. In one example, the multiple devices may include multiple master devices and multiple slave devices.

[0054] Taking the example that multiple devices may include a master device and multiple slave devices, when selecting a master device from multiple devices, the selection may be based on the capabilities of the multiple devices, and a device with a capability greater than a set threshold may be selected as the master device. For example, a device with a capability greater than a set threshold may be selected from multiple devices based on memory capacity, central processing unit (CPU) processing speed, GPU processing speed, NPU processing speed, remaining power, and storage capacity as the master device. Figure 1 As shown, device TI (smartphone A) is used as the main device of the collaborative system.

[0055] In the embodiment of the present application, the master device may send networking information to multiple slave devices. Figure 1 As shown, device T1 is a master device. In a possible implementation, master device T1 can send networking information to slave devices T2, T3, T4 and T5. In a possible implementation, master device T1 can first send networking information to a slave device, and then the slave device forwards the networking information to other slave devices.

[0056] In an embodiment of the present application, the networking information is used to establish a collaborative system between a master device and multiple slave devices, and a device resource pool can be obtained based on the constructed collaborative system.

[0057] In the embodiment of the present application, the master device may send the networking information to each slave device in the form of broadcast, that is, the networking information may be broadcast information sent by the master device to each slave device. In some implementations, the master device may also send the networking information to each slave device in the form of multicast, that is, the networking information may be multicast information sent by the master device to each slave device.

[0058] In an embodiment of the present application, after the slave device receives the networking information sent by the master device, if the slave device determines to join the collaborative system, then the slave device can send networking confirmation information to the master device to confirm that the slave device has joined the collaborative system.

[0059] In a possible implementation, after each slave device among the multiple slave devices receives the networking information sent by the master device, each slave device sends a networking confirmation message to the master device.

[0060] In another possible implementation, a slave device among the multiple slave devices may send the received networking confirmation information of other slave devices to the master device in the form of forwarding.

[0061] It should be understood that in actual applications, devices in the same local area network can be networked through WiFi, Bluetooth, etc. to obtain a collaborative system.

[0062] Then, for the master device, after receiving the networking confirmation information from the multiple slave devices, the master device may send synchronization information to the multiple slave devices. Here, the synchronization information may be handshake information.

[0063] Afterwards, each of the multiple slave devices replies with a handshake message to the master device, thereby achieving preliminary synchronization between the devices in the collaborative system.

[0064] It is understandable that, in one example, after the networking is successful, the master device can distribute the text to be translated to multiple slave devices for translation to obtain the translation result of the text to be translated. In one example, after the networking is successful, the master device can distribute the text to be translated to multiple devices including the master device for translation to obtain the translation result of the text to be translated.

[0065] In an embodiment of the present application, the slave device can be used to translate the target allocation result allocated by the master device, wherein at least one target allocation result includes a target translation sentence and an additional translation sentence corresponding to the target translation sentence. Afterwards, the translation result is sent to the master device so that the master device sorts out the translation results corresponding to each of the multiple slave devices (for example, removes redundant translation results) to obtain the target translation result.

[0066] In an embodiment of the present application, for slave devices in a collaborative system, in addition to translating the target allocation result assigned by the master device, each slave device can also report operating status information to the master device. Then, the master device can determine whether each slave device has an abnormality based on the operating status information reported by each slave device. In the case of an abnormality in a slave device (for example, the i-th slave device), the master device can send a clear device message to the i-th slave device. Here, the clear device message is used to clear the slave device from the collaborative system. At this time, the master device will not assign the target allocation result to the slave device for translation.

[0067] It should also be understood that when other slave devices are added to the collaborative system, the master device can establish a communication connection with the newly added slave device and assign the target allocation result to the newly added slave device for translation.

[0068] See also Figure 2a , is a flow chart of a translation method provided in an embodiment of the present application. Figure 2aAs shown, the method is applied to a collaborative system, which includes Q devices, and a communication connection is established between the Q devices, where Q is a positive integer greater than 1. In the description of this method, the first device among the Q devices is used as an example for explanation, and the method may include but is not limited to the following steps:

[0069] Step S200: The first device obtains the text to be translated.

[0070] In one example, the first device may be any one of the Q devices. In this case, the first device may receive the text to be translated input by the user, respond to the translation request for the text to be translated initiated by the user, and then distribute the text to be translated to all devices including the first device in the collaborative system for translation.

[0071] In one example, the first device is a device other than the Q devices. In this case, the first device can receive the text to be translated input by the user, respond to the translation request for the text to be translated initiated by the user, and then distribute the text to be translated to other devices other than the first device in the collaborative system for translation.

[0072] In the embodiment of the present application, the text to be translated can be the language of the same language, or it can be the language of different languages, which is not specifically limited in the embodiment of the present application. In practical applications, the language of the text to be translated can be set according to the actual translation requirements. For example, when the translation model is applied to the application scenario of Chinese-English translation, the language of the text to be translated can be Chinese. For another example, when the translation model is applied to the application scenario of English-French translation, the language of the text to be translated can be English. For another example, when the translation model is applied to the application scenario of Chinese-French translation, the language of the text to be translated can be Chinese and / or French.

[0073] In the embodiment of the present application, the text to be translated can be a text obtained by recognizing and converting the voice input by the user, or a text obtained by sorting the text input by the user, which is not specifically limited here. For example, the first device can collect the user's voice through a voice collection device, and then recognize and convert the collected voice, so as to obtain the text to be translated.

[0074] Step S202: For the text to be translated, the first device determines a target allocation result that each of the Q devices needs to translate; wherein at least one target allocation result includes a target translation sentence and an additional translation sentence corresponding to the target translation sentence; the additional translation sentence is located before the target translation sentence in the text to be translated.

[0075] In the embodiment of the present application, the number of additional translation sentences is K, where K is a positive integer greater than 0, for example, K may be 1. For another example, K may be 2.

[0076] In an embodiment of the present application, after the first device obtains the text to be translated, it can be evenly distributed to each device in the Q devices according to the sentences or text paragraphs contained in the text to be translated, and in addition, additional translation sentences are allocated to each device in the Q devices. For example, the text to be translated contains 8 sentences to be translated, namely, sentence 1, sentence 2, sentence 3, ..., sentence 8; the collaborative system contains 4 devices, namely, device 1, device 2, device 3, and device 4, and device 1 determines the target allocation results that each of the 4 devices needs to translate, wherein device 1 is used to obtain the first target allocation result, and the first target allocation result includes sentence 1 and sentence 2; device 2 is used to obtain the second target allocation result, wherein the second target allocation result includes sentence 3, sentence 4, and additional translation sentence 2; device 3 is used to obtain the third target allocation result, wherein the third target allocation result includes sentence 5, sentence 6, and additional translation sentence 4; device 4 is used to obtain the fourth target allocation result, wherein the fourth target allocation result includes sentence 7, sentence 8, and additional translation sentence 6. It should be noted that the target allocation results for each device cited here are only an example and should not constitute a limitation.

[0077] In the present application embodiment, target translation sentence and attachment translation sentence refer to, take punctuation marks as breakpoints to treat the sentence obtained by sentence segmentation of translation text.In general, punctuation marks can include comma (,), period (.), question mark (?), exclamation mark (!).When taking comma (,) as breakpoint to treat the sentence segmentation of translation text, each sentence obtained is an incomplete sentence (that is: some components are missing in the sentence).When taking period (.), question mark (?), exclamation mark (!) as breakpoint to treat the sentence segmentation of translation text, each sentence obtained is a complete sentence.It is understandable that, when taking punctuation marks as breakpoints to treat the sentence segmentation of translation text, the sentence obtained can include incomplete sentence and / or complete sentence.

[0078] In some embodiments, by segmenting the text to be translated using the above method, each target translation sentence obtained by segmenting can be a complete sentence, and each additional translation sentence obtained by segmenting can be an incomplete sentence.

[0079] In some embodiments, by segmenting the text to be translated using the above method, each target translation sentence obtained by segmenting can be a complete sentence, and each additional translation sentence obtained by segmenting can be a complete sentence.

[0080] In some embodiments, by segmenting the text to be translated using the above method, each target translation sentence obtained by segmenting can be an incomplete sentence, and each additional translation sentence obtained by segmenting can be an incomplete sentence.

[0081] Next, it is described in detail how to determine the target allocation result that each device in the Q devices needs to translate in this application:

[0082] In one example, a target allocation result includes an i-th target allocation result, and the i-th target allocation result is used to instruct an i-th device among Q devices to translate the i-th target allocation result; the i-th target allocation result includes a j-th target translation sentence and an additional translation sentence corresponding to the j-th target translation sentence; for a text to be translated, a first device determines that an implementation process of the target allocation result that each of the Q devices needs to translate may include: the first device obtains a j-th translation sub-text; wherein the j-th translation sub-text includes a j-th target translation sentence and M additional translation sentences that are located before the j-th target translation sentence in the text to be translated; if the first device determines through a translation model that a translation result corresponding to a distribution result consisting of the j-th target translation sentence and the K additional translation sentences that are located before the j-th target translation sentence is the same as a translation result corresponding to a distribution result consisting of the j-th target translation sentence and the K+1 additional translation sentences that are located before the j-th target translation sentence 1 additional translation sentence is greater than a first threshold value, wherein the value of K is sequentially from 1 to M-1, and the j-th target translation sentence and the K additional translation sentences before the j-th target translation sentence are taken as the i-th target allocation result; if the first device determines through the translation model that the similarity between the translation result corresponding to the allocation result consisting of the j-th target translation sentence and the K additional translation sentences before the j-th target translation sentence and the translation result corresponding to the allocation result consisting of the j-th target translation sentence and the K+1 additional translation sentences before the j-th target translation sentence is less than the first threshold value, wherein the value of K is sequentially from 1 to M-1, and the j-th target translation sentence and the M additional translation sentences before the j-th target translation sentence are taken as the i-th target allocation result.

[0083] In the embodiment of the present application, the i-th device among the Q devices can be understood as a certain device among the Q devices, and can also be understood as any device among the Q devices, and is not specifically limited here.

[0084] In the embodiment of the present application, similarity refers to the degree of similarity between two things. Specifically, the similarity can be the ratio between the number of identical words contained in the two translation results and the total number of words contained in the two translation results. In the application scenario of Chinese-English translation, taking the sentence to be translated as "I am still passionate about this sport" as an example, illustratively, the translation result corresponding to the sentence to be translated obtained by the first device through the translation model can be: I still love this sport; illustratively, the translation result corresponding to the sentence to be translated obtained by the first device through the translation model can be: I am still verykeen on this sport. Afterwards, the first device can obtain the similarity between the two translation results, specifically, the similarity is 4 / 13.

[0085] In the embodiment of the present application, the first threshold may be set by the first device, or may be set by the first device according to user needs. For example, the first threshold may be 70%, and so on.

[0086] For example, the text to be translated includes three sentences, namely, sentence 1, sentence 2 and sentence 3; the collaborative system includes three devices. Among them, device 1 is used to receive the first target allocation result, so that device 1 can translate the first target allocation result through the translation model, specifically, the first target allocation result can include sentence 1; wherein sentence 1 is the target translation sentence assigned to device 1, and the first target allocation result does not include the additional translation sentence; device 2 is used to receive the second target allocation result, so that device 2 can translate the second target allocation result through the translation model, specifically, the second target allocation result includes sentence 1 and sentence 2; wherein sentence 2 is the target translation sentence assigned to device 2, and sentence 1 is the additional translation sentence; device 3 is used to receive the third target allocation result, so that device 3 can translate the third target allocation result through the translation model. In an example, the third target allocation result can include sentence 1, sentence 2 and sentence 3; wherein sentence 3 is the target translation sentence assigned to device 3, and sentence 1 and sentence 2 are the additional translation sentences; in an example, the third target allocation result can include sentence 2 and sentence 3; wherein sentence 3 is the target translation sentence assigned to device 3, and sentence 2 is the additional translation sentence. It can be understood that for sentence 3, there are two forms of expression of its additional translation sentences. In this case, the first device can determine the similarity of the translation results corresponding to the two target allocation results through the translation model, and then determine the number of additional translation sentences corresponding to sentence 3 based on the similarity. Specifically, the first device obtains the translation results (referred to as translation result a) corresponding to sentences 2 and 3 (wherein sentence 3 is the target translation sentence and sentence 2 is the additional translation sentence) through the translation model. After that, the first device obtains the translation results (referred to as translation result b) corresponding to sentences 1, 2 and 3 (wherein sentence 3 is the target translation sentence and sentences 1 and 2 are the additional translation sentences) through the translation model. Then, the similarity between the two translation results is determined. For example, the similarity is 75%. If the similarity between the two translation results is greater than the first threshold (for example, the first threshold is 70%), in this case, the first device uses sentences 2 and 3 as the third target allocation result. Specifically, the schematic diagram of the first device determining the target allocation results that each device needs to translate can be as follows: Figure 2b It is understandable that each of the three devices can translate the target allocation result that needs to be translated to obtain the corresponding translation result.

[0087] It should be noted that, in the above example, sentence 1 is the target translation sentence assigned to device 1, sentence 2 is the target translation sentence assigned to device 2, and sentence 3 is the target translation sentence assigned to device 3. This is only an example and should not be construed as a limitation. For example, in the target assignment result, sentence 2 may be the target translation sentence assigned to device 1, sentence 1 may be the target translation sentence assigned to device 2, and sentence 3 may be the target translation sentence assigned to device 3.

[0088] In one example, a target allocation result includes an i-th target allocation result, and the i-th target allocation result is used to instruct an i-th device among the Q devices to translate the i-th target allocation result; the i-th target allocation result includes a j-th target translation sentence and an additional translation sentence corresponding to the j-th target translation sentence; the first device determines the target allocation result of the text to be translated, including: the first device obtains a j-th translation subtext; wherein the j-th translation subtext includes a j-th target translation sentence and all additional translation sentences located before the j-th target translation sentence in the text to be translated; the first device determines, through a trained classifier, classification results corresponding to all additional translation sentences located before the j-th target translation sentence, wherein the classification results include sentences belonging to the same category as the j-th target translation sentence, or sentences not belonging to the same category as the j-th target translation sentence, and the additional translation sentences belonging to the same category as the j-th target translation sentence in the classification results and the j-th target translation sentence are used as the i-th target allocation result; wherein the classifier is a model trained based on at least one sample data set, and the at least one sample data set includes N categories; N is a positive integer.

[0089] In an embodiment of the present application, a classifier is used to learn classification rules through a known training sample data set (wherein the training sample data set includes categories corresponding to the training samples) to achieve classification (or prediction) of a test sample data set. Specifically, the training sample data set can be manually labeled to obtain the categories corresponding to the training sample data. When training the classifier, the classifier can be trained based on at least one sample data set, where at least one sample data set can include 2 categories. After the classifier is trained through at least one sample data set, the first device can input all the additional translation sentences before the j-th target translation sentence into the trained classifier. The classifier extracts the features corresponding to each additional translation sentence, and then determines whether the distance between the extracted features of each additional translation sentence and the features corresponding to the j-th target translation sentence meets the set threshold (or, determines whether each additional translation sentence contains the same thing as the j-th target translation sentence, or determines whether each additional translation sentence contains the same entity as the j-th target translation, which entity can be a name, a place name, etc.). If so, the first device determines that the additional translation sentence belongs to the same category as the j-th target translation sentence; if not, the first device determines that the additional translation sentence does not belong to the same category as the j-th target translation sentence.

[0090] In one example, the additional translation sentence can be marked by indicating information "0" or "1". Exemplarily, "1" is used to represent that the additional translation sentence belongs to the same category as the j-th target translation sentence; "0" is used to represent that the additional translation sentence does not belong to the same category as the j-th target translation sentence. Exemplarily, "0" is used to represent that the additional translation sentence belongs to the same category as the j-th target translation sentence, and "1" is used to represent that the additional translation sentence does not belong to the same category as the j-th target translation sentence. For the convenience of subsequent elaboration, in the embodiment of the present application, the default "1" is used to represent that the additional translation sentence belongs to the same category as the j-th target translation sentence; "0" is used to represent that the additional translation sentence does not belong to the same category as the j-th target translation sentence.

[0091] It can be understood that after determining the classification results corresponding to all the additional translation sentences located before the j-th target translation sentence (wherein the classification results include the additional translation sentences belonging to the same category as the j-th target translation sentence, or not belonging to the same category as the j-th target translation sentence), the first device uses the additional translation sentences in the classification results that belong to the same category as the j-th target translation sentence and the j-th target translation sentence as the i-th target allocation result.

[0092] For example, the text to be translated includes three sentences, namely, sentence 1, sentence 2 and sentence 3; the collaborative system includes three devices. Among them, device 1 is used to receive the first target allocation result, so that device 1 can translate the first target allocation result through the translation model, specifically, the first target allocation result can include sentence 1; wherein sentence 1 is the target translation sentence assigned to device 1, and the first target allocation result may not include additional translation sentences; device 2 is used to receive the second target allocation result, so that device 2 can translate the second target allocation result through the translation model, specifically, the second target allocation result can include sentence 2; wherein sentence 2 is the target translation sentence assigned to device 2; device 3 is used to receive the third target allocation result, so that device 3 can translate the third target allocation result through the translation model, specifically, the third target allocation result can include sentence 3; wherein sentence 3 is the target translation sentence assigned to device 3. Taking the determination of the additional translation sentences corresponding to sentence 3 as an example, sentences 1 and 2 are all the additional translation sentences before sentence 3. The first device determines the classification results corresponding to sentences 1 and 2 respectively through the trained classifier. For example, sentences 1 and 3 belong to the same category; for example, sentences 2 and 3 do not belong to the same category. Then, in this case, the first device determines that the third target allocation result may include sentences 2 and 3. Thus, device 3 can translate the third target allocation result to obtain the corresponding translation result.

[0093] In one example, a target allocation result includes an i-th target allocation result, and the i-th target allocation result is used to instruct an i-th device among Q devices to translate the i-th target allocation result; the i-th target allocation result includes a j-th target translation sentence and an additional translation sentence corresponding to the j-th target translation sentence; for a text to be translated, a first device determines that an implementation process of the target allocation result that each of the Q devices needs to translate may include: the first device obtains a j-th translation sub-text; wherein the j-th translation sub-text includes a j-th target translation sentence and M additional translation sentences that are located before the j-th target translation sentence in the text to be translated; if the first device determines through a translation model that a translation result corresponding to a distribution result consisting of the j-th target translation sentence and the K additional translation sentences that are located before the j-th target translation sentence is the same as a translation result corresponding to a distribution result consisting of the j-th target translation sentence and the K+1 additional translation sentences that are located before the j-th target translation sentence 1 additional translation sentence is greater than a first threshold value, wherein the value of K is sequentially from 1 to M-1, and the j-th target translation sentence and the K additional translation sentences before the j-th target translation sentence are taken as the i-th intermediate allocation result; if the first device determines through the translation model that the similarity between the translation result corresponding to the allocation result consisting of the j-th target translation sentence and the K additional translation sentences before the j-th target translation sentence and the translation result corresponding to the allocation result consisting of the j-th target translation sentence and the K+1 additional translation sentences before the j-th target translation sentence is less than the first threshold value, wherein the value of K is sequentially from 1 to M-1, and the j-th target translation sentence and the M additional translation sentences before the j-th target translation sentence are taken as the i-th intermediate allocation result. Afterwards, the first device determines the classification results corresponding to the M additional translation sentences before the j-th target translation sentence through the trained classifier, and the classification results include the same category as the j-th target translation sentence, or the same category as the j-th target translation sentence. The additional translation sentences in the classification results that belong to the same category as the j-th target translation sentence and the j-th target translation sentence are used as the i'th intermediate allocation result; wherein the classifier is a model trained based on at least one sample data set, and the at least one sample data set includes N categories; N is a positive integer. Then, the i-th target allocation result is determined according to the i-th intermediate allocation result and the i'th intermediate allocation result. For its specific implementation, please refer to the above description, which will not be elaborated here. In this implementation, both the additional translation sentences that are far away from the target translation sentence in the text to be translated and the attachment translation sentences that are close to the target translation sentence in the text to be translated are considered, which can improve the accuracy of the translation result.

[0094] Step S204: The first device sends the target allocation result that needs to be translated to each of the Q devices.

[0095] For example, suppose that the text to be translated includes three sentences, namely, sentence 1, sentence 2 and sentence 3; the collaborative system includes three devices, namely, device 1, device 2 and device 3. Assuming that device 1 is the first device, the first device uses any of the methods described above to determine the target allocation results required by each of the three devices. For example, device 1 allocates the first target allocation result to device 1, wherein the first target allocation result includes sentence 1; device 1 allocates the second target allocation result to device 2, wherein the second target allocation results include sentence 1 and sentence 2; device 1 allocates the third target allocation result to device 3, wherein the third target allocation result includes sentence 1, sentence 2 and sentence 3. Then, in this case, for the three devices performing the translation work, after receiving the first target allocation result, device 1 can translate the first target allocation result through the translation model to obtain the corresponding translation result; after receiving the second target allocation result, device 2 can translate the second target allocation result through the translation model to obtain the corresponding translation result; after receiving the third target allocation result, device 3 can translate the third target allocation result through the translation model to obtain the corresponding translation result.

[0096] Step S206: The first device obtains the translation results corresponding to the Q devices, and obtains the target translation result of the text to be translated according to the translation results corresponding to the Q devices.

[0097] After each of the Q devices completes the translation of the target assignment result to be translated, the translation result corresponding to the target assignment result may be sent to the first device, so that the first device obtains the target assignment result of the text to be translated.

[0098] In one example, the translation result corresponding to the target allocation result may include the translation result corresponding to the target translation sentence and the translation result corresponding to the additional translation sentence. When there are at least two identical sentences to be translated in the target allocation result that each of the Q devices needs to translate, for example, the same sentence to be translated is assigned to different devices in the Q devices for translation, and the first device obtains that there are at least two translation results corresponding to the same sentence to be translated in the translation results corresponding to the Q devices, that is, redundant translation results are generated in the translation results. At this time, the first device can eliminate the redundant translation results in the translation results to obtain the target translation result of the text to be translated.

[0099] For example, suppose that the text to be translated includes three sentences, namely, sentence 1, sentence 2, and sentence 3; and the collaborative system includes three devices, namely, device 1, device 2, and device 3. Assuming that device 1 is the first device, the first device uses any of the methods described above to determine the target allocation results required by each of the three devices. For example, device 1 allocates the first target allocation result to device 1, wherein the first target allocation result includes sentence 1; device 1 allocates the second target allocation result to device 2, wherein the second target allocation results include sentence 1 and sentence 2; device 1 allocates the third target allocation result to device 3, wherein the third target allocation result includes sentence 1, sentence 2, and sentence 3. Then, in this case, for the three devices performing the translation work, the translation results corresponding to the target allocation results required to be translated can be obtained through the translation model. For example, device 1 can obtain translation result 1 through the translation model, wherein translation result 1 includes translation result 1A corresponding to sentence 1. Device 2 can obtain translation result 2 through the translation model, wherein translation result 2 includes translation result 1B corresponding to sentence 1 and translation result 2A corresponding to sentence 2. Device 3 can obtain translation result 3 through the translation model, wherein translation result 3 includes translation result 1C corresponding to sentence 1, translation result 2B corresponding to sentence 2, and translation result 3A corresponding to sentence 3. It can be understood that after the first device obtains the translation results corresponding to the target allocation results that need to be translated by each of the three devices, when the first device determines that there are at least two translation results corresponding to the same sentence to be translated in the translation results corresponding to each of the three devices, the redundant translation results are eliminated. In one example, the target translation results of the text to be translated may include: 1A, 2A, and 3A. In one example, the target translation results of the text to be translated may include: 1A, 2B, and 3A. In one example, the target translation results of the text to be translated may include: 1C, 2B, and 3A.

[0100] In one example, considering that the target translation sentence and the additional translation sentence include different indication information, the indication information can be an identifier. For example, 001 is used to refer to the target translation sentence, and 002 is used to refer to the additional translation sentence. Then, for Q devices in the collaborative system, for example, the Q devices include the i-th device, the i-th device can distinguish the target translation sentence and the additional translation sentence according to the indication information, wherein the additional translation sentence is used to assist in translating the target translation sentence. After the i-th device receives the i-th target allocation result determined by the first device, the i-th device obtains the translation results of the target translation sentence and the additional translation sentence through the translation model, and the i-th device sends the translation result corresponding to the target translation sentence to the first device (that is, the i-th device will not send the translation result corresponding to the additional translation sentence to the first device), so that the first device obtains the target translation result of the text to be translated.

[0101] For example, suppose that the text to be translated includes three sentences, namely, sentence 1, sentence 2 and sentence 3; the collaborative system includes three devices, namely, device 1, device 2 and device 3. Assuming that device 1 is the first device, the first device uses any of the methods described above to determine the target allocation results required by each of the three devices. For example, device 1 allocates the first target allocation result to device 1, wherein the first target allocation result includes sentence 1; device 1 allocates the second target allocation result to device 2, wherein the second target allocation results are sentence 1 and sentence 2; device 1 allocates the third target allocation result to device 3, wherein the third target allocation result includes sentence 1, sentence 2 and sentence 3. Then, in this case, for the three devices performing the translation work, the translation results corresponding to the target allocation results required to be translated can be obtained through the translation model. When the device translates through the translation model, the device can distinguish the target translation sentence and the additional translation sentence through the indication information, wherein the additional translation sentence is used to assist in translating the target translation sentence. For example, device 1 can obtain translation result 1 through the translation model, wherein translation result 1 includes translation result 1A corresponding to sentence 1. Device 2 can obtain translation result 2 through the translation model, wherein translation result 2 includes translation result 1B corresponding to sentence 1 and translation result 2A corresponding to sentence 2. Device 3 can obtain translation result 3 through the translation model, wherein translation result 3 includes translation result 1C corresponding to sentence 1, translation result 2B corresponding to sentence 2, and translation result 3A corresponding to sentence 3. After the three devices obtain the translation results, device 1 sends translation result 1A to device 1, device 2 sends translation result 2A to device 1, and device 3 sends translation result 3A to device 1. After the first device (device 1) obtains the translation results corresponding to the target allocation results that need to be translated by each of the three devices, it obtains the target translation results corresponding to the text to be translated. Specifically, the target translation results of the text to be translated may include: 1A, 2A, and 3A. It can be understood that in this implementation, even if redundant allocation results appear in the target allocation results that each of the Q devices needs to translate (for example, the same sentence to be translated is assigned to different devices among the Q devices for translation), the translation results corresponding to each device obtained by the first device will not contain at least two translation results corresponding to the same sentence to be translated. In this case, there is no need to eliminate redundant translation results, which can improve the efficiency of translation.

[0102] The following is an explanation with specific examples:

[0103] The text to be translated is "Based on whether an explicit hierarchical relationship between categories is required, hierarchical classification methods can be divided into two categories. The first type of method requires that the hierarchical relationship between categories is explicit, and each node in the hierarchical classifier except the root node corresponds to a class in the original category. This is more common in specific texts such as text classification and biological system classification. Sllla and Freitas reviewed this type of method in detail, which will not be repeated in this article. This article mainly reviews the second type of hierarchical classification methods, which require that the hierarchical relationship between categories is implicit, and the category labels only appear at the leaf node layer of the hierarchical classifier. The categories corresponding to the intermediate nodes are composed of subsets of the original category set. These subsets are called meta-classes (Mela-Class) or macro-classes (Main-Class). This type of method is generally used to solve classification problems that are inconvenient to directly annotate category labels with explicit hierarchical relationships, such as image classification. Specifically, this type of hierarchical classification method generally uses the hierarchical relationship of category labels in feature space or semantic space to decompose multi-category problems, establish a corresponding category hierarchy, and then solve the smaller-scale classification problems obtained after the decomposition. During classification, the results of multiple classifiers are summed up according to the hierarchy to obtain the final classification result. Unless otherwise specified, the hierarchical classification methods mentioned below refer to the second type of methods. ", such as Figure 2cAs shown, the first target allocation result may include S1 and S2 (complete sentences), and the first target allocation result does not contain additional translation sentences; the second target allocation result includes S3 and S4, and the corresponding additional translation sentence is context1, wherein context1 can be expressed as "This is more common in specific texts such as text classification and biological system classification."; the third target allocation result includes S5 and S6, and the corresponding additional translation sentence is context2, wherein context2 can be expressed as "These subsets are called meta-classes (Mela-Class) or macro-classes (Main-Class)."; the fourth target translation sentence includes S7, and the corresponding additional translation sentence is context3, wherein context3 can be expressed as "Then the smaller-scale classification problem obtained after decomposition is solved, and during classification, the results of multiple classifiers are summed up according to the hierarchical structure to obtain the final classification result." For example, device 1 is used to receive the first target allocation result, so that device 1 can translate the first target allocation result through the translation model. Specifically, the translation result corresponding to the first target allocation result is {t1, t2}; wherein t1 is the target translation sentence S1 is the translation result of the target translation sentence S2; device 2 is used to receive the second target allocation result, so that device 2 can translate the second target allocation result through the translation model, specifically, the translation result corresponding to the second target allocation result is {ti, t3, t4}; wherein ti is the translation result of the additional translation sentence context1, t3 is the translation result of the target translation sentence S3, and t4 is the translation result of the target translation sentence S4; device 3 is used to receive the third target allocation result, so that device 3 can translate the third target allocation result through the translation model, specifically Specifically, the translation result corresponding to the third target allocation result is {tj, t5, t6}, where tj is the translation result of the additional translation sentence context2, t5 is the translation result of the target translation sentence S5, and t6 is the translation result of the target translation sentence S6; device 4 is used to receive the fourth target allocation result, so that device 4 can translate the fourth target allocation result through the translation model. Specifically, the translation result corresponding to the fourth target allocation result is {ts, t7}; where ts is the translation result of the additional translation sentence context3, and t7 is the translation result of the target translation sentence S7. After the first device obtains the translation results corresponding to the above four devices, the redundant translation results in the translation results are eliminated to obtain the target translation result {t1, t2, t3, t4, t5, t6, t7}. Step S208, output the target translation result.

[0104] In one example, the first device may display the target translation result through a display screen. In one example, the first device may output the target translation result through a voice broadcast device.

[0105] By implementing the embodiment of the present application, since the target allocation results that each device in the collaborative system needs to translate include a target translation sentence and an additional translation sentence corresponding to the target translation sentence, the fluency of text expression is ensured and the accuracy of the translation results can be improved.

[0106] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should know that the present disclosure is not limited by the order of the actions described, because according to the present disclosure, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present disclosure.

[0107] It should be further explained that although Figure 2a The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2a At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0108] Combination of the above Figure 1-2c The translation method of the embodiment of the present application is described in detail. In order to facilitate the better implementation of the above-mentioned scheme of the embodiment of the present application, correspondingly, relevant devices and equipment for cooperating in the implementation of the above-mentioned scheme are also provided below.

[0109] See also Figure 3 , is a schematic diagram of the structure of a translation device provided in an embodiment of the present application, wherein the translation device 30 is applied to a collaborative system, wherein the collaborative system includes Q devices, and a communication connection is established between the Q devices, where Q is a positive integer greater than 1; wherein the first device includes:

[0110] A text acquisition unit 300, used for the first device to acquire a text to be translated;

[0111] A determination unit 302 is configured to determine, by the first device, a target allocation result that each of the Q devices needs to translate for the text to be translated; wherein at least one target allocation result includes a target translation sentence and an additional translation sentence corresponding to the target translation sentence; and the additional translation sentence is located before the target translation sentence in the text to be translated;

[0112] A sending unit 304 is used to send the target allocation result that needs to be translated to each of the Q devices respectively;

[0113] The processing unit 306 is used to obtain the translation results corresponding to the Q devices, and obtain the target translation result of the text to be translated according to the translation results corresponding to the Q devices;

[0114] The output unit 308 is used to output the target translation result.

[0115] In a possible implementation, the number of the additional translation sentences is K; and K is a positive integer greater than 1.

[0116] In a possible implementation, the target allocation result includes an i-th target allocation result, and the i-th target allocation result is used to instruct an i-th device among the Q devices to translate the i-th target allocation result; the i-th target allocation result includes a j-th target translation sentence and an additional translation sentence corresponding to the j-th target translation sentence; and the determining unit 302 is specifically used to:

[0117] Acquire a j-th translation subtext; wherein the j-th translation subtext includes a j-th target translation sentence and M additional translation sentences located before the j-th target translation sentence in the text to be translated;

[0118] If it is determined through the translation model that the similarity between the translation result corresponding to the allocation result consisting of the j-th target translation sentence and the K additional translation sentences located before the j-th target translation sentence and the translation result corresponding to the allocation result consisting of the j-th target translation sentence and the K+1 additional translation sentences located before the j-th target translation sentence is greater than a first threshold, wherein the value of K is from 1 to M-1 in sequence, the j-th target translation sentence and the K additional translation sentences located before the j-th target translation sentence are taken as the i-th target allocation result;

[0119] If it is determined through the translation model that the similarity between the translation result corresponding to the allocation result consisting of the j-th target translation sentence and the K additional translation sentences located before the j-th target translation sentence and the translation result corresponding to the allocation result consisting of the j-th target translation sentence and the K+1 additional translation sentences located before the j-th target translation sentence is less than the first threshold, wherein the value of K ranges from 1 to M-1 in sequence, the j-th target translation sentence and the M additional translation sentences located before the j-th target translation sentence are taken as the i-th target allocation result.

[0120] In a possible implementation, the target allocation result includes an i-th target allocation result, and the i-th target allocation result is used to instruct an i-th device among the Q devices to translate the i-th target allocation result; the i-th target allocation result includes a j-th target translation sentence and an additional translation sentence corresponding to the j-th target translation sentence; and the determining unit 302 is specifically used to:

[0121] Acquire a j-th translation subtext; wherein the j-th translation subtext includes a j-th target translation sentence and all additional translation sentences located before the j-th target translation sentence in the text to be translated;

[0122] The classification results corresponding to all the additional translation sentences located before the j-th target translation sentence are determined by a trained classifier, wherein the classification results include sentences belonging to the same category as the j-th target translation sentence, or sentences not belonging to the same category as the j-th target translation sentence, and the additional translation sentences belonging to the same category as the j-th target translation sentence and the j-th target translation sentence in the classification results are used as the i-th target allocation result; wherein the classifier is a model trained based on at least one sample data set, and the at least one sample data set includes N categories; and N is a positive integer.

[0123] In a possible implementation, the processing unit 306 is specifically configured to:

[0124] When there are at least two translation results corresponding to the same sentence to be translated among the translation results corresponding to the Q devices, redundant translation results are removed to obtain a target translation result of the text to be translated.

[0125] By implementing the embodiment of the present application, since the target allocation results that each device in the collaborative system needs to translate include a target translation sentence and an additional translation sentence corresponding to the target translation sentence, the fluency of text expression is ensured and the accuracy of the translation results can be improved.

[0126] It should be noted that each device in the above system may also include other units. The specific implementation of each device and unit can refer to the relevant description in the above method embodiment, which will not be repeated here.

[0127] In order to better implement the above solution of the embodiment of the present application, the present application also provides a corresponding translation device, which is described in detail below with reference to the accompanying drawings:

[0128] like Figure 4 The structural diagram of the translation device provided by the embodiment of the present application is shown, and the translation device 40 may include a processor 401, a memory 404 and a communication module 405, and the processor 401, the memory 404 and the communication module 405 may be interconnected through a bus 406. The memory 404 may be a high-speed random access memory (Random Access Memory, RAM) memory, or a non-volatile memory (non-volatile memory), such as at least one disk storage. The memory 404 may optionally be at least one storage system located away from the aforementioned processor 401. The memory 404 is used to store application code, and may include an operating system, a network communication module, a user interface module and a data processing program. The communication module 405 is used to interact with external devices for information; the processor 401 is configured to call the program code and perform the following steps:

[0129] Get the text to be translated;

[0130] For the text to be translated, determine a target allocation result that each of the Q devices needs to translate; wherein at least one target allocation result includes a target translation sentence and an additional translation sentence corresponding to the target translation sentence; the additional translation sentence is located before the target translation sentence in the text to be translated;

[0131] Sending the target allocation result that needs to be translated to each of the Q devices respectively;

[0132] Obtaining translation results corresponding to each of the Q devices, and obtaining a target translation result of the text to be translated according to the translation results corresponding to each of the Q devices;

[0133] The target translation result is output.

[0134] The number of the additional translation sentences is K; K is a positive integer greater than 1.

[0135] The target allocation result includes an i-th target allocation result, and the i-th target allocation result is used to instruct the i-th device among the Q devices to translate the i-th target allocation result; the i-th target allocation result includes a j-th target translation sentence and an additional translation sentence corresponding to the j-th target translation sentence; the processor 401 determines the target allocation result of the text to be translated, including:

[0136] Acquire a j-th translation subtext; wherein the j-th translation subtext includes a j-th target translation sentence and M additional translation sentences located before the j-th target translation sentence in the text to be translated;

[0137] If it is determined through the translation model that the similarity between the translation result corresponding to the allocation result consisting of the j-th target translation sentence and the K additional translation sentences located before the j-th target translation sentence and the translation result corresponding to the allocation result consisting of the j-th target translation sentence and the K+1 additional translation sentences located before the j-th target translation sentence is greater than a first threshold, wherein the value of K is from 1 to M-1 in sequence, the j-th target translation sentence and the K additional translation sentences located before the j-th target translation sentence are taken as the i-th target allocation result;

[0138] If it is determined through the translation model that the similarity between the translation result corresponding to the allocation result consisting of the j-th target translation sentence and the K additional translation sentences located before the j-th target translation sentence and the translation result corresponding to the allocation result consisting of the j-th target translation sentence and the K+1 additional translation sentences located before the j-th target translation sentence is less than the first threshold, wherein the value of K ranges from 1 to M-1 in sequence, the j-th target translation sentence and the M additional translation sentences located before the j-th target translation sentence are taken as the i-th target allocation result.

[0139] The target allocation result includes an i-th target allocation result, and the i-th target allocation result is used to instruct the i-th device among the Q devices to translate the i-th target allocation result; the i-th target allocation result includes a j-th target translation sentence and an additional translation sentence corresponding to the j-th target translation sentence; the processor 401 determines the target allocation result of the text to be translated, including:

[0140] Acquire a j-th translation subtext; wherein the j-th translation subtext includes a j-th target translation sentence and all additional translation sentences located before the j-th target translation sentence in the text to be translated;

[0141] The classification results corresponding to all the additional translation sentences located before the j-th target translation sentence are determined by a trained classifier, wherein the classification results include sentences belonging to the same category as the j-th target translation sentence, or sentences not belonging to the same category as the j-th target translation sentence, and the additional translation sentences belonging to the same category as the j-th target translation sentence and the j-th target translation sentence in the classification results are used as the i-th target allocation result; wherein the classifier is a model trained based on at least one sample data set, and the at least one sample data set includes N categories; and N is a positive integer.

[0142] The processor 401 obtains the target translation result of the text to be translated according to the translation results corresponding to the Q devices, which may include:

[0143] When there are at least two translation results corresponding to the same sentence to be translated among the translation results corresponding to the Q devices, redundant translation results are removed to obtain a target translation result of the text to be translated.

[0144] It should be noted that the execution steps of the processor in the translation device 40 in the embodiment of the present application can refer to the above-mentioned method embodiments. Figure 2a The specific implementation method of the translation device in the embodiment will not be described in detail here.

[0145] In a specific implementation, the translation device 40 may include a mobile phone, a tablet computer, a personal digital assistant (PDA), a mobile Internet device (MID), and other devices that can be used by various users, which are not specifically limited in the embodiments of the present application.

[0146] Figure 5 50 is a schematic block diagram of a collaborative system provided in an embodiment of the present application. The collaborative system 50 may include multiple devices, for example, multiple devices may include device 501, device 502, and device 50n. The specific functions of device 501, device 502, and device 50n are as follows:

[0147] In practical applications, the first device in the collaborative system is used to obtain a text to be translated; for the text to be translated, the first device determines a target allocation result that each of the Q devices needs to translate; wherein at least one target allocation result includes a target translation sentence and an additional translation sentence corresponding to the target translation sentence; the additional translation sentence is located before the target translation sentence in the text to be translated; the target allocation result that needs to be translated is sent to each of the Q devices respectively; the translation results corresponding to each of the Q devices are obtained, and the target translation result of the text to be translated is obtained according to the translation results corresponding to each of the Q devices; and the target translation result is output.

[0148] It should be understood that the device 501 in the collaborative system is equivalent to the translation apparatus 30 or the translation device 40 mentioned above.

[0149] The above embodiment describes that each of the Q devices translates the target allocation result that each device needs to translate through the translation model. Specifically, when each of the Q devices translates through the translation model, it can be implemented in the NPU. In addition, it can be understood that the process of training the classifier based on at least one sample data set and determining whether the additional translation sentence and the target translation sentence belong to the same category through the trained classifier can also be implemented in the NPU. Figure 6 A schematic diagram of the structure of a neural network processor provided in an embodiment of the present application.

[0150] The neural network processor NPU 60NPU is mounted on the host CPU as a coprocessor and is assigned tasks by the host CPU. The core part of the NPU is the operation circuit 603, which is controlled by the controller 604 to extract matrix data from the memory and perform multiplication operations.

[0151] In some implementations, the operation circuit 603 includes multiple processing units (Process Engine, PE) inside. In some implementations, the operation circuit 603 is a two-dimensional systolic array. The operation circuit 603 can also be a one-dimensional systolic array or other electronic circuits capable of performing mathematical operations such as multiplication and addition. In some implementations, the operation circuit 603 is a general-purpose matrix processor.

[0152] For example, suppose there is an input matrix A, a weight matrix B, and an output matrix C. The operation circuit takes the corresponding data of matrix B from the weight memory 602 and caches it on each PE in the operation circuit. The operation circuit takes the matrix A data from the input memory 601 and performs matrix operation with matrix B, and the partial result or final result of the matrix is ​​stored in the accumulator 608accumulator.

[0153] The unified memory 606 is used to store input data and output data. The weight data is directly transferred to the weight memory 602 through the storage unit access controller 605 Direct Memory Access Controller, DMAC. The input data is also transferred to the unified memory 606 through DMAC.

[0154] BIU stands for Bus Interface Unit, i.e., bus interface unit 610, which is used for the interaction between AXI bus, DMAC and instruction fetch buffer 609.

[0155] The bus interface unit 610 (Bus Interface Unit, BIU for short) is used for the instruction fetch memory 609 to obtain instructions from the external memory, and is also used for the storage unit access controller 605 to obtain the original data of the input matrix A or the weight matrix B from the external memory.

[0156] DMAC is mainly used to transfer input data in the external memory DDR to the unified memory 606 or to transfer weight data to the weight memory 602 or to transfer input data to the input memory 601.

[0157] The vector calculation unit 607 has multiple operation processing units, which further process the output of the operation circuit when necessary, such as vector multiplication, vector addition, exponential operation, logarithmic operation, size comparison, etc. It is mainly used for non-convolutional / FC layer network calculations in neural networks, such as Pooling, Batch Normalization, Local Response Normalization, etc.

[0158] In some implementations, the vector calculation unit 607 can store the processed output vector to the unified buffer 606. For example, the vector calculation unit 607 can apply a nonlinear function to the output of the operation circuit 603, such as a vector of accumulated values, to generate an activation value. In some implementations, the vector calculation unit 607 generates a normalized value, a merged value, or both. In some implementations, the processed output vector can be used as an activation input to the operation circuit 603, such as for use in a subsequent layer in a neural network.

[0159] An instruction fetch buffer 609 connected to the controller 604 is used to store instructions used by the controller 604;

[0160] The unified memory 606, the input memory 601, the weight memory 602 and the instruction fetch memory 609 are all on-chip memories. The external memory is private to the NPU hardware architecture.

[0161] Among them, the operations of each layer in the neural network architecture Transformer model can be performed by the matrix calculation unit 212 or the vector calculation unit 607.

[0162] This application uses NPU to complete the translation of target allocation results, which can greatly improve the efficiency of the device in processing natural language processing tasks.

[0163] Figure 7 A schematic diagram of the structure of a translation device provided in an embodiment of the present application, wherein the translation device 70 is applied to a collaborative system, wherein the collaborative system includes Q devices, and a communication connection is established between the Q devices, where Q is a positive integer greater than 1; wherein the i-th device of the Q devices includes:

[0164] The receiving unit 700 is used to receive the i-th target allocation result sent by the first device; wherein the i-th target allocation result includes the j-th target translation sentence to be translated by the i-th device and the additional translation sentence corresponding to the j-th target translation sentence; the j-th target translation sentence and the additional translation sentence corresponding to the j-th target translation sentence include respective corresponding indication information; the j-th target translation sentence and the additional translation sentence corresponding to the j-th target translation sentence are sentences in the text to be translated;

[0165] A translation unit 702, configured to translate the i-th target allocation result through a translation model to obtain a translation result corresponding to the j-th target translation sentence and a translation result corresponding to the additional translation sentence;

[0166] The sending unit 704 is used to send the translation result corresponding to the j-th target translation sentence to the first device; the first device is used to obtain the target translation result of the text to be translated according to the translation result corresponding to the j-th target translation sentence.

[0167] In implementing the embodiment of the present application, the i-th device among the Q devices can distinguish the target translation sentence and the additional translation sentence according to the indication information corresponding to each of them. After translation through the translation model, the translation result corresponding to the target translation sentence and the translation result corresponding to the additional translation sentence can be obtained. After that, the i-th device sends the translation result corresponding to the target translation sentence to the first device (that is, the i-th device will not send the translation result corresponding to the additional translation sentence to the first device), so that the first device obtains the target translation result of the text to be translated. In this implementation, even if redundant allocation results appear in the target allocation results that each of the Q devices needs to translate (for example, the same sentence to be translated is assigned to different devices among the Q devices for translation), the translation results corresponding to each device obtained by the first device will not have at least two translation results corresponding to the same sentence to be translated. At this time, there is no need to eliminate redundant translation results, which can improve the efficiency of translation.

[0168] The present application also provides a translation device, which is described in detail below with reference to the accompanying drawings:

[0169] like Figure 8 The structural schematic diagram of the translation device provided in the embodiment of the present application is shown, and the translation device can be specifically the i-th device among Q devices; the translation device 80 may include a processor 801, a memory 804 and a communication module 805, and the processor 801, the memory 804 and the communication module 805 may be interconnected through a bus 806. The memory 804 may be a high-speed random access memory (Random Access Memory, RAM) memory, or a non-volatile memory (non-volatile memory), such as at least one disk storage. The memory 804 may optionally be at least one storage system located away from the aforementioned processor 801. The memory 804 is used to store application code, and may include an operating system, a network communication module, a user interface module and a data processing program. The communication module 805 is used to interact with external devices for information; the processor 801 is configured to call the program code and perform the following steps:

[0170] Receive the i-th target allocation result sent by the first device; wherein the i-th target allocation result includes the j-th target translation sentence to be translated by the i-th device and the additional translation sentence corresponding to the j-th target translation sentence; the j-th target translation sentence and the additional translation sentence corresponding to the j-th target translation sentence include respective corresponding indication information; the j-th target translation sentence and the additional translation sentence corresponding to the j-th target translation sentence are sentences in the text to be translated;

[0171] Translating the i-th target assignment result through a translation model to obtain a translation result corresponding to the j-th target translation sentence and a translation result corresponding to the additional translation sentence;

[0172] The translation result corresponding to the j-th target translation sentence is sent to the first device; the first device is used to obtain the target translation result of the text to be translated according to the translation result corresponding to the j-th target translation sentence.

[0173] The specific implementation of each of the above-mentioned functional units can refer to the relevant description in the aforementioned embodiments, and will not be repeated in the embodiments of the present application.

[0174] The embodiment of the present application also provides a computer storage medium, in which instructions are stored, and when the instructions are executed on a computer or a processor, the computer or the processor executes one or more steps of the method described in any of the above embodiments. If the components of the above-mentioned device are implemented in the form of software functional units and sold or used as independent products, they can be stored in the computer-readable storage medium. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer product is stored in a computer-readable storage medium.

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

[0176] 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 computer program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk and other media that can store program codes.

[0177] The steps in the method of the embodiment of the present application can be adjusted in order, combined and deleted according to actual needs.

[0178] The modules in the device of the embodiment of the present application can be merged, divided and deleted according to actual needs.

[0179] It is to be understood that those of ordinary skill in the art can appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the various embodiments of the present application can be implemented in electronic hardware, or a combination of computer software and electronic hardware. 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 application.

[0180] Those skilled in the art will appreciate that the functions described in the various illustrative logic blocks, modules, and algorithm steps disclosed in the various embodiments of the present application can be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions described in the various illustrative logic blocks, modules, and steps can be stored or transmitted as one or more instructions or codes on a computer-readable medium and executed by a hardware-based processing unit. Computer-readable media may include computer-readable storage media, which corresponds to tangible media, such as data storage media, or includes any communication media that facilitates the transfer of computer programs from one place to another (e.g., according to a communication protocol). In this way, computer-readable media can generally correspond to (1) non-temporary tangible computer-readable storage media, or (2) communication media, such as signals or carrier waves. Data storage media can be any available media that can be accessed by one or more computers or one or more processors to retrieve instructions, codes, and / or data structures for implementing the technology described in the present application. A computer program product may include computer-readable media.

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

[0182] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. 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. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0183] 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 solution of this embodiment.

[0184] In addition, each functional unit in each embodiment of the present application 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.

[0185] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0186] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A translation method, characterized in that: The method is applied to a collaborative system, the collaborative system includes Q devices; a communication connection is established between the Q devices; Q is a positive integer greater than 1; the method includes: The first device obtains the text to be translated; For the text to be translated, the first device determines a target allocation result that each of the Q devices needs to translate; wherein the target allocation result includes an i-th target allocation result, and the i-th target allocation result is used to instruct the i-th device among the Q devices to translate the i-th target allocation result; the i-th target allocation result includes a j-th target translation sentence and an additional translation sentence corresponding to the j-th target translation sentence; at least one target allocation result includes a target translation sentence and an additional translation sentence corresponding to the target translation sentence; the additional translation sentence is located before the target translation sentence in the text to be translated; The first device sends a target allocation result that needs to be translated to each of the Q devices respectively; The first device obtains translation results corresponding to each of the Q devices, and obtains a target translation result of the text to be translated according to the translation results corresponding to each of the Q devices; Outputting the target translation result; The first device determines a target allocation result that needs to be translated for each of the Q devices, including: The first device obtains a j-th translation subtext; wherein the j-th translation subtext includes a j-th target translation sentence and M additional translation sentences located before the j-th target translation sentence in the text to be translated; If the first device determines through the translation model that the similarity between the translation result corresponding to the allocation result consisting of the j-th target translation sentence and the K additional translation sentences located before the j-th target translation sentence and the translation result corresponding to the allocation result consisting of the j-th target translation sentence and the K+1 additional translation sentences located before the j-th target translation sentence is greater than a first threshold, wherein the value of K is from 1 to M-1 in sequence, the j-th target translation sentence and the K additional translation sentences located before the j-th target translation sentence are used as the i-th target allocation result; If the first device determines through the translation model that the similarity between the translation result corresponding to the allocation result consisting of the j-th target translation sentence and the K additional translation sentences located before the j-th target translation sentence and the translation result corresponding to the allocation result consisting of the j-th target translation sentence and the K+1 additional translation sentences located before the j-th target translation sentence is less than the first threshold, where the value of K ranges from 1 to M-1 in sequence, the j-th target translation sentence and the M additional translation sentences located before the j-th target translation sentence are taken as the i-th target allocation result.

2. The method according to claim 1, characterized in that The number of the additional translation sentences is K; and K is a positive integer greater than 1.

3. The method according to claim 1 or 2, characterized in that The target allocation result includes an i-th target allocation result, and the i-th target allocation result is used to instruct an i-th device among the Q devices to translate the i-th target allocation result; The i-th target assignment result includes the j-th target translation sentence and the additional translation sentence corresponding to the j-th target translation sentence; The first device determines a target allocation result of the text to be translated, including: The first device obtains a j-th translation subtext; wherein the j-th translation subtext includes a j-th target translation sentence and all additional translation sentences located before the j-th target translation sentence in the text to be translated; The first device determines the classification results corresponding to all the additional translation sentences located before the j-th target translation sentence through a trained classifier, and the classification results include the additional translation sentences belonging to the same category as the j-th target translation sentence, or not belonging to the same category as the j-th target translation sentence, and the additional translation sentences belonging to the same category as the j-th target translation sentence and the j-th target translation sentence in the classification results are used as the i-th target allocation result; wherein the classifier is a model trained based on at least one sample data set, and the at least one sample data set includes N categories; N is a positive integer.

4. The method according to claim 1, characterized in that The obtaining a target translation result of the text to be translated according to the translation results corresponding to each of the Q devices includes: When there are at least two translation results corresponding to the same sentence to be translated among the translation results corresponding to the Q devices, redundant translation results are removed to obtain a target translation result of the text to be translated.

5. A translation method, characterized in that: The method is applied to a collaborative system, the collaborative system includes Q devices; a communication connection is established between the Q devices; Q is a positive integer greater than 1; the method includes: The i-th device among the Q devices receives the i-th target allocation result sent by the first device; wherein the i-th target allocation result includes the j-th target translation sentence to be translated by the i-th device and the additional translation sentence corresponding to the j-th target translation sentence; the j-th target translation sentence and the additional translation sentence corresponding to the j-th target translation sentence include respective corresponding indication information; the j-th target translation sentence and the additional translation sentence corresponding to the j-th target translation sentence are sentences in the text to be translated; The i-th device translates the i-th target assignment result through a translation model to obtain a translation result corresponding to the j-th target translation sentence and a translation result corresponding to the additional translation sentence; The i-th device sends the translation result corresponding to the j-th target translation sentence to the first device; the first device is used to obtain the target translation result of the text to be translated according to the translation result corresponding to the j-th target translation sentence; The i-th target allocation result is obtained by the first device in the following manner: Acquire a j-th translation subtext; wherein the j-th translation subtext includes a j-th target translation sentence and M additional translation sentences located before the j-th target translation sentence in the text to be translated; If the first device determines through the translation model that the similarity between the translation result corresponding to the allocation result consisting of the j-th target translation sentence and the K additional translation sentences located before the j-th target translation sentence and the translation result corresponding to the allocation result consisting of the j-th target translation sentence and the K+1 additional translation sentences located before the j-th target translation sentence is greater than a first threshold, wherein the value of K is from 1 to M-1 in sequence, the j-th target translation sentence and the K additional translation sentences located before the j-th target translation sentence are used as the i-th target allocation result; If the first device determines through the translation model that the similarity between the translation result corresponding to the allocation result consisting of the j-th target translation sentence and the K additional translation sentences located before the j-th target translation sentence and the translation result corresponding to the allocation result consisting of the j-th target translation sentence and the K+1 additional translation sentences located before the j-th target translation sentence is less than the first threshold, where the value of K ranges from 1 to M-1 in sequence, the j-th target translation sentence and the M additional translation sentences located before the j-th target translation sentence are taken as the i-th target allocation result.

6. A translation device, characterized in that: The apparatus is applied to a collaborative system, the collaborative system comprising Q devices; a communication connection is established between the Q devices; Q is a positive integer greater than 1; wherein the first device comprises: A text acquisition unit, used by the first device to acquire a text to be translated; A determination unit, configured to determine, by the first device, a target allocation result that each of the Q devices needs to translate for the text to be translated; wherein the target allocation result includes an i-th target allocation result, and the i-th target allocation result is used to instruct the i-th device among the Q devices to translate the i-th target allocation result; the i-th target allocation result includes a j-th target translation sentence and an additional translation sentence corresponding to the j-th target translation sentence; at least one target allocation result includes a target translation sentence and an additional translation sentence corresponding to the target translation sentence; the additional translation sentence is located before the target translation sentence in the text to be translated; A sending unit, used for sending the target allocation result to be translated to each of the Q devices respectively; A processing unit, configured to obtain translation results corresponding to each of the Q devices, and obtain a target translation result of the text to be translated according to the translation results corresponding to each of the Q devices; An output unit, used for outputting the target translation result; The determination unit is specifically configured to obtain a j-th translation subtext; wherein the j-th translation subtext includes a j-th target translation sentence and M additional translation sentences located before the j-th target translation sentence in the text to be translated; If it is determined through the translation model that the similarity between the translation result corresponding to the allocation result consisting of the j-th target translation sentence and the K additional translation sentences located before the j-th target translation sentence and the translation result corresponding to the allocation result consisting of the j-th target translation sentence and the K+1 additional translation sentences located before the j-th target translation sentence is greater than a first threshold, wherein the value of K is from 1 to M-1 in sequence, the j-th target translation sentence and the K additional translation sentences located before the j-th target translation sentence are taken as the i-th target allocation result; If it is determined through the translation model that the similarity between the translation result corresponding to the allocation result consisting of the j-th target translation sentence and the K additional translation sentences located before the j-th target translation sentence and the translation result corresponding to the allocation result consisting of the j-th target translation sentence and the K+1 additional translation sentences located before the j-th target translation sentence is less than the first threshold, wherein the value of K ranges from 1 to M-1 in sequence, the j-th target translation sentence and the M additional translation sentences located before the j-th target translation sentence are taken as the i-th target allocation result.

7. The device according to claim 6, characterized in that The number of the additional translation sentences is K; and K is a positive integer greater than 1.

8. The device according to claim 6 or 7, characterized in that The target allocation result includes an i-th target allocation result, and the i-th target allocation result is used to instruct the i-th device among the Q devices to translate the i-th target allocation result; the i-th target allocation result includes a j-th target translation sentence and an additional translation sentence corresponding to the j-th target translation sentence; the determining unit is specifically used to: Acquire a j-th translation subtext; wherein the j-th translation subtext includes a j-th target translation sentence and all additional translation sentences located before the j-th target translation sentence in the text to be translated; The classification results corresponding to all the additional translation sentences located before the j-th target translation sentence are determined by a trained classifier, wherein the classification results include sentences belonging to the same category as the j-th target translation sentence, or sentences not belonging to the same category as the j-th target translation sentence, and the additional translation sentences belonging to the same category as the j-th target translation sentence and the j-th target translation sentence in the classification results are used as the i-th target allocation result; wherein the classifier is a model trained based on at least one sample data set, and the at least one sample data set includes N categories; and N is a positive integer.

9. The device according to claim 6, characterized in that The processing unit is specifically used for: When there are at least two translation results corresponding to the same sentence to be translated among the translation results corresponding to the Q devices, redundant translation results are removed to obtain a target translation result of the text to be translated.

10. A translation device, characterized in that: The device is applied to a collaborative system, the collaborative system includes Q devices; a communication connection is established between the Q devices; Q is a positive integer greater than 1; the i-th device of the Q devices includes: A receiving unit, configured to receive an i-th target allocation result sent by a first device; wherein the i-th target allocation result includes a j-th target translation sentence to be translated by the i-th device and an additional translation sentence corresponding to the j-th target translation sentence; the j-th target translation sentence and the additional translation sentence corresponding to the j-th target translation sentence include respective corresponding indication information; the j-th target translation sentence and the additional translation sentence corresponding to the j-th target translation sentence are sentences in a text to be translated; A translation unit, configured to translate the i-th target allocation result through a translation model to obtain a translation result corresponding to the j-th target translation sentence and a translation result corresponding to the additional translation sentence; A sending unit, configured to send the translation result corresponding to the j-th target translation sentence to the first device; the first device is configured to obtain the target translation result of the text to be translated according to the translation result corresponding to the j-th target translation sentence; The i-th target allocation result is obtained by the first device in the following manner: Acquire a j-th translation subtext; wherein the j-th translation subtext includes a j-th target translation sentence and M additional translation sentences located before the j-th target translation sentence in the text to be translated; If the first device determines through the translation model that the similarity between the translation result corresponding to the allocation result consisting of the j-th target translation sentence and the K additional translation sentences located before the j-th target translation sentence and the translation result corresponding to the allocation result consisting of the j-th target translation sentence and the K+1 additional translation sentences located before the j-th target translation sentence is greater than a first threshold, wherein the value of K is from 1 to M-1 in sequence, the j-th target translation sentence and the K additional translation sentences located before the j-th target translation sentence are used as the i-th target allocation result; If the first device determines through the translation model that the similarity between the translation result corresponding to the allocation result consisting of the j-th target translation sentence and the K additional translation sentences located before the j-th target translation sentence and the translation result corresponding to the allocation result consisting of the j-th target translation sentence and the K+1 additional translation sentences located before the j-th target translation sentence is less than the first threshold, where the value of K ranges from 1 to M-1 in sequence, the j-th target translation sentence and the M additional translation sentences located before the j-th target translation sentence are taken as the i-th target allocation result.

11. A translation device, characterized in that: The translation device comprises a memory and a processor, wherein the processor executes computer instructions stored in the memory, so that the computing device executes the method according to any one of claims 1 to 4.

12. A translation device, characterized in that: The translation device comprises a memory and a processor, wherein the processor executes computer instructions stored in the memory to enable a computing device to perform the method of claim 5 .

13. A computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the method according to any one of claims 1 to 4 is implemented.

14. A computer-readable storage medium storing a computer program, which implements the method of claim 5 when the computer program is executed by a processor.

Citation Information

Patent Citations

  • A method and device for multi-language simultaneous interpretation

    CN109359305A

  • Contextual language translation

    CN110494841A