A term translation method and device, electronic equipment and storage medium

CN115545046BActive Publication Date: 2026-06-12KINGDEE SOFTWARE(CHINA) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
KINGDEE SOFTWARE(CHINA) CO LTD
Filing Date
2022-10-18
Publication Date
2026-06-12

AI Technical Summary

Technical Problem

In existing technologies, translation platforms need to maintain the interaction logic of multiple extraction interfaces, which leads to a large workload in development and maintenance and an increase in program complexity.

Method used

By standardizing the input and output of the extraction interfaces of each application, it is ensured that each extraction interface uses a unified standard to access the translation platform and uses a unified extraction request template and response template for term translation.

🎯Benefits of technology

It significantly reduces the maintenance difficulty and defect risk of translation platforms, and improves development efficiency and system stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115545046B_ABST
    Figure CN115545046B_ABST
Patent Text Reader

Abstract

The application can provide a term translation method and device, electronic equipment and storage medium, and relates to the field of translation platform. The method comprises the following steps: obtaining term resource information, integrating the term resource information into an extraction request template, and obtaining first request information; sending the first request information to an extraction interface of an application, so that the extraction interface extracts a term to be translated from a term resource corresponding to the term resource information, integrates the term resource information and the term to be translated into an extraction response template, and returns first response information obtained by integration; the extraction interface of each application corresponds to a unified extraction request template and an extraction response template; extracting the term to be translated from the first response information and performing translation processing on the term to be translated; the input and output of the extraction interface of each application can be standardized, so that the extraction interface can access the translation platform by using a unified standard, thereby significantly reducing the maintenance difficulty and the risk of defects of the translation platform.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of translation platforms, and in particular to a method, apparatus, electronic device, and computer-readable storage medium for translating terms. Background Technology

[0002] A translation platform is a platform that provides term translation services to external applications. Each external application can provide an extraction API (Application Programming Interface) through which the translation platform requests terms to be translated. However, when customizing their extraction interfaces, applications often define the input and output formats based solely on their own needs, such as the source of the term to be translated or the structure of the file it belongs to. This results in the translation platform needing to maintain the interaction logic of multiple extraction interfaces, increasing the development and maintenance workload for the platform's developers, as well as the program's complexity and the risk of defects. Summary of the Invention

[0003] The purpose of this invention is to provide a term translation method, apparatus, electronic device, and computer-readable storage medium that can standardize the input and output of extraction interfaces for various applications, ensuring that each extraction interface can access the translation platform using a unified standard, thereby significantly reducing the maintenance difficulty and risk of defects in the translation platform.

[0004] To solve the above-mentioned technical problems, the present invention provides a term translation method, comprising:

[0005] Obtain term resource information and integrate the term resource information into the extraction request template to obtain the first request information;

[0006] The first request information is sent to the extraction interface of the application so that the extraction interface extracts the term to be translated from the term resource corresponding to the term resource information, integrates the term resource information and the term to be translated into the extraction response template, and returns the integrated first response information; each of the extraction interfaces of the application corresponds to a unified extraction request template and extraction response template;

[0007] The term to be translated is extracted from the first response information, and the term to be translated is translated.

[0008] Optionally, integrating the term resource information into the extraction request template includes:

[0009] Extract the name, unique identifier, and language information of the term file from the term resource information, and integrate the name, unique identifier, and language information into the extraction request template;

[0010] Accordingly, the extraction interface extracts the terms to be translated from the term resources corresponding to the term resource information, including:

[0011] The extraction interface extracts the term to be translated from the term file corresponding to the term resource information.

[0012] Optionally, before obtaining the term resource information, the following may also be included:

[0013] Receive a resource list sent by the application; the resource list is used to record the term resources that can be extracted by the application's extraction interface;

[0014] Set a unique identifier for each term in the resource list.

[0015] Optionally, integrating the term resource information and the term to be translated into the extraction response template includes:

[0016] The extraction interface sets a unique identifier for each term to be translated.

[0017] The term resource information, the term to be translated, and the term's unique identifier are integrated into the extracted response template to obtain the first response information.

[0018] Optionally, after translating the term to be translated, the method further includes:

[0019] The term to be translated and the corresponding translated term are integrated into the construction request template to obtain the second request information;

[0020] The second request information is sent to the build interface of the application so that the build interface can construct an executable language file using the translated terms in the build interface request information and return the executable language file; each build interface of the application corresponds to a unified build request template;

[0021] Save the executable language file.

[0022] Optionally, sending the first request information to the application's extraction interface includes:

[0023] Query the first preset address information corresponding to the extraction interface of the application in the general configuration information, and send the first request information to the extraction interface according to the first preset address information;

[0024] Accordingly, sending the second request information to the application's build interface includes:

[0025] The second preset address information corresponding to the application's build interface is queried in the general configuration information, and the second request information is sent to the extraction interface according to the second preset address information.

[0026] Optionally, before sending the first request information to the extraction interface according to the first preset address information, the method further includes:

[0027] Use the first preset address information to determine whether the extraction interface can be accessed;

[0028] If so, then the step of sending the first request information to the extraction interface according to the first preset address information is executed;

[0029] Accordingly, before sending the second request information to the extraction interface according to the second preset address information, the method further includes:

[0030] The second preset address information is used to determine whether the construction interface can be accessed;

[0031] If so, then the step of sending the second request information to the extraction interface according to the second preset address information is performed.

[0032] The present invention also provides a term translation device, comprising:

[0033] The first integration module is used to obtain term resource information and integrate the term resource information into the extraction request template to obtain the first request information;

[0034] The extraction interface call module is used to send the first request information to the extraction interface of the application, so that the extraction interface extracts the term to be translated from the term resource corresponding to the term resource information, integrates the term resource information and the term to be translated into the extraction response template, and returns the integrated first response information; the extraction interfaces of each application correspond to a unified extraction request template and extraction response template;

[0035] The translation module is used to extract the term to be translated from the first response information and to translate the term to be translated.

[0036] The present invention also provides an electronic device, comprising:

[0037] Memory, used to store computer programs;

[0038] A processor for implementing the term translation method described above when executing the computer program.

[0039] The present invention also provides a computer-readable storage medium storing computer-executable instructions, which, when loaded and executed by a processor, implement the term translation method described above.

[0040] The present invention also provides a computer program product, including a computer program, wherein the computer program, when executed by a processor, implements the page generation method disclosed above.

[0041] This invention provides a term translation method, comprising: acquiring term resource information and integrating the term resource information into an extraction request template to obtain first request information; sending the first request information to an extraction interface of an application, so that the extraction interface extracts the term to be translated from the term resources corresponding to the term resource information; integrating the term resource information and the term to be translated into an extraction response template, and returning the integrated first response information; each extraction interface of the application corresponds to a unified extraction request template and extraction response template; extracting the term to be translated from the first response information, and performing translation processing on the term to be translated.

[0042] As can be seen, in this invention, each application's extraction interface corresponds to a unified extraction request template and extraction response template. The translation platform can then use the unified extraction request template to integrate the acquired term resource information to obtain a first request message with a standardized format. Similarly, after receiving the first request message from the translation platform, the extraction interface can extract the term to be translated from the term resources corresponding to the term resource information, and use the unified extraction response template to integrate the term to be translated and the term resource information to obtain a first response message with a standardized format. This first response message is then returned to the translation platform, enabling the latter to perform translation processing on the term to be translated in the first response message. In other words, this invention standardizes the input and output of each application's extraction interface, ensuring that all extraction interfaces can access the translation platform using a unified standard. This avoids the problem of the translation platform needing to maintain multiple extraction interface interaction logics, significantly reducing the development and maintenance workload of translation platform developers, and also reducing program complexity and the risk of defects. This invention also provides a term translation device, electronic device, and computer-readable storage medium, which have the aforementioned beneficial effects. Attached Figure Description

[0043] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0044] Figure 1 A flowchart illustrating a term translation method provided in an embodiment of the present invention;

[0045] Figure 2 A timing diagram of a term translation method provided in an embodiment of the present invention;

[0046] Figure 3 This is a structural block diagram of a term translation device provided in an embodiment of the present invention. Detailed Implementation

[0047] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0048] In related technologies, when customizing extraction interfaces for translation platforms, applications only define the input and output formats of the extraction interfaces based on their own needs. For example, the input and output formats may be determined based on factors such as the source of the term to be translated and the structure of the file to which it belongs. This results in the translation platform needing to maintain the interaction logic of multiple extraction interfaces, which not only increases the development and maintenance workload of translation platform developers but also increases the complexity of the program and the risk of defects. In view of this, the present invention provides a term translation method that standardizes the input and output of extraction interfaces from various applications, ensuring that each extraction interface can access the translation platform using a unified standard, thereby significantly reducing the maintenance difficulty and the risk of defects in the translation platform. Please refer to... Figure 1 , Figure 1 A flowchart of a term translation method provided in an embodiment of the present invention, the method may include:

[0049] S101. Obtain term resource information and integrate the term resource information into the extraction request template to obtain the first request information.

[0050] In this embodiment of the invention, the term to be translated refers to a text term that needs to be translated into the target language in the application. It can come from various term resources, such as databases and term files. A term file is a file containing multiple terms to be translated, which can come from multiple locations within the application, such as the front-end interface and the back-end database, and can have various file formats, such as XML (eXtensible Markup Language), JSON (JavaScript Object Notation), and JS (JavaScript script). It is understood that different types of databases and term files of different formats store term files differently, and the interaction methods between databases and the methods for obtaining term files of different formats also vary. Therefore, the application can set up multiple extraction interfaces to provide the translation platform with terms to be translated from different term resources. For example, a front-end JSON extraction interface can be set up for JSON files from the front-end, an interface XML extraction interface can be set up for XML files from the user interface, a front-end JavaScript extraction interface can be set up for JavaScript files from the front-end, and a back-end database extraction interface can be set up for the back-end database. Similarly, it's understandable that since the interaction methods involved in acquiring various terminology resources differ, and the methods for extracting terms to be translated from each resource also vary, the necessary information that a translation platform needs to input to the extraction interface to achieve the desired effect of extracting terms from terminology resources may also differ. Therefore, if each extraction interface only sets its input and output according to its own needs, the translation platform may need to maintain a separate set of input and output interaction logic for each extraction interface, thereby increasing the complexity of the translation platform and the risk of defects.

[0051] Therefore, this embodiment of the invention will comprehensively unify the input information and input templates of each extraction interface. Specifically, when the translation platform executing this method obtains term resource information, it can integrate this information into the extraction request template to obtain the first request information. The term resource information includes information on extracting the term to be translated from the term resources. This term resource information is obtained by integrating the requirements of all extraction interfaces; in other words, the types of information that can be contained in the term resource information are uniform. Furthermore, the extraction request template is used to integrate the term resource information into the input format of the extraction interface. The extraction request templates corresponding to the extraction interfaces of each application are the same. In other words, the input standards corresponding to the extraction interfaces of each application are the same. In this way, the translation platform does not need to maintain separate input interaction logic for each extraction interface. By using the same extraction request template, it can integrate the request information that all extraction interfaces can process, thereby effectively reducing the complexity of the translation platform and the workload of development and maintenance.

[0052] It should be noted that the embodiments of the present invention do not limit the specific content of the term resource information or the specific form of the extraction request template. It is understood that the specific form of the extraction request template and its possible content are related to the content that can be contained in the term resource information. The content contained in the term resource information is the information required by the extraction interface to query term files and extract terms to be translated. Therefore, it is only necessary to comprehensively consider the needs of all extraction interfaces, add information to the term resource information that facilitates term file querying and term extraction for each extraction interface, and set the extraction request template according to the term resource information. In one possible case, the term resource information may contain the name, unique identifier, and language information of the term resource. The unique identifier serves as the unique identity information of the term information, distinguishing term resources with the same name; while the language information instructs the extraction interface to extract terms to be translated in a specified language from the term resource. The aforementioned term resource can further be a term file, and thus, in one possible case, the extraction request template can be:

[0053] {

[0054] "filename":"xxx.xml", / / Entry information

[0055] "unique":"1659335444000xml", / / unique identifier

[0056] "tlangs":"en_US", / / Language type

[0057] "ext":{} / / Extended information

[0058] }

[0059] The filename field records the name of the term file or other term resource; the unique field records the unique identifier of the term resource; the tlangs field records the language type of the term file; and the ext field records optional extended information.

[0060] In one possible scenario, integrating term resource information into the extraction request template may include:

[0061] Step 11: Extract the name, unique identifier, and language information of the term file from the term resource information, and integrate the name, unique identifier, and language information into the extraction request template.

[0062] Furthermore, this embodiment of the invention does not limit the subject of setting the unique identifier. For example, it can be set by the application for the term file, or it can be set by the translation platform for the term file. Considering that the unique identifiers set by different applications are not uniform and that duplicate unique identifiers may occur, in order to improve the management efficiency of the translation platform, in this embodiment of the invention, the unique identifier can be set by the translation platform for the term file. This embodiment of the invention also does not limit the setting process of the unique identifier. For example, the application can send the term resource information containing terms to be translated one by one to the translation platform for unique identifier setting, or the application can integrate the above term resource information into a resource list and then send this list to the translation platform so that the translation platform can set a corresponding unique identifier for each term file recorded in the list. In this embodiment of the invention, to improve setting efficiency, the application can send a resource list to allow the translation platform to set unique identifiers in batches.

[0063] In one possible scenario, prior to obtaining the term resource information, the following may also be included:

[0064] Step 21: Receive the resource list sent by the application; the resource list is used to record the term resources that can be extracted by the application's extraction interface;

[0065] Step 22: Set a unique identifier for each term in the resource list.

[0066] Specifically, the application side can set up a dedicated interface for extracting resource lists, so that the translation platform can obtain the above resource list from this interface.

[0067] S102. Send a first request message to the application's extraction interface, so that the extraction interface can extract the term to be translated from the term resources corresponding to the term resource information, integrate the term resource information and the term to be translated into the extraction response template, and return the integrated first response information; each application's extraction interface corresponds to a unified extraction request template and extraction response template. After completing the construction of the first request message, the translation platform can send it to the application's extraction interface; after receiving the first request message, the interface can find the corresponding term resources according to the term resource information contained in the message and extract the term to be translated, and then integrate the term resource information and the term to be translated into the extraction response template to obtain the first response information. Finally, the first response information can be sent to the translation platform so that the latter can start the translation process. For example, when the term resource is a term file, the extraction interface can extract the term to be translated from the term file corresponding to the term resource information. Similar to the extraction request template, the extraction interfaces of each application also have the same extraction response template. That is, all extraction interfaces use the same output standard to output response information. In this way, the translation platform does not need to set up separate response information parsing logic for each extraction interface. It can complete the parsing of response information of all extraction interfaces by using a unified extraction response template, which can further reduce the complexity of the translation platform and the workload of development and maintenance.

[0068] It should be noted that the embodiments of the present invention do not limit the specific form of the extracted response template, which should at least include term resource information and terms to be translated. In addition, it may include the execution status of the extraction operation, such as the operation status (success or failure), the error code corresponding to the operation failure, and custom information that is easy for relevant personnel to read. Furthermore, it is understood that the term resource may contain multiple terms to be translated with completely identical text content. To effectively distinguish these terms with identical text content and facilitate subsequent processing, the extraction interface can also set a unique term identifier for each extracted term to be translated, so as to effectively distinguish all terms to be translated.

[0069] In one possible scenario, integrating the term resource information and the term to be translated into the extracted response template may include:

[0070] Step 31: Extract the interface to set a unique identifier for each term to be translated;

[0071] Step 32: Integrate the term resource information, the term to be translated, and the term's unique identifier into the extraction response template to obtain the first response information.

[0072] In one possible scenario, the extracted response template can be:

[0073]

[0074]

[0075] The `success` field records the operation status, the `errorCode` field records the corresponding error code when the `success` field indicates failure, and the `data` field records the term resource information and its corresponding terms to be translated. Its `localeData` field records all terms to be translated, and each term has a unique identifier. It's important to note that the "en_US" in the extracted response template only indicates that the location is used to record the language type. Its specific value corresponds to the `tlang` field in the first response information. For example, when the `tlang` field is English (`en_US`), the value here is `en_US`; when the `tlang` field is Chinese (`zh_CN`), the value here is `zh_CN`.

[0076] S103. Extract the terms to be translated from the first response information and perform translation processing on the terms to be translated.

[0077] Since the output format of each extraction interface is uniform, the translation platform only needs to extract the terms to be translated from the first response information according to the unified extraction response template. It should be noted that the embodiments of this invention do not limit the specific method of translation processing; it can be machine translation or human translation, and can be set according to actual application needs.

[0078] Furthermore, after translating the terms to be translated, the translation platform can return the corresponding translated terms to the application. The application can then use the translated terms to build an executable language file corresponding to the term resource, and perform operations such as display output and saving using the executable language file. It is understandable that each application can also set up corresponding build interfaces for term resources with different sources and formats, to receive the translated terms returned by the translation platform and build the corresponding executable language file. Similarly, it is understandable that the input and output formats of each build interface can be standardized. This way, the translation platform only needs to use a unified build request template and build response template to handle the input and output operations of various build interfaces, thereby effectively reducing the complexity and development workload of the translation platform.

[0079] In one possible scenario, after translating the terminology to be translated, the following may also be included:

[0080] S104. Integrate the term to be translated and the translated terms corresponding to the term to be translated into the construction request template to obtain the second request information.

[0081] It should be noted that the request template should at least contain the terms to be translated and their corresponding translated terms. In addition, the request template may also contain unique identifiers for each term to be translated. The specific format of this template can be set according to the localeData extracted from the response template.

[0082] S105. Send a second request message to the application's build interface so that the build interface can construct an executable language file using the translated terms in the build interface request message and return the executable language file; each application's build interface corresponds to a unified build request template.

[0083] It should be noted that the embodiments of the present invention do not limit the specific file format of the executable language file, which is the same as that of the terminology resource. For example, when the terminology resource is a terminology file, if the terminology file is in XML format, then the executable language file can also be in XML format; if the terminology file is in JSON format, then the executable file can also be in JSON format.

[0084] S106. Save the executable language file.

[0085] Based on the above embodiments, in this invention, each application's extraction interface corresponds to a unified extraction request template and extraction response template. The translation platform can then use the unified extraction request template to integrate the acquired term resource information to obtain a first request message with a standardized format. Upon receiving the first request message from the translation platform, the extraction interface can also extract the term to be translated from the term resources corresponding to the term resource information, and use the unified extraction response template to integrate the term to be translated and the term resource information to obtain a first response message with a standardized format. This first response message is then returned to the translation platform, enabling the latter to perform translation processing on the term to be translated in the first response message. In other words, this invention standardizes the input and output of each application's extraction interface, ensuring that all extraction interfaces can access the translation platform using a unified standard. This avoids the problem of the translation platform needing to maintain multiple extraction interface interaction logics, significantly reducing the development and maintenance workload of translation platform developers, and also reducing program complexity and the risk of defects.

[0086] Based on the above embodiments, since the access addresses of each application are different, and multiple extraction interfaces and construction interfaces may be set in the same application, a general configuration information is also set in this embodiment of the invention to facilitate the configuration of the translation platform. This information is used to store the address information corresponding to each interface, so that the translation platform can use this address information to interact with specific interfaces. In one possible case, sending a first request message to the extraction interface of the application may include:

[0087] Step 41: Query the first preset address information corresponding to the extraction interface of the application in the general configuration information, and send the first request information to the extraction interface according to the first preset address information.

[0088] Accordingly, sending a second request to the application's build interface may include:

[0089] Step 51: Query the second preset address information corresponding to the application's build interface in the general configuration information, and send the second request information to the extraction interface according to the second preset address information.

[0090] Since the input and output formats of each extraction and construction interface have been standardized in this embodiment of the invention, only the address information corresponding to each interface needs to be recorded in the general configuration information, without recording the input and output formats of each interface, and without needing to develop corresponding interaction logic for each interface. Therefore, developers only need to add the address information of each interface to the general configuration information to complete the interface access, which can greatly reduce the development work. Of course, it is understandable that errors may inevitably occur during the configuration process, resulting in invalid address information. Therefore, when sending relevant request information, the translation platform can first determine whether the above address information is accessible. If it is accessible, the address information is valid; otherwise, it is invalid. The translation platform can output an alarm message indicating that the corresponding preset address information is incorrect when it determines that the address information is invalid, so that relevant personnel can investigate and handle it in a timely manner.

[0091] In one possible scenario, before sending the first request information to the extraction interface based on the first preset address information, the process may further include:

[0092] Step 61: Use the first preset address information to determine whether the extraction interface can be accessed; if yes, proceed to step 62; if no, output an alarm message indicating that the first preset address information is incorrect.

[0093] If so, then execute the step of sending the first request information to the extraction interface according to the first preset address information;

[0094] Accordingly, before sending the second request information to the extraction interface based on the second preset address information, it may also include:

[0095] Step 71: Use the second preset address information to determine whether the interface can be accessed; if yes, proceed to step 72; if no, output an alarm message indicating that the second preset address information is incorrect.

[0096] If so, then the step of sending the second request information to the extraction interface according to the second preset address information is executed.

[0097] The translation method for the above terms is described below based on a specific time sequence diagram. Please refer to it. Figure 2 , Figure 2 This is a timing diagram of a term translation method provided in an embodiment of the present invention. In the standard translation process, the translation platform calls the corresponding extraction interface according to a general configuration to obtain the term to be translated. Then, it performs manual or machine translation within the translation platform. After translation is completed, it finally calls the corresponding construction interface according to a general configuration to generate the language package. To ensure that the translation platform can obtain the term to be translated from the application's extraction interface in the above manner, the following modifications need to be made to the extraction interface, construction interface, and translation platform before sending the translated term to the application's construction interface:

[0098] (1) Establish a unified API interface standard for term extraction and construction. All terms connected to the translation platform must meet this standard. During extraction, a unified API extraction interface standard is defined based on the linguistic characteristics of different terms for subsequent parsing of terms to be translated. During construction, the translation platform also returns the translated terms to the application's construction interface according to the unified standard;

[0099] (2) A "General Configuration" layer will be added to the translation platform to register and configure all entries that meet the platform's access standards. After an entry meets the API interface standards, it can be registered and configured with the standard API interface through the translation platform as needed. Once the configuration is successful, the entry of that type will be officially connected to the translation platform. The standard process of the translation platform can then be used for translating the entries.

[0100] The following describes the term translation device, electronic device, and computer-readable storage medium provided in the embodiments of the present invention. The term translation device, electronic device, and computer-readable storage medium described below can be referred to in correspondence with the term translation method described above.

[0101] Please refer to Figure 3 , Figure 3 This is a structural block diagram of a term translation device provided in an embodiment of the present invention. The device may include:

[0102] The first integration module 301 is used to obtain term resource information and integrate the term resource information into the extraction request template to obtain the first request information;

[0103] The extraction interface call module 302 is used to send a first request message to the extraction interface of the application so that the extraction interface can extract the term to be translated from the term file corresponding to the term resource information, integrate the term resource information and the term to be translated into the extraction response template, and return the integrated first response information; the extraction interface of each application corresponds to a unified extraction request template and extraction response template.

[0104] The translation module 303 is used to extract the term to be translated from the first response information and to perform translation processing on the term to be translated.

[0105] Optionally, the first integration module 301 can be specifically used for:

[0106] Extract the name, unique identifier, and language information of the term file from the term resource information, and integrate the name, unique identifier, and language information into the extraction request template.

[0107] Optionally, the device may further include:

[0108] The resource list receiving module is used to receive the resource list sent by the application before obtaining the term resource information; the resource list is used to record the term resources that can be extracted by the application's extraction interface;

[0109] The identifier setting module is used to set a unique identifier for each term in the resource list.

[0110] Optionally, the device may further include:

[0111] The second integration module is used to integrate the term to be translated and the corresponding translated terms into the construction request template after the term to be translated has been processed, so as to obtain the second request information.

[0112] The build interface call module is used to send a second request message to the application's build interface, so that the build interface can construct an executable language file using the translated terms in the build interface request message and return the executable language file; each application's build interface corresponds to a unified build request template;

[0113] The save module is used to save executable language files.

[0114] Optionally, the interface call extraction module 302 may include:

[0115] The first query module is used to query the first preset address information corresponding to the extraction interface of the application in the general configuration information, and send the first request information to the extraction interface according to the first preset address information.

[0116] Accordingly, the API call module can include:

[0117] The second query module is used to query the second preset address information corresponding to the application's construction interface in the general configuration information, and send the second request information to the extraction interface according to the second preset address information.

[0118] Optionally, the interface call extraction module 302 may also include:

[0119] The first verification module is used to determine whether the extraction interface can be accessed by using the first preset address information before sending the first request information to the extraction interface according to the first preset address information; if so, the step of sending the first request information to the extraction interface according to the first preset address information is executed.

[0120] Correspondingly, the API call module may also include:

[0121] The second verification module is used to determine whether the construction interface can be accessed by using the second preset address information before sending the second request information to the extraction interface according to the second preset address information; if so, the step of sending the second request information to the extraction interface according to the second preset address information is executed.

[0122] This invention also provides an electronic device, comprising:

[0123] Memory, used to store computer programs;

[0124] A processor is used to implement the steps of the term translation method described above when executing a computer program.

[0125] Since the embodiments of the electronic device part correspond to the embodiments of the term translation method part, please refer to the description of the embodiments of the term translation method part for the embodiments of the electronic device part, and they will not be repeated here.

[0126] This invention also provides a storage medium storing a computer program, which, when executed by a processor, implements the steps of the term translation method described in any of the above embodiments.

[0127] Since the embodiments of the storage medium section correspond to the embodiments of the term translation method section, please refer to the description of the embodiments of the term translation method section for the embodiments of the storage medium section, and they will not be repeated here.

[0128] This invention also provides a computer program product containing instructions that, when run on a computer, causes the computer to perform the steps of the term translation method described in any of the above embodiments.

[0129] Since the embodiments of the computer program product section correspond to the embodiments of the term translation method section, please refer to the description of the embodiments of the term translation method section for the embodiments of the computer program product section, and they will not be repeated here.

[0130] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.

[0131] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0132] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0133] The foregoing has provided a detailed description of the term translation method, apparatus, electronic device, and computer-readable storage medium provided by this invention. Specific examples have been used to illustrate the principles and implementation methods of this invention. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and core ideas of this invention. It should be noted that those skilled in the art can make various improvements and modifications to this invention without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of this invention.

Claims

1. A method for translating terms, characterized in that, include: Obtain term resource information and integrate the term resource information into the extraction request template to obtain the first request information; Send the first request information to the extraction interface of the application so that the extraction interface extracts the term to be translated from the term resource corresponding to the term resource information, integrates the term resource information and the term to be translated into the extraction response template, and returns the integrated first response information; The extraction interfaces of each application correspond to a unified extraction request template and extraction response template; Extract the term to be translated from the first response information and translate the term to be translated. The step of integrating the term resource information into the extraction request template includes: Extract the name, unique identifier, and language information of the term file from the term resource information, and integrate the name, unique identifier, and language information into the extraction request template; Accordingly, the extraction interface extracts the terms to be translated from the term resources corresponding to the term resource information, including: The extraction interface extracts the term to be translated from the term file corresponding to the term resource information; Before obtaining the term resource information, it also includes: Receive a resource list sent by the application; the resource list is used to record the term resources that can be extracted by the application's extraction interface; Set a unique identifier for each term in the resource list; After translating the term to be translated, the process also includes: The term to be translated and the corresponding translated term are integrated into the construction request template to obtain the second request information; The second request information is sent to the build interface of the application so that the build interface can construct an executable language file using the translated terms in the second request information and return the executable language file; each build interface of the application corresponds to a unified build request template; Save the executable language file.

2. The term translation method according to claim 1, characterized in that, The process of integrating the term resource information and the term to be translated into the extracted response template includes: The extraction interface sets a unique identifier for each term to be translated. The term resource information, the term to be translated, and the term's unique identifier are integrated into the extracted response template to obtain the first response information.

3. The term translation method according to claim 1, characterized in that, Sending the first request information to the application's extraction interface includes: Query the first preset address information corresponding to the extraction interface of the application in the general configuration information, and send the first request information to the extraction interface according to the first preset address information; Accordingly, sending the second request information to the application's build interface includes: The second preset address information corresponding to the application's build interface is queried in the general configuration information, and the second request information is sent to the extraction interface according to the second preset address information.

4. The term translation method according to claim 3, characterized in that, Before sending the first request information to the extraction interface according to the first preset address information, the method further includes: Use the first preset address information to determine whether the extraction interface can be accessed; If so, then the step of sending the first request information to the extraction interface according to the first preset address information is executed; Accordingly, before sending the second request information to the extraction interface according to the second preset address information, the method further includes: The second preset address information is used to determine whether the construction interface can be accessed; If so, then the step of sending the second request information to the extraction interface according to the second preset address information is performed.

5. A term translation device, characterized in that, include: The first integration module is used to obtain term resource information and integrate the term resource information into the extraction request template to obtain the first request information; The extraction interface call module is used to send the first request information to the extraction interface of the application, so that the extraction interface extracts the term to be translated from the term resource corresponding to the term resource information, integrates the term resource information and the term to be translated into the extraction response template, and returns the integrated first response information. The extraction interfaces of each application correspond to a unified extraction request template and extraction response template; The translation module is used to extract the term to be translated from the first response information and to translate the term to be translated. The first integration module is used for: Extract the name, unique identifier, and language information of the term file from the term resource information, and integrate the name, unique identifier, and language information into the extraction request template; Accordingly, the extraction interface extracts the terms to be translated from the term resources corresponding to the term resource information, including: The extraction interface extracts the term to be translated from the term file corresponding to the term resource information; The resource list receiving module is used to receive a resource list sent by the application before obtaining the term resource information; the resource list is used to record the term resources that can be extracted by the application's extraction interface; The identifier setting module is used to set a unique identifier for each term resource in the resource list; The second integration module is used to integrate the term to be translated and the translated terms corresponding to the term to be translated into the construction request template after the term to be translated has been translated, so as to obtain the second request information. The build interface call module is used to send the second request information to the build interface of the application, so that the build interface can construct an executable language file using the translated terms in the second request information and return the executable language file; each of the application's build interfaces corresponds to a unified build request template; A storage module is used to store the executable language file.

6. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the term translation method as described in any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when loaded and executed by a processor, implement the term translation method as described in any one of claims 1 to 4.

8. A computer program product containing instructions, characterized in that, When the computer program product is run on a computer, it causes the computer to perform the term translation method as described in any one of claims 1 to 4.