Document translation method and device based on interrupt efficiency value and medium

Through the calculation of interrupt operation and interrupt efficiency values, the appropriate translation method is selected to process multi-format documents, which solves the pause and resource consumption problems during multi-format documents translation in the prior art, and improves user experience and system performance.

CN118886431APending Publication Date: 2024-11-01IOL WUHAN INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410919994.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-10
Publication Date
2024-11-01

AI Technical Summary

Technical Problem

When processing multi-format document translation, the prior art cannot effectively reflect the existence of embedded format files such as video, images, and audio. Frequent jumps to obtain files lead to a pause in the translation process, consumes system resources, and reduces user experience.

Method used

By introducing interrupt operations and calculation of interrupt efficiency values, pre-execute translation tasks to determine whether interrupt operations are supported, select a hold-on or interrupted translation method, and use different translation engines to process the translation domain that supports interrupts to avoid frequent process switching and reduce system resources Occupancy.

Benefits of technology

It realizes rapid adaptive automation selection for multi-format document translation, avoids system lag, improves user experience, and reduces system resource consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118886431A_ABST
    Figure CN118886431A_ABST
Patent Text Reader

Abstract

The invention provides a document translation method and device based on an interruption efficiency value and a medium, and belongs to the technical field of computer-aided translation. The method comprises the following steps: in response to the ending of a current translation task for a document, pre-executing a next translation task; according to a pre-execution result, judging whether the next translation task supports interruption operation or not; if the next translation task supports the interruption operation, calculating an interruption efficiency value corresponding to the next translation task; based on the interruption efficiency value, the translation mode of the next translation task is selected, and the translation mode of the next task is maintenance type translation or interruption type translation. The device provides a to-be-translated document input interface and at least two translation engines for implementing the method. According to the technical scheme, interrupt processing is introduced in the computer-aided translation process, and system resources are saved while the quickness of the translation process is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of computer-aided translation, and in particular relates to a document translation method, device and medium based on interruption efficiency value. Background Art

[0002] Computer-assisted translation technology has been widely used in the fields of text, voice and audio, video (voice + subtitles), image (image description text), table data, etc. The translation process for a single object to be translated (such as a text object) is already very efficient and accurate. For example, computer translation technology can quickly achieve the translation output of a text document.

[0003] With the development of multimedia technology and the popularization of multimedia terminals, objects with a single format cannot reflect the personalized needs of users, and the amount of information they convey is also relatively small. Therefore, terminals usually support documents in multiple formats, such as embedding video, image, audio and other format files in the original text document, embedding pictures, audio and other format files in the original spreadsheet document, etc. These embedded formats are usually reflected in the document through some form of link domain, for example, a hyperlink address (URL address) is embedded in a paragraph of text in a text document, and by clicking on the hyperlink address, the video or audio resources provided by the corresponding web page can be accessed through the network; or, a file address (file address, which can be an IP address or a local area network host number, etc.) is embedded in a table item in a spreadsheet document, and by clicking on the file address, it is directly jumped to the file address, thereby obtaining the file itself.

[0004] When translating such multi-format documents, traditional translation technology begins to be stretched because such objects to be translated integrate multiple different categories of objects. Directly referring to the original text for translation will not reflect the existence of these embedded video, image, audio and other format files, and will not be able to output the translation results. If you jump to obtain the files one by one for each link domain and then translate them, the current translation process will be significantly paused. Frequent jumps will also consume more system resources and may cause system crashes, greatly reducing the user experience. Summary of the invention

[0005] In order to solve the above technical problems, the present invention proposes a document translation method, device and medium based on interruption efficiency value.

[0006] In a first aspect of the present invention, a document translation method based on an interruption efficiency value is proposed. The translation method is applied to an operating system supporting interruptions. The method comprises the following steps:

[0007] In response to the completion of the current translation task for the document, pre-execute the next translation task; and determine whether the next translation task supports an interrupt operation according to the result of the pre-execution;

[0008] If the next translation task supports interruption operation, then the interruption efficiency value corresponding to the next translation task is calculated;

[0009] Based on the interruption efficiency value, selecting a translation mode for the next translation task, wherein the translation mode for the next task is a hold translation or an interruption translation;

[0010] The hold translation is to use the translation engine corresponding to the current translation task to continue translating the next translation task;

[0011] The interruption-type translation is to introduce an interruption operation and use a second translation engine to translate the translation domain supporting the interruption operation in the next translation task.

[0012] In a second aspect of the present invention, a document translation device based on an interruption efficiency value is provided. The document translation device provides an input interface for a document to be translated and at least two translation engines.

[0013] The document translation device also includes:

[0014] The document decomposition unit is used to decompose the input document into multiple units, each of which corresponds to a translation task.

[0015] A pre-execution unit, in response to the completion of the current translation task by the current translation engine, pre-executes the next translation task;

[0016] An interruption determination unit, used for determining whether the next translation task supports an interruption operation based on the result of the pre-execution;

[0017] An interruption efficiency value calculation unit, used to calculate the interruption efficiency value corresponding to the next translation task when the interruption judgment unit judges that the next translation task supports the interruption operation;

[0018] A translation mode selection unit, based on the interruption efficiency value, selects a translation mode for the next translation task, wherein the translation mode for the next translation task is a hold translation or an interruption translation;

[0019] The hold translation is to continue translating the next translation task using the current translation engine;

[0020] The interruptive translation specifically includes:

[0021] dividing the next translation task into a first translation domain supporting interruption operation and a second translation domain not supporting interruption operation;

[0022] For the first translation domain, introducing an interrupt operation to use a second translation engine different from the current translation engine to perform translation;

[0023] For the second translation domain, the current translation engine is used to perform translation.

[0024] The document translation method based on interruption efficiency value described in the first aspect can be automatically implemented through various forms of electronic devices through computer program instructions; the computer program instructions can be stored in storage media of different forms and loaded into computer electronic devices for execution.

[0025] Therefore, in the third aspect of the present invention, a computer-readable storage medium is also provided for storing computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes a document translation method based on interruption efficiency value as described in the first aspect.

[0026] In a fourth aspect of the present invention, an electronic device is also proposed, comprising a processor and a memory, wherein the memory is used to store instructions, and the processor is used to call the instructions in the memory so that the electronic device executes a document translation method based on an interruption efficiency value.

[0027] The technical solution of the present invention introduces an interrupt operation and calculation of an interrupt efficiency value, and uses a pre-execution method to judge whether the next translation task supports the interrupt operation; if the next translation task supports the interrupt operation, the interrupt efficiency value corresponding to the next translation task is calculated; based on the interrupt efficiency value, the translation method of the next translation task is selected, and the translation method of the next task is a hold translation or an interrupt translation; the hold translation is to use the translation engine corresponding to the current translation task to continue to translate the next translation task; the interrupt translation is to introduce an interrupt operation and use a second translation engine to translate the translation domain supporting the interrupt operation in the next translation task, thereby realizing rapid adaptive automatic selection of the translation method when the object to be translated merges multiple objects of different categories, avoiding frequent process switching, effectively reducing system resource occupation, avoiding system freezes, and improving user experience.

[0028] Further advantages of the present invention will be further reflected in detail in the specific embodiments section in conjunction with the drawings of the specification. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0030] Figure 1 This is a main flow chart of a document translation method based on interruption efficiency value according to an embodiment of the present invention.

[0031] Figure 2 yes Figure 1 Schematic diagram of calculation for determining whether interruption is supported in the method embodiment

[0032] Figure 3 Schematic diagram of an application scenario for implementing the document translation method based on interruption efficiency value of the present invention

[0033] Figure 4 This is a functional framework diagram of a document translation device based on interruption efficiency value according to an embodiment of the present invention. DETAILED DESCRIPTION

[0034] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.

[0035] The application scenarios of the embodiments of the present disclosure are explained below.

[0036] In the prior art, the translation process for a single object to be translated (eg, a text object) is already very efficient and accurate. For example, computer translation technology can quickly output the translation of a text document.

[0037] For example, the text paragraph to be translated is as follows:

[0038] "Transn was founded in March 2005. With the mission of "making human communication without language barriers", it insists on independent research and development and has become the world's leading new language information service company. Transn uses artificial intelligence, big data, the Internet and other cutting-edge technologies, supported by strong technological innovation, aggregates global language production capacity, realizes efficient organization and dispatch of language capabilities, and provides scenario-based multilingual information services for enterprises and users."

[0039] Translating it into English, an online translation engine can quickly output the following results:

[0040] "Founded in March 2005, Transn has become the world's leading new language information service company with the mission of "making human communication without language barriers" and insisting on independent research and development. Transn comprehensively uses cutting-edge technologies such as artificial intelligence, big data, and the Internet, supported by strong scientific and technological innovation, aggregates global language production capacity, realizes efficient organization and scheduling of language capabilities, and provides scenario-based multilingual information services for enterprises and users".

[0041] Because the above-mentioned objects to be translated only include one kind of plain text object, the translation process is very fast and the original text semantics is maintained.

[0042] However, if the object to be translated contains other non-text content in a variety of different formats / types, the output results of the above translation tools will not meet user expectations.

[0043] For example, the object to be translated is:

[0044] "Transn has created a new language capacity, the "third capacity", of "human-machine co-translation"— Twinslator ”;

[0045] Among them, it contains a translation domain content with special meaning. Twinslator ", the object to be translated is for the translation domain content to be translated" Twinslator" provides a link domain identifier (such as a hyperlink underline). For the original object to be translated, the user can directly jump to the corresponding web page link description content (i.e. the resource file corresponding to the link domain identifier) ​​by clicking the link domain identifier (such as a hyperlink underline). For example, the web page after jumping contains the following content:

[0046] "Twinslator" is the abbreviation of "Twins Translator", which means "twin translator" in Chinese. At the first Transns Conference in 2018, He Enpei, president of Transns Language Network Technology Co., Ltd., first proposed that the best model for human-machine co-translation is to let AI grow together with the translator, acquire the same cultural background as the translator, and become the twin translator "Twinslator" of the human translator.

[0047] However, existing machine engines generally only directly output the following:

[0048] Transn has pioneered the "third capacity" of "human-machine co-translation", a new language production capacity-Twinslator.

[0049] Obviously, the output result has completely lost the correct understanding of "Twinslator". At the same time, the translation result cannot reflect the correct meaning of Twinslator interface, resulting in the output result not meeting user expectations. That is, directly translating with reference to the original text will not reflect the existence of these jump web pages and other format files.

[0050] On the other hand, if you jump to obtain the file for each link domain one by one and then translate it, the current translation process will be significantly paused. Frequent jumps will also consume more system resources and may cause the system to crash, greatly reducing the user experience.

[0051] To this end, the following embodiments of the present application are proposed.

[0052] Figure 1 The present invention is a flow chart of the main body of a document translation method based on interruption efficiency value according to an embodiment of the present invention.

[0053] exist Figure 1 In the method, the method comprises the following steps ( Figure 1 Step numbers S1, S2, ... are omitted):

[0054] S1: in response to the completion of the current translation task for the document, pre-execute the next translation task;

[0055] S2: judging whether the next translation task supports interrupt operation according to the result of the pre-execution;

[0056] S3: If the next translation task supports interruption operation, then calculate the interruption efficiency value corresponding to the next translation task;

[0057] S4: Based on the interruption efficiency value, selecting a translation mode for the next translation task, wherein the translation mode for the next task is a hold translation or an interruption translation.

[0058] Next, combine Figure 2 , and specifically introduces the detailed implementation method of each step.

[0059] Step S1: in response to the completion of the current translation task for the document, pre-execute the next translation task;

[0060] In a specific implementation process, the document includes multiple units to be translated.

[0061] As an example, the input document to be translated may be divided into a plurality of units to be translated in advance, and each unit to be translated corresponds to a translation task.

[0062] For example, if the document to be translated is a text document, the electronic document content to be translated is divided into a plurality of units to be translated based on separators;

[0063] A rough division method may be to divide the electronic document into multiple paragraphs based on paragraph separators, with each paragraph corresponding to a unit to be translated;

[0064] The precise division method may be to divide the electronic document into multiple sentences based on sentence delimiters, with each sentence corresponding to a unit to be translated.

[0065] For another example, if the document to be translated is a table document, each cell, each row, each column, etc. can be used as a separator to divide the table document into multiple units to be translated.

[0066] The specific division method to be adopted can be determined based on experience, input requirements of the translation engine and other factors, and the present invention does not limit this.

[0067] It is understandable that for most documents to be translated, the first sentence or the first paragraph of the content usually does not directly contain content containing a link domain, or only contains a small amount (one) of link domain content. Therefore, the traditional computer-assisted translation method can be used to perform the current translation task.

[0068] After the current translation task is completed, for the next translation task (the next unit to be translated), refer to Figure 2, that is, pre-execute the next translation task; based on the result of the pre-execution, determine whether the next translation task supports interrupt operation.

[0069] Specifically, scanning the translation domain content to be translated contained in the to-be-translated unit corresponding to the next translation task;

[0070] Determining whether the content of the to-be-translated translation domain contains a link domain;

[0071] If the content of the translation domain to be translated contains a link domain, the next translation task supports an interruption operation.

[0072] The link domain is usually identified by a link domain identifier, such as an underline; more link domain identifiers can also be subscripts, superscripts, etc., and can also be bold fonts, italics, etc.; a variety of existing technologies can be used to detect whether the content of the translation domain to be translated contains a link domain, which is not elaborated in the present invention.

[0073] In this embodiment, as a more specific improvement, the link domain is divided into a hyperlink domain and a common link domain; the hyperlink domain requires the operating system to provide network support; the common link domain does not require the operating system to provide network support.

[0074] The hyperlink domain identifier may be, for example, an identifier with a URL address, and by clicking on the URL address identifier, the corresponding resource file may be accessed through the network;

[0075] The audio domain identifier, video domain identifier, and image domain identifier are similar. By clicking the audio domain identifier, video domain identifier, and image domain identifier, when you need to access the corresponding audio, video, or image files through the network, the corresponding identifier represents the hyperlink domain; when jumping to the local storage space to access, the corresponding identifier represents the ordinary link domain.

[0076] A further improvement of the present invention is that it not only introduces interrupt operations, but also distinguishes different link domain situations, and further adopts soft interrupt and hard interrupt operations in a targeted manner to meet the use environment of the current system.

[0077] Specifically, the interrupt operation includes soft interrupt and hard interrupt;

[0078] For the first translation domain, an interrupt operation is introduced to use the second translation engine to perform translation, specifically including:

[0079] If the first translation domain includes a hyperlink domain, a soft interrupt is introduced to perform translation using a second translation engine;

[0080] If the first translation domain does not contain a hyperlink domain, a hard interrupt is introduced to use the second translation engine to perform translation.

[0081] Next, some of the principle processes involved in the above operations are introduced in detail.

[0082] In the present application, interruption refers to inserting another translation process at a certain node (in this embodiment, a node where a link domain is detected) during the execution of the current translation process.

[0083] A soft interrupt means that while another translation process is inserted, the current translation process does not stop executing or only pauses for a short first preset time period before resuming execution;

[0084] A hard interrupt means that when another translation process is inserted, the current translation process stops executing and resumes after the other translation process completes the translation; or, the current translation process resumes execution after pausing for a longer second preset time period; that is, the first preset time period is shorter than the second preset time period.

[0085] Therefore, as a more specific application embodiment, the translation method is applied to electronic devices, and in particular, may be various terminal systems / devices containing electronic documents to be translated.

[0086] The terminal device can be an independent physical server or physical machine, or a computer host running multiple virtual machines, or a server cluster or distributed system composed of multiple physical servers, where the server cluster or distributed system includes cloud servers for providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content distribution networks (CDNs), and big data and artificial intelligence platforms, without specific limitation.

[0087] It should be noted that in the specific implementation of this application, if user-related data is involved, when the embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.

[0088] As a specific example, the method execution subject is taken as an electronic device.

[0089] The electronic device supports computer-assisted translation technology, for example, it may include a variety of computer translation tools, the translation tools may be in the form of hardware (such as a translation chip processor) or software (such as a translation APP), hereinafter collectively referred to as a translation engine;

[0090] As a non-limiting example, assume that the electronic device includes an independent first translation engine and a second translation engine, the current translation process uses the first translation engine, and another translation process after the operation is interrupted uses the second translation engine.

[0091] When the next translation task supports interruption operation, frequent process switching is avoided because the content translation of different translation domains is executed through interruption operation, that is, interruption-type translation.

[0092] Of course, it is understandable that if the next translation task does not support the interruption operation, the current first translation engine can continue to be used to continue the current translation process, that is, the hold translation.

[0093] The hold translation is to use the translation engine corresponding to the current translation task to continue translating the next translation task;

[0094] The interruption-type translation is to introduce an interruption operation and use a second translation engine to translate the translation domain supporting the interruption operation in the next translation task.

[0095] Of course, as a further improvement, in order to further reduce the switching cost of the translation engine, or to avoid unnecessary calling of new translation engines by new calling system resources, the method further includes step S3:

[0096] S3: If the next translation task supports interruption operation, the interruption efficiency value corresponding to the next translation task is calculated.

[0097] The interruption efficiency value is introduced here mainly to measure whether to use the hold-mode translation or the interrupt-mode translation to achieve the lowest system resource call cost when the translation task supports interruption.

[0098] The interruption efficiency value is a comparison value of a first cost value of a system resource call using a hold-type translation and a second cost value of a system resource call using an interruption-type translation;

[0099] The first cost value and the second cost value can be obtained by simulating the execution of the hold-type translation and the interrupt-type translation, and the result can be reused in the subsequent units to be translated that contain the same link domain.

[0100] As a specific calculation method, the first cost value and the second cost value may be determined by obtaining the response time of simulating execution of the hold translation and the interrupt translation;

[0101] When the first cost value is greater than the second cost value, the interrupt translation is selected; otherwise, the maintain translation is selected.

[0102] It can be understood that the result of this measurement method can be reused in subsequent units to be translated that contain the same link domain.

[0103] As another specific calculation method, the first cost value and the second cost value may also be determined by the data volume of the current link domain, the network transmission rate, and the currently available resources of the first translation engine and the second translation engine.

[0104] Specifically, the first cost value is calculated as follows:

[0105] Simulate clicking the link domain identifier to determine the time t1 (unit: second, s) for loading the resource file corresponding to the link domain identifier and the data volume D (unit: MB, megabyte) of the resource file;

[0106] Obtain the currently available remaining memory M1 (unit: MB, megabyte) and network transmission rate V1 (unit: MB / s, megabyte / second) of the first translation engine;

[0107] The first cost value S1 is calculated according to the following formula (1):

[0108]

[0109] The second cost value is calculated as follows:

[0110] Obtaining the time t2 (unit: second, s) for calling the second translation engine, as well as the remaining memory M2 (unit: MB, megabyte) and the network transmission rate V2 (unit: MB / s, megabyte / second) currently available to the second translation engine;

[0111] Simulate clicking the link domain identifier to determine the time t0 (unit: second, s) for loading the resource file corresponding to the link domain identifier and the data volume D0 (unit: MB, megabyte) of the resource file;

[0112] The second cost value S0 is calculated according to formula (2):

[0113]

[0114] At this time, the interruption efficiency value S can be defined as S = S1 / S2;

[0115] When S1 is greater than the threshold T, the interruption translation is selected; otherwise, the maintenance translation is selected. The selection range of the threshold T is (0.85, 1).

[0116] It is understandable that this calculation method needs to be calculated every time (because even if the domain identifier is the same, the network transmission rate and the amount of resources currently available to the first translation engine and the second translation engine may change each time), but the accuracy is relatively high, and the above threshold T can be dynamically adjusted as needed.

[0117] Furthermore, the introducing of the interruption operation uses a second translation engine to translate the translation domain supporting the interruption operation in the next translation task, specifically including:

[0118] dividing the next translation task into a first translation domain supporting interruption operation and a second translation domain not supporting interruption operation;

[0119] For the first translation domain, an interrupt operation is introduced to perform translation using a second translation engine;

[0120] For the second translation domain, the translation is performed using the translation engine corresponding to the current translation task.

[0121] Figure 3 The first translation domain and the second translation domain corresponding to each translation task are schematically marked.

[0122] exist Figure 3 In the figure, the part marked by the rectangular box is the second translation domain that does not support interruption operation, which is generally plain text (text1, text2, ... textN; texta, textb, ..., textz); the part marked by the oval box is the first translation domain that supports interruption operation, which generally includes link domains, such as the hyperlink domain HTTP1 and the ordinary file link domain File1.

[0123] In the above embodiment, the translation of the first translation domain and the second translation domain are executed in parallel. Although the second translation engine is introduced, there is no need to wait for return; or, although there may be a moment of interruption and waiting in some cases, a corresponding time period is also predetermined to stop waiting and resume, that is, a soft interrupt (meaning that while inserting another translation process, the current translation process does not stop execution or only pauses for a shorter first preset time period and then resumes execution) and a hard interrupt (pauses for a longer second preset time period and then resumes execution); therefore, the translation of the first translation domain and the second translation domain can be executed in parallel.

[0124] To achieve Figure 1-Figure 3 method, Figure 4 The embodiment provides a functional framework diagram of a document translation device based on an interruption efficiency value.

[0125] exist Figure 4 The device comprises a document input interface to be translated, a document decomposition unit to be translated, a pre-execution unit, an interruption judgment unit, an interruption efficiency value calculation unit and a translation mode selection unit, wherein the translation mode selection unit is connected to a plurality of translation engines;

[0126] Figure 4 The specific functions of each functional unit are as follows:

[0127] The document decomposition unit is used to decompose the input document into multiple units, each of which corresponds to a translation task.

[0128] A pre-execution unit, in response to the completion of the current translation task by the current translation engine, pre-executes the next translation task;

[0129] An interruption determination unit, used for determining whether the next translation task supports an interruption operation based on the result of the pre-execution;

[0130] An interruption efficiency value calculation unit, used to calculate the interruption efficiency value corresponding to the next translation task when the interruption judgment unit judges that the next translation task supports the interruption operation;

[0131] A translation mode selection unit, based on the interruption efficiency value, selects a translation mode for the next translation task, wherein the translation mode for the next translation task is a hold translation or an interruption translation;

[0132] The hold translation is to continue translating the next translation task using the current translation engine;

[0133] The interruptive translation specifically includes:

[0134] dividing the next translation task into a first translation domain supporting interruption operation and a second translation domain not supporting interruption operation;

[0135] For the first translation domain, introducing an interrupt operation to use a second translation engine different from the current translation engine to perform translation;

[0136] For the second translation domain, the current translation engine is used to perform translation.

[0137] The interruption judgment unit judges whether the next translation task supports the interruption operation based on the result of the pre-execution, specifically including:

[0138] The interruption judgment unit scans the translation domain content to be translated contained in the to-be-translated unit corresponding to the next translation task;

[0139] Determining whether the content of the to-be-translated translation domain contains a link domain;

[0140] If the content of the translation domain to be translated contains a link domain, the next translation task supports an interruption operation.

[0141] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer readable medium, and the computer program includes a program code for executing the method shown in the flowchart.

[0142] More embodiments further provide a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the document translation method based on the interruption efficiency value as described in the first aspect and various possible designs of the first aspect is implemented.

[0143] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0144] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0145] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.

Claims

1. A document translation method based on interrupt efficiency value, the translation method is applied to an operating system supporting interrupts, It is characterized in that The method comprises: In response to the completion of the current translation task for the document, pre-execute the next translation task; and determine whether the next translation task supports an interrupt operation according to the result of the pre-execution; If the next translation task supports interruption operation, then the interruption efficiency value corresponding to the next translation task is calculated; Based on the interruption efficiency value, selecting a translation mode for the next translation task, wherein the translation mode for the next task is a hold translation or an interruption translation; The hold translation is to use the translation engine corresponding to the current translation task to continue translating the next translation task; The interruption-type translation is to introduce an interruption operation and use a second translation engine to translate the translation domain supporting the interruption operation in the next translation task.

2. A document translation method based on interruption efficiency value as claimed in claim 1, Features: The document includes a plurality of units to be translated, each unit to be translated corresponds to a translation task; The pre-execution of the next translation task, and judging whether the next translation task supports an interrupt operation according to the result of the pre-execution, specifically includes: Scanning the translation domain content to be translated contained in the to-be-translated unit corresponding to the next translation task; Determining whether the content of the to-be-translated translation domain contains a link domain; If the content of the translation domain to be translated contains a link domain, the next translation task supports an interruption operation.

3. A document translation method based on interruption efficiency value as claimed in claim 2, Features: The link domain includes a hyperlink domain and a common link domain; The hyperlink domain requires the operating system to provide network support; The normal link domain does not require the operating system to provide network support.

4. A document translation method based on interruption efficiency value as claimed in claim 1, Features: The operating system provides a first translation engine and a second translation engine; The translation engine corresponding to the current translation task is the first translation engine.

5. A document translation method based on interruption efficiency value as claimed in claim 1, Features: The introducing interruption operation uses a second translation engine to translate the translation domain supporting the interruption operation in the next translation task, specifically including: dividing the next translation task into a first translation domain supporting interruption operation and a second translation domain not supporting interruption operation; For the first translation domain, an interrupt operation is introduced to perform translation using a second translation engine; For the second translation domain, the translation is performed using the translation engine corresponding to the current translation task.

6. A document translation method based on interruption efficiency value as claimed in claim 2, Features: The link domain includes a hyperlink domain and a common link domain; The interrupt operation includes soft interrupt and hard interrupt; For the first translation domain, an interrupt operation is introduced to use the second translation engine to perform translation, specifically including: If the first translation domain includes a hyperlink domain, a soft interrupt is introduced to perform translation using a second translation engine; If the first translation domain does not contain a hyperlink domain, a hard interrupt is introduced to use the second translation engine to perform translation.

7. A document translation method based on interruption efficiency value as claimed in claim 5, Features: The translation for the first translation domain and the second translation domain are performed in parallel.

8. A document translation device based on an interruption efficiency value, the document translation device providing a document input interface to be translated and at least two translation engines; It is characterized in that The document translation device also includes: The document decomposition unit is used to decompose the input document into multiple units, each of which corresponds to a translation task. A pre-execution unit, in response to the completion of the current translation task by the current translation engine, pre-executes the next translation task; An interruption determination unit, used for determining whether the next translation task supports an interruption operation based on the result of the pre-execution; An interruption efficiency value calculation unit, used to calculate the interruption efficiency value corresponding to the next translation task when the interruption judgment unit judges that the next translation task supports the interruption operation; A translation mode selection unit, based on the interruption efficiency value, selects a translation mode for the next translation task, wherein the translation mode for the next translation task is a hold translation or an interruption translation; The hold translation is to continue translating the next translation task using the current translation engine; The interruptive translation specifically includes: dividing the next translation task into a first translation domain supporting interruption operation and a second translation domain not supporting interruption operation; For the first translation domain, introducing an interrupt operation to use a second translation engine different from the current translation engine to perform translation; For the second translation domain, the current translation engine is used to perform translation.

9. A document translation device based on interruption efficiency value as claimed in claim 8, It is characterized in that The interruption judgment unit judges whether the next translation task supports the interruption operation based on the result of the pre-execution, specifically including: The interruption judgment unit scans the translation domain content to be translated contained in the to-be-translated unit corresponding to the next translation task; Determining whether the content of the to-be-translated translation domain contains a link domain; If the content of the translation domain to be translated contains a link domain, the next translation task supports an interruption operation.

10. A computer-readable storage medium, It is characterized in that The method comprises computer instructions, which, when executed on an electronic device, enable the electronic device to execute a document translation method based on an interruption efficiency value as claimed in any one of claims 1 to 6.