Chinese entry translation method and device, electronic equipment and storage medium
By building a historical translation database and professional terminology database for home design and utilizing vector encoding and indexing frameworks, we solved the consistency and professionalism issues in the translation of terms in the internationalization of home design software, achieving efficient and accurate translation results.
Patent Information
- Application Number
- CN202510642274.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-19
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2045-05-19
AI Technical Summary
In the internationalization process of home design software, the English translation of the same Chinese term in different interfaces, documents and help systems is inconsistent, the translation of professional terms is inaccurate and the management and maintenance costs are high, resulting in a lack of consistency and professionalism in the translation results.
Build a historical translation database and a professional terminology database, achieve rapid retrieval and reuse through vector encoding and indexing framework, utilize large model translation results, enhance context awareness, and ensure translation consistency and professionalism.
It improves the accuracy and professionalism of home design translation, ensures data coverage of diverse scenarios, enhances translation consistency and context adaptation capabilities, and reduces manual maintenance costs.
Smart Images

Figure CN120688516A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a Chinese term translation method, device, electronic device, and storage medium. Background Art
[0002] In the related technology, there is a term translation technology for the field of home design. However, in the current internationalization process of home design software, the term translation methods in the related technology have the following defects: the English translation of the same Chinese term in the interface, documents, help system, etc. is inconsistent, and the specific translation content does not meet the scenario requirements; the translation of professional terms in the field of home design is inaccurate, etc.
[0003] In summary, the technical problems existing in the relevant technologies need to be improved. Summary of the Invention
[0004] The embodiments of the present application aim to solve at least one of the technical problems in the related art to a certain extent. To this end, the main purpose of the embodiments of the present application is to provide a Chinese term translation method, device, electronic device and storage medium that can improve the accuracy and professionalism of term translation.
[0005] To achieve the above objectives, one aspect of the present application provides a Chinese term translation method, which includes the following steps:
[0006] Acquire historical translation data of home design, and build a historical translation database and a professional terminology database based on the historical translation data;
[0007] Constructing a historical translation data vector index based on the historical translation database, and constructing a professional term vector index based on the professional term database;
[0008] Perform vector encoding on the Chinese terms to be translated to obtain historical data query vectors and professional term query vectors;
[0009] Determining a historical data query index based on the historical data query vector and the historical translation data vector index, and determining a professional terminology query index based on the professional terminology query vector and the professional terminology vector index;
[0010] Determining historical translation material examples based on the historical material query index and the historical translation material database, and determining professional terminology examples based on the professional terminology query index and the professional terminology database;
[0011] splicing the historical translation material examples, the professional term examples, and the Chinese terms to be translated into a prompt template to obtain a target prompt project;
[0012] The target prompt project is input into the target macro model for translation, and the term translation result is output.
[0013] In some embodiments, the step of constructing a historical translation database and a professional terminology database based on the historical translation data includes:
[0014] In response to the first screening operation on the historical translation data, candidate Chinese-English term pairs are obtained, and target Chinese-English term pairs are randomly selected from the candidate Chinese-English term pairs according to a preset Chinese term word count rule, so as to construct the historical translation database based on the target Chinese-English term pairs;
[0015] In response to the second screening operation on the historical translation data, a manual candidate professional terminology set is obtained, and the historical translation database is automatically identified based on preset screening rules and preset entity recognition technology to obtain a machine candidate professional terminology set, so as to construct the professional terminology library based on the manual candidate professional terminology set and the machine candidate professional terminology set.
[0016] In some embodiments, the automatic identification of the historical translation database based on preset screening rules and preset entity recognition technology to obtain a machine candidate terminology set includes:
[0017] According to the preset keywords, target terms containing the preset keywords are screened out from the historical translation database, and a first candidate professional term set is constructed based on the target terms;
[0018] Performing word segmentation on the Chinese entries in the historical translation database, and screening out target words that meet a preset word length threshold and a preset word frequency threshold, and constructing a second candidate professional term set based on the target words;
[0019] extracting target character strings that conform to a preset structural pattern from the historical translation database using regular expressions, and constructing a third candidate professional terminology set based on the target character strings;
[0020] Automatically identifying the historical translation database using a preset entity recognition technology to obtain candidate named entities, and extracting professional terms with a noun part of speech from the candidate named entities as a fourth candidate professional term set according to a preset noun extraction rule;
[0021] The machine candidate terminology set is constructed according to the first candidate terminology set, the second candidate terminology set, the third candidate terminology set, and the fourth candidate terminology set.
[0022] In some embodiments, constructing a historical translation data vector index based on the historical translation database and constructing a professional term vector index based on the professional term database includes:
[0023] Performing vector encoding on Chinese entries in the historical translation database to obtain a historical translation database vector database;
[0024] Performing vector encoding on Chinese entries in the professional terminology library to obtain a professional terminology vector library;
[0025] Normalizing the historical translation data vector library, and indexing the normalized historical translation data vector library to obtain the historical translation data vector index;
[0026] The professional terminology vector library is normalized, and an index is constructed on the normalized professional terminology vector library to obtain the professional terminology vector index.
[0027] In some embodiments, determining a historical data query index based on the historical data query vector and the historical translation data vector index, and determining a professional terminology query index based on the professional terminology query vector and the professional terminology vector index, includes:
[0028] Inputting the historical data query vector into the historical translation data vector index for retrieval to obtain the historical data query index that meets a first similarity threshold;
[0029] The professional term query vector is input into the professional term vector index for retrieval to obtain the professional term query index that meets a second similarity threshold.
[0030] In some embodiments, determining historical translation material examples based on the historical material query index and the historical translation material library, and determining professional terminology examples based on the professional terminology query index and the professional terminology library, includes:
[0031] Inputting the historical data query index into the historical translation database to perform data query, and obtaining the historical translation data examples corresponding to the historical data query index;
[0032] The professional term query index is input into the professional term library to perform data query, and the professional term examples corresponding to the professional term query index are obtained.
[0033] In some embodiments, the method further comprises the step of constructing the target macro model, wherein constructing the target macro model comprises:
[0034] Performing data cleaning on the Chinese and English term pairs in the historical translation database to obtain a historical translation training data set;
[0035] Performing data cleaning on the Chinese and English entry pairs in the professional terminology database to obtain a professional terminology training data set;
[0036] Fusing the historical translation training dataset and the professional terminology training dataset to obtain a fine-tuning training dataset;
[0037] The fine-tuning training data set is input into the large model to be trained to perform model training to obtain the target large model.
[0038] To achieve the above objectives, another aspect of the present application provides a Chinese term translation device, which includes the following modules:
[0039] A domain knowledge base construction module is used to obtain historical translation data of home design and to construct a historical translation database and a professional terminology database based on the historical translation data;
[0040] A vector index building module, configured to build a historical translation data vector index based on the historical translation database, and to build a professional term vector index based on the professional term database;
[0041] The vector encoding module is used to perform vector encoding on the Chinese terms to be translated, and obtain historical data query vectors and professional term query vectors;
[0042] a query index determination module, configured to determine a historical data query index based on the historical data query vector and the historical translation data vector index, and to determine a professional terminology query index based on the professional terminology query vector and the professional terminology vector index;
[0043] a similar example determination module, configured to determine historical translation material examples based on the historical material query index and the historical translation material library, and to determine professional terminology examples based on the professional terminology query index and the professional terminology library;
[0044] A prompt project splicing module, configured to splice the historical translation material examples, the professional term examples, and the Chinese terms to be translated into a prompt template to obtain a target prompt project;
[0045] The term translation module is used to input the target prompt project into the target large model for translation and output the term translation result.
[0046] To achieve the above-mentioned purpose, another aspect of an embodiment of the present application provides an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the above-mentioned method when executing the computer program.
[0047] To achieve the above objectives, another aspect of an embodiment of the present application 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 method described above is implemented.
[0048] The embodiments of the present application include at least the following beneficial effects: the present application provides a Chinese term translation method, device, electronic device and storage medium, which obtains historical translation data of home design and constructs a historical translation database and a professional term database based on the historical translation data; constructs a historical translation data vector index based on the historical translation database, and constructs a professional term vector index based on the professional term database; vector encodes the Chinese term to be translated to obtain a historical data query vector and a professional term query vector; determines a historical data query index based on the historical data query vector and the historical translation data vector index, and determines a professional term query index based on the professional term query vector and the professional term vector index; determines a historical translation data example based on the historical data query index and the historical translation database, and determines a professional term example based on the professional term query index and the professional term database; splices the historical translation data example, the professional term example and the Chinese term to be translated into a prompt template to obtain a target prompt project; inputs the target prompt project into a target large model for translation, and outputs the term translation result. The embodiment of the present application can ensure that home design data covers diverse scenarios and field expertise by constructing a historical translation database and a professional terminology database about home design; at the same time, based on vector encoding and indexing framework, it can realize rapid retrieval and reuse of historical translation data examples and professional terminology examples, significantly improving translation consistency and context adaptation capabilities; and, when translating terms, it searches the historical translation database and the professional terminology database based on the query index, and splices the retrieved historical translation data examples, professional terminology examples and Chinese terms to be translated into the prompt engineering template, thereby enhancing the context perception capability of the large model and improving translation accuracy and professionalism. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 This is a flowchart of the steps of a Chinese term translation method provided in an embodiment of the present application;
[0050] Figure 2 This is a schematic diagram of the overall process of a Chinese term translation method provided in an embodiment of the present application;
[0051] Figure 3 This is a technical framework diagram of a Chinese term translation method provided in an embodiment of the present application;
[0052] Figure 4 This is a schematic diagram of the structure of a Chinese term translation device provided in an embodiment of the present application;
[0053] Figure 5This is a schematic diagram of the hardware structure of the electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0054] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the embodiments of the present application. They are merely examples of devices and methods consistent with some aspects of the embodiments of the present application as detailed in the appended claims.
[0055] It will be understood that the terms "first", "second", etc. used in this application may be used herein to describe various concepts, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of the embodiments of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" and "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0056] The terms "at least one", "plurality", "each", "any", etc. used in this application include "at least one", "two" or more, "plurality" or "each", "any" or "any one", "each" or "any one" in the context of the present invention, and "at least one" or "at least one" includes one, two or more, "plurality" or "any one" includes two or more, "each" or "each one" in the context of the present invention, and "any" or "any one
[0057] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application pertains. The terms used herein are for the purpose of describing the embodiments of this application only and are not intended to limit this application.
[0058] Current AI (Artificial Intelligence) translation tools are primarily categorized into traditional neural machine translation (NMT) tools and large-scale model-driven translation tools. Traditional NMT approaches primarily include rule-based approaches, which rely on predefined dictionaries and grammatical rules to achieve translation through phrase alignment and syntactic analysis; statistical approaches, which utilize bilingual corpora to learn word alignment probabilities and generate the target language by maximizing the translation model's probability; and neural network-based approaches, which utilize an encoder-decoder architecture and capture contextual dependencies through sequence-to-sequence models for translation. Traditional neural machine translation methods support multi-language translation, but require manual maintenance of the terminology database, which has relatively high maintenance costs. At the same time, there is a lack of global consistency constraints, and the same term is prone to ambiguity in different scenarios. Representative products of large-scale model-driven translation tools include DeepL, which is based on large-scale pre-trained language models (such as BERT and CLIP), captures long-distance semantic dependencies through the attention mechanism, supports end-to-end translation, can perceive the context for translation, and avoid literal translation. However, it lacks knowledge in the field of home design and cannot integrate knowledge in the home field for accurate translation. The generated results are prone to semantic deviation, which is easy to produce semantic deviation for entries with data parts, leading to translation deviation.
[0059] For example, in the current internationalization process of home design software, the defects of the term translation methods in related technologies are as follows: (1) the problem of fragmented translation of professional terms. The English translation of the same Chinese term in the interface, document, and help system will be inconsistent, and the specific translation content does not meet the requirements of the scenario; (2) the number of Chinese terms is huge, manual translation requires huge manpower, and the translation results are greatly affected by human subjective factors; (3) the translation of professional terms in the field of home design is inaccurate, and the management and maintenance costs are high.
[0060] In view of this, a Chinese term translation method, device, electronic device and storage medium are provided in an embodiment of the present application. The solution obtains historical translation data of home design and constructs a historical translation database and a professional term database based on the historical translation data; constructs a historical translation data vector index based on the historical translation database, and constructs a professional term vector index based on the professional term database; vector encodes the Chinese term to be translated to obtain a historical data query vector and a professional term query vector; determines a historical data query index based on the historical data query vector and the historical translation data vector index, and determines a professional term query index based on the professional term query vector and the professional term vector index; determines a historical translation data example based on the historical data query index and the historical translation database, and determines a professional term example based on the professional term query index and the professional term database; splices the historical translation data example, the professional term example and the Chinese term to be translated into a prompt template to obtain a target prompt project; inputs the target prompt project into a target large model for translation, and outputs the term translation result. The embodiment of the present application can ensure that home design data covers diverse scenarios and field expertise by constructing a historical translation database and a professional terminology database about home design; at the same time, based on vector encoding and indexing framework, it can realize rapid retrieval and reuse of historical translation data examples and professional terminology examples, significantly improving translation consistency and context adaptation capabilities; and, when translating terms, it searches the historical translation database and the professional terminology database based on the query index, and splices the retrieved historical translation data examples, professional terminology examples and Chinese terms to be translated into the prompt engineering template, thereby enhancing the context perception capability of the large model and improving translation accuracy and professionalism.
[0061] A Chinese term translation method provided in an embodiment of the present application relates to the field of computer technology. A Chinese term translation method provided in an embodiment of the present application can be applied in a terminal, can be applied in a server, or can be software running in a terminal or a server. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, and a car terminal, etc., but is not limited to this; the server side can be configured as an independent physical server, or can be configured as a server cluster or distributed system composed of multiple physical servers, and can also be configured as 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, CDN (Content Delivery Network) and big data and artificial intelligence platforms. The server can also be a node server in a blockchain network; the software can be an application that implements a Chinese term translation method, etc., but is not limited to the above forms.
[0062] The present application can be used in numerous general or special computer system environments or configurations. For example: personal computers, server computers, handheld devices or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs (Personal Computers, personal computers), minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0063] See also Figure 1 , Figure 1 This is an optional step flow chart of a Chinese term translation method provided in an embodiment of the present application. Figure 1 The method may include but is not limited to steps S101 to S107.
[0064] Step S101, obtaining historical translation data of home design, and constructing a historical translation database and a professional terminology database based on the historical translation data;
[0065] In some embodiments, step S101 may include: in response to a first screening operation on historical translation data, obtaining candidate Chinese-English term pairs, and randomly selecting target Chinese-English term pairs from the candidate Chinese-English term pairs according to a preset Chinese term word count rule, so as to construct a historical translation database based on the target Chinese-English term pairs; in response to a second screening operation on historical translation data, obtaining a manual candidate professional term set, and automatically identifying the historical translation database based on preset screening rules and preset entity recognition technology to obtain a machine candidate professional term set, so as to construct a professional term database based on the manual candidate professional term set and the machine candidate professional term set.
[0066] In some specific embodiments, the step of automatically identifying the historical translation database based on preset screening rules and preset entity recognition technology to obtain a machine candidate professional terminology set may include: based on preset keywords, screening out target terms containing preset keywords from the historical translation database, and constructing a first candidate professional terminology set based on the target terms; performing word segmentation processing on the Chinese terms in the historical translation database, and screening out target terms that meet a preset word length threshold and a preset word occurrence frequency threshold, and constructing a second candidate professional terminology set based on the target terms; extracting target character strings that conform to a preset structural pattern from the historical translation database through regular expressions, and constructing a third candidate professional terminology set based on the target character strings; automatically identifying the historical translation database using preset entity recognition technology to obtain candidate named entities, and extracting professional terms with noun parts of speech in the candidate named entities as a fourth candidate professional terminology set based on preset noun extraction rules; and constructing a machine candidate professional terminology set based on the first candidate professional terminology set, the second candidate professional terminology set, the third candidate professional terminology set, and the fourth candidate professional terminology set.
[0067] The target entry refers to a Chinese entry containing preset keywords.
[0068] In the specific implementation, a large amount of historical translation data from the previous international versions of home design software is first collected, and professional translators judge the quality of the translation. A number of Chinese-English term pairs are randomly selected from the Chinese-English term pairs with high quality to form a historical translation database DB1; then, from the historical translation database DB1, professional terms are semi-automatically identified using rules and NLP (Natural Language Processing) entity recognition technology, and professional translators screen the identified professional terms. The screened professional terms and the professional term set SetA compiled by professional translators form a professional term database DB2.
[0069] Specifically, the specific implementation process of constructing the historical translation database DB1 is as follows: first, a large amount of historical translation data is collected from the international version of the previous home design software, such as UI (User Interface) text, design software window prompts, menu text of each process of the design software, etc. This step does not require manual screening; then, multiple professional translators are asked to judge the translation quality of the Chinese and English term pairs in the collected historical translation data; finally, from the Chinese and English term pairs with high quality, according to the rules that the number of Chinese term characters is less than 7, greater than 7 and less than 15, and greater than 15, the Chinese and English term pairs are divided into three categories: short, medium and long. Ten thousand Chinese and English term pairs are randomly selected from each of the three categories to form the historical translation database DB1. It should be noted that the numerical values such as the number of Chinese term characters and the number of Chinese and English term pairs in this example can be set according to actual conditions, and the embodiments of this application do not impose any restrictions on this.
[0070] Specifically, the specific implementation process of constructing the professional terminology database DB2 is as follows: first, the Chinese entries containing preset keywords are screened out from the historical translation database DB1 through keywords as the candidate professional terminology set SetB (the first candidate professional terminology set); then, the Chinese word segmentation tool is used to segment the Chinese entries in the historical translation database DB1, and then the words that are too long and too short are filtered out first, and the words that frequently appear in the entries and their frequency of occurrence are counted, and the words with the highest frequency of occurrence are taken as the candidate professional terminology set SetC (the second candidate professional terminology set); then, the regular expression is used to extract the character string that meets the specific structural pattern as the candidate professional terminology set SetD (the third candidate professional terminology set); further, an NLP model is initialized using the spacy library, and the NLP model is used to perform entity recognition. The target Chinese text is input into the model to obtain annotation information including word segmentation, part of speech and named entity, and collect All named entities (such as ORG, PRODUCT) identified by the NLP model are used as candidate professional terms. Then, the part of the candidate professional terms identified by the NLP model with the noun part of speech is extracted through rules as the candidate professional terminology set SetE (the fourth candidate professional terminology set). Among them, the candidate professional terminology set SetB (the first candidate professional terminology set), the candidate professional terminology set SetC (the second candidate professional terminology set), the candidate professional terminology set SetD (the third candidate professional terminology set) and the candidate professional terminology set SetE (the fourth candidate professional terminology set) are merged to obtain the machine candidate professional terminology set; finally, professional translators are asked to check the machine candidate professional terminology set (candidate professional terminology sets SetB, SetC, SetD and SetE), and select the parts that meet the professional terminology requirements, and form the final professional terminology library DB2 with the professional terminology set SetA compiled by professional translators.
[0071] Step S102: constructing a historical translation data vector index based on the historical translation database, and constructing a professional term vector index based on the professional term database;
[0072] In some embodiments, step S102 may include: performing vector encoding on Chinese terms in a historical translation database to obtain a historical translation database vector database; performing vector encoding on Chinese terms in a professional terminology database to obtain a professional terminology vector database; normalizing the historical translation database vector database and indexing the normalized historical translation database vector database to obtain a historical translation database vector index; normalizing the professional terminology vector database and indexing the normalized professional terminology vector database to obtain a professional terminology vector index.
[0073] In the specific implementation, the Chinese terms in the historical translation database DB1 and the professional terminology database DB2 are first vector-encoded to obtain vector libraries EB1 and EB2, respectively. Then, based on the constructed historical translation database vector library EB1 and professional terminology vector library EB2, Faiss is used to construct vector indexes for RAG (Retrieval-Augmented Generation). Specifically, two vector models, bge-m3 and text2vec, are initialized. The bge-m3 model is then used to encode the Chinese terms in the historical translation database DB1 to obtain the historical translation database vector library EB1. Simultaneously, the text2vec model is used to encode the Chinese terms in the professional terminology database DB2 to obtain the professional terminology vector library EB2. Subsequently, L2 normalization is performed on the historical translation database vector library EB1 and the professional terminology vector library EB2. Finally, the normalized vectors are indexed using an inner-product-based exact search index in the Faiss database, resulting in the historical translation database vector index Index1 and the professional terminology vector index Index2.
[0074] Step S103: vector encoding is performed on the Chinese terms to be translated to obtain a historical data query vector and a professional term query vector;
[0075] In the specific implementation, the bge-m3 model and the text2vec model are used to vector encode the translation terms, respectively, to obtain the similar historical data query vector EB3 and the related professional term query vector EB4.
[0076] Step S104, determining a historical data query index based on the historical data query vector and the historical translation data vector index, and determining a professional terminology query index based on the professional terminology query vector and the professional terminology vector index;
[0077] In some embodiments, step S104 may include: inputting the historical data query vector into the historical translation data vector index for retrieval to obtain a historical data query index that meets a first similarity threshold; inputting the professional terminology query vector into the professional terminology vector index for retrieval to obtain a professional terminology query index that meets a second similarity threshold.
[0078] In the specific implementation, the similar historical data query vector EB3 is used to search in the historical translation data vector index Index1, and the topK historical data query indexes with the highest similarity are obtained; at the same time, the relevant professional terminology query vector EB4 is used to search in the professional terminology vector index Index2, and the topK professional terminology query indexes with the highest similarity are obtained.
[0079] Step S105, determining historical translation data examples based on the historical data query index and the historical translation database, and determining professional terminology examples based on the professional terminology query index and the professional terminology database;
[0080] In some embodiments, step S105 may include: inputting the historical data query index into the historical translation data library for data query, and obtaining historical translation data examples corresponding to the historical data query index; inputting the professional terminology query index into the professional terminology library for data query, and obtaining professional terminology examples corresponding to the professional terminology query index.
[0081] In a specific implementation, the corresponding historical translation data example Sample1 is obtained from the historical translation data base DB1 according to the retrieved historical data query index. At the same time, the corresponding professional terminology example Sample2 is obtained from the professional terminology base DB2 according to the retrieved professional terminology query index.
[0082] Step S106, splicing the historical translation material examples, the professional term examples, and the Chinese terms to be translated into a prompt template to obtain a target prompt project;
[0083] In a specific implementation, the historical translation material sample Sample1, the professional term sample Sample2, and the term to be translated are spliced into the Prompt template to obtain the final Prompt.
[0084] Step S107: input the target prompt project into the target macro model for translation, and output the term translation result.
[0085] In some embodiments, the step of constructing a target large model may also be included. The step of constructing the target large model may include: performing data cleaning on the Chinese and English term pairs in the historical translation database to obtain a historical translation training data set; performing data cleaning on the Chinese and English term pairs in the professional term library to obtain a professional term training data set; fusing the historical translation training data set and the professional term training data set to obtain a fine-tuning training data set; inputting the fine-tuning training data set into the large model to be trained for model training to obtain a target large model.
[0086] Steps S101 to S107 shown in the embodiment of the present application are as follows: historical translation data of home design is obtained, and a historical translation database and a professional terminology database are constructed based on the historical translation data; a historical translation data vector index is constructed based on the historical translation database, and a professional terminology vector index is constructed based on the professional terminology database; vector encoding is performed on the Chinese terms to be translated to obtain historical data query vectors and professional terminology query vectors; a historical data query index is determined based on the historical data query vector and the historical translation data vector index, and a professional terminology query index is determined based on the professional terminology query vector and the professional terminology vector index; historical translation data examples are determined based on the historical data query index and the historical translation database, and professional terminology examples are determined based on the professional terminology query index and the professional terminology database; the historical translation data examples, professional terminology examples and the Chinese terms to be translated are spliced into a prompt template to obtain a target prompt project; the target prompt project is input into a target large model for translation, and the term translation result is output. The embodiment of the present application can ensure that home design data covers diverse scenarios and field expertise by constructing a historical translation database and a professional terminology database about home design; at the same time, based on vector encoding and indexing framework, it can realize rapid retrieval and reuse of historical translation data examples and professional terminology examples, significantly improving translation consistency and context adaptation capabilities; and, when translating terms, it searches the historical translation database and the professional terminology database based on the query index, and splices the retrieved historical translation data examples, professional terminology examples and Chinese terms to be translated into the prompt engineering template, thereby enhancing the context perception capability of the large model and improving translation accuracy and professionalism.
[0087] In order to explain the principle of the technical solution of the present invention in detail, the overall process of the present invention is described below in combination with some specific embodiments. It is easy to understand that the following is an explanation of the technical principle of the present invention and cannot be regarded as a limitation of the present invention.
[0088] See also Figure 2 , Figure 2 This is a schematic diagram of the overall process of a Chinese term translation method provided in an embodiment of the present application. Figure 2As shown in the figure, the overall implementation process of the Chinese term translation method is as follows: first, a historical translation database, a professional term database and a fine-tuning training set are sorted out from the historical translation data; then, the fine-tuning training set is used to fine-tune the large model, and a historical translation data vector database and a professional term database are respectively established based on the historical translation database and the professional term database; then, vector primes of the historical translation database and the professional term database are respectively established based on the historical translation data vector database and the professional term database; further, RAG is performed on the terms to be translated to obtain historical translation data examples and professional term examples, and the historical translation data examples, professional term examples and the terms to be translated are spliced into Prompt and then input into the large model for translation; finally, the translation results are output, and after being spot-checked by professionals, the translation results will be entered into the backend term file.
[0089] See also Figure 3 , Figure 3 Schematic diagram of the technical framework of a Chinese term translation method provided in an embodiment of the present application; Figure 3 As shown, the specific implementation process of a Chinese term translation method provided in the embodiment of the present application is as follows:
[0090] (1) The first step is to collect a large amount of historical translation data from the international versions of home design software. Professional translators will evaluate the quality of the translations and randomly select a number of Chinese-English term pairs from the high-quality Chinese-English term pairs to form the historical translation database DB1:
[0091] First, we collected a large amount of historical translation data from previous international versions of home design software, such as UI (User Interface) text, design software window prompts, menu text for each process of the design software, etc. This step did not require manual screening;
[0092] Then, multiple professional translators were asked to evaluate the translation quality of the Chinese-English term pairs in the collected historical translation materials;
[0093] Finally, from the high-quality Chinese-English term pairs, the Chinese-English term pairs were divided into three categories: short, medium, and long, based on the rules of Chinese term character counts being less than 7, greater than 7 and less than 15, and greater than 15. Ten thousand Chinese-English term pairs were randomly selected from each of the three categories to form the historical translation database DB1. It should be noted that the values for the Chinese term character count and the number of Chinese-English term pairs in this example can be set according to actual circumstances and are not limited in this embodiment of the present application.
[0094] (2) In the second step, professional terms are semi-automatically identified from the historical translation database DB1 using rules and NLP (Natural Language Processing) entity recognition technology. Professional translators then screen the identified professional terms and combine the screened professional terms with the professional term set SetA compiled by professional translators to form the professional term database DB2:
[0095] First, the entries containing the preset keywords are selected from the historical translation database DB1 by using keywords (such as "series", "style", "pattern", etc.) as candidate professional term set SetB;
[0096] Then, a Chinese word segmentation tool (such as Jieba) is used to segment the Chinese entries in the historical translation database DB1. Then, words that are too long (such as greater than 7) or too short (such as less than 2) are filtered out. Frequently appearing words and their frequencies are counted in the entries. The words with the highest frequency of 5% (which can be set according to actual conditions) are selected as the candidate professional term set SetC.
[0097] Next, regular expressions are used to extract strings that conform to specific structural patterns as candidate professional terminology sets SetD, such as strings framed by symbols (such as "[]", "()", "-*-", etc.);
[0098] Furthermore, we initialize an NLP model (e.g., zh_core_web_md) using the spacy library, perform entity recognition using the NLP model, input the target Chinese text into the model, obtain annotation information including word segmentation, part of speech, and named entity, collect all named entities (e.g., ORG, PRODUCT) recognized by the NLP model as candidate professional terms, and then extract the part of the candidate professional terms recognized by the NLP model that is a noun through rules as the candidate professional term set SetE;
[0099] Finally, professional translators are asked to check the candidate professional terminology sets SetB, SetC, SetD and SetE, and select the parts that meet the professional terminology requirements. Together with the professional terminology set SetA compiled by professional translators, they form the final professional terminology database DB2.
[0100] (3) In the third step, the Chinese entries in the historical translation database DB1 and the professional terminology database DB2 are respectively vector-encoded to obtain vector libraries EB1 and EB2:
[0101] First, initialize two vector models bge-m3 and text2vec;
[0102] Then, the bge-m3 model is used to encode the Chinese entries in the historical translation database DB1 to obtain the historical translation data vector database EB1. At the same time, the text2vec model is used to encode the Chinese entries in the professional terminology database DB2 to obtain the professional terminology vector database EB2.
[0103] The fourth step is to use Faiss to build a vector index for RAG based on the historical translation data vector library EB1 and professional terminology vector library EB2 built in the third step:
[0104] First, L2 normalization is performed on the historical translation data vector library EB1 and the professional terminology vector library EB2;
[0105] Then, an inner product-based precise search index in the Faiss library is used to index the normalized vectors, obtaining the historical translation data vector index Index1 and the professional terminology vector index Index2.
[0106] The fifth step is to build a fine-tuning training set A for the large model. Use Llama_factory to fine-tune the selected large model on the fine-tuning training set A to obtain the target large model:
[0107] First, traverse the Chinese-English term pairs in the historical translation database DB1 and perform vector encoding on the Chinese terms in the Chinese-English term pairs to obtain the encoding vector emb_train;
[0108] Then, based on the historical translation data vector index Index1, the N (e.g., N=5) groups of first Chinese-English term pairs that are most similar to the encoding vector emb_train are retrieved from the historical translation database DB1. Similarly, based on the professional term vector index Index2, the N (e.g., N=5) groups of second Chinese-English term pairs that are most similar to the encoding vector emb_train are retrieved from the professional term database DB2.
[0109] Next, data cleaning is performed on the N groups of first Chinese-English term pairs, and data cleaning is performed on the N groups of second Chinese-English term pairs;
[0110] Finally, the N groups of first Chinese-English term pairs after data cleaning and the N groups of second Chinese-English term pairs after data cleaning are merged, and the merged Chinese-English term pairs are input into the data set template to form the fine-tuning training set A of the large model; then use Llama_factory to fine-tune the selected large model on the fine-tuning training set A to obtain the target large model.
[0111] Step 6: Deploy the fine-tuned large model, receive the terms to be translated, and translate them:
[0112] First, we use the bge-m3 model and the text2vec model to encode the translation terms into vectors, obtaining the similar historical data query vector EB3 and the related professional term query vector EB4 respectively.
[0113] Then, use the similar historical data query vector EB3 to search in the historical translation data vector index Index1, and use the related professional term query vector EB4 to search in the professional term vector index Index2, and take the topK indexes with the highest similarity respectively;
[0114] Then, according to the retrieved index, the corresponding index is used to retrieve the corresponding historical translation data sample Sample1 and professional terminology sample Sample2 from the historical translation data database DB1 and the professional terminology database DB2 respectively;
[0115] Furthermore, the historical translation material sample Sample 1, the professional term sample Sample 2, and the term to be translated are spliced into the Prompt template to obtain the final Prompt;
[0116] Finally, use Prompt to call the deployed large model, and the large model outputs the translation results.
[0117] A method for translating Chinese terms proposed in an embodiment of the present application is based on NLP technology and adopts the text analysis capability of the Spacy framework. It extracts professional terms from historical translation materials by combining rule matching with statistical models to support the construction and maintenance of a professional terminology library. It uses LoRA fine-tuning technology to inject knowledge in the field of home design software into the large model. At the same time, the system uses RAG technology to search in the historical translation database and the organized professional terminology library when translating terms, and splices the retrieved historical translation material examples, professional terminology examples, and terms to be translated into the Prompt template, thereby enhancing the context awareness capability of the large model and improving translation accuracy.
[0118] It should be noted that this embodiment only briefly illustrates the general process of a Chinese term translation method. The detailed description of each step can refer to the relevant content in the aforementioned embodiment and will not be repeated here. It can be understood that the present invention is not limited to this.
[0119] The embodiment of the present application obtains historical translation data of home design and constructs a historical translation database and a professional terminology database based on the historical translation data; constructs a historical translation data vector index based on the historical translation database and a professional terminology vector index based on the professional terminology database; performs vector encoding on the Chinese terms to be translated to obtain a historical data query vector and a professional terminology query vector; determines a historical data query index based on the historical data query vector and the historical translation data vector index, and determines a professional terminology query index based on the professional terminology query vector and the professional terminology vector index; determines historical translation data examples based on the historical data query index and the historical translation database, and determines professional terminology examples based on the professional terminology query index and the professional terminology database; splices the historical translation data examples, professional terminology examples and the Chinese terms to be translated into a prompt template to obtain a target prompt project; inputs the target prompt project into a target large model for translation, and outputs the term translation result. The embodiment of the present application can ensure that home design data covers diverse scenarios and field expertise by constructing a historical translation database and a professional terminology database about home design; at the same time, based on vector encoding and indexing framework, it can realize rapid retrieval and reuse of historical translation data examples and professional terminology examples, significantly improving translation consistency and context adaptation capabilities; and, when translating terms, it searches the historical translation database and the professional terminology database based on the query index, and splices the retrieved historical translation data examples, professional terminology examples and Chinese terms to be translated into the prompt engineering template, thereby enhancing the context perception capability of the large model and improving translation accuracy and professionalism.
[0120] In summary, the advantages of the embodiments of the present application lie in the following three points:
[0121] (1) Constructing the Historical Translation Database DB1 based on professional evaluation and categorized sampling. Professional translators evaluate the quality of historical Chinese-English term pairs, select high-quality translations, and randomly sample them according to term length (short, medium, and long) to ensure that the constructed Historical Translation Database DB1 covers diverse scenarios and has controllable quality.
[0122] (2) Construct a professional terminology database DB2 based on a combination of semi-automatic and manual methods. By integrating rule matching (keywords, word frequency, regular expressions), NLP entity recognition technology (such as the spacy model), and manual verification, professional terms are extracted from historical translation data and combined with manually compiled professional terminology sets to form a high-precision professional terminology database DB2 to improve terminology consistency.
[0123] (3) A hybrid translation framework based on RAG and large model fine-tuning. This framework uses vector encoding (bge-m3 / text2vec) and Faiss indexing to achieve efficient retrieval. Examples of historical translation materials and professional terminology are injected into the large model through Prompt templates. This framework combines retrieval-augmented generation (RAG) with model reasoning to optimize translation accuracy and professionalism.
[0124] The embodiment of the present application constructs a high-quality historical translation database (DB1) through professional translator evaluation and stratified sampling, and combines rules, NLP and manual review to build a professional terminology database (DB2), ensuring that the training data covers diverse scenarios and field expertise, reducing manual annotation and proofreading costs; at the same time, based on the RAG framework of vector encoding (such as bge-m3 / text2vec) and Faiss index, it realizes the rapid retrieval and reuse of historical translation material examples and professional terminology examples, significantly improving translation consistency and context adaptation capabilities. At the same time, home design domain knowledge is injected into the fine-tuning stage so that the model can still maintain high-precision output when reducing the amount of training data, reducing dependence on large-scale annotated data. In short, the embodiment of the present application provides efficient support for the internationalization scenario of design software through the process of automated feature extraction, term recognition, dynamic retrieval and model reasoning. While ensuring the consistency of professional terminology, it can significantly improve the translation accuracy of long-tail terms and complex semantics, optimize the efficiency of internationalization, and reduce annotation costs and labor costs.
[0125] See also Figure 4 The present application also provides a Chinese term translation device 400, which can implement the above-mentioned Chinese term translation method. The device includes the following modules:
[0126] The domain knowledge base construction module 401 is used to obtain historical translation data of home design and construct a historical translation database and a professional terminology database based on the historical translation data;
[0127] A vector index building module 402 is configured to build a historical translation data vector index based on the historical translation data library, and to build a professional term vector index based on the professional term library;
[0128] Vector encoding module 403, used to perform vector encoding on the Chinese terms to be translated to obtain historical data query vectors and professional term query vectors;
[0129] A query index determination module 404 is configured to determine a historical document query index based on the historical document query vector and the historical translation document vector index, and to determine a professional term query index based on the professional term query vector and the professional term vector index;
[0130] A similar example determination module 405 is configured to determine historical translation material examples based on the historical material query index and the historical translation material database, and to determine professional terminology examples based on the professional terminology query index and the professional terminology database;
[0131] A prompt project splicing module 406 is used to splice the historical translation material examples, the professional term examples, and the Chinese terms to be translated into a prompt template to obtain a target prompt project;
[0132] The term translation module 407 is used to input the target prompt project into the target macro model for translation and output the term translation result.
[0133] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0134] The present application also provides an electronic device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the above-mentioned Chinese term translation method when executing the computer program. The electronic device can be any smart terminal including a tablet computer, an in-vehicle computer, or the like.
[0135] It can be understood that the contents of the above method embodiments are applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0136] See also Figure 5 , Figure 5 The hardware structure of an electronic device according to another embodiment is shown. The electronic device includes:
[0137] The processor 501 may be implemented as a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is configured to execute relevant programs to implement the technical solutions provided in the embodiments of the present application.
[0138] The memory 502 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 502 can store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 502 and is called by the processor 501 to execute the Chinese term translation method of the embodiments of this application.
[0139] Input / output interface 503, used to implement information input and output;
[0140] Communication interface 504, used to implement communication interaction between this device and other devices, which can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WiFi, Bluetooth, etc.);
[0141] Bus 505 , which transmits information between various components of the device (e.g., processor 501 , memory 502 , input / output interface 503 , and communication interface 504 );
[0142] The processor 501 , the memory 502 , the input / output interface 503 and the communication interface 504 are connected to each other in communication within the device via a bus 505 .
[0143] An embodiment of the present application further provides a computer-readable storage medium storing a computer program, which implements the above-mentioned Chinese term translation method when executed by a processor.
[0144] It can be understood that the contents of the above method embodiments are all applicable to the present storage medium embodiment, the functions specifically implemented by the present storage medium embodiment are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0145] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely arranged relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0146] The embodiments of the present application provide a Chinese term translation method, a Chinese term translation device, an electronic device, and a storage medium, which obtain historical translation data of home design and construct a historical translation database and a professional term database based on the historical translation data; construct a historical translation data vector index based on the historical translation database, and construct a professional term vector index based on the professional term database; vector encode the Chinese term to be translated to obtain a historical data query vector and a professional term query vector; determine a historical data query index based on the historical data query vector and the historical translation data vector index, and determine a professional term query index based on the professional term query vector and the professional term vector index; determine historical translation data examples based on the historical data query index and the historical translation database, and determine professional term examples based on the professional term query index and the professional term database; splice the historical translation data examples, professional term examples, and the Chinese term to be translated into a prompt template to obtain a target prompt project; input the target prompt project into a target large model for translation, and output the term translation result. The embodiment of the present application can ensure that home design data covers diverse scenarios and field expertise by constructing a historical translation database and a professional terminology database about home design; at the same time, based on vector encoding and indexing framework, it can realize rapid retrieval and reuse of historical translation data examples and professional terminology examples, significantly improving translation consistency and context adaptation capabilities; and, when translating terms, it searches the historical translation database and the professional terminology database based on the query index, and splices the retrieved historical translation data examples, professional terminology examples and Chinese terms to be translated into the prompt engineering template, thereby enhancing the context perception capability of the large model and improving translation accuracy and professionalism.
[0147] The embodiments described in the embodiments of this application are intended to more clearly illustrate the technical solutions of the embodiments of this application and do not constitute a limitation on the technical solutions provided by the embodiments of this application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.
[0148] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0149] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, i.e., they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of this embodiment.
[0150] Those skilled in the art will appreciate that all or some of the steps in the methods, systems, and functional modules / units in the devices disclosed above may be implemented as software, firmware, hardware, or appropriate combinations thereof.
[0151] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0152] It should be understood that in this application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0153] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the above-mentioned units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0154] The units described above as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0155] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0156] 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 computer-readable storage medium. Based on this understanding, the technical solution of the present application, 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, which is stored in a storage medium and includes multiple instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: various media that can store programs, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0157] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but are not intended to limit the scope of the present invention. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and essence of the present invention should be within the scope of the present invention.
Claims
1. A Chinese term translation method, characterized in that: The method comprises the following steps: Acquire historical translation data of home design, and build a historical translation database and a professional terminology database based on the historical translation data; Constructing a historical translation data vector index based on the historical translation database, and constructing a professional term vector index based on the professional term database; Perform vector encoding on the Chinese terms to be translated to obtain historical data query vectors and professional term query vectors; Determining a historical data query index based on the historical data query vector and the historical translation data vector index, and determining a professional terminology query index based on the professional terminology query vector and the professional terminology vector index; Determining historical translation material examples based on the historical material query index and the historical translation material database, and determining professional terminology examples based on the professional terminology query index and the professional terminology database; splicing the historical translation material examples, the professional term examples, and the Chinese terms to be translated into a prompt template to obtain a target prompt project; The target prompt project is input into the target macro model for translation, and the term translation result is output.
2. The method according to claim 1, characterized in that The process of constructing a historical translation database and a professional terminology database based on the historical translation data includes: In response to the first screening operation on the historical translation data, candidate Chinese-English term pairs are obtained, and target Chinese-English term pairs are randomly selected from the candidate Chinese-English term pairs according to a preset Chinese term word count rule, so as to construct the historical translation database based on the target Chinese-English term pairs; In response to the second screening operation on the historical translation data, a manual candidate professional terminology set is obtained, and the historical translation database is automatically identified based on preset screening rules and preset entity recognition technology to obtain a machine candidate professional terminology set, so as to construct the professional terminology library based on the manual candidate professional terminology set and the machine candidate professional terminology set.
3. The method according to claim 2, characterized in that The historical translation database is automatically identified based on preset screening rules and preset entity recognition technology to obtain a machine candidate professional terminology set, including: According to the preset keywords, target terms containing the preset keywords are screened out from the historical translation database, and a first candidate professional term set is constructed based on the target terms; Performing word segmentation on the Chinese entries in the historical translation database, and screening out target words that meet a preset word length threshold and a preset word frequency threshold, and constructing a second candidate professional term set based on the target words; extracting target character strings that conform to a preset structural pattern from the historical translation database using regular expressions, and constructing a third candidate professional terminology set based on the target character strings; Automatically identifying the historical translation database using a preset entity recognition technology to obtain candidate named entities, and extracting professional terms with a noun part of speech from the candidate named entities as a fourth candidate professional term set according to a preset noun extraction rule; The machine candidate terminology set is constructed according to the first candidate terminology set, the second candidate terminology set, the third candidate terminology set, and the fourth candidate terminology set.
4. The method according to claim 1, wherein The step of constructing a historical translation data vector index based on the historical translation database and constructing a professional term vector index based on the professional term database includes: Performing vector encoding on Chinese entries in the historical translation database to obtain a historical translation database vector database; Performing vector encoding on Chinese entries in the professional terminology library to obtain a professional terminology vector library; Normalizing the historical translation data vector library, and indexing the normalized historical translation data vector library to obtain the historical translation data vector index; The professional terminology vector library is normalized, and an index is constructed on the normalized professional terminology vector library to obtain the professional terminology vector index.
5. The method according to claim 1, wherein Determining a historical data query index based on the historical data query vector and the historical translation data vector index, and determining a professional terminology query index based on the professional terminology query vector and the professional terminology vector index, includes: Inputting the historical data query vector into the historical translation data vector index for retrieval to obtain the historical data query index that meets a first similarity threshold; The professional term query vector is input into the professional term vector index for retrieval to obtain the professional term query index that meets a second similarity threshold.
6. The method according to claim 1, characterized in that The determining of historical translation material examples based on the historical material query index and the historical translation material library, and the determining of professional terminology examples based on the professional terminology query index and the professional terminology library, includes: Inputting the historical data query index into the historical translation database to perform data query, and obtaining the historical translation data examples corresponding to the historical data query index; The professional term query index is input into the professional term library to perform data query, and the professional term examples corresponding to the professional term query index are obtained.
7. The method according to claim 1, characterized in that The method further comprises the step of constructing the target large model, wherein the step of constructing the target large model comprises: Performing data cleaning on the Chinese and English term pairs in the historical translation database to obtain a historical translation training data set; Performing data cleaning on the Chinese and English entry pairs in the professional terminology database to obtain a professional terminology training data set; Fusing the historical translation training dataset and the professional terminology training dataset to obtain a fine-tuning training dataset; The fine-tuning training data set is input into the large model to be trained to perform model training to obtain the target large model.
8. A Chinese term translation device, characterized in that: The device comprises the following modules: A domain knowledge base construction module is used to obtain historical translation data of home design and to construct a historical translation database and a professional terminology database based on the historical translation data; A vector index building module, configured to build a historical translation data vector index based on the historical translation database, and to build a professional term vector index based on the professional term database; The vector encoding module is used to perform vector encoding on the Chinese terms to be translated, and obtain historical data query vectors and professional term query vectors; a query index determination module, configured to determine a historical data query index based on the historical data query vector and the historical translation data vector index, and to determine a professional terminology query index based on the professional terminology query vector and the professional terminology vector index; a similar example determination module, configured to determine historical translation material examples based on the historical material query index and the historical translation material library, and to determine professional terminology examples based on the professional terminology query index and the professional terminology library; A prompt project splicing module, configured to splice the historical translation material examples, the professional term examples, and the Chinese terms to be translated into a prompt template to obtain a target prompt project; The term translation module is used to input the target prompt project into the target large model for translation and output the term translation result.
9. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Term translation acquisition method and term translation acquisition apparatus
US20140350914A1
Intention recognition method and device for intelligent customer service robot
WO2020206957A1
Cited By
Term proofreading method based on fuzzy matching and large model semantic discrimination
CN121724012A