Method, device, computer equipment and storage medium for translating text in a page

By receiving translation requests from R&D terminals, querying and replacing interface text with historical translation values, the problems of low translation efficiency and low intelligence in the existing technology are solved, efficient and accurate translation and display are achieved, and R&D efficiency and product quality are improved.

CN112507729BActive Publication Date: 2025-05-02KANG JIAN INFORMATION TECH (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011472605.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-15
Publication Date
2025-05-02
Estimated Expiration
2040-12-15

AI Technical Summary

Technical Problem

The existing translation systems are inefficient in processing multilingual interface texts and are not intelligent enough, resulting in a decline in R&D efficiency and product quality.

Method used

By receiving the translation request sent by the R&D terminal, query the stored initial text based on the text identification, and obtain the historical translation value of the target translation language, perform page text replacement, determine that the target page is generated after the translation is completed, and display checksum storage is performed.

Benefits of technology

It improves translation efficiency and intelligence level, ensures translation accuracy and display accuracy, thereby improving R&D efficiency and product quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112507729B_ABST
    Figure CN112507729B_ABST
Patent Text Reader

Abstract

The present application relates to a method, device, computer equipment and storage medium for translating text in a page, including: receiving a translation request sent by a research and development terminal, the translation request carries an initial page, a text identifier and a target translation language, the text identifier is generated based on the text of the initial language in the initial page; querying the stored initial text according to the text identifier, and obtaining the historical translation value corresponding to the target translation language corresponding to the initial text, the historical translation value is obtained by manual translation and proofreading based on the text in the historical page; replacing the corresponding text in the initial page by the historical translation value; judging whether the text in the initial page has been translated; when the text in the initial page has been translated, a target page with completed translation is generated. The use of this method can improve the level of intelligence. In addition, the present invention also relates to blockchain technology, and the text identifier and corresponding translation value of the initial text can be stored in a blockchain node.
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 technology, and in particular to a method, device, computer equipment and storage medium for translating text in a page. Background Art

[0002] Supporting multiple languages ​​is a basic function of international products. It is a basic requirement for products, but it is closely related to R&D quality and efficiency for R&D. A copywriting error can lead to a huge difference in users' understanding of the product, which will greatly reduce users' satisfaction with the product experience. If the time for multilingual translation, communication, replacement, and troubleshooting can be reduced in the R&D process, and the accuracy of different languages ​​in different contexts can be improved, R&D efficiency and product quality can be greatly improved.

[0003] Traditionally, in order to solve the above problems, some translation systems have emerged. These translation systems parse the text in the interface, translate the parsed text into the target language, and directly replace the text in the interface. Users can also be introduced to replace the target language in the text translation process. However, the above operations need to be performed for each page, resulting in low efficiency and insufficient intelligence. Summary of the invention

[0004] Based on this, it is necessary to provide a method, device, computer equipment and storage medium for translating text in a page that can improve the level of intelligence in response to the above technical problems.

[0005] A method for translating text in a page, the method comprising:

[0006] Receiving a translation request sent by a research and development terminal, the translation request carrying an initial page, a text identifier in the initial page, and a target translation language, wherein the text identifier is generated based on the text in the initial language in the initial page;

[0007] Searching for the stored initial text according to the text identifier, and obtaining a historical translation value corresponding to the target translation language corresponding to the initial text, wherein the historical translation value is obtained by manually translating and proofreading the text in the historical page;

[0008] Replacing the corresponding text in the initial page with the historical translation value;

[0009] Determining whether the text in the initial page has been translated;

[0010] When the text in the initial page is completely translated, a target page with completed translation is generated;

[0011] The target page is subjected to display verification, and after the display verification is successful, the text identifier and the corresponding translation value of the initial text in the initial page are stored in the corresponding project.

[0012] In one embodiment, obtaining the historical translation value corresponding to the target translation language corresponding to the initial text includes:

[0013] Obtaining the number of historical translation values ​​corresponding to the target translation language corresponding to the initial text;

[0014] When the number is greater than or equal to two, the length of the container corresponding to the initial text in the initial page is obtained;

[0015] Obtain a historical translation value whose length satisfies the length of the container;

[0016] When there is no historical translation value whose length satisfies the length of the container, the size of the associated text at the location of the initial text is obtained, and the display range of the historical translation value is determined according to the size of the associated text;

[0017] Determining whether the historical translation value can be displayed normally according to the display range;

[0018] If yes, a historical translation value corresponding to the target translation language corresponding to the initial text is randomly obtained; if no, no translation is performed on the target translation language corresponding to the initial text.

[0019] In one embodiment, after determining whether the text in the initial page has been translated, the method further includes:

[0020] When the text in the page has not been translated, the untranslated initial page and the translated text are allocated to the corresponding translation terminal, so that the translation terminal translates the untranslated text in the untranslated page, and the text identifiers in the initial page and the current translation values ​​corresponding to each text identifier in the target translation language are displayed in the first operation box of the translation terminal, and the untranslated page is dynamically displayed in the second operation box according to the current translation value.

[0021] In one embodiment, the step of allocating the untranslated initial page and the translated text to corresponding translation terminals includes:

[0022] Obtaining a system identifier corresponding to an untranslated page, and obtaining a translation terminal identifier corresponding to the system identifier according to a historical allocation record;

[0023] A translation terminal identifier corresponding to the target translation language is selected, and the untranslated pages and the translated texts are allocated to the translation terminal corresponding to the selected translation terminal identifier.

[0024] In one embodiment, storing the text identifier and the corresponding translation value of the initial text in the initial page into the corresponding project includes:

[0025] Determining whether the target translation languages ​​corresponding to the initial page have been translated;

[0026] If yes, generate a template document corresponding to the number of the target translation languages, and store the completed translation value in the template document;

[0027] The template document is stored in a corresponding project engineering so that the template document can be packaged when the project engineering is packaged.

[0028] A device for translating text in a page, the device comprising:

[0029] A receiving module, configured to receive a translation request sent by a research and development terminal, wherein the translation request carries an initial page, a text identifier in the initial page, and a target translation language, wherein the text identifier is generated based on the text in the initial language in the initial page;

[0030] A query module, used to query the stored initial text according to the text identifier, and obtain the historical translation value corresponding to the target translation language corresponding to the initial text, wherein the historical translation value is obtained by manually translating and proofreading the text in the historical page;

[0031] A replacement module, used for replacing the corresponding text in the initial page with the historical translation value;

[0032] A first judging module is used to judge whether the text in the initial page has been translated;

[0033] A generation module, used for generating a target page after the text in the initial page has been translated;

[0034] The verification module is used to perform display verification on the target page, and after the display verification is successful, store the text identifier and the corresponding translation value of the initial text in the initial page into the corresponding project.

[0035] In one embodiment, the query module includes:

[0036] A quantity acquisition unit, used to acquire the quantity of historical translation values ​​corresponding to the target translation language corresponding to the initial text;

[0037] a length obtaining unit, configured to obtain the length of the container corresponding to the initial text in the initial page when the number is greater than or equal to two;

[0038] A translation value acquisition unit, used to acquire a historical translation value whose length satisfies the length of the container;

[0039] A display range determining unit, configured to obtain the size of the associated text at the location of the initial text when there is no historical translation value whose length satisfies the length of the container, and determine the display range of the historical translation value according to the size of the associated text;

[0040] The translation unit is used to determine whether the historical translation value can be displayed normally according to the display range; if so, randomly obtain a historical translation value corresponding to the target translation language corresponding to the initial text; if not, do not translate the target translation language corresponding to the initial text.

[0041] In one embodiment, the device further comprises:

[0042] The sending module is used for allocating the untranslated initial page and the translated text to the corresponding translation terminal when the text in the page is not translated, so that the translation terminal translates the untranslated text in the untranslated page, and the text identifiers in the initial page and the current translation values ​​corresponding to each text identifier in the target translation language are displayed in the first operation box of the translation terminal, and the untranslated page is dynamically displayed in the second operation box according to the current translation value.

[0043] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.

[0044] A computer storage medium stores a computer program, which implements the steps of the above method when executed by a processor.

[0045] In the above-mentioned page text translation method, device, computer equipment and storage medium, firstly, the text identifier is generated based on the text of the initial language, so that one text corresponds to only one text identifier, and the historical translation value is obtained by manual translation and proofreading based on the text in the historical page, so as to ensure the accuracy of the historical translation value, thereby ensuring the accuracy of the translation. On this basis, the historical translation value is fully utilized through the text identifier, which improves the translation efficiency and intelligence level. After the translation value is obtained, display verification is also performed, which ensures the accuracy of the display while ensuring the accuracy of the translation, thereby making the intelligence level higher. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 This is an application scenario diagram of a method for translating text in a page in an embodiment;

[0047] Figure 2 A schematic diagram of a flow chart of a method for translating text in a page in one embodiment;

[0048] Figure 3 A schematic diagram of a flow chart of a method for translating text in a page in another embodiment;

[0049] Figure 4 A structural block diagram of a text translation device in a page in an embodiment;

[0050] Figure 5 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0051] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0052] The method for translating text in a page provided by this application can be applied to Figure 1 In the application environment shown. Among them, the R&D terminal 102 and the translation terminal 104 communicate with the server 106 through the network, and the R&D terminal 102 sends a translation request to the server 106, which carries the initial page, the text identifier in the initial page, and the target translation language, wherein the text identifier is generated based on the text of the initial language in the initial page, so that the server 106 queries the stored initial text according to the text identifier, and obtains the historical translation value corresponding to the target translation language corresponding to the initial text, and the historical translation value is obtained by manual translation and proofreading according to the text in the historical page, and the corresponding text in the initial page is replaced by the historical translation value; after the replacement is completed, the server 106 determines whether the text in the initial page is fully translated; when the text in the initial page is fully translated, a target page with completed translation is generated; the target page is displayed and verified, and after the display verification is successful, the text identifier and the corresponding translation value of the initial text in the initial page are stored in the corresponding project engineering, and when there is text in the initial page that has not been translated, it is sent to the translation terminal 104 for translation. The R&D terminal 102 and the translation terminal 104 may be, but are not limited to, various personal computers, laptops, smart phones, tablet computers, and portable wearable devices, and the server 106 may be implemented as an independent server or a server cluster consisting of multiple servers.

[0053] In one embodiment, Figure 2 As shown, a method for translating text in a page is provided, and the method is applied to Figure 1 The server in the example is used to illustrate the following steps:

[0054] S202: receiving a translation request sent by a research and development terminal, the translation request carrying an initial page, a text identifier in the initial page, and a target translation language, wherein the text identifier is generated based on the text in the initial language in the initial page.

[0055] Specifically, the translation request can be that when the R&D terminal develops a static page based on the visual draft, all the initial text-related element values ​​in the visual draft are extracted, and then each initial text is assigned a text identifier and a blank translation value, such as setting a key-value pair, and using the key as the data-i18n parameter tag of the DOM element, and the resulting static page, that is, the initial page and the required target translation language are packaged together. That is, the translation request includes the initial page (which is mainly for display and proofreading), all the initial texts in the initial page, the initial text identifier, the required target translation language, and the blank translation values ​​corresponding to each target translation language.

[0056] The initial text identifier is generated based on the initial text, and the initial text is identified by an initial language, such as Chinese or English. Preferably, the developer's native language is used as the initial language. In this way, the initial text corresponding to the initial language is matched with the text with the generated text identifier. If the match is successful, there is no need to assign the text identifier again, and the generated text identifier can be directly obtained. If the match fails, a new text identifier is generated according to the text identifier generation logic, for example, the text identifier is generated according to the random number corresponding to each word in the text.

[0057] S204: searching the stored initial text according to the text identifier, and obtaining the historical translation value corresponding to the target translation language corresponding to the initial text, where the historical translation value is obtained by manually translating and proofreading the text in the historical page.

[0058] S206: Replace the corresponding text in the initial page with the historical translation value.

[0059] Specifically, the stored initial text refers to the translated text, wherein for the translated text, the server stores the initial text, the text identifier and the corresponding translation value of the translation language in association. The translation value is obtained by the translator after translating and proofreading the text in the historical page, so the translation values ​​are relatively accurate. In this way, for the stored initial text, there is no need to translate it again, and the historical translation value that has been translated can be directly used.

[0060] The server can first obtain the corresponding initial text according to the text identifier, and then determine whether the initial text has a historical translation value corresponding to the target translation language. If so, the text in the initial page is directly replaced by the historical translation value. Otherwise, the automatic translation of the initial text fails, and the translation of the initial page needs to be sent to the corresponding translation terminal for translation.

[0061] S208: Determine whether the text in the initial page has been translated.

[0062] Specifically, after the text in the initial page is traversed, the server determines whether the traversed text is translated. Preferably, when the server translates the text in the initial page, a corresponding DOM document can be generated, in which a text identifier, a corresponding target translation language, and a translation value under the target translation language are stored correspondingly. The server determines whether the translation value under each target translation language is empty. If at least one is empty, the initial page corresponding to the target translation language is not translated. If it is not empty, the target translation language translation of the initial page is completed. When all target translation languages ​​of the initial page are translated, the initial page is translated.

[0063] S210: When the texts in the initial page are all translated, a target page with completed translation is generated.

[0064] Specifically, when the translation of a target translation language is not completed, the server allocates a subsequent translation terminal corresponding to the target translation language to continue the translation. If the translation is completed, the server generates a target page under the target translation language, that is, replaces the initial text with the translated translation value.

[0065] S212: Perform display verification on the target page, and after the display verification is successful, store the text identifier and the corresponding translation value of the initial text in the initial page into the corresponding project.

[0066] Specifically, the display verification of the target page includes but is not limited to verifying the display length of the translation text corresponding to each initial text in the target page and verifying the occlusion. After the display verification is completed, the translation value and the corresponding text identifier that have successfully been displayed are stored in the corresponding project, so that the project can be directly obtained when packaging without additional operations.

[0067] In addition, preferably, after all the automatic translations are completed, the initial page and the results of the automatic translation can also be sent to the translation terminal for proofreading by the translation terminal, and the translated target page can be dynamically generated based on the proofread translation values, that is, the first operation box displays the text tags in the initial page and the current translation values ​​corresponding to each text tag in the target translation language, and the second operation box dynamically displays the untranslated page based on the current translation values, so that the translator can understand the translation status in real time.

[0068] It should be emphasized that in order to further ensure the privacy and security of the above-mentioned initial page, the translated translation value and the text identifier, the above-mentioned initial page, the translated translation value and the text identifier can also be stored in a node of a blockchain.

[0069] In the above-mentioned method for translating text in the page, first, the text identifier is generated based on the text in the original language, so that one text corresponds to only one text identifier, and the historical translation value is obtained by manual translation and proofreading based on the text in the historical page, so as to ensure the accuracy of the historical translation value, thereby ensuring the accuracy of the translation. On this basis, the historical translation value is fully utilized through the text identifier, which improves the translation efficiency and intelligence level. After obtaining the translation value, display verification is also performed, which ensures the accuracy of the display while ensuring the accuracy of the translation, thereby making the intelligence level higher.

[0070] In one of the embodiments, obtaining a historical translation value corresponding to a target translation language corresponding to an initial text includes: obtaining the number of historical translation values ​​corresponding to the target translation language corresponding to the initial text; when the number is greater than or equal to two, obtaining the length of a container corresponding to the initial text in an initial page; obtaining a historical translation value whose length satisfies the length of the container; when there is no historical translation value whose length satisfies the length of the container, obtaining the size of an associated text at a location where the initial text is located, and determining a display range of the historical translation value according to the size of the associated text; determining whether the historical translation value can be displayed normally according to the display range; if so, randomly obtaining a historical translation value corresponding to the target translation language corresponding to the initial text, and if not, not translating the target translation language corresponding to the initial text.

[0071] Specifically, in this embodiment, when there are multiple historical translation values, the historical translation values ​​are selected according to the length of the container and the size of the associated text. For example, when the length of the historical translation value is less than or equal to the length of the container, the historical translation values ​​are preferentially selected, so as to ensure that the historical translation value can be displayed completely when displayed, and avoid failure in subsequent display verification. In addition, if there is no historical translation value whose length is less than or equal to the length of the container, it can also be determined according to the size of the associated text. For example, the associated text is a text that is related to the initial text in position, that is, the text distributed around the initial text and adjacent to the initial text. By judging the size of the associated text and the size of the initial text, it is judged whether the associated text and the initial text overlap, or the maximum display area of ​​the initial text is obtained, and the corresponding historical translation value is determined according to the maximum display area. For example, after a section of text is translated, it is divided into two lines for display, and it will not block other associated texts. Then, the historical translation value is preferentially selected. If there is blocking, it needs to be sent to the translation terminal for translation, that is, when it is judged later, the translation corresponding to the target translation language is not completed and needs to be sent to the translation terminal for translation.

[0072] In the above embodiment, the historical translation value is selected according to the length of the container and the associated text, thereby ensuring the accuracy of the selected historical translation value.

[0073] In one of the embodiments, after determining whether the text in the initial page has been translated, the method further includes: when the text in the page has not been translated, the untranslated initial page and the translated text are assigned to the corresponding translation terminal, so that the translation terminal translates the untranslated text in the untranslated page, and the text identifiers in the initial page and the current translation values ​​corresponding to the text identifiers in the target translation language are displayed in the first operation box of the translation terminal, and the untranslated page is dynamically displayed in the second operation box according to the current translation value.

[0074] Specifically, when the text is not translated, that is, when the initial text corresponding to a certain target translation language of the initial page is not translated, it is sent to the translation terminal for translation. The situation where the initial text corresponding to a certain target translation language of the initial page is not translated includes: the text identifier corresponding to the initial text is not retrieved, that is, a new text to be translated appears; another is that the text identifier corresponding to the initial text is retrieved, but the text identifier does not have a historical translation value corresponding to the target translation language; another is that the text identifier corresponding to the initial text is retrieved, and the historical translation value of the target translation language corresponding to the text identifier also exists, but the attributes of these historical translation values, such as length, do not meet the display requirements of the initial page. Therefore, these untranslated initial texts need to be translated again.

[0075] When the translation terminal receives the translation task, at least two operation boxes are displayed on the display interface. The at least two operation boxes can be displayed in parallel, so that the page in the second operation box can be fully displayed, and the text mark in the first operation box and each current translation value in the target translation language can be displayed in parallel, but the first operation box can be slid to flip through other text marks and current translation values ​​displayed in parallel. Optionally, the second operation box can also display the initial text of the corresponding initial language.

[0076] Specifically, when the translation terminal receives the corresponding current translation value through the first operation box, the current translation value is dynamically displayed in the corresponding position of the page displayed in the second operation box, so that the translator can view the corresponding translation effect in real time. The translator can directly access and view the corresponding page in the translation proofreading system, and can select the corresponding translation language in the translation proofreading system to view the page display in the current language, and proofread whether the translation copy in the current language is correct, and perform translation proofreading. The translation proofreading system will load the corresponding front-end page, count all elements in the page dom containing the data-i18n identifier, and count the corresponding value of data-i18n as the key and the text of dom as the value. The translation proofreader can see all the text lists, can highlight the corresponding text on the corresponding page and make modifications, and can see the modified effect in real time after modifying the text, which is convenient for verifying the display effect of the text on the page.

[0077] In the above embodiment, the translation value and the corresponding page are displayed in real time through associated display, which is convenient for verifying the display effect of the text on the page.

[0078] In one embodiment, allocating an untranslated initial page and a translated text to a corresponding translation terminal includes: obtaining a system identifier corresponding to the untranslated page, and obtaining a translation terminal identifier corresponding to the system identifier according to a historical allocation record; selecting a translation terminal identifier corresponding to a target translation language, and allocating the untranslated page and the translated text to a translation terminal corresponding to the selected translation terminal identifier.

[0079] Specifically, in order to ensure the accuracy of the allocation, in this embodiment, the allocation is performed by the system identifier and the target translation language. The system identifier is the system corresponding to the initial page, that is, the project project, and the identifier of the project project corresponding to the initial page. In this way, the translation work of a project project is basically delivered to the same translator, which can further ensure the accuracy of the translation. In addition, it is also necessary to process according to the language of the target translation language, which also ensures the accuracy of the translation.

[0080] In one of the embodiments, the text identifier and the corresponding translation value of the initial text in the initial page are stored in the corresponding project engineering, including: determining whether the target translation languages ​​corresponding to the initial page have been translated; if so, generating a template document corresponding to the number of target translation languages, and storing the completed translation value in the template document; storing the template document in the corresponding project engineering, so as to package the template document when the project engineering is packaged.

[0081] Specifically, after the translator completes the translation, the corresponding developer needs to be notified. The developer can access the page on the translation and proofreading system and export all language resource files related to the page, or the translation system directly places the language resource files of the corresponding page in the corresponding directory of the project, and then packages and publishes it. After the test environment is published, acceptance testing is required. After the test verification is passed, the product and vision need to conduct UAT testing. If it is found that the text needs to be modified, the corresponding translator can be notified to modify and preview it on the translation and proofreading system, and after confirmation, it will be submitted to the development for packaging and deployment, and resubmitted for testing.

[0082] In one embodiment, see Figure 3 As shown, Figure 3 This is a method for translating text in a page in another embodiment. In this embodiment, the R&D personnel first complete the development of the static page. After completion, the R&D terminal sends the developed page to the server, so that the server translates the text in the page. If the automatic translation is unsuccessful, it is sent to the corresponding translation terminal for processing, so that the translator selects the corresponding language for translation. After the translation is completed, the translation document is automatically exported and verified. If the verification is passed, it is released online, that is, the corresponding project project is packaged and put online.

[0083] It should be understood that although Figure 2 and Figure 3 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 2 and Figure 3 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.

[0084] In one embodiment, Figure 4As shown, a text translation device for a page is provided, comprising: a receiving module 100, a query module 200, a replacement module 300, a first judgment module 400, a generation module 500 and a verification module 600, wherein:

[0085] The receiving module 100 is used to receive a translation request sent by the R&D terminal, the translation request carrying an initial page, a text identifier in the initial page, and a target translation language, wherein the text identifier is generated based on the text in the initial language in the initial page;

[0086] A query module 200 is used to query the stored initial text according to the text identifier, and obtain the historical translation value corresponding to the target translation language corresponding to the initial text, where the historical translation value is obtained by manually translating and proofreading the text in the historical page;

[0087] A replacement module 300, used to replace the corresponding text in the initial page with the historical translation value;

[0088] The first judgment module 400 is used to judge whether the text in the initial page has been translated;

[0089] A generation module 500 is used to generate a target page after the text in the initial page has been translated;

[0090] The verification module 600 is used to perform display verification on the target page, and after the display verification is successful, store the text identifier and the corresponding translation value of the initial text in the initial page into the corresponding project.

[0091] In one embodiment, the query module 200 includes:

[0092] A quantity acquisition unit, used to acquire the quantity of historical translation values ​​corresponding to the target translation language corresponding to the initial text;

[0093] A length obtaining unit, used for obtaining the length of the container corresponding to the initial text in the initial page when the number is greater than or equal to two;

[0094] A translation value acquisition unit, used to acquire a historical translation value whose length satisfies the length of the container;

[0095] A display range determining unit, configured to obtain the size of the associated text at the location of the initial text when there is no historical translation value whose length satisfies the length of the container, and determine the display range of the historical translation value according to the size of the associated text;

[0096] The translation unit is used to determine whether the historical translation value can be displayed normally according to the display range; if so, randomly obtain a historical translation value corresponding to the target translation language corresponding to the initial text; if not, do not translate the target translation language corresponding to the initial text.

[0097] In one embodiment, the above-mentioned webpage text translation device further includes:

[0098] The sending module is used to distribute the untranslated initial page and the translated text to the corresponding translation terminal when the text in the page is not translated, so that the translation terminal translates the untranslated text in the untranslated page, and the text identifier in the initial page and the current translation value corresponding to each text identifier in the target translation language are displayed in the first operation box of the translation terminal, and the untranslated page is dynamically displayed in the second operation box according to the current translation value.

[0099] In one embodiment, the sending module may include:

[0100] An identification acquisition unit, used to acquire a system identification corresponding to an untranslated page, and acquire a translation terminal identification corresponding to the system identification according to a historical allocation record;

[0101] The sending unit is used to select a translation terminal identifier corresponding to a target translation language, and distribute the untranslated pages and translated texts to the translation terminal corresponding to the selected translation terminal identifier.

[0102] In one embodiment, the verification module 600 includes:

[0103] The second judgment unit is used to judge whether the target translation languages ​​corresponding to the initial page have been translated; if so, generate a template document corresponding to the number of target translation languages, and store the completed translation values ​​in the template document;

[0104] The storage unit is used to store the template document in the corresponding project engineering so as to package the template document when the project engineering is packaged.

[0105] The specific definition of the text translation device in the page can be found in the definition of the text translation method in the page above, which will not be repeated here. Each module in the above-mentioned text translation device in the page can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0106] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 5 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store text identifiers, translation values, etc. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for translating text in a page is implemented.

[0107] Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0108] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the following steps when executing the computer program: receiving a translation request sent by a research and development terminal, the translation request carrying an initial page, a text identifier in the initial page, and a target translation language, wherein the text identifier is generated based on the text in the initial language in the initial page; querying the stored initial text according to the text identifier, and obtaining a historical translation value corresponding to the target translation language corresponding to the initial text, wherein the historical translation value is obtained by manually translating and proofreading the text in the historical page; replacing the corresponding text in the initial page with the historical translation value; determining whether the text in the initial page has been translated; when the text in the initial page has been translated, generating a target page with the translation completed; displaying and verifying the target page, and after the display verification is successful, storing the text identifier and the corresponding translation value of the initial text in the initial page in the corresponding project engineering.

[0109] In one embodiment, the method of obtaining a historical translation value corresponding to a target translation language corresponding to an initial text implemented by a processor when executing a computer program includes: obtaining the number of historical translation values ​​corresponding to the target translation language corresponding to the initial text; when the number is greater than or equal to two, obtaining the length of a container corresponding to the initial text in an initial page; obtaining a historical translation value whose length satisfies the length of the container; when there is no historical translation value whose length satisfies the length of the container, obtaining the size of an associated text at a location where the initial text is located, and determining a display range of the historical translation value according to the size of the associated text; determining whether the historical translation value can be displayed normally according to the display range; if so, randomly obtaining a historical translation value corresponding to the target translation language corresponding to the initial text, and if not, not translating the target translation language corresponding to the initial text.

[0110] In one embodiment, after the processor executes the computer program to determine whether the text in the initial page has been translated, the method further includes: when the text in the page has not been translated, the untranslated initial page and the translated text are allocated to the corresponding translation terminal, so that the translation terminal translates the untranslated text in the untranslated page, and the text identifiers in the initial page and the current translation values ​​corresponding to each text identifier in the target translation language are displayed in the first operation box of the translation terminal, and the untranslated page is dynamically displayed in the second operation box according to the current translation value.

[0111] In one embodiment, the method implemented by the processor executing the computer program to distribute the untranslated initial page and the translated text to the corresponding translation terminal includes: obtaining the system identifier corresponding to the untranslated page, and obtaining the translation terminal identifier corresponding to the system identifier according to the historical allocation record; selecting the translation terminal identifier corresponding to the target translation language, and distributing the untranslated page and the translated text to the translation terminal corresponding to the selected translation terminal identifier.

[0112] In one embodiment, the processor executes a computer program to implement storing the text identifier of the initial text in the initial page and the corresponding translation value in the corresponding project engineering, including: determining whether the target translation languages ​​corresponding to the initial page have all been translated; if so, generating a template document corresponding to the number of target translation languages, and storing the completed translation value in the template document; storing the template document in the corresponding project engineering so as to package the template document when the project engineering is packaged.

[0113] In one embodiment, a computer storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented: receiving a translation request sent by a research and development terminal, the translation request carrying an initial page, a text identifier in the initial page, and a target translation language, wherein the text identifier is generated based on the text in the initial language in the initial page; querying the stored initial text according to the text identifier, and obtaining a historical translation value corresponding to the target translation language corresponding to the initial text, wherein the historical translation value is obtained by manually translating and proofreading the text in the historical page; replacing the corresponding text in the initial page with the historical translation value; judging whether the text in the initial page has been translated; when the text in the initial page has been translated, generating a target page with completed translation; displaying and verifying the target page, and after the display verification is successful, storing the text identifier and the corresponding translation value of the initial text in the initial page in the corresponding project engineering.

[0114] In one embodiment, the method of obtaining a historical translation value corresponding to a target translation language corresponding to an initial text implemented by a computer program executed by a processor includes: obtaining the number of historical translation values ​​corresponding to the target translation language corresponding to the initial text; when the number is greater than or equal to two, obtaining the length of a container corresponding to the initial text in an initial page; obtaining a historical translation value whose length satisfies the length of the container; when there is no historical translation value whose length satisfies the length of the container, obtaining the size of an associated text at a location where the initial text is located, and determining a display range of the historical translation value according to the size of the associated text; determining whether the historical translation value can be displayed normally according to the display range; if so, randomly obtaining a historical translation value corresponding to the target translation language corresponding to the initial text, and if not, not translating the target translation language corresponding to the initial text.

[0115] In one embodiment, after determining whether all texts in the initial page have been translated, the computer program implemented when executed by the processor further includes: when the text in the page has not been translated, the untranslated initial page and the translated text are allocated to the corresponding translation terminal, so that the translation terminal translates the untranslated text in the untranslated page, and the text identifiers in the initial page and the current translation values ​​corresponding to each text identifier in the target translation language are displayed in the first operation box of the translation terminal, and the untranslated page is dynamically displayed in the second operation box according to the current translation value.

[0116] In one embodiment, the method implemented by a processor when executing a computer program to allocate an untranslated initial page and a translated text to a corresponding translation terminal includes: obtaining a system identifier corresponding to the untranslated page, and obtaining a translation terminal identifier corresponding to the system identifier according to a historical allocation record; selecting a translation terminal identifier corresponding to a target translation language, and allocating the untranslated page and the translated text to a translation terminal corresponding to the selected translation terminal identifier.

[0117] In one embodiment, the computer program implemented when executed by the processor stores the text identifier of the initial text in the initial page and the corresponding translation value in the corresponding project engineering, including: determining whether the target translation languages ​​corresponding to the initial page have all been translated; if so, generating a template document corresponding to the number of target translation languages, and storing the completed translation value in the template document; storing the template document in the corresponding project engineering so as to package the template document when the project engineering is packaged.

[0118] The blockchain referred to in the present invention is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the blockchain underlying platform, platform product service layer, and application service layer.

[0119] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0120] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0121] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A method for translating text in a page, characterized in that: The method comprises: Receiving a translation request sent by a research and development terminal, the translation request carrying an initial page, a text identifier in the initial page, and a target translation language, wherein the text identifier is generated based on the text in the initial language in the initial page; Searching for the stored initial text according to the text identifier, and obtaining a historical translation value corresponding to the target translation language corresponding to the initial text, wherein the historical translation value is obtained by manually translating and proofreading the text in the historical page; Replacing the corresponding text in the initial page with the historical translation value; Determining whether the text in the initial page has been translated; When the text in the initial page is completely translated, a target page with completed translation is generated; Performing display verification on the target page, and after the display verification is successful, storing the text identifier and the corresponding translation value of the initial text in the initial page into the corresponding project; The obtaining of the historical translation value corresponding to the target translation language corresponding to the initial text includes: Obtaining the number of historical translation values ​​corresponding to the target translation language corresponding to the initial text; When the number is greater than or equal to two, the length of the container corresponding to the initial text in the initial page is obtained; Get a historical translation value whose length is less than or equal to the length of the container; When there is no historical translation value whose length satisfies the length of the container, the size of the associated text at the location of the initial text is obtained, and the display range of the historical translation value is determined according to the size of the associated text, wherein the associated text is text distributed around the initial text and adjacent to the initial text; Determining whether the historical translation value can be displayed normally according to the display range; If yes, then randomly obtain a historical translation value corresponding to the target translation language corresponding to the initial text; if no, then do not translate the target translation language corresponding to the initial text; After determining whether the text in the initial page has been translated, the method further includes: When the text in the page is not translated, the untranslated initial page and the translated text are assigned to the corresponding translation terminal, so that the translation terminal translates the untranslated text in the untranslated page, and the text identifiers in the initial page and the current translation values ​​corresponding to the text identifiers in the target translation language are displayed in the first operation box of the translation terminal, and the untranslated page is dynamically displayed in the second operation box according to the current translation value; The step of allocating the untranslated initial page and the translated text to corresponding translation terminals includes: Obtaining a system identifier corresponding to an untranslated page, and obtaining a translation terminal identifier corresponding to the system identifier according to a historical allocation record; A translation terminal identifier corresponding to the target translation language is selected, and the untranslated pages and the translated texts are allocated to the translation terminal corresponding to the selected translation terminal identifier.

2. The method according to claim 1, characterized in that The storing of the text identifier and the corresponding translation value of the initial text in the initial page into the corresponding project includes: Determining whether the target translation languages ​​corresponding to the initial page have been translated; If yes, generate a template document corresponding to the number of the target translation languages, and store the completed translation value in the template document; The template document is stored in a corresponding project engineering so that the template document can be packaged when the project engineering is packaged.

3. A device for translating text in a page, characterized in that: The device comprises: A receiving module, configured to receive a translation request sent by a research and development terminal, wherein the translation request carries an initial page, a text identifier in the initial page, and a target translation language, wherein the text identifier is generated based on the text in the initial language in the initial page; A query module, used to query the stored initial text according to the text identifier, and obtain the historical translation value corresponding to the target translation language corresponding to the initial text, wherein the historical translation value is obtained by manually translating and proofreading the text in the historical page; A replacement module, used for replacing the corresponding text in the initial page with the historical translation value; A first judging module is used to judge whether the text in the initial page has been translated; A generation module, used for generating a target page after the text in the initial page has been translated; A verification module, used for performing display verification on the target page, and after the display verification is successful, storing the text identifier and the corresponding translation value of the initial text in the initial page into the corresponding project; The query module includes: A quantity acquisition unit, used to acquire the quantity of historical translation values ​​corresponding to the target translation language corresponding to the initial text; a length obtaining unit, configured to obtain the length of the container corresponding to the initial text in the initial page when the number is greater than or equal to two; A translation value acquisition unit, used to acquire a historical translation value whose length is less than or equal to the length of the container; A display range determining unit, configured to obtain the size of an associated text at the location of the initial text when there is no historical translation value whose length satisfies the length of the container, and determine the display range of the historical translation value according to the size of the associated text, wherein the associated text is text distributed around the initial text and adjacent to the initial text; A translation unit, configured to determine whether the historical translation value can be displayed normally according to the display range; if so, randomly obtain a historical translation value corresponding to the target translation language corresponding to the initial text; if not, do not translate the target translation language corresponding to the initial text; The device also includes: A sending module, for distributing the untranslated initial page and the translated text to a corresponding translation terminal when the text in the page is not translated, so that the translation terminal translates the untranslated text in the untranslated page, and the text identifiers in the initial page and the current translation values ​​corresponding to the text identifiers in the target translation language are displayed in a first operation box of the translation terminal, and the untranslated page is dynamically displayed in a second operation box according to the current translation value; The sending module comprises: An identification acquisition unit, used to acquire a system identification corresponding to an untranslated page, and acquire a translation terminal identification corresponding to the system identification according to a historical allocation record; The sending unit is used to select a translation terminal identifier corresponding to the target translation language, and distribute the untranslated pages and the translated texts to the translation terminal corresponding to the selected translation terminal identifier.

4. The device according to claim 3, characterized in that The verification module comprises: A second judgment unit is used to judge whether the target translation languages ​​corresponding to the initial page have been translated; if so, generate a template document corresponding to the number of the target translation languages, and store the completed translation values ​​in the template document; The storage unit is used to store the template document in the corresponding project engineering so as to package the template document when the project engineering is packaged.

5. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the following steps are implemented: Receiving a translation request sent by a research and development terminal, the translation request carrying an initial page, a text identifier in the initial page, and a target translation language, wherein the text identifier is generated based on the text in the initial language in the initial page; Searching for the stored initial text according to the text identifier, and obtaining a historical translation value corresponding to the target translation language corresponding to the initial text, wherein the historical translation value is obtained by manually translating and proofreading the text in the historical page; Replacing the corresponding text in the initial page with the historical translation value; Determining whether the text in the initial page has been translated; When the text in the initial page is completely translated, a target page with completed translation is generated; Performing display verification on the target page, and after the display verification is successful, storing the text identifier and the corresponding translation value of the initial text in the initial page into the corresponding project; The obtaining of the historical translation value corresponding to the target translation language corresponding to the initial text includes: Obtaining the number of historical translation values ​​corresponding to the target translation language corresponding to the initial text; When the number is greater than or equal to two, the length of the container corresponding to the initial text in the initial page is obtained; Get a historical translation value whose length is less than or equal to the length of the container; When there is no historical translation value whose length satisfies the length of the container, the size of the associated text at the location of the initial text is obtained, and the display range of the historical translation value is determined according to the size of the associated text, wherein the associated text is text distributed around the initial text and adjacent to the initial text; Determining whether the historical translation value can be displayed normally according to the display range; If yes, then randomly obtain a historical translation value corresponding to the target translation language corresponding to the initial text; if no, then do not translate the target translation language corresponding to the initial text; After determining whether the text in the initial page has been translated, the method further includes: When the text in the page is not translated, the untranslated initial page and the translated text are assigned to the corresponding translation terminal, so that the translation terminal translates the untranslated text in the untranslated page, and the text identifiers in the initial page and the current translation values ​​corresponding to the text identifiers in the target translation language are displayed in the first operation box of the translation terminal, and the untranslated page is dynamically displayed in the second operation box according to the current translation value; The step of allocating the untranslated initial page and the translated text to corresponding translation terminals includes: Obtaining a system identifier corresponding to an untranslated page, and obtaining a translation terminal identifier corresponding to the system identifier according to a historical allocation record; A translation terminal identifier corresponding to the target translation language is selected, and the untranslated pages and the translated texts are allocated to the translation terminal corresponding to the selected translation terminal identifier.

6. The computer device according to claim 5, characterized in that The storing of the text identifier and the corresponding translation value of the initial text in the initial page into the corresponding project, which is implemented when the processor executes the computer program, includes: Determining whether the target translation languages ​​corresponding to the initial page have been translated; If yes, generate a template document corresponding to the number of the target translation languages, and store the completed translation value in the template document; The template document is stored in a corresponding project engineering so that the template document can be packaged when the project engineering is packaged.

7. A computer storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the following steps are implemented: Receiving a translation request sent by a research and development terminal, the translation request carrying an initial page, a text identifier in the initial page, and a target translation language, wherein the text identifier is generated based on the text in the initial language in the initial page; Searching for the stored initial text according to the text identifier, and obtaining a historical translation value corresponding to the target translation language corresponding to the initial text, wherein the historical translation value is obtained by manually translating and proofreading the text in the historical page; Replacing the corresponding text in the initial page with the historical translation value; Determining whether the text in the initial page has been translated; When the text in the initial page is completely translated, a target page with completed translation is generated; Performing display verification on the target page, and after the display verification is successful, storing the text identifier and the corresponding translation value of the initial text in the initial page into the corresponding project; The obtaining of the historical translation value corresponding to the target translation language corresponding to the initial text includes: Obtaining the number of historical translation values ​​corresponding to the target translation language corresponding to the initial text; When the number is greater than or equal to two, the length of the container corresponding to the initial text in the initial page is obtained; Get a historical translation value whose length is less than or equal to the length of the container; When there is no historical translation value whose length satisfies the length of the container, the size of the associated text at the location of the initial text is obtained, and the display range of the historical translation value is determined according to the size of the associated text, wherein the associated text is text distributed around the initial text and adjacent to the initial text; Determining whether the historical translation value can be displayed normally according to the display range; If yes, then randomly obtain a historical translation value corresponding to the target translation language corresponding to the initial text; if no, then do not translate the target translation language corresponding to the initial text; After determining whether the text in the initial page has been translated, the method further includes: When the text in the page is not translated, the untranslated initial page and the translated text are assigned to the corresponding translation terminal, so that the translation terminal translates the untranslated text in the untranslated page, and the text identifiers in the initial page and the current translation values ​​corresponding to the text identifiers in the target translation language are displayed in the first operation box of the translation terminal, and the untranslated page is dynamically displayed in the second operation box according to the current translation value; The step of allocating the untranslated initial page and the translated text to corresponding translation terminals includes: Obtaining a system identifier corresponding to an untranslated page, and obtaining a translation terminal identifier corresponding to the system identifier according to a historical allocation record; A translation terminal identifier corresponding to the target translation language is selected, and the untranslated pages and the translated texts are allocated to the translation terminal corresponding to the selected translation terminal identifier.

8. The computer storage medium according to claim 7, wherein: The step of storing the text identifier of the initial text in the initial page and the corresponding translation value in the corresponding project project when the computer program is executed by the processor includes: Determining whether the target translation languages ​​corresponding to the initial page have been translated; If yes, generate a template document corresponding to the number of the target translation languages, and store the completed translation value in the template document; The template document is stored in a corresponding project engineering so that the template document can be packaged when the project engineering is packaged.

Citation Information

Patent Citations

  • Multi-language translation method, device and equipment for webpage

    CN110263351A

  • Language translation processing method and device

    CN111008524A