CN117195921A - Translation method, device and storage medium applied to translation platform - Google Patents

Translation method, device and storage medium applied to translation platform Download PDF

Info

Publication number
CN117195921A
CN117195921A CN202311229035.8A CN202311229035A CN117195921A CN 117195921 A CN117195921 A CN 117195921A CN 202311229035 A CN202311229035 A CN 202311229035A CN 117195921 A CN117195921 A CN 117195921A
Authority
CN
China
Prior art keywords
translation
translated
target
document
files
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311229035.8A
Other languages
Chinese (zh)
Inventor
李志强
叶松林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Thalys Automobile Co ltd
Original Assignee
Thalys Automobile Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Thalys Automobile Co ltd filed Critical Thalys Automobile Co ltd
Priority to CN202311229035.8A priority Critical patent/CN117195921A/en
Publication of CN117195921A publication Critical patent/CN117195921A/en
Pending legal-status Critical Current

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The embodiment of the application relates to the technical field of translation, and discloses a translation method, a translation device and a storage medium applied to a translation platform, wherein the method comprises the following steps: receiving a plurality of files to be translated; wherein; each file to be translated comprises a plurality of files to be translated and translation languages corresponding to the files to be translated; according to a plurality of to-be-translated texts and a preset function, calculating to obtain a hash value corresponding to each to-be-translated text; determining whether a target to-be-translated version corresponding to the target to-be-translated version exists according to the hash value and the translation language corresponding to each to-be-translated version; if the target to-be-translated text exists, displaying other to-be-translated text except the target to-be-translated text on a translation page so that a translator translates the other to-be-translated text and acquires the translation text corresponding to the other to-be-translated text. According to the embodiment of the application, the translation platform automatically converts the corresponding file, and meanwhile, unnecessary repeated translation work can be avoided, so that the translation efficiency is improved.

Description

Translation method, device and storage medium applied to translation platform
Technical Field
The embodiment of the application relates to the technical field of translation, in particular to a translation method, a translation device and a storage medium applied to a translation platform.
Background
In the process of developing internationalized software projects, translation work of multi-lingual documents is generally involved. For example, the developer sends the files to be translated required in the project codes to a third-party translation mechanism, and after the translation of the third-party translation mechanism is completed, the corresponding multi-language files are returned to the developer, and the developer manually converts the files into multi-language configuration files which can be identified by the programming language, so that the whole process is complicated and the efficiency is low.
In addition, a great deal of repeated content may exist in the files to be translated submitted by the research and development personnel for many times, which increases unnecessary repeated translation work of a third-party translation mechanism, and thus the whole translation process is inefficient.
Disclosure of Invention
In view of the above problems, the embodiments of the present application provide a translation method, apparatus, and storage medium applied to a translation platform, which constructs the translation platform for research personnel and translation personnel to simplify the cumbersome translation process; meanwhile, unnecessary repeated translation work by a translator can be avoided, so that the translation efficiency is improved.
According to an aspect of an embodiment of the present application, there is provided a translation method applied to a translation platform, the translation method including: .
In an alternative manner, the translation method further includes: constructing a translation task table, an importing detail table and a translation document table; the translation task table is used for recording task identifications and translation languages corresponding to each translation task, and each translation task comprises translation tasks aiming at least one document to be translated; the importing detail table is used for recording at least one to-be-translated document included in each translation task, and a document identifier and a hash value corresponding to the at least one to-be-translated document; the translation document table is used for recording hash values corresponding to the documents to be translated, translation languages and translation documents.
In an alternative manner, the translation method further includes: generating task identifiers corresponding to each file to be translated according to the receiving sequence among the files to be translated; the task identifiers corresponding to all the files to be translated in each file to be translated are the same; updating the translation task table according to the translation language and the corresponding task identifier included in each file to be translated to obtain an updated translation task table; and updating the import detail table according to each text to be translated and the hash value corresponding to each text to be translated, and the text identifier and the task identifier to obtain an updated import detail table.
In an alternative manner, the translation method further includes: detecting whether translation documents corresponding to the other documents to be translated are acquired; and if the translation files corresponding to the other files to be translated are detected and collected, updating the translation file table according to the hash values corresponding to the other files to be translated, the translation languages and the translation files to obtain an updated translation file table.
In an alternative manner, the translation method further includes: detecting whether the translation file table has the same translation file which is successfully matched with other translation files; if the same translation is present, deleting the same translation from the other translations to obtain deleted other translations, and updating the translation table according to hash values corresponding to the deleted other translations to obtain an updated translation table by translating languages and the translation table.
In an optional manner, the determining whether the target to-be-translated document corresponding to the target to-be-translated document exists according to the hash value and the translation language corresponding to each to-be-translated document further includes: traversing all the to-be-translated cases, and taking the traversed to-be-translated cases as target to-be-translated cases; and respectively matching the target hash value and the target translation language corresponding to the target translation document with the existing hash value and translation language, and determining whether the target translation document corresponding to the target translation document exists according to a matching result.
In an optional manner, the determining whether the target to-be-translated document corresponding to the target translated document exists according to the matching result further includes: and if the matching result represents that the target hash value is successfully matched with the existing hash value, the target translation language is successfully matched with the existing translation language, and the matched hash value and the translation language correspond to the same existing translation language, determining that the target to-be-translated document corresponding to the target translation document exists.
According to another aspect of the embodiments of the present application, there is provided a translation apparatus applied to a translation platform, the translation apparatus including: the receiving module is used for receiving a plurality of files to be translated; wherein; each file to be translated comprises a plurality of files to be translated and translation languages corresponding to the files to be translated; the calculation module is used for calculating a hash value corresponding to each document to be translated according to the plurality of documents to be translated and the preset function; the determining module is used for determining whether a target to-be-translated version corresponding to the target to-be-translated version exists or not according to the hash value and the translation language corresponding to each to-be-translated version; and the translation module is used for displaying other to-be-translated texts except the target to-be-translated text on a translation page if the target to-be-translated text exists, so that a translator translates the other to-be-translated texts and acquires the translation texts corresponding to the other to-be-translated texts.
According to an aspect of an embodiment of the present application, there is provided an electronic apparatus including: a controller; and a memory for storing one or more programs which, when executed by the controller, perform the translation method described above.
According to an aspect of an embodiment of the present application, there is also provided a computer-readable storage medium having stored thereon computer-readable instructions which, when executed by a processor of a computer, cause the computer to perform the translation method described above.
According to an aspect of embodiments of the present application, there is also provided a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the translation method described above.
The embodiment of the application is applied to a translation platform shared by research personnel and translation personnel, and the translation platform can automatically convert corresponding files so as to simplify the complicated translation process. The translation platform calculates a hash value corresponding to each to-be-translated document according to a preset function, and determines whether a target to-be-translated document corresponding to the target to-be-translated document exists according to the hash value corresponding to each to-be-translated document and the translation language; if the target to-be-translated text exists, the target to-be-translated text does not need to be displayed on a translation page, so that unnecessary repeated translation work of a translator is avoided, and translation efficiency is improved.
The foregoing description is only an overview of the technical solutions of the embodiments of the present application, and may be implemented according to the content of the specification, so that the technical means of the embodiments of the present application can be more clearly understood, and the following specific embodiments of the present application are given for clarity and understanding.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application. It is evident that the drawings in the following description are only some embodiments of the present application and that other drawings may be obtained from these drawings without inventive effort for a person of ordinary skill in the art.
Fig. 1 is a flow chart illustrating a translation method applied to a translation platform according to an exemplary embodiment of the present application.
Fig. 2 is a schematic diagram of key values and value values corresponding to different files to be translated according to the present application.
FIG. 3 is a flow chart illustrating another translation method applied to a translation platform, based on the exemplary embodiment shown in FIG. 1.
Fig. 4 is a schematic diagram of an application scenario of the translation method of the present application applied to a translation platform.
Fig. 5 is a schematic structural diagram of a translation device applied to a translation platform according to an exemplary embodiment of the present application.
Fig. 6 is a schematic diagram of a computer system of an electronic device according to an exemplary embodiment of the present application.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the application. Rather, they are merely examples of apparatus and methods consistent with aspects of the application as detailed in the accompanying claims.
The block diagrams depicted in the figures are merely functional entities and do not necessarily correspond to physically separate entities. That is, the functional entities may be implemented in software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
The flow diagrams depicted in the figures are exemplary only, and do not necessarily include all of the elements and operations/steps, nor must they be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the order of actual execution may be changed according to actual situations.
In the present application, the term "plurality" means two or more. "and/or" describes an association relationship of an association object, meaning that there may be three relationships, e.g., a and/or B may represent: a exists alone, A and B exist together, and B exists alone. The character "/" generally indicates that the context-dependent object is an "or" relationship.
The workflow between the existing research personnel and the translation personnel is complicated, related files to be translated are required to be manually transferred, and meanwhile, because the research personnel and the translation personnel respectively lack professional skills of the other side, all the related files are required to be manually converted into the respectively familiar work files, so that the workload of the whole translation process is increased. In addition, a great deal of repeated content may exist in the files to be translated submitted by the research and development personnel for many times, which increases unnecessary repeated translation work of a third-party translation mechanism, and thus the whole translation process is inefficient.
For this purpose, an aspect of the present application provides a translation method applied to a translation platform. Referring specifically to fig. 1, fig. 1 is a flow chart illustrating a translation method applied to a translation platform according to an exemplary embodiment of the present application. The translation method at least comprises S110 to S140, and is described in detail as follows:
S110: receiving a plurality of files to be translated; wherein; each file to be translated comprises a plurality of files to be translated and translation languages corresponding to the files to be translated.
The file to be translated is a source language configuration file input by a developer on a file input page of the translation platform. Each document to be translated comprises at least one document to be translated, and each document to be translated is recorded in the document to be translated in the form of a key-value pair. The key value is a document identifier corresponding to the document to be translated, and the value is the content of the document to be translated.
After receiving the file to be translated, the translation platform determines a file format according to the file name suffix, and analyzes the file to be translated by selecting a corresponding preset analysis algorithm to obtain key values and value values corresponding to a plurality of files to be translated in the file to be translated. Referring to fig. 2, fig. 2 is a schematic diagram illustrating key values and value values corresponding to different files to be translated according to the present application. The java configuration file format preset analysis algorithm comprises the following steps: by identifying "=", the value to the left of "=" is identified as the key value, and the value to the right is identified as the value. As another example, a Python profile format parsing algorithm: by identifying every two consecutive lines, the double-quote content following the mesgid is identified as a key value and the double-quote content following the msgstr is identified as a value.
The file types of the files to be translated include: java: properties file types, for example: messages_en. Swift: strings file type, for example: localzable, strings (englist); javaScript: json file type, e.g.: en.json, zh.json; python: the type of the spot file, for example: messages.
S120: and calculating to obtain a hash value corresponding to each document to be translated according to the plurality of documents to be translated and the preset function.
By way of example, through md5 hash algorithm function, hash values corresponding to each document to be translated are calculated, and hash values corresponding to different translation documents are different, so that subsequent check and reuse are facilitated.
S130: and determining whether a target to-be-translated document corresponding to the target to-be-translated document exists according to the hash value and the translation language corresponding to each to-be-translated document.
By way of example, a search combination of hash value and translation language is established, and the target translation document stored by the translation platform (i.e. the translation document obtained after translating the target translation document) can be accurately searched according to the search combination, so as to determine whether the translation platform translates the target translation document.
S140: if the target to-be-translated text exists, displaying other to-be-translated text except the target to-be-translated text on a translation page so that a translator translates the other to-be-translated text and acquires the translation text corresponding to the other to-be-translated text.
The translation page is a page displayed for a translator, and the translator can directly translate related text to be translated on the translation page, so that the translation platform can collect the translation text input by the translator.
After the translation work is completed, a developer can select a corresponding configuration file format type in the translation platform according to the programming language framework, namely the translation platform can directly convert the translation file into a format type file expected by the developer without manual conversion of the developer.
Illustratively, the developer views the previously created translation task in the web portal and selects the corresponding programming language java, python, swift, javascript, etc.; and requests the derived task identity, the derived programming language format. According to different preset conversion algorithms, converting the translated version into files of different programming languages, packaging the converted files into ZIP compressed files, and realizing a downloading function through an http response return stream file so as to provide direct downloading of related files for research and development personnel.
In this embodiment, the target document to be translated is a document translated on the translation platform, and the translation platform has recorded therein a translation document corresponding to the target document to be translated. In order to avoid unnecessary repeated translation work by the translator, the translation work is not displayed in the translation page, so that the translator only translates other files to be translated except the target file to be translated.
The embodiment is applied to a translation platform shared by research personnel and translation personnel, and the translation platform can automatically convert corresponding files so as to simplify the complicated translation process. The translation platform calculates a hash value corresponding to each to-be-translated document according to a preset function, and determines whether a target to-be-translated document corresponding to the target to-be-translated document exists according to the hash value corresponding to each to-be-translated document and the translation language; if the target to-be-translated text exists, the target to-be-translated text does not need to be displayed on a translation page, so that unnecessary repeated translation work of a translator is avoided, and translation efficiency is improved.
In another exemplary embodiment of the present application, how the translation platform constructs the translation task table, import details table and translation table is described in detail, referring specifically to fig. 3, fig. 3 is a flow chart of another translation method applied to the translation platform, which is shown based on the exemplary embodiment shown in fig. 1. The translation method further includes S310 based on S110 to S140 shown in fig. 1, and is described in detail as follows:
S310: constructing a translation task table, an importing detail table and a translation document table; the translation task table is used for recording task identifications and translation languages corresponding to each translation task, and each translation task comprises translation tasks aiming at least one document to be translated; the importing detail table is used for recording at least one to-be-translated file included in each translation task, and file identification and hash values corresponding to the at least one to-be-translated file; the translation table is used for recording hash values corresponding to the to-be-translated text, translation languages and translation text.
Referring to table 1, table 1 is an exemplary translation task table, which may be used to record task identifiers and translation languages corresponding to each translation task. Wherein each translation task may include translation tasks for a plurality of documents to be translated.
Task identification Translating languages
…… ……
…… ……
…… ……
TABLE 1
The task identifier in the imported detail table corresponds to the task identifier in the translation detail table, and the translation task of the same task identifier is derived from the same file to be translated, as shown in table 2, table 2 is an exemplary imported detail table, that is, the task identifiers corresponding to all the files to be translated in the same file to be translated are the same.
TABLE 2
The translation table and the imported detail table both include hash values corresponding to the to-be-translated document, so as to relate the to-be-translated document to the translation document, refer to table 3 specifically, and table 3 is an exemplary translation table. Recorded in table 3 are the translation documents corresponding to the relevant translation documents collected.
The translation platform can quickly search the corresponding translation file according to the search combination of the hash value and the translation language in the translation file table shown in the table 3 so as to determine the translated target file to be translated, so that the repeated data cannot be inserted into the translation file table.
Hash value corresponding to text to be translated Translating languages Translation version
f070aa69f8d73650da15a0f9d0878a411 EN hello
f070aa69f8d73650da15a0f9d0878a411 ES Hola
…… …… ……
TABLE 3 Table 3
In some embodiments, the target to-be-translated text which has the target translation text corresponding to the target translation text can be displayed in the display page, and the target translation text in the translation text table is automatically filled in the blank corresponding to the target to-be-translated text which is input by the translation staff, that is, the translation staff is not required to repeatedly translate the target to-be-translated text again, so that the working efficiency of the translation staff is improved.
In this embodiment, the translation platform imports the detail table and the translation document table through the constructed translation task table to record corresponding data, so as to better analyze and process the to-be-translated document in the received translation document, quickly determine the untranslated to-be-translated document according to the three tables, and display the untranslated to-be-translated document on the translation page, so as to collect the translation document input by the translation personnel.
Meanwhile, the translation platform can also generate files of different programming languages including the translation version according to the three tables so as to be directly packed and downloaded by a developer without manually converting the translation version into the corresponding format type file by the developer, thereby improving the working efficiency of the developer.
In another exemplary embodiment of the present application, how the translation task table and the import detail table are updated by the translation platform is described in detail, and based on the translation method applied to the translation platform shown in fig. 3, the translation method further includes S31 to S33, which are described in detail as follows:
s31: generating task identifiers corresponding to each file to be translated according to the receiving sequence among the files to be translated; and the task identifiers corresponding to all the files to be translated in each file to be translated are the same.
If the translation platform receives the file to be translated A and the file to be translated B in sequence, the file to be translated A corresponds to the first task identifier, and the task identifiers corresponding to all the files to be translated in the file to be translated are the first task identifiers; and the files to be translated correspond to the second task identifiers, and the task identifiers corresponding to all the files to be translated in the files to be translated are the second task identifiers.
S32: and updating the translation task list according to the translation languages and the corresponding task identifications included in each file to be translated, so as to obtain an updated translation task list.
In some embodiments, the task names and task submitters corresponding to the translation tasks may also be recorded in the translation task table, as shown in table 4, where table 4 is an exemplary updated translation task table, and the task names and task submitters recorded therein may be used to more accurately classify the translation tasks, so as to better locate the corresponding translation tasks.
Task identification Task name Translating languages Task presenter
1 Tsp iteration 1 EN Zhang San
2 OTA iteration 2 EN\ES Li Si
…… …… …… ……
TABLE 4 Table 4
S33: and updating the import detail table according to each text to be translated and the hash value corresponding to each text to be translated, and the text identifier and the task identifier to obtain an updated import detail table.
For example, referring to table 5, table 5 is an exemplary updated import details table, where the translation tasks with task identifiers of 1 are all derived from the same file to be translated.
TABLE 5
In another exemplary embodiment of the present application, how the translation task table and the import detail table are updated by the translation platform is described in detail, and based on the translation method applied to the translation platform shown in fig. 3, the translation method further includes S410 to S420, which are described in detail as follows:
S410: and detecting whether translation texts corresponding to other texts to be translated are acquired.
And detecting whether the corresponding translation file input by the translation personnel is acquired or not, and if the corresponding translation file is not acquired, characterizing that the translation personnel does not translate the translation file or does not input the corresponding translation file, and not needing to update the translation file table.
S420: if the translation files corresponding to other files to be translated are detected and collected, the translation file table is updated according to hash values corresponding to other files to be translated, translation languages and the translation files, so that the updated translation file table is obtained.
In this embodiment, the updating process is to supplement the translation, for example, if detecting and collecting the translation corresponding to another translation to be translated, the contents in the above table 3 are supplemented, that is, the corresponding translation, the hash value and the translation language corresponding to the translation to be translated are supplemented, so as to obtain an updated translation table as shown in table 6, and table 6 is an exemplary updated translation table. The last two lines of data are hash values corresponding to other supplementary text to be translated, translation languages and translation texts.
TABLE 6
The embodiment further illustrates that when the translation files corresponding to other translation files are collected, the collected data is needed to be used for updating the translation file table in time, and the hash values, the translation languages and the translation files corresponding to the other translation files are supplemented to the translation file table so as to obtain an updated translation file table, so that repeated translation of the other translation files is avoided, and the translation efficiency is improved.
Further, the translation method in some embodiments further includes S510 to S520 based on S410 to S420 described above, and the following details are described below:
s510: and detecting whether the same translation table successfully matched with other translations exists in the translation table.
In this embodiment, the collected other translation schemes are subjected to the check and retransmission process before the translation scheme table is updated according to hash values corresponding to other translation schemes, translation languages and translation schemes.
S520: if the same translation is present, deleting the same translation from other translations to obtain deleted other translations, and updating the translation table according to hash values corresponding to the deleted other translations to obtain updated translation table.
The present embodiment is exemplarily described: matching the collected other translation with all the translation in the current translation table; if the matching fails, the translation document table can be updated directly according to hash values corresponding to other documents to be translated, translation languages and translation documents, so that the updated translation document table can be obtained. If the matching is successful, the fact that the same translation table is the same as other translations exists in the current translation table is characterized in that the same translation table in other translations needs to be deleted, hash values, translation languages and translation tables corresponding to other deleted translations to be added into the current translation table, and accordingly an updated translation table is obtained.
In this embodiment, by detecting whether the same translation table successfully matched with other translations exists in the translation table, the other translations are subjected to check and repeat processing, so as to avoid repeated importing of the translation table recorded in the translation table into the translation table, thereby avoiding invalid importing operation and improving updating efficiency of the translation table.
In another exemplary embodiment of the present application, based on the translation method shown in any one of the foregoing exemplary embodiments, how to determine whether there is a target to-be-translated document corresponding to the target to-be-translated document according to the hash value and the translation language corresponding to each to-be-translated document is further described in detail, where the translation method in S130 in the translation method shown in any one of the foregoing exemplary embodiments further includes S610 to S620, which is described in detail as follows:
S610: traversing all the to-be-translated texts, and taking the traversed to-be-translated texts as target to-be-translated texts.
The embodiment ensures that the parameters corresponding to each to-be-translated document are matched with the existing parameters without omission by traversing the to-be-translated document.
S620: and respectively matching the target hash value and the target translation language corresponding to the target translation document with the existing hash value and translation language, and determining whether the target translation document corresponding to the target translation document exists according to the matching result.
Illustratively, the target hash value corresponding to the target to-be-translated document is matched with all hash values in table 3, and the target translation language corresponding to the target to-be-translated document is matched with the translation language in table 3, so as to determine a final matching result, and determine whether the target to-be-translated document corresponding to the target to-be-translated document exists.
According to the embodiment, through traversing the to-be-translated text, the traversed target hash value and target translation language corresponding to the target to-be-translated text are respectively matched with the existing hash value and translation language, so that the matching operation of the parameters corresponding to each to-be-translated text and the existing parameters is guaranteed to be carried out without omission, whether the target to-be-translated text corresponding to the target to-be-translated text exists or not is determined according to a matching result, and the accuracy of a determining result is improved.
In another exemplary embodiment of the present application, the above S620 is described in detail, that is, the above S620 further includes: if the matching result represents that the matching of the target hash value and the existing hash value is successful, the matching of the target translation language and the existing translation language is successful, and the hash value and the translation language which are successfully matched correspond to the same existing translation document, determining that the target document to be translated corresponding to the target translation document exists.
For example, if the target hash value is successfully matched with the hash value "f070aa69f8d73650da15a0f9d0878a411" corresponding to the to-be-translated version in table 3, and the target translation language is successfully matched with "EN", as can be seen from table 3, "f070aa69f8d73650da15a0f9d0878a411" and "EN" correspond to the same translation version, "hello", it is determined that there is a corresponding target translation version, and it can be further determined that the target to-be-translated version has been translated.
If the matching result represents that the matching of the target hash value and the existing hash value fails, or the matching of the target translation language and the existing translation language fails, or the matching of the hash value and the translation language which succeed corresponds to different existing target translations, determining that the target to-be-translated version corresponding to the target translation version does not exist.
Illustratively, if there is no hash value matching the target hash value in table 3, or there is no translation language matching the target translation language in table 3, it may be determined that there is no target translation in table 3, i.e. the translation platform has not translated the target document to be translated.
As another example, if the target hash value is successfully matched with the hash value "f070aa69f8d73650da15a0f9d0878a411" corresponding to the to-be-translated document in table 3, and the target translation language is successfully matched with "ES", as can be seen from table 3, the translation document corresponding to "f070aa69f8d73650da15a0f9d0878a411" is "hello", the translation document corresponding to "EN" is "Hola", and it is obvious that the two correspond to different translation documents, it is determined that the target to-be-translated document corresponding to the target translation document does not exist.
The embodiment provides a method for determining whether the target to-be-translated document corresponding to the target translation document exists according to the matching result, and accurately determines whether the target to-be-translated document corresponding to the target translation document exists or not according to the matching result of the hash value, the matching result of the translation language, the hash value successfully matched and the existing translation document corresponding to the translation language.
In another exemplary embodiment of the present application, an application scenario of the above-mentioned multiple translation methods is illustrated, referring specifically to fig. 4, and fig. 4 is a schematic diagram of an application scenario of the translation method applied to the translation platform according to the present application. The three terminals, including the developer 100, the translation platform 200 and the translator 300, can perform data transmission by wired or wireless communication, and the present application is not limited to the data transmission manner between them. The server 201 may be disposed in the translation platform 200 as shown in fig. 4, or may be independent of the translation platform 200, and the positional relationship and connection manner between them are not limited in the present application.
The developer 100 inputs different types of source files as files to be translated into the translation platform 200, the server 201 displays the files to be translated in the translation page according to the received files to be translated, so that the translator 300 can translate the files to be translated in the translation page, and inputs corresponding translation files, so that the server 201 converts the received corresponding translation files into format type files corresponding to programming languages expected by the developer according to a preset conversion algorithm, and the developer does not need to manually convert the translation files into the corresponding format type files, thereby improving the working efficiency of the developer.
The server 201 may be used as an execution end of the translation method shown in any of the above exemplary embodiments to execute any of the above translation methods, and the following exemplary description of the translation method executed by the server 201 is given below:
the server 201 receives a plurality of files to be translated; wherein; each file to be translated comprises a plurality of files to be translated and translation languages corresponding to the files to be translated; the server 201 calculates and obtains a hash value corresponding to each document to be translated according to a plurality of documents to be translated and a preset function; the server 201 determines whether a target to-be-translated version corresponding to the target to-be-translated version exists according to the hash value and the translation language corresponding to each to-be-translated version; if the server 201 determines that the target document to be translated exists, other documents to be translated except the target document to be translated are displayed on the translation page, so that the translator 300 translates the other documents to be translated and acquires the translated documents corresponding to the other documents to be translated.
Specifically, the server 201 receives an http request of a source language configuration file input by the developer 100, and selects a corresponding parsing algorithm according to a suffix name of the source language configuration file, so as to parse and obtain a corresponding key-value key value pair.
The server 201 generates a task identifier corresponding to each file to be translated according to the receiving sequence between the source language configuration files, and imports each task into the translation task table to obtain an updated translation task table.
According to the source language configuration file and the preset function, the server 201 calculates to obtain a hash value corresponding to each to-be-translated version in the source language configuration file, and inserts the key value, the value and the task identifier in the key value pair and the value pair corresponding to each to-be-translated version in the import detail table to obtain an updated import detail table.
The server 201 generates a translation page for the translator 300 to work according to the updated translation task table and the updated import detail table, and displays the document to be translated in the translation page. In the translation process of the translator 300, the server 201 determines whether a target translation version exists in the current translation version table (i.e. a translation version corresponding to a related translation version in the file to be translated) according to the hash value and the translation language corresponding to each translation to be translated; if so, the target translation document is directly filled into the corresponding position in the translation page, so as to avoid repeated translation of the target translation document by the translator 300.
After the translator 300 submits the translated version, the server 201 inserts the collected translated version, the translated language thereof and the hash value corresponding to the corresponding version to be translated into the translated version table to obtain an updated translated version table. It should be noted that if the hash value corresponding to the corresponding to-be-translated document and the translation language thereof already exist in the translation document table, the translation document table cannot be inserted, so as to avoid repeated data insertion.
The server 201 may be an independent physical server, or may be a server cluster or a distributed system formed by a plurality of physical servers, where a plurality of servers may form a blockchain, and the servers are nodes on the blockchain, and the server 201 may also be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs (Content Delivery Network, content delivery networks), and basic cloud computing services such as big data and artificial intelligent platforms, which are not limited herein.
In another aspect, the present application further provides a translation device applied to the translation platform, as shown in fig. 5, and fig. 5 is a schematic structural diagram of the translation device applied to the translation platform according to an exemplary embodiment of the present application. The translation apparatus 500 includes:
A receiving module 510, configured to receive a plurality of files to be translated; wherein; each file to be translated comprises a plurality of files to be translated and translation languages corresponding to the files to be translated.
The calculating module 530 is configured to calculate, according to the plurality of to-be-translated documents and the preset function, a hash value corresponding to each to-be-translated document.
The determining module 550 is configured to determine whether a target to-be-translated document corresponding to the target to-be-translated document exists according to the hash value and the translation language corresponding to each to-be-translated document.
And the translation module 570 is configured to display other to-be-translated documents except the target to-be-translated document on the translation page if it is determined that the target to-be-translated document exists, so that a translator translates the other to-be-translated documents and acquires the translation documents corresponding to the other to-be-translated documents.
In an alternative manner, the translation device 500 further includes:
the construction module is used for constructing and obtaining a translation task table, an importing detail table and a translation document table; the translation task table is used for recording task identifications and translation languages corresponding to each translation task, and each translation task comprises translation tasks aiming at least one document to be translated; the importing detail table is used for recording at least one to-be-translated file included in each translation task, and file identification and hash values corresponding to the at least one to-be-translated file; the translation table is used for recording hash values corresponding to the to-be-translated text, translation languages and translation text.
In an alternative manner, the translation device 500 further includes:
the task identifier generation module is used for generating task identifiers corresponding to each file to be translated according to the receiving sequence among the files to be translated; and the task identifiers corresponding to all the files to be translated in each file to be translated are the same.
And the translation task table updating module is used for updating the translation task table according to the translation languages and the corresponding task identifications included in each file to be translated so as to obtain an updated translation task table.
And the import detail table updating module is used for updating the import detail table according to each to-be-translated file and the hash value corresponding to each to-be-translated file, and the file identifier and the task identifier so as to obtain an updated import detail table.
In an alternative manner, the translation device 500 further includes:
the first detection module is used for detecting whether the translation text corresponding to other text to be translated is acquired.
And the translation table updating module is used for updating the translation table according to the translation languages and the translation tables according to the hash values corresponding to the other to-be-translated tables if the translation tables corresponding to the other to-be-translated tables are detected and acquired, so as to obtain the updated translation table.
In an alternative manner, the translation device 500 further includes:
and the second detection module is used for detecting whether the same translation table successfully matched with other translations exists in the translation table.
And the deleting module is used for deleting the same translation from other translation if the same translation exists, obtaining other deleted translation, and updating the translation table according to hash values, translation languages and translation tables corresponding to other deleted translation to obtain an updated translation table.
In an alternative manner, the determining module 550 further includes:
the traversing unit is used for traversing all the to-be-translated texts and taking the traversed to-be-translated texts as target to-be-translated texts.
And the matching unit is used for respectively matching the target hash value and the target translation language corresponding to the target translation document with the existing hash value and translation language, and determining whether the target translation document corresponding to the target translation document exists according to the matching result.
In an alternative way, the matching unit further comprises:
and the matching success plate is used for determining that the target to-be-translated document corresponding to the target translation document exists if the matching result represents that the target hash value is successfully matched with the existing hash value, the target translation language is successfully matched with the existing translation language, and the hash value and the translation language which are successfully matched correspond to the same existing translation document.
The translation device is applied to a translation platform shared by research personnel and translation personnel, and the translation platform can automatically convert corresponding files so as to simplify the complicated translation process. The translation platform calculates a hash value corresponding to each to-be-translated document according to a preset function, and determines whether a target to-be-translated document corresponding to the target to-be-translated document exists according to the hash value corresponding to each to-be-translated document and the translation language; if the target to-be-translated text exists, the target to-be-translated text does not need to be displayed on a translation page, so that unnecessary repeated translation work of a translator is avoided, and translation efficiency is improved.
It should be noted that, the translation device provided in the foregoing embodiment and the translation method provided in the foregoing embodiment belong to the same concept, and a specific manner in which each module and unit perform an operation has been described in detail in the method embodiment, which is not described herein again.
Another aspect of the present application also provides an electronic device, including: a controller; and a memory for storing one or more programs that when executed by the controller perform the translation method described above.
Referring to fig. 5, fig. 5 is a schematic diagram of a computer system of an electronic device according to an exemplary embodiment of the present application, which is suitable for implementing the electronic device according to the embodiment of the present application.
It should be noted that, the computer system 500 of the electronic device shown in fig. 5 is only an example, and should not impose any limitation on the functions and the application scope of the embodiments of the present application.
As shown in fig. 5, the computer system 500 includes a central processing unit (Central Processing Unit, CPU) 501, which can perform various appropriate actions and processes, such as performing the methods in the above-described embodiments, according to a program stored in a Read-Only Memory (ROM) 502 or a program loaded from a storage section 508 into a random access Memory (Random Access Memory, RAM) 503. In the RAM 503, various programs and data required for the system operation are also stored. The CPU 501, ROM 502, and RAM 503 are connected to each other through a bus 504. An Input/Output (I/O) interface 505 is also connected to bus 504.
The following components are connected to the I/O interface 505: an input section 506 including a keyboard, a mouse, and the like; an output portion 507 including a Cathode Ray Tube (CRT), a liquid crystal display (Liquid Crystal Display, LCD), and the like, and a speaker, and the like; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN (Local Area Network ) card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The drive 510 is also connected to the I/O interface 505 as needed. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as needed so that a computer program read therefrom is mounted into the storage section 508 as needed.
In particular, according to embodiments of the present application, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising a computer program for performing the method shown in the flowchart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication portion 509, and/or installed from the removable media 511. When executed by a Central Processing Unit (CPU) 501, performs the various functions defined in the system of the present application.
It should be noted that, the computer readable medium shown in the embodiments of the present application may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium may be, for example, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-Only Memory (ROM), an erasable programmable read-Only Memory (Erasable Programmable Read Only Memory, EPROM), flash Memory, an optical fiber, a portable compact disc read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present application, however, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with a computer-readable computer program embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. A computer program embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. Where each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present application may be implemented by software, or may be implemented by hardware, and the described units may also be provided in a processor. Wherein the names of the units do not constitute a limitation of the units themselves in some cases.
Another aspect of the application also provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a translation method as before. The computer-readable storage medium may be included in the electronic device described in the above embodiment or may exist alone without being incorporated in the electronic device.
Another aspect of the application also provides a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the translation method provided in the above-described respective embodiments.
According to an aspect of the embodiment of the present application, there is also provided a computer system including a central processing unit (Central Processing Unit, CPU) which can perform various appropriate actions and processes, such as performing the method in the above-described embodiment, according to a program stored in a Read-Only Memory (ROM) or a program loaded from a storage section into a random access Memory (Random Access Memory, RAM). In the RAM, various programs and data required for the system operation are also stored. The CPU, ROM and RAM are connected to each other by a bus. An Input/Output (I/O) interface is also connected to the bus.
The following components are connected to the I/O interface: an input section including a keyboard, a mouse, etc.; an output section including a Cathode Ray Tube (CRT), a liquid crystal display (Liquid Crystal Display, LCD), and the like, and a speaker, and the like; a storage section including a hard disk or the like; and a communication section including a network interface card such as a LAN (Local Area Network ) card, a modem, or the like. The communication section performs communication processing via a network such as the internet. The drives are also connected to the I/O interfaces as needed. Removable media such as magnetic disks, optical disks, magneto-optical disks, semiconductor memories, and the like are mounted on the drive as needed so that a computer program read therefrom is mounted into the storage section as needed.
The foregoing is merely illustrative of the preferred embodiments of the present application and is not intended to limit the embodiments of the present application, and those skilled in the art can easily make corresponding variations or modifications according to the main concept and spirit of the present application, so that the protection scope of the present application shall be defined by the claims.

Claims (10)

1. A translation method applied to a translation platform, the translation method comprising:
Receiving a plurality of files to be translated; wherein; each file to be translated comprises a plurality of files to be translated and translation languages corresponding to the files to be translated;
according to the multiple to-be-translated documents and the preset function, calculating to obtain a hash value corresponding to each to-be-translated document;
determining whether a target to-be-translated version corresponding to the target to-be-translated version exists according to the hash value and the translation language corresponding to each to-be-translated version;
if the target to-be-translated text exists, displaying other to-be-translated text except the target to-be-translated text on a translation page so that a translator translates the other to-be-translated text and acquires the translation text corresponding to the other to-be-translated text.
2. The translation method according to claim 1, characterized in that the translation method further comprises:
constructing a translation task table, an importing detail table and a translation document table; the translation task table is used for recording task identifications and translation languages corresponding to each translation task, and each translation task comprises translation tasks aiming at least one document to be translated; the importing detail table is used for recording at least one to-be-translated document included in each translation task, and a document identifier and a hash value corresponding to the at least one to-be-translated document; the translation document table is used for recording hash values corresponding to the documents to be translated, translation languages and translation documents.
3. The translation method according to claim 2, characterized in that the translation method further comprises:
generating task identifiers corresponding to each file to be translated according to the receiving sequence among the files to be translated; the task identifiers corresponding to all the files to be translated in each file to be translated are the same;
updating the translation task table according to the translation language and the corresponding task identifier included in each file to be translated to obtain an updated translation task table;
and updating the import detail table according to each text to be translated and the hash value corresponding to each text to be translated, and the text identifier and the task identifier to obtain an updated import detail table.
4. The translation method according to claim 2, characterized in that the translation method further comprises:
detecting whether translation documents corresponding to the other documents to be translated are acquired;
and if the translation files corresponding to the other files to be translated are detected and collected, updating the translation file table according to the hash values corresponding to the other files to be translated, the translation languages and the translation files to obtain an updated translation file table.
5. The translation method according to claim 4, wherein said translation method further comprises:
detecting whether the translation file table has the same translation file which is successfully matched with other translation files;
if the same translation is present, deleting the same translation from the other translations to obtain deleted other translations, and updating the translation table according to hash values corresponding to the deleted other translations to obtain an updated translation table by translating languages and the translation table.
6. The translation method according to any one of claims 1 to 5, wherein determining whether there is a target translation to be translated corresponding to the target translation has been determined according to the hash value and the translation language corresponding to each translation to be translated, further comprises:
traversing all the to-be-translated cases, and taking the traversed to-be-translated cases as target to-be-translated cases;
and respectively matching the target hash value and the target translation language corresponding to the target translation document with the existing hash value and translation language, and determining whether the target translation document corresponding to the target translation document exists according to a matching result.
7. The translation method according to claim 6, wherein the determining whether the target to-be-translated document corresponding to the target translated document already exists according to the matching result, further comprises:
and if the matching result represents that the target hash value is successfully matched with the existing hash value, the target translation language is successfully matched with the existing translation language, and the matched hash value and the translation language correspond to the same existing translation language, determining that the target to-be-translated document corresponding to the target translation document exists.
8. A translation apparatus for use in a translation platform, the translation apparatus comprising:
the receiving module is used for receiving a plurality of files to be translated; wherein; each file to be translated comprises a plurality of files to be translated and translation languages corresponding to the files to be translated;
the calculation module is used for calculating a hash value corresponding to each document to be translated according to the plurality of documents to be translated and the preset function;
the determining module is used for determining whether a target to-be-translated version corresponding to the target to-be-translated version exists or not according to the hash value and the translation language corresponding to each to-be-translated version;
And the translation module is used for displaying other to-be-translated texts except the target to-be-translated text on a translation page if the target to-be-translated text exists, so that a translator translates the other to-be-translated texts and acquires the translation texts corresponding to the other to-be-translated texts.
9. An electronic device, comprising:
a controller;
a memory for storing one or more programs that, when executed by the controller, cause the controller to implement the translation method of any of claims 1-7.
10. A computer readable storage medium having stored thereon computer readable instructions which, when executed by a processor of a computer, cause the computer to perform the translation method of any of claims 1 to 7.
CN202311229035.8A 2023-09-21 2023-09-21 Translation method, device and storage medium applied to translation platform Pending CN117195921A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311229035.8A CN117195921A (en) 2023-09-21 2023-09-21 Translation method, device and storage medium applied to translation platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311229035.8A CN117195921A (en) 2023-09-21 2023-09-21 Translation method, device and storage medium applied to translation platform

Publications (1)

Publication Number Publication Date
CN117195921A true CN117195921A (en) 2023-12-08

Family

ID=88994168

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311229035.8A Pending CN117195921A (en) 2023-09-21 2023-09-21 Translation method, device and storage medium applied to translation platform

Country Status (1)

Country Link
CN (1) CN117195921A (en)

Similar Documents

Publication Publication Date Title
CN109241141B (en) Deep learning training data processing method and device
CN108628830B (en) Semantic recognition method and device
CN111709527A (en) Operation and maintenance knowledge map library establishing method, device, equipment and storage medium
CN111159220B (en) Method and apparatus for outputting structured query statement
CN110851468A (en) Method and device for making simulation response to test request of client
US20200034481A1 (en) Language agnostic data insight handling for user application data
CN111104479A (en) Data labeling method and device
CN111506603B (en) Data processing method, device, equipment and storage medium
CN111435367A (en) Knowledge graph construction method, system, equipment and storage medium
CN110737655B (en) Method and device for reporting data
CN113761428A (en) Page rendering method, device and system, storage medium and electronic equipment
CN110837356A (en) Data processing method and device
CN113094625B (en) Page element positioning method and device, electronic equipment and storage medium
CN112582073B (en) Medical information acquisition method, device, electronic equipment and medium
CN113094287A (en) Page compatibility detection method, device, equipment and storage medium
CN108932225A (en) For natural language demand to be converted into the method and system of semantic modeling language statement
CN116562255A (en) Form information generation method, form information generation device, electronic equipment and computer readable medium
CN117195921A (en) Translation method, device and storage medium applied to translation platform
CN110110032B (en) Method and device for updating index file
CN108182628B (en) Method, system, equipment and storage medium for ordering travel
US20180032510A1 (en) Automated translation of source code
CN114817276A (en) Method, system, equipment and storage medium for updating file
CN113590883A (en) Method, system, device and storage medium for mapping medical information and database
CN110196803B (en) Software defect training method and system
CN113553826A (en) Information input method and device combining RPA and AI and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination