A translation task scheduling method and a scheduling system
By adding source device identifiers and generation time to the translation task, task grouping and device matching is solved, the problem of matching delay in corpus to be translated in multilateral meeting occasions is solved, and the user experience improvement of quasi-real-time translation is achieved.
Patent Information
- Application Number
- CN202211232288.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-11
- Publication Date
- 2025-06-03
- Estimated Expiration
- 2042-10-11
AI Technical Summary
In multilateral conference occasions, when multiple source devices simultaneously generate a large number of corpus to be translated, the prior art is difficult to quickly match the target terminal device and the translation model, resulting in delays in translation results and affecting the user experience.
A translation task scheduling method is proposed, which combines task groups and target devices by adding the device identifier of the translation source device and task generation time when generating the translation task. The central server receives translation tasks, groups and stores them in a queue based on the translation identifier, and determines the target device and container based on the status parameters of the translation terminal device.
This method can effectively reduce the delay and wait of translation tasks, improve user experience, and ensure quasi-real-time translation in multilateral meeting occasions.
Smart Images

Figure CN115658293B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of translation task scheduling, and particularly relates to a translation task scheduling method and a scheduling system. Background Art
[0002] In an open multi-lateral (multi-country) conference scenario, there are usually multiple source languages to be translated and multiple target languages. The source language corpus to be translated in the first source language generated by a source device may be received by multiple target devices simultaneously, and different target devices respectively need to translate the first source language into the second target language, the third target language... to meet the understanding needs of users in different countries. In this process, the target devices need to configure multiple translation target models to achieve translations in different languages.
[0003] In the prior art, usually one translation device is configured for each translation target, and there are multiple devices for multiple translation targets; or, multiple translation models are configured on one translation device. When the translation device receives the source language corpus to be translated, the user selects the corresponding translation model based on their own needs.
[0004] However, the resources of each translation device itself are limited, and the number of tasks that can be processed within a period of time is also limited; at the same time, the processing requirements for the tasks of the source language corpus to be translated generated each time are also different.
[0005] When multiple source devices simultaneously generate a large number of source language corpus tasks, if the task matching scheduling strategy cannot adapt to the current attributes of the source language corpus tasks to be translated, it will lead to a delay in the translation result. This is unacceptable in a multi-lateral conference scenario that requires almost real-time communication.
[0006] Therefore, how to quickly match the corresponding target terminal devices and target translation models for these large numbers of source language corpus tasks, avoid task delays or waiting, and improve the user experience has become a technical problem that urgently needs to be solved for achieving quasi-real-time translation in a multi-lateral conference scenario. Summary of the Invention
[0007] A translation task scheduling method and a scheduling system proposed by the present invention are proposed to solve the above technical problems.
[0008] Specifically, in the first stage of the present invention, a translation task scheduling method is proposed, which is characterized in that the method includes the following steps:
[0009] S1: A translation source device generates a translation task, where the translation task includes the source language corpus to be translated and a translation identifier, and the translation identifier is determined based on the first device identifier of the translation source device and the generation time of the translation task;
[0010] S2: receiving the translation tasks, grouping the translation tasks according to the translation identifiers, and storing the groups into a plurality of grouping queues;
[0011] S3: Acquire state parameters of multiple translation end devices, wherein the state parameters include a second device identifier of each translation end device and schedulable resources, wherein the schedulable resources include the number of idle containers of each translation end device and the physical resources available for each idle container;
[0012] S4: based on the state parameters of each translation end device, determining a target translation end device and a target idle container for each dequeued translation task in each packet queue;
[0013] The second device identifier of the target translation end device corresponds to the first device identifier of the translation source device that generates the dequeued translation task;
[0014] The first device identifiers of the translation source devices corresponding to all the translation tasks in each group queue are different, and the difference of the generation time of the translation tasks included in the translation identifiers of all the translation tasks in each group queue is less than a preset value.
[0015] In specific implementation, the method is executed by a central server, which communicates with multiple translation end devices and multiple translation source devices, receives multiple translation tasks generated by multiple translation source devices, and groups the multiple translation tasks according to the translation identifiers.
[0016] As a specific hardware device for implementation, the translation end device and the translation source device are both dual-mode Bluetooth terminals, and the first device identifier of the translation source device and the second device identifier of the target translation end device include Bluetooth identification identifiers.
[0017] The first device identifier of the translation source device includes a system language identifier;
[0018] The translation end device determines a translation target based on a system language identifier included in the received translation task.
[0019] Each translation end device is configured with multiple containers, each container runs a translation target model, and different containers share the physical resources of the translation end device in time-sharing or in parallel and real-time groups.
[0020] As a further improvement, before step S1, the method further includes:
[0021] A dual-mode Bluetooth pairing relationship is pre-established between the plurality of translation end devices and the plurality of translation source devices.
[0022] In the second stage of the present invention, in order to implement the translation task scheduling method described in the first stage, the present invention proposes a translation task scheduling system, the scheduling system comprising a plurality of translation end devices, a plurality of translation source devices and a central server, the central server communicating with the plurality of translation end devices and the plurality of translation source devices;
[0023] The translation source device is used to generate a translation task, wherein the translation task includes a corpus to be translated and a translation identifier, wherein the translation identifier is determined based on a first device identifier of the translation source device and a generation time of the translation task;
[0024] The central server receives the translation tasks, groups the translation tasks according to the translation identifiers, and stores the groups into a plurality of grouping queues;
[0025] The first device identifiers of the translation source devices corresponding to all translation tasks in each group queue are different, and the difference in generation time of the translation tasks included in the translation identifiers of all translation tasks in each group queue is less than a preset value;
[0026] The central server obtains state parameters of multiple translation end devices, wherein the state parameters include a second device identifier of each translation end device and schedulable resources, wherein the schedulable resources include the number of idle containers of each translation end device and the physical resources available for each idle container;
[0027] The central server determines a target translation end device and a target idle container for each dequeued translation task in each packet queue based on the state parameters of each translation end device.
[0028] The translation end device and the translation source device are both dual-mode Bluetooth terminals, and the first device identifier of the translation source device and the second device identifier of the target translation end device include Bluetooth identification identifiers;
[0029] The scheduling system also includes a pairing subsystem for pre-establishing a dual-mode Bluetooth pairing relationship between a plurality of the translation end devices and a plurality of the translation source devices.
[0030] Each translation end device is configured with multiple containers, each container runs a translation target model, and different containers share the physical resources of the translation end device in time-sharing or in parallel and real-time groups.
[0031] The first device identifier of the translation source device includes a system language identifier;
[0032] The translation end device determines a translation target based on a system language identifier included in the received translation task, and schedules the translation task to a target container based on the translation target.
[0033] In the technical solution of the present invention, after obtaining a plurality of translation tasks to be translated, the plurality of translation tasks are first grouped based on translation identifiers and then stored in a plurality of grouped queues; the first device identifiers of the corresponding translation source devices of all the translation tasks in each grouped queue are different, and the difference in the generation times of the translation tasks included in the translation identifiers of all the translation tasks in each grouped queue is less than a preset value, so that when scheduling subsequently, the target translation terminal device and the target idle container determined for each dequeued translation task in each grouped queue can be adaptively matched with the state parameters of the terminal, reducing task waiting or delay.
[0034] More embodiments and improvement effects of the present invention will be further introduced in combination with the drawings and specific embodiments. Brief Description of the Drawings
[0035] Figure 1 is a schematic diagram of the steps of a translation task scheduling method according to an embodiment of the present invention;
[0036] Figure 2 is to execute Figure 1 a schematic diagram of the hardware architecture of the described translation task scheduling method;
[0037] Figure 3 is a schematic diagram of a preferred embodiment of a translation task scheduling method according to an embodiment of the present invention;
[0038] Figure 4 is a schematic diagram of the principle architecture of a translation task scheduling system according to an embodiment of the present invention;
[0039] Figure 5 is a schematic diagram of the working principle of the central server of a translation task scheduling system according to an embodiment of the present invention. Detailed Description of the Embodiments
[0040] In order to enable those skilled in the art to better understand the solution of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without making creative efforts shall fall within the protection scope of the present application.
[0041] The terms "first", "second", "third", "fourth", etc. (if any) in the description, claims and the above-mentioned drawings of this application are used to distinguish similar objects, and do not necessarily describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of this application described here can be implemented in an order other than those illustrated or described here.
[0042] First, refer to Figure 1 . Figure 1 FIG. is a schematic diagram of the steps of a translation task scheduling method according to an embodiment of the present invention. In Figure 1 , the method includes steps S1-S4, and the specific implementation of each step is as follows:
[0043] S1: A translation source device generates a translation task;
[0044] S2: After grouping the translation tasks, store them in multiple grouped queues;
[0045] S3: Obtain the status parameters of multiple translation terminal devices;
[0046] S4: Determine the target translation terminal device and the target idle container.
[0047] The translation task scheduling method described in the present invention can be used in a multilateral conference scenario. For the convenience of description, assume that the multilateral conference scenario includes N translation source devices, M translation terminal devices, and at least one central server; both M and N are integers greater than 1, such as Figure 2 shown.
[0048] As a specific example, when the present invention is used for real-time or near-real-time speech translation, each translation source device can be a voice input device, such as a terminal device with a microphone, for the speaker to input the speech to be translated in the source language;
[0049] As another example of a sentence, the present invention can also be used for real-time or near-real-time text translation. At this time, each translation source device can be a text input device, such as a terminal device with text scanning, for the speaker to input the text material to be translated in the source language;
[0050] At this time, when the step S1 is specifically executed, N translation tasks are generated by the N translation source devices;
[0051] Different from the prior art which simply generates translation tasks, in the embodiments of the present invention, each generated translation task includes the corpus to be translated and a translation identifier, and the translation identifier is determined based on the first device identifier of the translation source device and the generation time of the translation task;
[0052] As a specific example, assume that the material to be translated is a voice sequence XXX or a text sequence YYY, then the translation task can be expressed as:
[0053] "First device identifier + generation time + XXX" or "First device identifier + generation time + YYY";
[0054] Preferably, in the generated translation task, the first device identifier and the generation time of the translation task are at the beginning of the text sequence or the voice sequence, so that when the translation end device reads later, it can first determine the first device identifier of the translation task.
[0055] Specifically, the first device identifier of the translation source device includes a system language identifier; the translation end device determines the translation target based on the system language identifier included in the received translation task.
[0056] It can be understood that the system language identifier is used to mark the system language type of the translation source device.
[0057] It can be understood that in each embodiment of the present invention, when the speaker uses the translation source device to generate a translation task, the translation source device is usually set to the native language system of the speaker itself, and the speaker enters the voice sequence or text sequence in the native language. Therefore, at this time, the system language type of the translation source device is the language type of the material to be translated.
[0058] Since the identifier of the system language type (system language identifier) included in the first device identifier is at the beginning of the text sequence or the voice sequence, the translation end device can determine the translation target based on the system language identifier included in the received translation task, that is, what source language type is to be translated next.
[0059] Specifically, each translation end device is configured with multiple containers, and each container runs a translation target model.
[0060] For example, assume that the translation end device A is configured with containers A1 and A2, where the translation target model running in container A1 can complete the translation from language a11 to other languages, and the translation target model running in container A2 can complete the translation from language a22 to other languages.
[0061] After the translation end device determines the translation target based on the system language identifier included in the received translation task, it can select the currently available container to perform the corresponding translation.
[0062] The next problem to be faced is that when multiple translation source devices generate multiple translation tasks simultaneously, how to allocate these multiple translation tasks to the corresponding translation end devices and the containers of each translation end device without causing delay or waiting.
[0063] To this end, refer to Figure 3 the embodiments of
[0064] In Figure 3 the embodiments of, the translation terminal device and the translation source device are both dual-mode Bluetooth terminals, and the first device identifier of the translation source device and the second device identifier of the target translation terminal device include Bluetooth identification identifiers.
[0065] In one example, the method can be executed by the translation source device without the central server. At this time, each translation source device itself can complete the function of the central server, and each translation terminal device communicates with the translation source device through Bluetooth communication to generate and send tasks.
[0066] To save the time for each translation terminal device to establish Bluetooth communication with the translation source device and avoid the Bluetooth search-Bluetooth connection and other processes required for each Bluetooth communication in the prior art, in this embodiment, before the step S1, the method further includes: pre-establishing a dual-mode Bluetooth pairing relationship between multiple translation terminal devices and multiple translation source devices, so that each translation terminal device can quickly match and communicate with the translation source device.
[0067] Next, specifically introduce the process of how to select the target translation terminal device and how to determine the target container for multiple translation tasks.
[0068] As a specific example, each translation terminal device has multiple containers, and each container runs a virtual machine.
[0069] Therefore, it can be understood that each translation terminal device includes multiple virtual machines (VMs), and each virtual machine can schedule the existing physical resources of the corresponding translation terminal device according to a predetermined rule, such as the number of GPU cores, the number of CPU cores, video memory resources, memory resources, and network resources.
[0070] The predetermined rule includes: different containers share the physical resources of the translation terminal device in a time-sharing manner or share the physical resources of the translation terminal device in parallel in real-time groups.
[0071] For example, a certain translation terminal device includes three virtual machines Vm1, Vm2, and Vm3, and this translation terminal device includes 4 GPU cores, 6 CPUs, and 1000M (megabytes) of video memory resources.
[0072] Examples of different containers sharing the physical resources of the translation terminal device in parallel in real-time groups include:
[0073] Vm1 can schedule 2 GPU cores to implement 2 GPU processes, schedule 2 CPUs to implement 2 CPU processes, and can obtain video memory resources not exceeding 300M; Vm2 can schedule 1 GPU core to implement 1 GPU process, schedule 2 CPUs to implement 2 CPU processes, and can obtain video memory resources not exceeding 200M; Vm3 can schedule 1 GPU core to implement 1 GPU process, schedule 2 CPUs to implement 2 CPU processes, and can obtain video memory resources not exceeding 500M.
[0074] Examples of different containers sharing the physical resources of the translation end device in time-sharing include: in the first period, Vm1 can schedule 6 GPU cores to implement 6 GPU processes, schedule 2 CPUs to implement 2 CPU processes, and obtain video memory resources not exceeding 300M;
[0075] At this time, Vm2 and Vm3 cannot schedule GPU cores, and therefore cannot start GPU processes; however, they can start GPU processes and obtain video memory resources.
[0076] After the first period ends, Vm1 releases resources, and Vm2 and Vm3 can schedule GPU cores and start GPU processes.
[0077] It can be seen that the real-time available resource status of different translation-end devices and the real-time available resource status of each container of each translation-end device are constantly changing. Therefore, the task needs to be matched to an available node in real time to run without waiting or delay.
[0078] At the same time, the properties of each translation task itself are different.
[0079] As an example, in multimodal translation, the translation task also has different multimodal translation requirements, such as image translation requirements, that is, translating the corpus to be translated into a graphic and text format. At this time, the task to be translated needs to schedule the GPU process, so it must be allocated to the translation end device or target container that can currently call GPU resources.
[0080] In addition, frequent switching of calling processes must be avoided, such as frequent switching from GPU processes to CPU processes. In addition to causing delays, each process switch also causes frequent system overhead.
[0081] To this end, Figure 3 In the embodiment, after receiving the translation task, the translation task needs to be grouped according to the translation identifier and stored in a plurality of grouping queues;
[0082] Specifically, the first device identifiers of the translation source devices corresponding to all translation tasks in each grouping queue are different, and the difference in the generation times of the translation tasks included in the translation identifiers of all translation tasks in each grouping queue is less than a preset value.
[0083] Then, obtain the status parameters of multiple translation terminal devices. The status parameters include the second device identifier of each translation terminal device and the schedulable resources. The schedulable resources include the number of idle containers of each translation terminal device and the physical resources available for each idle container.
[0084] At this time, based on the status parameters of each translation terminal device, a target translation terminal device and a target idle container can be determined for each dequeued translation task in each grouping queue.
[0085] Since the first device identifiers of the translation source devices corresponding to all translation tasks in each grouping queue are different, and the first device identifier represents different source languages, different translation modality requirements, etc., therefore, the source languages and translation modality requirements of each dequeued translation task in each grouping queue are different. Multiple dequeued translation tasks can be allocated to different idle and available target containers in parallel, so that each idle and available target container can continue the existing resource process and avoid frequent process switching.
[0086] At the same time, the difference in the generation times of the translation tasks included in the translation identifiers of all translation tasks in each grouping queue is less than a preset value, which can ensure that the translation tasks in the same queue are almost generated in the same time period. When processed in parallel, they can be dequeued in sequence and allocated to different translation terminal devices or containers, so that the translation tasks generated first are processed first, avoiding the phenomenon of out-of-sync translation results.
[0087] The above method can be automatically implemented by a virtualization device or a physical machine device in the form of computer program instructions. The partial pseudo-code algorithm for implementing the computer program is described as follows:
[0088] N translation tasks to be translated: Task 1 , Task 2 , … Task N ;
[0089] Among them, each translation task to be translated Task i , i = 1, 2, … N is expressed as follows:
[0090] Task i = {iID, iTime, iSequence}, where iID is the identifier for generating the translation task to be translated Task iThe first device identifier of the translation source device, iTime is the translation task Task to be translated i The generation time; iSequence is the speech sequence or text sequence to be translated;
[0091] The N translation tasks to be translated are divided into K groups, and the translation tasks in each group are put into a grouping queue waiting for allocation;
[0092] Suppose the k-th group Group k (k = 1, 2, … K) contains m translation tasks to be translated:
[0093] For
[0094] Then pID and qID are different, and |pTime - qTime| ≤ GksetTime; GksetTime is the preset value of the generation time difference of the grouping Group k The preset value of the generation time difference.
[0095] That is, the first device identifiers of the translation source devices corresponding to all the translation tasks in each grouping queue are different, and the difference in the generation times of the translation tasks included in the translation identifiers of all the translation tasks in each grouping queue is less than the preset value.
[0096] Preferably, the preset values of the generation time differences of each group are different.
[0097] Specifically, the reference value SetTime of the preset value of the generation time difference can be set;
[0098] Then the preset value GksetTime of the generation time difference of the grouping Group k satisfies the following conditions:
[0099]
[0100] Among them, |Group k | represents the number of translation tasks included in the grouping Group k (in the above embodiment, it is m).
[0101] Among them, iMode is equal to the number of translation tasks that need to call the GPU process included in the grouping Group k In the specific execution, the initial preset value of the generation time difference of each grouping Group
[0102] is the reference value SetTime. First, the initial elements of the grouping Group k are determined with the reference value SetTime, and then, the grouping Group k is calculated kWhether the preset value GksetTime of the generation time difference conforms to the above formula. If not, adjust the grouping Group k The number of elements (add or delete elements) until the grouping Group k The preset value GksetTime of the generation time difference conforms to the above formula.
[0103] M translation terminal devices: Memo 1 ,Memo 2 ,…Memo M ;
[0104] Then the translation terminal device Memo l , l = 1, 2, … M, the schedulable resources are expressed as:
[0105] Memo l ={lNumdocker,{NumGPU 1 ,NumCPU 1 ,…}, {NumGPU 2 ,NumCPU 2 ,…}, …, {NumGPU l ,NumCPU l ,…}}
[0106] The above indicates that the translation terminal device Memo l Is configured with l containers. The number of GPU cores that the first container can call is NumGPU 1 And the number of CPU cores that can be called is NumCPU 1 . The ellipsis indicates that there are other schedulable resources; the number of GPU cores that the l-th container can call is NumGPU 1 And the number of CPU cores that can be called is NumCPU 1 . The ellipsis indicates that there are other schedulable resources.
[0107] Assume that the translation task Task i The required GPU and CPU processes are NumGPU i 、NumCPU i ;
[0108] Then if the virtual machine where the container is located can provide no less than NumGPU i Of GPU cores and NumCPU i Of CPU cores, then the translation terminal device where the virtual machine is located can be used as the target translation terminal device that matches the translation source device of the generation translation task Task i .
[0109] At this time, set the second device identifier of the target translation terminal device to correspond to the first device identifier of the translation source device that generates the dequeued translation task, so as to facilitate quick matching.
[0110] It can be understood that the translation tasks that need to call the GPU process can be implemented through keyword recognition. For example, pre-establish the keywords to be translated that may require picture display. When such a keyword sequence to be translated is recognized, it means that the sequence to be translated needs to call the GPU process.
[0111] Of course, other forms can also be adopted. Recognition is not the focus of the present invention, and the present invention does not specifically expand on this.
[0112] Based on Figures 1 - 3 , Figures 4 - 5 A specific embodiment of a translation task scheduling system for implementing the described translation task scheduling method is given.
[0113] It can be understood that Figures 4 - 5 All or part of the module units of the embodiment of a translation task scheduling system shown can implement Figures 1 - 3 All or part of the steps of the method.
[0114] Specifically, Figure 4 A translation task scheduling system is shown. The scheduling system includes a plurality of translation terminal devices and a plurality of translation source devices.
[0115] The scheduling system further includes a central server, and the central server communicates with the plurality of translation terminal devices and the plurality of translation source devices;
[0116] The translation source device is used to generate translation tasks. The translation tasks include the corpus to be translated and a translation identifier, and the translation identifier is determined based on the first device identifier of the translation source device and the generation time of the translation task;
[0117] The central server receives the translation tasks, and after grouping the translation tasks according to the translation identifier, stores them in a plurality of grouped queues;
[0118] Among them, the first device identifiers of the corresponding translation source devices of all translation tasks in each grouped queue are different, and the difference in the generation time of the translation tasks included in the translation identifiers of all translation tasks in each grouped queue is less than a preset value;
[0119] The preset value of the generation time difference is determined based on a preset generation time difference reference value SetTime, the number of translation tasks included in each grouped queue, the number of translation tasks that need to call the GPU process included in each grouped queue, and the difference in the generation time of all different tasks in each grouped queue.
[0120] Preferably, group k The preset value of the generated time difference GksetTime satisfies the following conditions:
[0121]
[0122] Among them, |Group k |Indicates grouping Group k The number of translation tasks included; iMode is equal to Group k The number of translation tasks that need to call the GPU process contained in Task p 、Task q Group k Any two translation tasks included, pTime and qTime are Task p 、Task q The corresponding generation time.
[0123] The translation end device and the translation source device are both dual-mode Bluetooth terminals, and the first device identifier of the translation source device and the second device identifier of the target translation end device include Bluetooth identification identifiers;
[0124] The scheduling system also includes a pairing subsystem for pre-establishing a dual-mode Bluetooth pairing relationship between a plurality of the translation end devices and a plurality of the translation source devices.
[0125] See also Figure 5 , the central server obtains state parameters of multiple translation end devices, the state parameters include a second device identifier of each translation end device and schedulable resources, the schedulable resources include the number of idle containers of each translation end device and the physical resources available for each idle container;
[0126] Each translation end device is configured with multiple containers, each container runs a translation target model, and different containers share the physical resources of the translation end device in time-sharing or in parallel and real-time groups.
[0127] Figure 5 In the process, the central server obtains the status parameters of the translation end device 1 and the translation end device 2, including the container A, container B and the schedulable physical resources running on the translation end device 1, and the container C, container D and the schedulable physical resources running on the translation end device 2.
[0128] The central server determines a target translation end device and a target idle container for each dequeued translation task in each packet queue based on the state parameters of each translation end device.
[0129] The first device identifier of the translation source device includes a system language identifier;
[0130] The translation target device determines a translation target based on the system language identifier included in the received translation task, and schedules the translation task to a target container based on the translation target.
[0131] It can be seen that, compared with the prior art, the present invention has at least the following improvement effects:
[0132] (1) When generating a translation task, add the first device identifier of the translation source device that generates the translation task and the generation time of the translation task for subsequent grouping and target device matching, so that the scheduling process can conform to the actual attributes of the task;
[0133] (2) When there are multiple translation tasks to be processed, first group the translation tasks according to the translation identifier and store them in multiple grouped queues. Moreover, the first device identifiers of the translation source devices corresponding to all the translation tasks in each grouped queue are different, and the difference in the generation time of the translation tasks included in the translation identifiers of all the translation tasks in each grouped queue is less than a preset value; at the same time, the preset values of different grouped queues are different, which can better achieve targeted scheduling for grouping;
[0134] (3) Since the first device identifiers of the translation source devices corresponding to all the translation tasks in each grouped queue are different, and the first device identifier represents different source languages, different translation modality requirements, etc., therefore, the source languages and translation modality requirements of each dequeued translation task in each grouped queue are different, and multiple dequeued translation tasks can be allocated to different idle and available target containers in parallel. In this way, each idle and available target container can continue the existing resource process, avoiding frequent process switching.
[0135] (4) The difference in the generation time of the translation tasks included in the translation identifiers of all the translation tasks in each grouped queue is less than a preset value, which can ensure that the translation tasks in the same queue are almost generated in the same time period. When processed in parallel, they can be dequeued in sequence and allocated to different translation target devices or containers, so that the translation tasks generated first are processed first, avoiding the phenomenon of asynchronous translation results.
[0136] Of course, it can be understood that each embodiment of the present invention can achieve one of the effects alone, and multiple embodiments of the present invention in combination can achieve all of the above effects. However, it is not required that each embodiment of the present invention achieve all of the above advantages and effects, because each embodiment of the present invention can constitute an independent technical solution and make one or more contributions to the prior art.
[0137] For the partial module structures not specifically defined in the present invention, the content recorded in the prior art shall prevail. The prior art mentioned in the foregoing background art section and specific embodiment section of the present invention can be regarded as a part of the present invention for understanding the meaning of some technical features or parameters. The protection scope of the present invention shall be subject to the content actually recorded in the claims.
Claims
1. A translation task scheduling method, It is characterized in that The method comprises the following steps: S1: A translation source device generates a translation task, wherein the translation task includes a corpus to be translated and a translation identifier, wherein the translation identifier is determined based on a first device identifier of the translation source device and a generation time of the translation task; S2: receiving the translation tasks, grouping the translation tasks according to the translation identifiers, and storing the groups into a plurality of grouping queues; S3: Acquire state parameters of multiple translation end devices, wherein the state parameters include a second device identifier of each translation end device and schedulable resources, wherein the schedulable resources include the number of idle containers of each translation end device and the physical resources available for each idle container; S4: based on the state parameters of each translation end device, determining a target translation end device and a target idle container for each dequeued translation task in each packet queue; The second device identifier of the target translation end device corresponds to the first device identifier of the translation source device that generates the dequeued translation task; The first device identifiers of the translation source devices corresponding to all the translation tasks in each group queue are different, and the difference of the generation time of the translation tasks included in the translation identifiers of all the translation tasks in each group queue is less than a preset value.
2. A translation task scheduling method as claimed in claim 1, Features: The translation end device and the translation source device are both dual-mode Bluetooth terminals, and the first device identifier of the translation source device and the second device identifier of the target translation end device include Bluetooth identification identifiers.
3. A translation task scheduling method as claimed in claim 1, Features: The method is executed by a central server, which communicates with a plurality of the translation end devices and a plurality of the translation source devices, and is used to receive a plurality of translation tasks generated by a plurality of the translation source devices, and group the plurality of translation tasks according to the translation identifiers.
4. A translation task scheduling method as claimed in claim 1, Features: The first device identifier of the translation source device includes a system language identifier; The translation end device determines a translation target based on a system language identifier included in the received translation task.
5. A translation task scheduling method as claimed in claim 2, It is characterized in that Before step S1, the method further includes: A dual-mode Bluetooth pairing relationship is pre-established between the plurality of translation end devices and the plurality of translation source devices.
6. A translation task scheduling method as claimed in claim 1, It is characterized in that Each translation end device is configured with multiple containers, each container runs a translation target model, and different containers share the physical resources of the translation end device in time-sharing or in parallel and real-time groups.
7. A translation task scheduling system, the scheduling system comprising a plurality of translation end devices and a plurality of translation source devices, Features: The scheduling system further includes a central server, which communicates with the multiple translation end devices and multiple translation source devices; The translation source device is used to generate a translation task, wherein the translation task includes a corpus to be translated and a translation identifier, wherein the translation identifier is determined based on a first device identifier of the translation source device and a generation time of the translation task; The central server receives the translation tasks, groups the translation tasks according to the translation identifiers, and stores the groups into a plurality of grouping queues; The first device identifiers of the translation source devices corresponding to all translation tasks in each group queue are different, and the difference in generation time of the translation tasks included in the translation identifiers of all translation tasks in each group queue is less than a preset value; The central server obtains state parameters of multiple translation end devices, wherein the state parameters include a second device identifier of each translation end device and schedulable resources, wherein the schedulable resources include the number of idle containers of each translation end device and the physical resources available for each idle container; The central server determines a target translation end device and a target idle container for each dequeued translation task in each packet queue based on the state parameters of each translation end device.
8. A translation task scheduling system as claimed in claim 7, It is characterized in that The translation end device and the translation source device are both dual-mode Bluetooth terminals, and the first device identifier of the translation source device and the second device identifier of the target translation end device include Bluetooth identification identifiers; The scheduling system also includes a pairing subsystem for pre-establishing a dual-mode Bluetooth pairing relationship between a plurality of the translation end devices and a plurality of the translation source devices.
9. A translation task scheduling system as claimed in claim 7, It is characterized in that Each translation end device is configured with multiple containers, each container runs a translation target model, and different containers share the physical resources of the translation end device in time-sharing or in parallel and real-time groups.
10. A translation task scheduling system as claimed in claim 9, It is characterized in that The first device identifier of the translation source device includes a system language identifier; The translation end device determines a translation target based on a system language identifier included in the received translation task, and schedules the translation task to a target container based on the translation target.
Citation Information
Patent Citations
Large-scale translation corpus task processing system in multi-source input mode
CN111753559A
Multi-task translation system based on artificial intelligence
CN114330379A