A Chinese word entry translation method and device, electronic equipment and storage medium

By constructing a historical translation database and a terminology database for home design, and utilizing vector coding and an indexing framework, the problems of inconsistent translations and inaccurate terminology in the internationalization of home design software were solved, thereby improving the accuracy and professionalism of the translations.

CN120688516BActive Publication Date: 2026-04-21广州极点三维信息科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
广州极点三维信息科技有限公司
Filing Date
2025-05-19
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

In the process of internationalizing home design software, the English translations of the same Chinese term are inconsistent across different interfaces, documents, and help systems. The translation of professional terms is inaccurate and the management and maintenance costs are high, resulting in translations that do not meet the requirements of the scenario and are prone to semantic deviations.

Method used

We construct historical translation databases and terminology databases, and achieve rapid retrieval and reuse through vector encoding and indexing frameworks. We also leverage large-scale model translation results to enhance context awareness and ensure translation consistency and professionalism.

Benefits of technology

It improves the accuracy and professionalism of home design translation, ensures data coverage of diverse scenarios, enhances translation consistency and contextual adaptability, and reduces manual maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120688516B_ABST
    Figure CN120688516B_ABST
Patent Text Reader

Abstract

This application discloses a method, apparatus, electronic device, and storage medium for translating Chinese terms. The method includes: vector encoding the Chinese term 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 vectors and historical translated data vector indexes, and determining a professional term query index based on the professional term query vectors and professional term vector indexes; determining historical translated data examples based on the historical data query indexes and a historical translated data database, and determining professional term examples based on the professional term query indexes and a professional term database; concatenating the historical translated data examples, professional term examples, and the Chinese term to be translated into a prompt template to obtain a target prompt project; inputting the target prompt project into a target large model for translation, and outputting the term translation result. This application can improve the accuracy and professionalism of term translation and can be widely applied in the field of computer technology.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, electronic device, and storage medium for translating Chinese entries. Background Technology

[0002] Among related technologies, there are term translation technologies for the home design field. However, in the current process of internationalizing home design software, the term translation methods in these technologies have the following shortcomings: inconsistent English translations of the same Chinese term in interfaces, documents, help systems, etc., and the specific translated content does not meet the requirements of the scenario; inaccurate translation of professional terms in the home design field, etc.

[0003] In summary, the technical problems existing in the relevant technologies need to be improved. Summary of the Invention

[0004] The embodiments of this application aim to at least partially solve one of the technical problems in the related art. Therefore, the main objective of the embodiments of this application is to provide a Chinese term translation method, apparatus, electronic device, and storage medium that can improve the accuracy and professionalism of term translation.

[0005] To achieve the above objectives, one aspect of this application proposes a method for translating Chinese terms, the method comprising the following steps:

[0006] Acquire historical translation data of home design, and construct a historical translation database and a terminology database based on the historical translation data;

[0007] A vector index of historical translation data is constructed based on the historical translation database, and a vector index of professional terms is constructed based on the professional terminology database.

[0008] Vector encoding is performed on the Chinese entries to be translated to obtain historical data query vectors and professional terminology query vectors;

[0009] The historical data query index is determined based on the historical data query vector and the historical translation data vector index, and the professional term query index is determined based on the professional term query vector and the professional term vector index.

[0010] Examples of historical translation materials are determined based on the historical data query index and the historical translation database, and examples of professional terms are determined based on the professional terminology query index and the professional terminology database;

[0011] By combining the historical translation data examples, the professional terminology examples, and the Chinese terms to be translated into the prompt template, the target prompt project is obtained.

[0012] The target prompting engineering is input into the target large model for translation, and the translated terms are output.

[0013] In some embodiments, constructing a historical translation database and a terminology database based on the historical translation data includes:

[0014] In response to the first filtering operation on the historical translation data, candidate Chinese-English word pairs are obtained, and target Chinese-English word pairs are randomly selected from the candidate Chinese-English word pairs according to the preset Chinese word character count rule, so as to construct the historical translation database based on the target Chinese-English word pairs;

[0015] In response to the second filtering operation on the historical translation data, a set of manually selected candidate terms is obtained, and the historical translation database is automatically identified based on preset filtering rules and preset entity recognition technology to obtain a set of machine-selected candidate terms, so as to construct the terminology database based on the set of manually selected candidate terms and the set of machine-selected candidate terms.

[0016] In some embodiments, the automated identification of the historical translation database based on preset filtering rules and preset entity recognition technology to obtain a set of machine-selected professional terms includes:

[0017] Based on preset keywords, target terms containing the preset keywords are selected from the historical translation database, and a first candidate terminology set is constructed based on the target terms.

[0018] The Chinese entries in the historical translation database are segmented, and target words that meet the preset word length threshold and preset word frequency threshold are selected. A second candidate terminology set is constructed based on the target words.

[0019] The target strings that conform to the preset structural pattern are extracted from the historical translation database using regular expressions, and a third candidate set of professional terms is constructed based on the target strings;

[0020] The historical translation database is automatically identified using preset entity recognition technology to obtain candidate named entities. Then, according to preset noun extraction rules, professional terms with the part of speech of nouns in the candidate named entities are extracted as the fourth candidate professional term set.

[0021] The machine candidate terminology set is constructed based on 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 vector index of historical translation data based on the historical translation database and a vector index of professional terms based on the professional terminology database includes:

[0023] Vector encoding is performed on the Chinese entries in the historical translation database to obtain a historical translation data vector database;

[0024] The Chinese entries in the terminology database are vector-encoded to obtain a terminology vector database.

[0025] The historical translation data vector library is normalized, and an index is constructed on the normalized historical translation data vector library to obtain the historical translation data vector index.

[0026] The terminology vector library is normalized, and an index is constructed on the normalized terminology vector library to obtain the terminology vector index.

[0027] In some embodiments, determining the historical data query index based on the historical data query vector and the historical translation data vector index, and determining the professional term query index based on the professional term query vector and the professional term vector index, includes:

[0028] The historical data query vector is input into the historical translation data vector index for retrieval to obtain the historical data query index that meets the first similarity threshold.

[0029] The terminology query vector is input into the terminology vector index for retrieval, and the terminology query index that meets the second similarity threshold is obtained.

[0030] In some embodiments, 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, includes:

[0031] Input the historical data query index into the historical translation database to perform a data query and obtain the historical translation data examples corresponding to the historical data query index;

[0032] The terminology query index is input into the terminology database for data querying to obtain examples of the terminology corresponding to the terminology query index.

[0033] In some embodiments, the method further includes the step of constructing the target large model, wherein constructing the target large model includes:

[0034] Data cleaning was performed on the Chinese-English term pairs in the historical translation database to obtain the historical translation training dataset;

[0035] Data cleaning was performed on the Chinese and English entries in the terminology database to obtain a terminology training dataset.

[0036] The historical translation training dataset and the technical terminology training dataset are merged to obtain a fine-tuned training dataset;

[0037] The fine-tuned training dataset is input into the large model to be trained to train the model and obtain the target large model.

[0038] To achieve the above objectives, another aspect of this application provides a Chinese term translation device, which includes the following modules:

[0039] The domain knowledge base construction module is used to acquire historical translation data of home design and construct a historical translation database and a professional terminology database based on the historical translation data;

[0040] The vector index construction module is used to construct a vector index of historical translation materials based on the historical translation database, and to construct a vector index of professional terms based on the professional terminology database.

[0041] The vector encoding module is used to perform vector encoding on the Chinese entries to be translated, to obtain historical data query vectors and professional term query vectors.

[0042] The query index determination module is used to determine the historical data query index based on the historical data query vector and the historical translation data vector index, and to determine the professional term query index based on the professional term query vector and the professional term vector index.

[0043] The similarity example determination module is used to determine historical translation data examples based on the historical data query index and the historical translation database, and to determine professional terminology examples based on the professional terminology query index and the professional terminology database;

[0044] The prompt project splicing module is used to splice the historical translation data examples, the professional terminology examples, and the Chinese entries to be translated into the prompt template to obtain the target prompt project;

[0045] The term translation module is used to translate the target prompt engineering input into the target large model and output the term translation results.

[0046] To achieve the above objectives, another aspect of this application provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the method described above.

[0047] To achieve the above objectives, another aspect of the embodiments of this application proposes a computer-readable storage medium storing a computer program that, when executed by a processor, implements the aforementioned method.

[0048] The embodiments of this application include at least the following beneficial effects: This application provides a method, apparatus, electronic device, and storage medium for translating Chinese terms. This solution acquires historical translation data of home design and constructs a historical translation database and a terminology database based on the historical translation data; constructs a historical translation data vector index based on the historical translation database and a terminology vector index based on the terminology database; performs vector encoding on the Chinese terms to be translated to obtain historical data query vectors and terminology query vectors; determines the historical data query index based on the historical data query vectors and historical translation data vector indexes, and determines the terminology query index based on the terminology query vectors and terminology vector indexes; determines historical translation data examples based on the historical data query indexes and the historical translation database, and determines terminology examples based on the terminology query indexes and the terminology database; concatenates the historical translation data examples, 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. This application's embodiments, by constructing a historical translation database and a professional terminology database related to home design, ensure that the home design data covers diverse scenarios and domain specializations. Simultaneously, based on vector encoding and an indexing framework, it enables rapid retrieval and reuse of historical translation examples and professional terminology examples, significantly improving translation consistency and contextual adaptability. Furthermore, when translating terms, it searches the historical translation database and professional terminology database based on the query index, and then concatenates the retrieved historical translation examples, professional terminology examples, and the Chinese term to be translated into a prompt engineering template, enhancing the contextual awareness of the large model and improving translation accuracy and professionalism. Attached Figure Description

[0049] Figure 1 This is a flowchart illustrating the steps of a Chinese term translation method provided in an embodiment of this application;

[0050] Figure 2 This is a schematic diagram of the overall process of a Chinese term translation method provided in an embodiment of this application;

[0051] Figure 3 This is a schematic diagram of the technical framework of a Chinese term translation method provided in an embodiment of this application;

[0052] Figure 4 This is a schematic diagram of the structure of a Chinese dictionary translation device provided in an embodiment of this application;

[0053] Figure 5This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0054] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit it. In the following description, when referring to the accompanying 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 those of this application; they are merely examples of apparatuses and methods consistent with some aspects of the embodiments of this application as detailed in the appended claims.

[0055] It is understood that the terms “first,” “second,” etc., used in this application may be used herein to describe various concepts, but unless otherwise stated, 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 this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the words “if,” “when,” or “in response to a determination” as used herein may be interpreted as “when…” or “when…” or “in response to a determination.”

[0056] As used in this application, the terms "at least one", "multiple", "each", "any", etc., "at least one" includes one, two or more, "multiple" includes two or more, "each" refers to each of the corresponding multiples, and "any" refers to any one of the multiples.

[0057] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0058] Current AI (Artificial Intelligence) translation tools are mainly divided into traditional Neural Machine Translation (NMT) tools and large model-driven translation tools. Traditional NMT tools primarily employ three methods: rule-based methods, which rely on predefined dictionaries and grammatical rules to achieve translation through phrase alignment and syntactic analysis; statistical methods, 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 methods, which use an encoder-decoder architecture to capture contextual dependencies through sequence-to-sequence models for translation. Traditional neural machine translation methods support multilingual translation, but require manual maintenance of the terminology database, which is costly. They also lack global consistency constraints, leading to ambiguity for the same term in different contexts. Large-scale model-driven translation tools, such as DeepL, are based on large-scale pre-trained language models (e.g., BERT, CLIP) and capture long-distance semantic dependencies through attention mechanisms. They support end-to-end translation, achieving context-aware translation and avoiding literal translation. However, they lack knowledge in the home design field, cannot integrate home design knowledge for accurate translation, and are prone to semantic bias in the generated results, especially with data-related terms, leading to translation errors.

[0059] For example, in the current process of internationalization of home design software, the defects of the term translation methods in related technologies are as follows: (1) The problem of fragmentation in the translation of professional terms. The English translation of the same Chinese term will be inconsistent in the interface, document and help system, and the specific translation content does not meet the requirements of the scenario; (2) The number of Chinese terms is huge, and manual translation requires a lot of manpower, and the translation result is 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, this application provides a method, apparatus, electronic device, and storage medium for translating Chinese terms. This solution acquires historical translation data of home design and constructs a historical translation database and a terminology database based on this data. It then constructs a vector index for historical translation data based on the historical translation database and a vector index for professional terms based on the terminology database. The Chinese terms to be translated are vector-encoded to obtain historical data query vectors and professional terminology query vectors. A historical data query index is determined based on the historical data query vectors and the historical translation data vector index, and a professional terminology query index is determined based on the professional terminology query vectors and the professional terminology vector index. Examples of historical translation data are determined based on the historical data query index and the historical translation database, and examples of professional terms are determined based on the professional terminology query index and the professional terminology database. The examples of historical translation data, examples of professional terms, and the Chinese terms to be translated are concatenated 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 translation result is output. This application's embodiments, by constructing a historical translation database and a professional terminology database related to home design, ensure that the home design data covers diverse scenarios and domain specializations. Simultaneously, based on vector encoding and an indexing framework, it enables rapid retrieval and reuse of historical translation examples and professional terminology examples, significantly improving translation consistency and contextual adaptability. Furthermore, when translating terms, it searches the historical translation database and professional terminology database based on the query index, and then concatenates the retrieved historical translation examples, professional terminology examples, and the Chinese term to be translated into a prompt engineering template, enhancing the contextual awareness of the large model and improving translation accuracy and professionalism.

[0061] This application provides a method for translating Chinese terms, relating to the field of computer technology. This method can be applied to a terminal, a server, or software running on either a terminal or a server. In some embodiments, the terminal can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, or in-vehicle terminal, but is not limited to these. The server can be configured as an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, 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 implementing a Chinese term translation method, but is not limited to the above forms.

[0062] This application can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics devices, network PCs, minicomputers, mainframes, and distributed computing environments including any of the above systems or devices. This 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. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0063] Please see Figure 1 , Figure 1 This is an optional flowchart of a Chinese term translation method provided in an embodiment of this application. Figure 1 The method may include, but is not limited to, steps S101 to S107.

[0064] Step S101: Obtain historical translation data of home design, and construct 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 filtering 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 character count rule, so as to construct a historical translation database based on the target Chinese-English term pairs; in response to a second filtering operation on historical translation data, obtaining a set of manually selected professional terms, and automatically identifying the historical translation database based on preset filtering rules and preset entity recognition technology to obtain a set of machine-selected professional terms, so as to construct a professional term database based on the set of manually selected professional terms and the set of machine-selected professional terms.

[0066] In some specific embodiments, the step of automatically identifying a historical translation database based on preset filtering rules and preset entity recognition technology to obtain a machine candidate terminology set may include: filtering target terms containing preset keywords from the historical translation database according to preset keywords, and constructing a first candidate terminology set based on the target terms; performing word segmentation on Chinese terms in the historical translation database, and filtering target terms that meet preset word length thresholds and preset word frequency thresholds, and constructing a second candidate terminology set based on the target terms; extracting target strings that conform to preset structural patterns from the historical translation database using regular expressions, and constructing a third candidate terminology set based on the target strings; automatically identifying the historical translation database using preset entity recognition technology to obtain candidate named entities, and extracting terminology with noun parts of speech from the candidate named entities according to preset noun extraction rules as a fourth candidate terminology set; and constructing a machine candidate terminology set based on the first, second, third, and fourth candidate terminology sets.

[0067] The target term refers to a Chinese term containing preset keywords.

[0068] In the specific implementation, firstly, a large amount of historical translation data from previous international versions of home design software is collected. Professional translators evaluate the quality of the translations, and randomly select several Chinese-English term pairs from the high-quality Chinese-English term pairs to form a historical translation database DB1. Next, from the historical translation database DB1, semi-automatic identification of professional terms is performed using rules and NLP (Natural Language Processing) entity recognition technology. Professional translators then filter the identified professional terms, and the filtered professional terms are combined with the professional term set SetA compiled by professional translators to form a professional term database DB2.

[0069] Specifically, the process of constructing the historical translation database DB1 is as follows: First, a large amount of historical translation data is collected from previous internationalized versions of home design software, such as UI (User Interface) text, design software window prompts, menu text of various processes in the design software, etc. This step does not require manual screening. Then, multiple professional translators evaluate the translation quality of the Chinese-English term pairs in the collected historical translation data. Finally, from the high-quality Chinese-English term pairs, they are divided into three categories—short, medium, and long—based on the rule that the number of Chinese characters in each category is less than 7, greater than 7 but less than 15, and greater than 15. Ten thousand Chinese-English term pairs are randomly selected from each of these three categories to form the historical translation database DB1. It should be noted that the number of Chinese characters and the number of Chinese-English term pairs in this example can be set according to actual circumstances, and this embodiment does not impose any limitations on this.

[0070] Specifically, the implementation process of constructing the terminology database DB2 is as follows: First, Chinese entries containing preset keywords are selected from the historical translation database DB1 as candidate terminology set SetB (first candidate terminology set); then, Chinese word segmentation tools are used to segment the Chinese entries in the historical translation database DB1, followed by filtering out excessively long and short words, and statistically analyzing the frequently occurring words and their frequencies, selecting the most frequent words as candidate terminology set SetC (second candidate terminology set); next, strings conforming to specific structural patterns are extracted using regular expressions as candidate terminology set SetD (third candidate terminology set); further, an NLP model is initialized using the spacy library, and entity recognition is performed using the NLP model. The target Chinese text is input into the model to obtain annotation information including word segmentation, part-of-speech tags, and named entities, and the data is collected. All named entities (such as ORG, PRODUCT) identified by the NLP model are used as candidate professional terms. Then, the parts of speech that are nouns in the candidate professional terms identified by the NLP model are extracted according to rules to form the candidate professional term set SetE (fourth candidate professional term set). The candidate professional term sets SetB (first candidate professional term set), SetC (second candidate professional term set), SetD (third candidate professional term set), and SetE (fourth candidate professional term set) are merged to obtain the machine candidate professional term set. Finally, professional translators check the machine candidate professional term sets (candidate professional term sets SetB, SetC, SetD, and SetE) and select the parts that meet the requirements of professional terms. These are then combined with the professional term set SetA compiled by professional translators to form the final professional term database DB2.

[0071] Step S102: Construct a vector index of historical translation data based on the historical translation database, and construct a vector index of professional terms based on the professional terminology database;

[0072] In some embodiments, step S102 may include: vector encoding Chinese entries in the historical translation database to obtain a historical translation data vector database; vector encoding Chinese entries in the terminology database to obtain a terminology vector database; normalizing the historical translation data vector database and constructing an index for the normalized historical translation data vector database to obtain a historical translation data vector index; and normalizing the terminology vector database and constructing an index for the normalized terminology vector database to obtain a terminology vector index.

[0073] In the specific implementation, the Chinese entries in the historical translation database DB1 and the terminology database DB2 are first vectorized to obtain vector databases EB1 and EB2, respectively. Then, based on the constructed historical translation database EB1 and terminology database EB2, Faiss is used to construct vector indexes for RAG (Retrieval-Augmented Generation). Specifically, first, two vector models, bge-m3 and text2vec, are initialized; then, the bge-m3 model is used to encode the Chinese entries in the historical translation database DB1 to obtain the historical translation database EB1, and the text2vec model is used to encode the Chinese entries in the terminology database DB2 to obtain the terminology database EB2; next, L2 normalization is performed on the historical translation database EB1 and the terminology database EB2; finally, an inner product-based precise search index from the Faiss library is used to build indexes on the normalized vectors to obtain the historical translation database vector index Index1 and the terminology database vector index Index2.

[0074] Step S103: Vector encoding is performed on the Chinese entries to be translated to obtain historical data query vectors and professional term query vectors;

[0075] In the specific implementation, the bge-m3 model and the text2vec model are used to encode the terms to be translated into vectors, respectively, to obtain the similar historical data query vector EB3 and the related professional term query vector EB4.

[0076] Step S104: Determine the historical data query index based on the historical data query vector and the historical translation data vector index, and determine the professional term query index based on the professional term query vector and the professional term vector index;

[0077] In some embodiments, step S104 may include: inputting historical data query vectors into historical translation data vector indexes for retrieval to obtain historical data query indexes that meet a first similarity threshold; inputting professional terminology query vectors into professional terminology vector indexes for retrieval to obtain professional terminology query indexes that meet 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 top K historical data query indices with the highest similarity are selected; at the same time, the related professional term query vector EB4 is used to search in the professional term vector index Index2, and the top K professional term query indices with the highest similarity are selected.

[0079] Step S105: Determine historical translation data examples based on the historical data query index and the historical translation database, and determine 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 database for data querying to obtain historical translation data examples corresponding to the historical data query index; inputting the professional terminology query index into the professional terminology database for data querying to obtain professional terminology examples corresponding to the professional terminology query index.

[0081] In the specific implementation, the historical translation data sample Sample1 is retrieved from the historical translation data database DB1 based on the retrieved historical data query index. At the same time, the professional terminology sample Sample2 is retrieved from the professional terminology database DB2 based on the retrieved professional terminology query index.

[0082] Step S106: Combine the historical translation data examples, the professional terminology examples, and the Chinese terms to be translated into the prompt template to obtain the target prompt project;

[0083] In the specific implementation, the historical translation data example Sample1, the professional terminology example Sample2, and the terminology to be translated are concatenated into the Prompt template to obtain the final Prompt.

[0084] Step S107: The target prompting engineering input is translated into the target large model, and the translation result of the term is output.

[0085] In some embodiments, the method may further include a step of constructing a target large model. The step of constructing a target large model may include: cleaning the Chinese-English term pairs in the historical translation database to obtain a historical translation training dataset; cleaning the Chinese-English term pairs in the professional terminology database to obtain a professional terminology training dataset; fusing the historical translation training dataset and the professional terminology training dataset to obtain a fine-tuning training dataset; and inputting the fine-tuning training dataset into the large model to be trained for model training to obtain the target large model.

[0086] Steps S101 to S107 as shown in this embodiment involve: acquiring historical translation data of home design; constructing a historical translation database and a terminology database based on the historical translation data; constructing a historical translation vector index based on the historical translation database and a terminology vector index based on the terminology database; performing vector encoding on the Chinese entries to be translated to obtain historical data query vectors and terminology query vectors; determining the historical data query index based on the historical data query vectors and historical translation vector indexes, and determining the terminology query index based on the terminology query vectors and terminology vector indexes; determining historical translation data examples based on the historical data query indexes and the historical translation database, and determining terminology examples based on the terminology query indexes and the terminology database; concatenating the historical translation data examples, terminology examples, and the Chinese entries to be translated into a prompt template to obtain the target prompt project; inputting the target prompt project into the target large model for translation, and outputting the translation results. This application's embodiments, by constructing a historical translation database and a professional terminology database related to home design, ensure that the home design data covers diverse scenarios and domain specializations. Simultaneously, based on vector encoding and an indexing framework, it enables rapid retrieval and reuse of historical translation examples and professional terminology examples, significantly improving translation consistency and contextual adaptability. Furthermore, when translating terms, it searches the historical translation database and professional terminology database based on the query index, and then concatenates the retrieved historical translation examples, professional terminology examples, and the Chinese term to be translated into a prompt engineering template, enhancing the contextual awareness of the large model and improving translation accuracy and professionalism.

[0087] To explain in detail the principle of the technical solution of the present invention, the overall process of the present invention will be described below with reference to some specific embodiments. It is easy to understand that the following is an explanation of the technical principle of the present invention and should not be regarded as a limitation of the present invention.

[0088] Please see Figure 2 , Figure 2 This is a schematic diagram of the overall process of a Chinese term translation method provided in an embodiment of this application, such as... Figure 2As shown, the overall implementation process of the Chinese term translation method is as follows: First, a historical translation database, a terminology database, and a fine-tuning training set are compiled from historical translation materials. Then, the large model is fine-tuned using the fine-tuning training set, and a historical translation data vector database and a terminology vector database are established based on the historical translation data database and the terminology vector database, respectively. Next, vector elements for the historical translation data database and the terminology vector database are established based on the historical translation data vector database and the terminology vector database, respectively. Further, the term to be translated is processed using RAG to obtain historical translation data examples and terminology examples, and the historical translation data examples, terminology examples, and the term to be translated are concatenated into a Prompt file and input into the large model for translation. Finally, the translation results are output, and after being checked by professionals, the translation results are entered into the terminology file in the background.

[0089] Please see Figure 3 , Figure 3 This is a schematic diagram of the technical framework of a Chinese term translation method provided in an embodiment of this application; as shown below. Figure 3 As shown in the figure, the specific implementation process of a Chinese term translation method provided in this application embodiment is as follows:

[0090] (1) The first step is to collect a large amount of historical translation data from previous international versions of home design software. Professional translators will evaluate the quality of the translations, and a number of Chinese-English glossary pairs will be randomly selected from the high-quality Chinese-English glossary pairs to form the historical translation database DB1.

[0091] First, a large amount of historical translation data was collected from previous international versions of home design software, such as UI (User Interface) text, design software window prompts, menu text of each process in the design software, etc. This step does not require manual screening.

[0092] Then, multiple professional translators were asked to evaluate the translation quality of the Chinese-English glossary entries in the collected historical translation materials;

[0093] Finally, from the high-quality Chinese-English word pairs, they are categorized into three types—short, medium, and long—based on the rule that the number of Chinese words is less than 7, greater than 7 but less than 15, and greater than 15. Ten thousand Chinese-English word pairs are randomly selected from each of these three categories to form the historical translation database DB1. It should be noted that the number of Chinese words and the number of Chinese-English word pairs in this example can be set according to actual circumstances, and this embodiment does not impose any limitations on this.

[0094] (2) The second step involves semi-automatically identifying specialized terms from the historical translation database DB1 using rules and NLP (Natural Language Processing) entity recognition technology. Professional translators then filter the identified terms, combining them with a set of specialized terms SetA compiled by the professional translators to form the specialized terminology database DB2.

[0095] First, select entries containing preset keywords from the historical translation database DB1 as the candidate terminology set SetB by using keywords (such as "series", "style", "pattern" etc.).

[0096] Then, Chinese word segmentation tools (such as Jieba) are used to segment Chinese entries in the historical translation database DB1. Then, words that are too long (e.g., greater than 7) and too short (e.g., less than 2) are filtered out. The words that appear frequently in the entries and their frequency of occurrence are counted. The words with the highest frequency of occurrence (which can be set according to the actual situation) are selected as the candidate professional term set SetC.

[0097] Next, strings that conform to a specific structural pattern are extracted using regular expressions as a candidate set of technical terms, SetD, such as strings enclosed by symbols (e.g., "【】", "()", "-*-").

[0098] Furthermore, an NLP model (such as zh_core_web_md) is initialized using the spacy library. The NLP model is then used for entity recognition. The target Chinese text is input into the model to obtain annotation information including word segmentation, part-of-speech tagging, and named entities. All named entities (such as ORG and PRODUCT) identified by the NLP model are collected as candidate terms. Then, the parts of the candidate terms identified by the NLP model that are nouns are extracted according to rules to form the candidate term set SetE.

[0099] Finally, professional translators reviewed the candidate terminology sets SetB, SetC, SetD, and SetE, selecting those that met the terminology requirements. These selected terms, along with the terminology set SetA compiled by the professional translators, formed the final terminology database DB2.

[0100] (3) The third step is to perform vector encoding on the Chinese entries in the historical translation database DB1 and the professional terminology database DB2 to obtain vector databases EB1 and EB2 respectively:

[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 involves using Faiss to construct a vector index for RAG based on the historical translation data vector database EB1 and the technical terminology vector database EB2 built in the third step.

[0104] First, L2 normalization was performed on the historical translation data vector database EB1 and the professional terminology vector database EB2.

[0105] Then, an exact search index based on inner product from the Faiss library is used to index the normalized vectors, resulting in the historical translation data vector index Index1 and the technical terminology vector index Index2.

[0106] The fifth step is to construct a fine-tuning training set A for the large model, and then 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, iterate through 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, retrieve the first pair of Chinese and English terms in the historical translation data database DB1, which are most similar to the encoding vector emb_train (e.g., N=5); similarly, based on the professional terminology vector index Index2, retrieve the second pair of Chinese and English terms in the professional terminology database DB2, which are most similar to the encoding vector emb_train (e.g., N=5).

[0109] Next, data cleaning was performed on the N sets of the first Chinese-English word pairs, and data cleaning was performed on the N sets of the second Chinese-English word pairs;

[0110] Finally, the N sets of first Chinese-English word pairs and the N sets of second Chinese-English word pairs after data cleaning are merged, and the merged Chinese-English word pairs are input into the dataset template to form the fine-tuning training set A of the large model; then, Llama_factory is used 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 finely tuned large model, receive the terms to be translated, and perform the translation:

[0112] First, the bge-m3 model and text2vec model are used to encode the terms to be translated into vectors, respectively, to obtain the similar historical data query vector EB3 and the related professional term query vector EB4.

[0113] Then, the similar historical data query vector EB3 is used to search in the historical translation data vector index Index1, and the relevant professional terminology query vector EB4 is used to search in the professional terminology vector index Index2. The top K indexes with the highest similarity are selected respectively.

[0114] Next, based on the retrieved indexes, the corresponding historical translation data sample Sample1 and professional terminology sample Sample2 are retrieved from the historical translation data database DB1 and the professional terminology database DB2, respectively.

[0115] Furthermore, the historical translation data example Sample1, the professional terminology example Sample2, and the terminology to be translated are concatenated into the Prompt template to obtain the final Prompt.

[0116] Finally, the Prompt is used to call the deployed large model, which then outputs the translation results.

[0117] This application proposes a method for translating Chinese terms. Based on NLP technology, it utilizes the text analysis capabilities of the Spacy framework to extract specialized terms from historical translation materials through a combination of rule matching and statistical models, supporting the construction and maintenance of a specialized terminology database. LoRA fine-tuning technology is used to inject knowledge from the home design software field into the large model. Simultaneously, the system employs RAG technology to search the historical translation database and the organized specialized terminology database during term translation. The retrieved historical translation examples, specialized terminology examples, and the term to be translated are then concatenated into a Prompt template, enhancing the context awareness of the large model and improving translation accuracy.

[0118] It should be noted that this embodiment is only a brief illustrative description of the general process of a Chinese term translation method. Detailed descriptions of each step can be found in the relevant content of the foregoing embodiments, and will not be repeated here. It is understood that the present invention does not limit this.

[0119] This application embodiment acquires historical translation data of home design and constructs a historical translation database and a terminology database based on the historical translation data; it constructs a historical translation data vector index based on the historical translation database and a terminology vector index based on the terminology database; it performs vector encoding on the Chinese entries to be translated to obtain historical data query vectors and terminology query vectors; it determines the historical data query index based on the historical data query vectors and historical translation data vector indexes, and determines the terminology query index based on the terminology query vectors and terminology vector indexes; it determines historical translation data examples based on the historical data query indexes and the historical translation database, and determines terminology examples based on the terminology query indexes and the terminology database; it concatenates the historical translation data examples, terminology examples, and the Chinese entries to be translated into a prompt template to obtain the target prompt project; it inputs the target prompt project into the target large model for translation and outputs the translation results. This application's embodiments, by constructing a historical translation database and a professional terminology database related to home design, ensure that the home design data covers diverse scenarios and domain specializations. Simultaneously, based on vector encoding and an indexing framework, it enables rapid retrieval and reuse of historical translation examples and professional terminology examples, significantly improving translation consistency and contextual adaptability. Furthermore, when translating terms, it searches the historical translation database and professional terminology database based on the query index, and then concatenates the retrieved historical translation examples, professional terminology examples, and the Chinese term to be translated into a prompt engineering template, enhancing the contextual awareness of the large model and improving translation accuracy and professionalism.

[0120] In summary, the advantages of the embodiments of this application are as follows:

[0121] (1) A historical translation database DB1 was constructed based on professional evaluation and categorized sampling. Through the quality assessment of historical Chinese-English term pairs by professional translators, high-quality translations were selected, and stratified random sampling was performed according to term length (short, medium, long) to ensure that the constructed historical translation database DB1 covers diverse scenarios and has controllable quality.

[0122] (2) A professional terminology database DB2 is constructed based on a combination of semi-automation and manual methods. By integrating rule matching (keywords, word frequency, regular expressions), NLP entity recognition technology (such as the spay 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, thereby improving terminology consistency.

[0123] (3) A hybrid translation framework based on RAG and large model fine-tuning. Efficient retrieval is achieved by using vector encoding (bge-m3 / text2vec) and Faiss indexing. Examples of historical translation materials and professional terms are injected into the large model through Prompt templates. Combined with retrieval augmentation generation (RAG) and model inference, the accuracy and professionalism of the translation are optimized.

[0124] This application's embodiments construct a high-quality historical translation database (DB1) through evaluation by professional translators and stratified sampling, and construct a specialized terminology database (DB2) by combining rules, NLP, and manual review. This ensures that the training data covers diverse scenarios and domain specializations, reducing the cost of manual annotation and proofreading. Simultaneously, based on the RAG framework using vector encoding (such as bge-m3 / text2vec) and Faiss indexing, it enables rapid retrieval and reuse of historical translation examples and specialized terminology examples, significantly improving translation consistency and contextual adaptation capabilities. Furthermore, knowledge from the home design domain is injected during the fine-tuning stage, allowing the model to maintain high-precision output while reducing the amount of training data, thus reducing dependence on large-scale labeled data. In summary, this application's embodiments provide efficient support for the internationalization of design software scenarios through automated feature extraction, terminology recognition, dynamic retrieval, and model inference processes. While ensuring the consistency of specialized terminology, it can significantly improve the translation accuracy of long-tail terms and complex semantics, optimize internationalization efficiency, and reduce annotation and labor costs.

[0125] Please see Figure 4 This 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 acquire historical translation data of home design and construct a historical translation database and a professional terminology database based on the historical translation data.

[0127] The vector index construction module 402 is used to construct a vector index of historical translation materials based on the historical translation data database, and to construct a vector index of professional terms based on the professional terminology database.

[0128] Vector encoding module 403 is used to perform vector encoding on the Chinese entries to be translated, to obtain historical data query vectors and professional term query vectors;

[0129] The query index determination module 404 is used to determine the historical data query index based on the historical data query vector and the historical translation data vector index, and to determine the professional term query index based on the professional term query vector and the professional term vector index.

[0130] The similarity example determination module 405 is used to determine historical translation data examples based on the historical data query index and the historical translation database, and to determine professional terminology examples based on the professional terminology query index and the professional terminology database;

[0131] The prompt project splicing module 406 is used to splice the historical translation data examples, the professional terminology examples, and the Chinese entries to be translated into the prompt template to obtain the target prompt project;

[0132] The term translation module 407 is used to translate the target prompt engineering input target large model and output the term translation result.

[0133] It is understood that the content of the above method embodiments is applicable to the present device embodiments. The specific functions 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] This application also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the aforementioned Chinese term translation method. This electronic device can be any smart terminal, including tablet computers, in-vehicle computers, etc.

[0135] It is understood that the content of the above method embodiments is applicable to this device embodiment. The specific functions implemented by this device 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.

[0136] Please see Figure 5 , Figure 5 The hardware structure of an electronic device according to another embodiment is illustrated. The electronic device includes:

[0137] The processor 501 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application.

[0138] The memory 502 can be implemented as a read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). The memory 502 can store the operating system and other applications. 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 and executed by the processor 501 using the Chinese term translation method of the embodiments of this application.

[0139] The input / output interface 503 is used to implement information input and output;

[0140] The communication interface 504 is used to enable communication and interaction between this device and other devices. Communication 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 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, memory 502, input / output interface 503, and communication interface 504 are connected to each other within the device via bus 505.

[0143] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described Chinese term translation method.

[0144] It is understood that the content of the above method embodiments is applicable to this storage medium embodiment. The specific functions implemented in this storage medium embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.

[0145] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0146] The Chinese term translation method, device, electronic device, and storage medium provided in this application embodiment acquire historical translation data of home design and construct a historical translation database and a terminology database based on the historical translation data; construct a historical translation data vector index based on the historical translation database and a terminology vector index based on the terminology database; perform vector encoding on the Chinese term to be translated to obtain historical data query vectors and terminology query vectors; determine the historical data query index based on the historical data query vectors and historical translation data vector indexes, and determine the terminology query index based on the terminology query vectors and terminology vector indexes; determine historical translation data examples based on the historical data query indexes and historical translation database, and determine terminology examples based on the terminology query indexes and terminology database; concatenate the historical translation data examples, terminology 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. This application's embodiments, by constructing a historical translation database and a professional terminology database related to home design, ensure that the home design data covers diverse scenarios and domain specializations. Simultaneously, based on vector encoding and an indexing framework, it enables rapid retrieval and reuse of historical translation examples and professional terminology examples, significantly improving translation consistency and contextual adaptability. Furthermore, when translating terms, it searches the historical translation database and professional terminology database based on the query index, and then concatenates the retrieved historical translation examples, professional terminology examples, and the Chinese term to be translated into a prompt engineering template, enhancing the contextual awareness of the large model and improving translation accuracy and professionalism.

[0147] The embodiments described in this application are for the purpose of more clearly illustrating 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. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by 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 this application, and may include more or fewer steps than shown, or combine 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; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0150] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or appropriate combinations thereof.

[0151] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0152] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0153] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0154] The units described above as separate components may or may not be physically separate. 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 the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0155] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0156] If the integrated unit is implemented as 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 this application, in essence, 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. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0157] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.

Claims

1. A method for translating Chinese entries, characterized in that, The method includes the following steps: Obtain historical translation data of home design, and construct a historical translation database and a terminology database based on the historical translation data; A vector index of historical translation data is constructed based on the historical translation database, and a vector index of professional terms is constructed based on the professional terminology database. Vector encoding is performed on the Chinese entries to be translated to obtain historical data query vectors and professional terminology query vectors; The historical data query index is determined based on the historical data query vector and the historical translation data vector index, and the professional term query index is determined based on the professional term query vector and the professional term vector index. Examples of historical translation materials are determined based on the historical data query index and the historical translation database, and examples of professional terms are determined based on the professional terminology query index and the professional terminology database; By combining the historical translation data examples, the professional terminology examples, and the Chinese terms to be translated into the prompt template, the target prompt project is obtained. The target prompting engineering is input into the target large model for translation, and the translated terms are output. The construction of a historical translation database and a terminology database based on the historical translation data includes: In response to the first filtering operation on the historical translation data, candidate Chinese-English word pairs are obtained, and target Chinese-English word pairs are randomly selected from the candidate Chinese-English word pairs according to the preset Chinese word character count rule, so as to construct the historical translation database based on the target Chinese-English word pairs; In response to the second filtering operation on the historical translation data, a set of manually selected candidate terms is obtained, and the historical translation database is automatically identified based on preset filtering rules and preset entity recognition technology to obtain a set of machine-selected candidate terms, so as to construct the terminology database based on the set of manually selected candidate terms and the set of machine-selected candidate terms.

2. The method according to claim 1, characterized in that, The automated identification of the historical translation database based on preset filtering rules and preset entity recognition technology yields a set of machine-generated candidate professional terms, including: Based on preset keywords, target terms containing the preset keywords are selected from the historical translation database, and a first candidate terminology set is constructed based on the target terms. The Chinese entries in the historical translation database are segmented, and target words that meet the preset word length threshold and preset word frequency threshold are selected. A second candidate terminology set is constructed based on the target words. The target strings that conform to the preset structural pattern are extracted from the historical translation database using regular expressions, and a third candidate set of professional terms is constructed based on the target strings; The historical translation database is automatically identified using preset entity recognition technology to obtain candidate named entities. Then, according to preset noun extraction rules, professional terms with the part of speech of nouns in the candidate named entities are extracted as the fourth candidate professional term set. The machine candidate terminology set is constructed based on the first candidate terminology set, the second candidate terminology set, the third candidate terminology set, and the fourth candidate terminology set.

3. The method according to claim 1, characterized in that, The construction of a vector index for historical translation data based on the historical translation database and a vector index for professional terms based on the professional terminology database includes: Vector encoding is performed on the Chinese entries in the historical translation database to obtain a historical translation data vector database; The Chinese entries in the terminology database are vector-encoded to obtain a terminology vector database. The historical translation data vector library is normalized, and an index is constructed on the normalized historical translation data vector library to obtain the historical translation data vector index. The terminology vector library is normalized, and an index is constructed on the normalized terminology vector library to obtain the terminology vector index.

4. The method according to claim 1, characterized in that, The step of determining the historical data query index based on the historical data query vector and the historical translation data vector index, and determining the professional term query index based on the professional term query vector and the professional term vector index, includes: The historical data query vector is input into the historical translation data vector index for retrieval to obtain the historical data query index that meets the first similarity threshold. The terminology query vector is input into the terminology vector index for retrieval, and the terminology query index that meets the second similarity threshold is obtained.

5. The method according to claim 1, characterized in that, The step of 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, includes: Input the historical data query index into the historical translation database to perform a data query and obtain the historical translation data examples corresponding to the historical data query index; The terminology query index is input into the terminology database for data querying to obtain examples of the terminology corresponding to the terminology query index.

6. The method according to claim 1, characterized in that, The method further includes the step of constructing the target large model, wherein constructing the target large model includes: Data cleaning was performed on the Chinese-English term pairs in the historical translation database to obtain the historical translation training dataset; Data cleaning was performed on the Chinese and English entries in the terminology database to obtain a terminology training dataset. The historical translation training dataset and the technical terminology training dataset are merged to obtain a fine-tuned training dataset; The fine-tuned training dataset is input into the large model to be trained to train the model and obtain the target large model.

7. A Chinese dictionary translation device, characterized in that, The device includes the following modules: The domain knowledge base construction module is used to acquire historical translation data of home design and construct a historical translation database and a professional terminology database based on the historical translation data; The vector index construction module is used to construct a vector index of historical translation materials based on the historical translation database, and to construct a vector index of professional terms based on the professional terminology database. The vector encoding module is used to perform vector encoding on the Chinese entries to be translated, to obtain historical data query vectors and professional term query vectors. The query index determination module is used to determine the historical data query index based on the historical data query vector and the historical translation data vector index, and to determine the professional term query index based on the professional term query vector and the professional term vector index. The similar example determination module is used to determine historical translation data examples based on the historical data query index and the historical translation database, and to determine professional terminology examples based on the professional terminology query index and the professional terminology database; The prompt project splicing module is used to splice the historical translation data examples, the professional terminology examples, and the Chinese entries to be translated into the prompt template to obtain the target prompt project; The term translation module is used to translate the target prompt engineering input into the target large model and output the term translation results; The construction of a historical translation database and a terminology database based on the historical translation data includes: In response to the first filtering operation on the historical translation data, candidate Chinese-English word pairs are obtained, and target Chinese-English word pairs are randomly selected from the candidate Chinese-English word pairs according to the preset Chinese word character count rule, so as to construct the historical translation database based on the target Chinese-English word pairs; In response to the second filtering operation on the historical translation data, a set of manually selected candidate terms is obtained, and the historical translation database is automatically identified based on preset filtering rules and preset entity recognition technology to obtain a set of machine-selected candidate terms, so as to construct the terminology database based on the set of manually selected candidate terms and the set of machine-selected candidate terms.

8. An electronic device, characterized in that, The electronic device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method according to any one of claims 1 to 6.

9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 6.

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