Translation method and device, equipment and medium

By identifying and querying the proper noun knowledge base to obtain accurate translations and combining pre-trained large language models for translation, the problem of insufficient translation accuracy and professionalism in the professional field is solved, achieving more efficient and economical translation results.

CN119647488APending Publication Date: 2025-03-18SHENZHEN QIANHAI HUANRONG LIANYI INFORMATION TECHNOLOGY SERVICES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411707106.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-25
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

The existing machine translation technology lacks translation accuracy and professionalism in professional fields, especially in niche fields, and the flexibility to adapt to new fields is low, resulting in high data collection and training costs.

Method used

By identifying proper nouns in the target text, querying the proper noun knowledge base for accurate translations, and updating the translation requests to invoke pre-trained large language models for translation.

Benefits of technology

It improves the accuracy and professionalism of text translation in professional fields, reduces the cost of data collection and training to adapt to new fields, shortens translation time, and improves translation efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119647488A_ABST
    Figure CN119647488A_ABST
Patent Text Reader

Abstract

The invention relates to an artificial intelligence technology, and provides a translation method and device, equipment and a medium, which can query a translation of an identified target noun in a proper noun knowledge base to obtain a target translation of the target noun when it is identified that a proper noun is contained in a target text, so that the proper noun has more accurate translation. The translation request is further updated according to the target noun and the target translation to obtain the target request, the pre-trained large language model is called to execute the target request to obtain the translation result, and the accurate translation queried in the knowledge base is used as a translation basis, so that the translation result of the large language model can be more accurate and professional.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a translation method, device, equipment and medium. Background Art

[0002] Currently, machine translation technology mainly relies on end-to-end neural network models, such as large-scale language models based on the Transformer architecture. These models perform well when processing general texts, but in professional fields, due to the lack of understanding of the specific vocabulary in the field, the translation accuracy and professionalism will be greatly affected.

[0003] In the existing technology, in order to improve the translation quality of professional texts, the model is mainly fine-tuned to adapt to specific fields, but this method still has the following shortcomings:

[0004] 1. Inaccurate translation of professional terms: Even after fine-tuning, the model may still not be able to accurately translate certain professional terms, especially in niche fields.

[0005] 2. High data collection and training costs: In order to improve the translation quality in professional fields, it is necessary to collect a large amount of professional data sets and conduct additional training on the model, which will significantly increase the cost and time expenditure.

[0006] 3. Low flexibility in adapting to new domains: Once the model is fine-tuned, if it needs to be adapted to a new professional domain, it is necessary to collect data again and fine-tune it again.

[0007] In view of this, how to improve the accuracy and professionalism of text translation in professional fields has become an urgent problem to be solved. Summary of the invention

[0008] The embodiments of the present application provide a translation method, apparatus, device and medium, which are intended to solve the problem of inaccurate translation in professional fields.

[0009] In a first aspect, an embodiment of the present application provides a translation method, which includes:

[0010] In response to a translation request for a target text, identifying whether the target text contains a proper noun;

[0011] When it is recognized that the target text contains a proper noun, determining the recognized proper noun as a target noun;

[0012] Searching for the translation of the target noun in a proper noun knowledge base to obtain a target translation of the target noun;

[0013] updating the translation request according to the target noun and the target translation to obtain a target request;

[0014] A pre-trained large language model is called to execute the target request to obtain a translation result.

[0015] In a second aspect, an embodiment of the present application provides a translation device, which includes:

[0016] an identification unit, configured to identify, in response to a translation request for a target text, whether the target text contains a proper noun;

[0017] a determination unit, configured to determine the recognized proper noun as a target noun when the target text is recognized to contain the proper noun;

[0018] A query unit, used to query the translation of the target noun in the proper noun knowledge base to obtain the target translation of the target noun;

[0019] An updating unit, configured to update the translation request according to the target noun and the target translation to obtain a target request;

[0020] The execution unit is used to call a pre-trained large language model to execute the target request and obtain a translation result.

[0021] In a third aspect, an embodiment of the present application further provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the translation method described in the first aspect when executing the computer program.

[0022] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor executes the translation method described in the first aspect above.

[0023] The embodiments of the present application provide a translation method, apparatus, device and medium. When a target text is identified to contain a proper noun, the translation of the identified target noun is queried in a proper noun knowledge base to obtain a target translation of the target noun, so that the proper noun has a more accurate translation; further, a translation request is updated according to the target noun and the target translation to obtain a target request, and a pre-trained large language model is called to execute the target request to obtain a translation result. Since the accurate translation queried in the knowledge base is used as the basis for translation, the translation result of the large language model can be more accurate and professional. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0025] Figure 1 A schematic diagram of an application scenario of the translation method provided in an embodiment of the present application;

[0026] Figure 2 A flowchart of a translation method provided in an embodiment of the present application;

[0027] Figure 3 A schematic block diagram of a translation device provided in an embodiment of the present application;

[0028] Figure 4 A schematic block diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0029] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0030] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.

[0031] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0032] It should be further understood that the term “and / or” used in the specification and appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0033] See also Figure 1 and Figure 2 , Figure 1 A schematic diagram of an application scenario of the translation method provided in an embodiment of the present application; Figure 2 A flowchart of a translation method provided in an embodiment of the present application, wherein the translation method is applied in a server and is executed by application software installed in the server.

[0034] like Figure 2 As shown, the method includes steps S101 to S105.

[0035] S101: In response to a translation request for a target text, identifying whether the target text contains a proper noun.

[0036] In this embodiment, the technical solution is described with the server as the execution subject. The user terminal (such as smart terminals such as smart phones and tablet computers) used by the user can interact with the server for data. Specifically, the server provides a translation platform, and the user can log in to the translation platform using the user terminal. The user interaction interface of the translation platform is displayed on the terminal interface of the user terminal, and there is at least one data upload interface in the user interaction interface. For example: when the user enters text on the user interaction interface and uploads it to the server from the specified interface, subsequent translation can be performed in the server.

[0037] In this embodiment, the target text may be a text in any field, such as professional fields such as the medical field, and other non-professional fields.

[0038] In this embodiment, the proper noun may be a proper noun in a specified field, such as "Hospital Information System (HIS)" and "Radiology Information System (RIS)" in the medical field. The proper noun may also be a template string or a specific markup language, such as an abbreviation, an English abbreviation, etc.

[0039] In this embodiment, the step of identifying whether the target text contains a proper noun includes:

[0040] When the target text belongs to the configuration field and / or the target text is in the configuration format, using a rule based approach or a regular expression to identify whether the target text contains a proper noun; or

[0041] When the target text does not belong to the configuration domain and the target text is not in the configuration format, a pre-trained recognition model is called to identify whether the target text contains proper nouns.

[0042] The configuration field may include a specific field, and the configuration format may include a fixed format.

[0043] In the above embodiment, since texts in specific fields and fixed formats usually have certain regularities, a rule-based method or regular expression can be directly used to identify whether the target text contains proper nouns, which can provide a fast and effective recognition effect while ensuring accuracy.

[0044] In the above embodiment, for texts that do not belong to a specific field and a fixed format, a pre-trained recognition model such as Named Entity Recognition (NER) can be used to identify whether the target text contains proper nouns. Through targeted recognition of different types of texts, both recognition accuracy and recognition efficiency are taken into account.

[0045] S102: When it is recognized that the target text contains a proper noun, the recognized proper noun is determined as a target noun.

[0046] In this embodiment, when it is recognized that the target text does not contain a proper noun, a large language model (LLM) is called to execute the translation request.

[0047] In the above embodiment, if it is recognized that the target text contains proper nouns, further processing is performed on the proper nouns to improve the accuracy of translation; if it is recognized that the target text does not contain proper nouns, a large language model is directly called to execute the translation request without any other processing.

[0048] S103: Searching for the translation of the target noun in a proper noun knowledge base to obtain a target translation of the target noun.

[0049] In this embodiment, the proper noun knowledge base includes a pre-maintained static knowledge base and a third-party knowledge base; the step of querying the translation of the target noun in the proper noun knowledge base to obtain the target translation of the target noun includes:

[0050] Querying the translation of the target noun in the static knowledge base;

[0051] When a translation of the target noun is found in the static knowledge base, the found translation is determined as the target translation; or

[0052] When the translation of the target noun is not found in the static knowledge base, the third-party knowledge base is called to search for the translation of the target noun, and the searched translation is determined as the target translation.

[0053] The static knowledge base may be a knowledge base maintained locally, and the static knowledge base includes various proper nouns and their translations which are updated regularly.

[0054] The third-party knowledge base may be an online knowledge base or a knowledge base dynamically called through an API (Application Programming Interface) service.

[0055] In the above embodiment, the translation of the target noun is searched in the static knowledge base first to reduce the query cost. When the translation of the target noun is not found in the static knowledge base, the translation of the target noun is searched in the third-party knowledge base to obtain the latest translation information.

[0056] In this embodiment, by introducing a knowledge base of proper nouns in a specific field, it is possible to ensure that proper nouns are correctly translated.

[0057] With the emergence of new terms and the development of technology, the maintenance of the knowledge base becomes simple and easy, so the use of an external knowledge base ensures the continuous availability of the system.

[0058] In this embodiment, the method further includes:

[0059] When no translation of the target noun is found in the proper noun knowledge base, the large language model is called to execute the translation request.

[0060] In the above embodiment, if the translation of the target noun is not found in the proper noun knowledge base, the large language model is directly called to execute the translation request without subsequent processing.

[0061] S104: Update the translation request according to the target noun and the target translation to obtain a target request.

[0062] In this embodiment, before the translation request is updated according to the target noun and the target translation and the target request is obtained, the method further includes:

[0063] Calling a pre-trained small language model to translate the target noun to obtain a candidate translation;

[0064] The target translation is updated according to the candidate translation.

[0065] In the above embodiment, a multi-stage translation method is adopted. A small language model is used to perform preliminary translation, and then the translation result is merged with the translation of proper nouns. Finally, a large language model is used to perform secondary translation, which can not only improve the translation speed but also ensure the translation quality.

[0066] In this embodiment, the updating of the translation request according to the target noun and the target translation to obtain the target request includes:

[0067] The target noun and the target translation are added as prompt words to the translation request to obtain the target request.

[0068] Based on the identified professional terms, relevant professional terms are added as context prompts in the prompt of the translation request to guide the model to translate according to the translation standards in the proper noun knowledge base. This can ensure that the professional terms are translated correctly and improve the translation quality and professionalism.

[0069] In the above embodiment, unlike the prior art, when adapting to a new professional field, data needs to be collected again and the model needs to be fine-tuned again. This embodiment uses an external knowledge base to enhance the model, avoiding the need to collect a large amount of data and perform additional fine-tuning when adapting to a new professional field, thereby effectively reducing the cost and time overhead caused by data collection and additional training. In addition, by updating the knowledge base instead of retraining the model, it is also possible to quickly adapt to new professional fields and avoid the problem of inaccurate translation in niche fields after fine-tuning.

[0070] S105: Calling a pre-trained large language model to execute the target request and obtain a translation result.

[0071] This embodiment, by combining prompt words containing professional translations, can ensure that the model accurately translates professional terms while maintaining the translation quality of other parts.

[0072] In this embodiment, after obtaining the translation result, the method further includes:

[0073] Determining an output format according to the translation request;

[0074] The translation result is converted into the output format.

[0075] Through the above embodiments, the translation results can be output in a required format according to user needs, further improving the user experience.

[0076] In this embodiment, after obtaining the translation result, the method further includes:

[0077] A preset post-processing algorithm is used to verify and correct the translation result.

[0078] Through the above embodiments, the consistency and accuracy of professional terminology translation can be further ensured.

[0079] According to experiments, in the translation of professional texts, after adopting the technical solution of this embodiment, the translation accuracy rate is improved by about 20% (for example, the translation accuracy rate can be improved from 80% to 96%).

[0080] Furthermore, by evaluating test samples in multiple professional fields, the results show that after adopting the translation method in this embodiment, the translation accuracy of professional terms is improved from 83% to more than 98%, which is about 15% higher than the traditional method.

[0081] In practical applications, the misrecognition rate of proper nouns has been reduced to below 2%, effectively reducing translation errors.

[0082] In addition, through comparative tests, it is found that after adopting the translation method in this embodiment, the translation time is shortened by 30% on average, thereby improving the translation efficiency. For example, in a translation task containing 200 scientific and technological documents, the average translation time is reduced from 3 minutes / article to 2.1 minutes / article.

[0083] Since this embodiment no longer requires a large number of professional field data sets for model fine-tuning, the cost of data collection and annotation is reduced, and the initial investment of the project is reduced. When using it, users can easily use the translation solution provided by this embodiment without professional knowledge, which reduces the threshold for use. In addition, since the proper noun knowledge base is easy to update, the translation capability is also easier to expand.

[0084] It can be seen from the above technical solution that when it is recognized that the target text contains proper nouns, the translation of the recognized target noun is queried in the proper noun knowledge base to obtain the target translation of the target noun, so that the proper noun has a more accurate translation; further, the translation request is updated according to the target noun and the target translation to obtain the target request, and the pre-trained large language model is called to execute the target request to obtain the translation result. Since the accurate translation queried in the knowledge base is used as the basis for translation, the translation result of the large language model can be more accurate and professional.

[0085] The present application also provides a translation device, which is used to perform any of the above-mentioned translation methods. Figure 3 , Figure 3 It is a schematic block diagram of the translation device 100 provided in an embodiment of the present application.

[0086] Among them, Figure 3 As shown, the translation device 100 includes a recognition unit 101 , a determination unit 102 , a query unit 103 , an update unit 104 , and an execution unit 105 .

[0087] The identification unit 101 is used to identify whether the target text contains a proper noun in response to a translation request for the target text.

[0088] In this embodiment, the technical solution is described with the server as the execution subject. The user terminal (such as smart terminals such as smart phones and tablet computers) used by the user can interact with the server for data. Specifically, the server provides a translation platform, and the user can log in to the translation platform using the user terminal. The user interaction interface of the translation platform is displayed on the terminal interface of the user terminal, and there is at least one data upload interface in the user interaction interface. For example: when the user enters text on the user interaction interface and uploads it to the server from the specified interface, subsequent translation can be performed in the server.

[0089] In this embodiment, the target text may be a text in any field, such as professional fields such as the medical field, and other non-professional fields.

[0090] In this embodiment, the proper noun may be a proper noun in a specified field, such as "Hospital Information System (HIS)" and "Radiology Information System (RIS)" in the medical field. The proper noun may also be a template string or a specific markup language, such as an abbreviation, an English abbreviation, etc.

[0091] In this embodiment, the recognition unit 101 recognizes whether the target text contains a proper noun, including:

[0092] When the target text belongs to the configuration field and / or the target text is in the configuration format, using a rule based approach or a regular expression to identify whether the target text contains a proper noun; or

[0093] When the target text does not belong to the configuration domain and the target text is not in the configuration format, a pre-trained recognition model is called to identify whether the target text contains proper nouns.

[0094] The configuration field may include a specific field, and the configuration format may include a fixed format.

[0095] In the above embodiment, since texts in specific fields and fixed formats usually have certain regularities, a rule-based method or regular expression can be directly used to identify whether the target text contains proper nouns, which can provide a fast and effective recognition effect while ensuring accuracy.

[0096] In the above embodiment, for texts that do not belong to a specific field and a fixed format, a pre-trained recognition model such as Named Entity Recognition (NER) can be used to identify whether the target text contains proper nouns. Through targeted recognition of different types of texts, both recognition accuracy and recognition efficiency are taken into account.

[0097] The determining unit 102 is configured to determine the recognized proper noun as a target noun when it is recognized that the target text contains a proper noun.

[0098] In this embodiment, when it is recognized that the target text does not contain a proper noun, a large language model (LLM) is called to execute the translation request.

[0099] In the above embodiment, if it is recognized that the target text contains proper nouns, further processing is performed on the proper nouns to improve the accuracy of translation; if it is recognized that the target text does not contain proper nouns, a large language model is directly called to execute the translation request without any other processing.

[0100] The query unit 103 is used to query the translation of the target noun in the proper noun knowledge base to obtain the target translation of the target noun.

[0101] In this embodiment, the proper noun knowledge base includes a pre-maintained static knowledge base and a third-party knowledge base; the query unit 103 queries the translation of the target noun in the proper noun knowledge base to obtain the target translation of the target noun, including:

[0102] Querying the translation of the target noun in the static knowledge base;

[0103] When a translation of the target noun is found in the static knowledge base, the found translation is determined as the target translation; or

[0104] When the translation of the target noun is not found in the static knowledge base, the third-party knowledge base is called to search for the translation of the target noun, and the searched translation is determined as the target translation.

[0105] The static knowledge base may be a knowledge base maintained locally, and the static knowledge base includes various proper nouns and their translations which are updated regularly.

[0106] The third-party knowledge base may be an online knowledge base or a knowledge base dynamically called through an API (Application Programming Interface) service.

[0107] In the above embodiment, the translation of the target noun is searched in the static knowledge base first to reduce the query cost. When the translation of the target noun is not found in the static knowledge base, the translation of the target noun is searched in the third-party knowledge base to obtain the latest translation information.

[0108] In this embodiment, by introducing a knowledge base of proper nouns in a specific field, it is possible to ensure that proper nouns are correctly translated.

[0109] With the emergence of new terms and the development of technology, the maintenance of the knowledge base becomes simple and easy, so the use of an external knowledge base ensures the continuous availability of the system.

[0110] In this embodiment, when the translation of the target noun is not found in the proper noun knowledge base, the large language model is called to execute the translation request.

[0111] In the above embodiment, if the translation of the target noun is not found in the proper noun knowledge base, the large language model is directly called to execute the translation request without subsequent processing.

[0112] The updating unit 104 is used to update the translation request according to the target noun and the target translation to obtain a target request.

[0113] In this embodiment, the translation request is updated according to the target noun and the target translation, and before obtaining the target request, a pre-trained small language model is called to translate the target noun to obtain a candidate translation;

[0114] The target translation is updated according to the candidate translation.

[0115] In the above embodiment, a multi-stage translation method is adopted. A small language model is used to perform preliminary translation, and then the translation result is merged with the translation of proper nouns. Finally, a large language model is used to perform secondary translation, which can not only improve the translation speed but also ensure the translation quality.

[0116] In this embodiment, the updating unit 104 updates the translation request according to the target noun and the target translation to obtain a target request, including:

[0117] The target noun and the target translation are added as prompt words to the translation request to obtain the target request.

[0118] Based on the identified professional terms, relevant professional terms are added as context prompts in the prompt of the translation request to guide the model to translate according to the translation standards in the proper noun knowledge base. This can ensure that the professional terms are translated correctly and improve the translation quality and professionalism.

[0119] In the above embodiment, unlike the prior art, when adapting to a new professional field, data needs to be collected again and the model needs to be fine-tuned again. This embodiment uses an external knowledge base to enhance the model, avoiding the need to collect a large amount of data and perform additional fine-tuning when adapting to a new professional field, thereby effectively reducing the cost and time overhead caused by data collection and additional training. In addition, by updating the knowledge base instead of retraining the model, it is also possible to quickly adapt to new professional fields and avoid the problem of inaccurate translation in niche fields after fine-tuning.

[0120] The execution unit 105 is used to call a pre-trained large language model to execute the target request and obtain a translation result.

[0121] This embodiment, by combining prompt words containing professional translations, can ensure that the model accurately translates professional terms while maintaining the translation quality of other parts.

[0122] In this embodiment, after obtaining the translation result, the output format is determined according to the translation request;

[0123] The translation result is converted into the output format.

[0124] Through the above embodiments, the translation results can be output in a required format according to user needs, further improving the user experience.

[0125] In this embodiment, after the translation result is obtained, a preset post-processing algorithm is used to verify and correct the translation result.

[0126] Through the above embodiments, the consistency and accuracy of professional terminology translation can be further ensured.

[0127] According to experiments, in the translation of professional texts, after adopting the technical solution of this embodiment, the translation accuracy rate is improved by about 20% (for example, the translation accuracy rate can be improved from 80% to 96%).

[0128] Furthermore, by evaluating test samples in multiple professional fields, the results show that after adopting the translation method in this embodiment, the translation accuracy of professional terms is improved from 83% to more than 98%, which is about 15% higher than the traditional method.

[0129] In practical applications, the misrecognition rate of proper nouns has been reduced to below 2%, effectively reducing translation errors.

[0130] In addition, through comparative tests, it is found that after adopting the translation method in this embodiment, the translation time is shortened by 30% on average, thereby improving the translation efficiency. For example, in a translation task containing 200 scientific and technological documents, the average translation time is reduced from 3 minutes / article to 2.1 minutes / article.

[0131] Since this embodiment no longer requires a large number of professional field data sets for model fine-tuning, the cost of data collection and annotation is reduced, and the initial investment of the project is reduced. When using it, users can easily use the translation solution provided by this embodiment without professional knowledge, which reduces the threshold for use. In addition, since the proper noun knowledge base is easy to update, the translation capability is also easier to expand.

[0132] It can be seen from the above technical solution that when it is recognized that the target text contains proper nouns, the translation of the recognized target noun is queried in the proper noun knowledge base to obtain the target translation of the target noun, so that the proper noun has a more accurate translation; further, the translation request is updated according to the target noun and the target translation to obtain the target request, and the pre-trained large language model is called to execute the target request to obtain the translation result. Since the accurate translation queried in the knowledge base is used as the basis for translation, the translation result of the large language model can be more accurate and professional.

[0133] The above-mentioned translation device can be implemented in the form of a computer program, which can be used in Figure 4 Runs on the computer device shown.

[0134] See also Figure 4 , Figure 4 4 is a schematic block diagram of a computer device provided in an embodiment of the present application. The computer device 400 is a server, or a server cluster. The server can be an independent server, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.

[0135] See also Figure 4 The computer device 400 includes a processor 402 , a memory and a network interface 405 connected via a device bus 401 , wherein the memory may include a storage medium 403 and an internal memory 404 .

[0136] The storage medium 403 may store an operating system 4031 and a computer program 4032. When the computer program 4032 is executed, the processor 402 may execute the translation method.

[0137] The processor 402 is used to provide computing and control capabilities to support the operation of the entire computer device 400 .

[0138] The internal memory 404 provides an environment for the operation of the computer program 4032 in the storage medium 403. When the computer program 4032 is executed by the processor 402, the processor 402 can execute the translation method.

[0139] The network interface 405 is used for network communication, such as providing data information transmission, etc. Those skilled in the art will understand that Figure 4 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present application, and does not constitute a limitation on the computer device 400 to which the solution of the present application is applied. The specific computer device 400 may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0140] The processor 402 is used to run the computer program 4032 stored in the memory to implement the translation method disclosed in the embodiment of the present application.

[0141] Those skilled in the art will understand that Figure 4 The embodiments of the computer device shown in the figure do not constitute a limitation on the specific composition of the computer device. In other embodiments, the computer device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. For example, in some embodiments, the computer device may only include a memory and a processor. In such embodiments, the structure and function of the memory and the processor are the same as those of the embodiment of the present invention. Figure 4 The embodiments shown are consistent and will not be described again here.

[0142] It should be understood that in the embodiment of the present application, the processor 402 may be a central processing unit (CPU), and the processor 402 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0143] In another embodiment of the present application, a computer-readable storage medium is provided. The computer-readable storage medium may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the translation method disclosed in the embodiment of the present application is implemented.

[0144] It should be noted that the data involved in this case were all obtained legally.

[0145] It will be clear to those skilled in the art that, for the convenience and simplicity of description, the specific working process of the above-described equipment, devices and units can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. It will be appreciated by those of ordinary skill in the art that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, computer software or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to the function. Whether these functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.

[0146] In the several embodiments provided in the present application, it should be understood that the disclosed equipment, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, and units with the same function may be combined into one unit. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices or units, or may be electrical, mechanical or other forms of connection.

[0147] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of the present application.

[0148] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0149] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a background server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a disk or an optical disk.

[0150] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A translation method, characterized in that: include: In response to a translation request for a target text, identifying whether the target text contains a proper noun; When it is recognized that the target text contains a proper noun, determining the recognized proper noun as a target noun; Searching for the translation of the target noun in a proper noun knowledge base to obtain a target translation of the target noun; updating the translation request according to the target noun and the target translation to obtain a target request; A pre-trained large language model is called to execute the target request to obtain a translation result.

2. The translation method according to claim 1, characterized in that: The identifying whether the target text contains a proper noun includes: When the target text belongs to the configuration field and / or the target text is in the configuration format, using a rule-based method or a regular expression to identify whether the target text contains a proper noun; or When the target text does not belong to the configuration domain and the target text is not in the configuration format, a pre-trained recognition model is called to identify whether the target text contains proper nouns.

3. The translation method according to claim 1, characterized in that: The proper noun knowledge base includes a pre-maintained static knowledge base and a third-party knowledge base; The step of searching the translation of the target noun in the proper noun knowledge base to obtain the target translation of the target noun includes: Querying the translation of the target noun in the static knowledge base; When a translation of the target noun is found in the static knowledge base, the found translation is determined as the target translation; or When the translation of the target noun is not found in the static knowledge base, the third-party knowledge base is called to search for the translation of the target noun, and the searched translation is determined as the target translation.

4. The translation method according to claim 1, characterized in that: Before updating the translation request according to the target noun and the target translation to obtain the target request, the method further includes: Calling a pre-trained small language model to translate the target noun to obtain a candidate translation; The target translation is updated according to the candidate translation.

5. The translation method according to claim 1, characterized in that: The updating of the translation request according to the target noun and the target translation to obtain a target request includes: The target noun and the target translation are added as prompt words to the translation request to obtain the target request.

6. The translation method according to claim 1, characterized in that: The method further comprises: When it is identified that the target text does not contain a proper noun, or when the translation of the target noun is not found in the proper noun knowledge base, the large language model is called to execute the translation request.

7. The translation method according to claim 1, characterized in that: After obtaining the translation result, the method further includes: Determining an output format according to the translation request; The translation result is converted into the output format.

8. A translation device, characterized in that: include: an identification unit, configured to identify, in response to a translation request for a target text, whether the target text contains a proper noun; a determination unit, configured to determine the recognized proper noun as a target noun when the target text is recognized to contain the proper noun; A query unit, used to query the translation of the target noun in the proper noun knowledge base to obtain the target translation of the target noun; An updating unit, configured to update the translation request according to the target noun and the target translation to obtain a target request; The execution unit is used to call a pre-trained large language model to execute the target request and obtain a translation result.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the translation method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, causes the processor to perform the translation method according to any one of claims 1 to 7.