Ancient Chinese language translation method and device, electronic equipment and readable storage medium
By acquiring multimodal data, performing semantic feature fusion and knowledge graph reasoning, and combining classical Chinese context analysis, the problem of low accuracy in traditional classical Chinese translation methods has been solved, achieving more accurate classical Chinese translation.
Patent Information
- Application Number
- CN202510771862.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-10
- Publication Date
- 2026-01-09
AI Technical Summary
Traditional methods of translating classical Chinese texts fail to effectively consider the deeper semantics and cultural background of classical texts, resulting in lower translation accuracy, especially when dealing with metaphors, allusions, and phonetic loan characters.
By acquiring multimodal data of the target classical Chinese text, semantic features are extracted and fused. Knowledge reasoning and contextual analysis are performed using classical Chinese knowledge graphs to determine translation strategies. Translation is carried out using classical Chinese explanatory knowledge and translation terminology, taking into account the professional knowledge and cultural background of the classical Chinese text.
It significantly improves the accuracy of classical Chinese translation, accurately conveying the literal meaning of ancient texts and capturing their deeper semantic layers, thus overcoming the shortcomings of traditional methods in handling complex classical Chinese texts.
Smart Images

Figure CN121303153A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology and is applied in financial and medical scenarios, particularly to a method and apparatus for translating ancient Chinese texts, an electronic device, and a readable storage medium. Background Technology
[0002] Traditional methods for translating classical Chinese texts typically employ machine translation (MT) models to translate the text word by word. However, due to the extensive use of metaphors, allusions, and phonetic loan characters in classical Chinese, this approach relies solely on fixed terminology and grammatical rules, failing to consider the cultural context of the text, identify its deeper semantic layers, or handle issues such as polysemy and differences in meaning between ancient and modern Chinese. This results in low accuracy in classical Chinese translation. Therefore, improving the accuracy of classical Chinese translation has become an urgent problem to be solved. Summary of the Invention
[0003] The main objective of this application is to provide a method, apparatus, electronic device, and readable storage medium for translating classical Chinese texts, aiming to improve the accuracy of classical Chinese translation.
[0004] To achieve the above objectives, a first aspect of this application proposes a method for translating classical Chinese texts, the method comprising:
[0005] Obtain the target ancient text and extract its semantic features to obtain the semantic features of the ancient text;
[0006] Ancient Chinese semantic features are inferred from a pre-constructed ancient Chinese knowledge graph to obtain ancient Chinese interpretation knowledge.
[0007] The semantic features of the ancient text are analyzed using the context of the ancient text to obtain context information of the ancient text;
[0008] Based on the contextual information of the classical Chinese text, translation terminology detection is performed on the semantic features of the classical Chinese text to obtain translation terms for the classical Chinese text.
[0009] A translation strategy for classical Chinese is determined based on the contextual information and semantic features of the classical Chinese text.
[0010] Based on the aforementioned knowledge of classical Chinese interpretation, the aforementioned contextual information of classical Chinese, the aforementioned terminology for classical Chinese translation, and the aforementioned translation strategies, the target classical Chinese text is translated to obtain target translation data.
[0011] In some embodiments, before performing classical Chinese knowledge reasoning on the semantic features of the classical Chinese text from a pre-constructed classical Chinese knowledge graph to obtain classical Chinese interpretation knowledge, the method further includes:
[0012] Acquire multimodal data of the target ancient text; the multimodal data includes the target ancient text text, the target ancient text image, and the target ancient text audio;
[0013] The target ancient Chinese text is subjected to text semantic feature extraction to obtain text semantic features;
[0014] Visual semantic features are extracted from the target ancient text image to obtain visual semantic features;
[0015] The target ancient text audio is converted into audio text, and the audio text semantic features are extracted to obtain audio semantic features;
[0016] The text semantic features, the visual semantic features, and the audio semantic features are fused to obtain fused semantic features.
[0017] In some embodiments, the step of performing classical Chinese knowledge reasoning on the semantic features of the classical Chinese text from a pre-constructed classical Chinese knowledge graph to obtain classical Chinese interpretation knowledge includes:
[0018] The fused semantic features are fused with the classical Chinese semantic features to obtain fused classical Chinese semantic features;
[0019] Ancient Chinese knowledge is retrieved from the ancient Chinese knowledge graph by performing ancient Chinese semantic features fusion;
[0020] Entity knowledge subgraphs are extracted from the retrieved knowledge entities to obtain entity knowledge subgraphs;
[0021] Obtain the target knowledge entity of the entity knowledge subgraph, and extract the context features of the target knowledge entity to obtain the entity context features;
[0022] The ancient text interpretation knowledge is determined based on the entity context features and the entity knowledge subgraph.
[0023] In some embodiments, the step of performing classical Chinese contextual analysis on the semantic features of the classical Chinese text to obtain classical Chinese contextual information includes:
[0024] Temporal features are extracted from the target ancient text to obtain the temporal features of the ancient text;
[0025] Knowledge features are extracted from the aforementioned classical Chinese interpretation knowledge to obtain classical Chinese knowledge features;
[0026] Contextual recognition is performed based on the semantic features, temporal features, and knowledge features of the ancient text to obtain the contextual information of the ancient text.
[0027] In some embodiments, determining the classical Chinese translation strategy based on the classical Chinese contextual information and the classical Chinese semantic features includes:
[0028] The historical translation data of the target ancient text is obtained, and features are extracted from the historical translation data to obtain historical translation features;
[0029] The cosine similarity of the historical translation features and the ancient Chinese semantic features is calculated to obtain the target similarity.
[0030] The historical translation feature weights of the historical translation features are determined based on the target similarity.
[0031] The weights of the historical translation features are adjusted based on the classical Chinese context information to obtain the adjusted translation feature weights;
[0032] The ancient Chinese translation strategy is determined based on the target similarity and the adjusted translation feature weights.
[0033] In some embodiments, the step of detecting translation terms based on the semantic features of the classical Chinese text according to the classical Chinese context information to obtain classical Chinese translation terms includes:
[0034] Feature extraction is performed on the classical Chinese context information to obtain classical Chinese context features;
[0035] Based on the aforementioned contextual features of classical Chinese texts, translation terminology recommendations are made for the semantic features of classical Chinese texts, resulting in reference translation terminology.
[0036] The classical Chinese translation terms are obtained by performing a terminology corpus search on the reference translation terms from the pre-built translation corpus.
[0037] In some embodiments, translating the target classical Chinese text based on the classical Chinese interpretation knowledge, the classical Chinese contextual information, the classical Chinese translation terminology, and the classical Chinese translation strategy to obtain target translation data includes:
[0038] Based on the knowledge of ancient Chinese interpretation, the contextual information of ancient Chinese, the translation terminology of ancient Chinese, and the translation strategy of ancient Chinese, a preliminary translation of the target ancient Chinese is performed to obtain preliminary translation data.
[0039] An update detection is performed on the ancient text knowledge graph to obtain an updated knowledge graph.
[0040] The ancient text interpretation knowledge is updated based on the updated knowledge graph to obtain updated ancient text interpretation knowledge;
[0041] The preliminary translation data is updated based on the updated knowledge of classical Chinese interpretation to obtain the target translation data.
[0042] To achieve the above objectives, a second aspect of this application provides an ancient Chinese translation device, the device comprising:
[0043] The classical Chinese semantic feature extraction module is used to acquire the target classical Chinese text and extract its semantic features to obtain the classical Chinese semantic features.
[0044] The knowledge reasoning module is used to perform ancient Chinese knowledge reasoning on the semantic features of the ancient Chinese text from a pre-constructed ancient Chinese knowledge graph to obtain ancient Chinese interpretation knowledge.
[0045] The classical Chinese context analysis module is used to perform classical Chinese context analysis on the semantic features of the classical Chinese text to obtain classical Chinese context information.
[0046] The translation terminology detection module is used to detect translation terms based on the ancient Chinese context information and semantic features of the ancient Chinese text to obtain ancient Chinese translation terms.
[0047] The translation strategy determination module is used to determine the translation strategy for the classical Chinese text based on the classical Chinese context information and the semantic features of the classical Chinese text.
[0048] The classical Chinese translation module is used to translate the target classical Chinese text based on the classical Chinese interpretation knowledge, the classical Chinese context information, the classical Chinese translation terminology, and the classical Chinese translation strategy, to obtain target translation data.
[0049] To achieve the above objectives, a third 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 in the first aspect.
[0050] To achieve the above objectives, a fourth aspect of the present application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method of the first aspect described above.
[0051] The method, apparatus, electronic device, and readable storage medium for translating classical Chinese proposed in this application first acquire the target classical Chinese text and extract its semantic features. This is followed by knowledge reasoning based on a classical Chinese knowledge graph and contextual analysis of the semantic features. This enriches the semantic associations and cultural background knowledge of the classical Chinese text, contributing to a deeper understanding of its deeper semantics and cultural context. Second, by detecting translation terms related to the semantic features of the classical Chinese text, the accuracy of the translation results within the relevant professional field is ensured, effectively avoiding ambiguity in terminology translation. Furthermore, by determining a classical Chinese translation strategy, subsequent translation results are ensured to adapt to different contexts and cultural backgrounds. Finally, the translation of the target classical Chinese text is based on classical Chinese explanatory knowledge, contextual information, translation terms, and translation strategies. This comprehensive approach considers both the professional knowledge and cultural background of the classical Chinese text, accurately conveying both the literal meaning and the deeper semantics of the text. It effectively addresses the shortcomings of traditional methods in handling metaphors, allusions, phonetic loan characters, and polysemy in classical Chinese texts, significantly improving the accuracy of classical Chinese translation. Attached Figure Description
[0052] Figure 1 This is a flowchart of the ancient Chinese translation method provided in the embodiments of this application;
[0053] Figure 2 This is another flowchart of the classical Chinese translation method provided in the embodiments of this application;
[0054] Figure 3 yes Figure 1 The flowchart of step S102 in the document;
[0055] Figure 4 yes Figure 1 The flowchart of step S103 in the process;
[0056] Figure 5 yes Figure 1 The flowchart of step S104 in the process;
[0057] Figure 6 yes Figure 1 The flowchart of step S105 in the process;
[0058] Figure 7 yes Figure 1 The flowchart of step S106 in the process;
[0059] Figure 8 This is a schematic diagram of the ancient Chinese translation device provided in the embodiments of this application;
[0060] Figure 9 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0061] 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 and not intended to limit the scope of this application.
[0062] It should be noted that although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first," "second," etc., in the specification, claims, and the aforementioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0063] 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.
[0064] First, let's analyze some of the terms used in this application:
[0065] Artificial intelligence (AI) is a new branch of computer science that studies, develops, and applies theories, methods, technologies, and systems to simulate, extend, and expand human intelligence. It aims to understand the essence of intelligence and produce intelligent machines that can react in a way similar to human intelligence. Research in this field includes robotics, speech recognition, image recognition, natural language processing, and expert systems. AI can simulate the information processes of human consciousness and thought. Furthermore, AI utilizes digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceiving the environment, acquiring knowledge, and using that knowledge to achieve optimal results.
[0066] This application provides a method and apparatus for translating classical Chinese texts, an electronic device, and a readable storage medium, aiming to improve the accuracy of classical Chinese text translation.
[0067] The ancient Chinese translation method, apparatus, electronic device, and readable storage medium provided in this application are specifically described through the following embodiments. First, the ancient Chinese translation method in this application embodiment is described.
[0068] The embodiments of this application can acquire and process relevant data based on artificial intelligence technology. Artificial intelligence (AI) refers to the theories, methods, technologies, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to obtain optimal results.
[0069] Foundational technologies for artificial intelligence generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies mainly encompass computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning.
[0070] The classical Chinese translation method provided in this application relates to the field of artificial intelligence 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, etc.; 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, and big data and artificial intelligence platforms; the software can be an application implementing the classical Chinese translation method, but is not limited to the above forms.
[0071] 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, network PCs, minicomputers, mainframe computers, 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.
[0072] Figure 1 This is an optional flowchart of the classical Chinese translation method provided in the embodiments of this application. Figure 1The method may include, but is not limited to, steps S101 to S106.
[0073] Step S101: Obtain the target ancient text and extract its semantic features to obtain the semantic features of the ancient text.
[0074] Step S102: Perform ancient Chinese knowledge reasoning on the semantic features of ancient Chinese texts from the pre-constructed ancient Chinese knowledge graph to obtain ancient Chinese interpretation knowledge.
[0075] Step S103: Perform classical Chinese context analysis on the semantic features of classical Chinese texts to obtain classical Chinese context information.
[0076] Step S104: Based on the contextual information of the classical Chinese text, perform translation term detection on the semantic features of the classical Chinese text to obtain the translation terms of the classical Chinese text.
[0077] Step S105: Determine the translation strategy for classical Chinese based on the contextual information and semantic features of the classical Chinese text.
[0078] Step S106: Based on knowledge of classical Chinese interpretation, contextual information of classical Chinese, translation terminology of classical Chinese, and translation strategies of classical Chinese, the target classical Chinese text is translated to obtain target translation data.
[0079] Steps S101 to S106 of this embodiment first involve acquiring the target classical Chinese text and extracting its semantic features. This is combined with a classical Chinese knowledge graph for knowledge reasoning and contextual analysis of the semantic features, enriching the semantic association features and cultural background knowledge of the classical Chinese text. This facilitates a deeper understanding of the text's deeper semantics and cultural context. Second, by detecting translation terms related to the semantic features of the classical Chinese text, the accuracy of the translation results within the relevant professional field is ensured, effectively avoiding ambiguity in terminology translation. Furthermore, by determining a classical Chinese translation strategy, subsequent translation results are ensured to adapt to different contexts and cultural backgrounds. Finally, the target classical Chinese text is translated based on classical Chinese interpretation knowledge, contextual information, translation terms, and translation strategies. This comprehensive approach considers both the professional knowledge and cultural background of the classical Chinese text, accurately conveying its literal meaning while capturing its deeper semantics. This effectively addresses the shortcomings of traditional methods in handling classical Chinese metaphors, allusions, phonetic loan characters, and polysemy, significantly improving the accuracy of classical Chinese translation.
[0080] In step S101 of some embodiments, specifically, the target classical Chinese text refers to the classical Chinese text to be translated, which includes, but is not limited to, classical Chinese texts (such as ancient prose, parallel prose, etc.), ancient rhymed texts (such as poems, lyrics, songs, fu, etc.), and ancient annotations (such as commentaries, dictionaries, etc.).
[0081] Specifically, the target classical Chinese text can be a text to be translated from the financial or medical fields.
[0082] Specifically, classical Chinese semantic features refer to extracting semantic feature vectors from classical Chinese texts.
[0083] Specifically, the target classical Chinese text can be segmented into words to obtain target classical Chinese text segmentation tokens. Then, the target classical Chinese text segmentation tokens can be processed by word embedding through the BERT model to transform the target classical Chinese text into a structured vector representation.
[0084] In this embodiment, by extracting semantic features from the target classical Chinese text, it is possible to transform the target classical Chinese text into structured vector data, thereby capturing the core semantic features of the target classical Chinese text and providing a data foundation for subsequent classical Chinese translation.
[0085] Please see Figure 2 In some embodiments, prior to step S102, the ancient Chinese translation method further includes, but is not limited to, steps S201 to S205:
[0086] Step S201: Obtain multimodal data of the target ancient text; the multimodal data includes the target ancient text text, the target ancient text image, and the target ancient text audio.
[0087] Step S202: Extract text semantic features from the target ancient text to obtain text semantic features.
[0088] Step S203: Extract visual semantic features from the target ancient text image to obtain visual semantic features.
[0089] Step S204: Convert the target ancient text audio into audio text, and extract the audio text semantic features to obtain audio semantic features.
[0090] Step S205: The text semantic features, visual semantic features and audio semantic features are fused to obtain fused semantic features.
[0091] In step S201 of some embodiments, specifically, multimodal data refers to a collection containing ancient text data of different modalities. Multimodal data may include target ancient text, target ancient text image and target ancient text audio.
[0092] Specifically, the target classical Chinese text can be any type of text material related to the target classical Chinese text in the financial or medical fields, including but not limited to classical Chinese works, annotations and explanations of classical Chinese texts, and research papers on classical Chinese texts in the financial or medical fields.
[0093] Specifically, the target ancient text image can be visual material related to the financial or medical fields.
[0094] Specifically, the target classical Chinese audio data can be audio data related to the financial or medical fields, including but not limited to lecture audio, recitation audio, and music in the financial or medical fields.
[0095] Specifically, multimodal data of the target ancient texts can be collected from various websites, digital libraries, and social media platforms using web crawling technology.
[0096] In this embodiment, by acquiring multimodal data of the target ancient text, it is possible to analyze the target ancient text from multiple modalities such as text, image and audio, avoiding the limitations of analyzing ancient texts only from the textual level, and providing rich and multidimensional data support for subsequent ancient text translation.
[0097] In step S202 of some embodiments, specifically, text semantic features refer to the text semantic feature vector extracted from the target ancient text.
[0098] Specifically, by deploying improved positional encoding modules in each layer of the Transformer encoder, the Transformer model can be enhanced to capture the semantic relationships between words and other words in different positions of the target classical Chinese text through relative positional bias matrices, thereby capturing semantic changes in words at different positions. Furthermore, by employing an adversarial training strategy, the generator and discriminator compete against each other. During the adversarial process, the generator is responsible for generating multiple possible semantic interpretations of the text, while the discriminator attempts to distinguish the rationality of these interpretations to generate accurate semantic features.
[0099] In this embodiment, by combining a location-based self-attention mechanism and an adversarial training strategy to extract semantic features from the target classical Chinese text, the semantic details of the classical Chinese text can be better captured. Especially when dealing with complex classical Chinese texts, it can effectively avoid subsequent translation errors caused by grammatical complexity and semantic ambiguity.
[0100] In step S203 of some embodiments, specifically, visual semantic features refer to semantic feature vectors extracted from the target ancient text image that can characterize visual content.
[0101] Specifically, visual semantic features of the target ancient text image can be extracted by adding a multi-scale feature extraction network with lateral connections to the original residual blocks using a deep residual network (such as ResNet).
[0102] For example, when processing an image in the financial field, the ResNet model can accurately extract the main features of the image, and combine it with a multi-scale feature branch network to analyze the detailed features. The main features and detailed features are then fused together, and the fused features are used for image semantic classification to obtain the visual semantic features of the image.
[0103] In this embodiment, by extracting visual semantic features from the target ancient text image, it is possible to combine residual networks and multi-scale visual feature extraction to capture key details in the image and their corresponding visual semantics, which helps to generate more accurate and richer visual semantic features.
[0104] In step S204 of some embodiments, specifically, time-frequency analysis of the target ancient Chinese audio can be performed by combining wavelet transform and short-time Fourier transform. Specifically, wavelet transform is used to effectively capture local features in the target ancient Chinese audio, and short-time Fourier transform is used to analyze the spectral changes of the target ancient Chinese audio, so as to comprehensively extract the rhythm, rhyme, tone and other features of the target ancient Chinese audio. Furthermore, ASR (Automatic Speech Recognition) technology is used to convert the target ancient Chinese audio into audio text.
[0105] Specifically, audio semantic features are audio semantic feature vectors extracted from audio text.
[0106] Specifically, deep learning models (such as BERT) can be used to encode audio text to obtain a high-dimensional audio text semantic feature vector, which can reflect the audio semantic features of the audio text.
[0107] Specifically, by constructing a mapping relationship between audio semantic features and text semantic features, the emotional information in the audio and the text are integrated into the subsequent translation of classical Chinese texts.
[0108] In this embodiment, by extracting the semantic features of the audio text, we can not only accurately capture the semantic features of the ancient Chinese audio, but also effectively avoid translation errors caused by the lack of emotional and textual semantic clues.
[0109] In step S205 of some embodiments, specifically, fusing semantic features refers to integrating the semantic representations of three heterogeneous modalities—text, vision, and audio—into a unified feature vector space.
[0110] Specifically, the cross-attention mechanism is used to align and weight the semantic features of each modality to obtain fused semantic features.
[0111] In this embodiment, by fusing textual semantic features, visual semantic features, and audio semantic features, information from multiple modalities such as text, images, and audio can be comprehensively considered to generate a more comprehensive and accurate semantic feature representation, providing a richer semantic background for subsequent ancient Chinese translation.
[0112] Through steps S201 to S205, by acquiring multimodal data of the target classical Chinese text and performing feature extraction and fusion, the semantics of the classical Chinese text can be comprehensively understood from multiple perspectives. This effectively captures the deep semantics of the classical Chinese text, helps to preserve the original meaning and metaphorical cultural connotations of the classical Chinese text, and thus improves the accuracy of subsequent classical Chinese text translation.
[0113] Please see Figure 3 In some embodiments, step S102 includes, but is not limited to, steps S301 to S305:
[0114] Step S301: The fused semantic features are fused with the classical Chinese semantic features to obtain the fused classical Chinese semantic features.
[0115] Step S302: Perform ancient Chinese knowledge retrieval from the ancient Chinese knowledge graph by integrating ancient Chinese semantic features to obtain the retrieved knowledge entities.
[0116] Step S303: Extract entity knowledge subgraphs from the retrieved knowledge entities to obtain entity knowledge subgraphs.
[0117] Step S304: Obtain the target knowledge entity from the entity knowledge subgraph, and extract the context features of the target knowledge entity to obtain the entity context features.
[0118] Step S305: Determine the ancient text interpretation knowledge based on entity context features and entity knowledge subgraph.
[0119] In step S301 of some embodiments, specifically, fusing classical Chinese semantic features refers to integrating fusion semantic features and classical Chinese semantic features into a comprehensive vector representation.
[0120] Specifically, the fused semantic features and classical Chinese semantic features are obtained by concatenating vectors.
[0121] In this embodiment, by fusing the fused semantic features with the classical Chinese semantic features, a fused classical Chinese semantic feature containing the classical Chinese text to be translated can be obtained, providing a solid data foundation for subsequent knowledge retrieval.
[0122] In step S302 of some embodiments, specifically, the ancient Chinese knowledge graph is a structured knowledge base that contains ancient Chinese terms, conceptual entities, and entity relationships.
[0123] Specifically, retrieving knowledge entities refers to finding knowledge entity nodes in the ancient text knowledge graph that are related to the target ancient text content.
[0124] Specifically, a knowledge reasoning model built using graph neural networks (such as GNNs) can map the fused semantic features of classical Chinese texts onto matching entity nodes in the classical Chinese knowledge graph, and use these entity nodes as the retrieved knowledge entities.
[0125] For example, for an ancient Chinese text to be translated, the knowledge reasoning model can retrieve the definition node ID#206 of the term in the knowledge graph.
[0126] In this embodiment, by retrieving ancient Chinese knowledge from the ancient Chinese knowledge graph by integrating the semantic features of ancient Chinese texts, the knowledge entities most relevant to the semantic features of ancient Chinese texts can be quickly found from the ancient Chinese knowledge graph, providing reference data support for subsequent interpretation of ancient Chinese texts.
[0127] In step S303 of some embodiments, specifically, the entity knowledge subgraph refers to a local knowledge graph composed of knowledge entity nodes and entity relationship edges associated with the retrieved knowledge entity.
[0128] Specifically, starting with the retrieved knowledge entity, the multi-hop neighbor information of the retrieved knowledge entity is aggregated through the aggregation message passing mechanism of the GraphSAGE architecture to determine the nodes and edges directly connected to the retrieved knowledge entity, so as to form a semantically coherent knowledge subgraph.
[0129] For example, starting with the retrieval of knowledge entities, the extracted knowledge subgraph can be aggregating knowledge entity definitions, historical events of knowledge entities, and related figures of knowledge entities, etc., to form a semantically coherent neighbor knowledge subgraph.
[0130] In this embodiment, by extracting entity knowledge subgraphs from the retrieved knowledge entities, subgraphs related to the retrieved knowledge entities can be extracted, providing rich semantic association information for subsequent semantic interpretation.
[0131] In step S304 of some embodiments, specifically, the target knowledge entity refers to any knowledge entity in the subgraph.
[0132] Specifically, neighbor sampling is performed on the target knowledge entity node to randomly sample a fixed number of nodes from the neighbors of each target knowledge entity node, and the features of the sampled neighbors are aggregated to obtain aggregated features. The aggregated features and the features of the target knowledge entity node are updated to obtain updated node features. The neighbor features corresponding to the updated node features are aggregated again to obtain the context feature representation of each target knowledge entity node.
[0133] In this embodiment, extracting contextual features from the target knowledge entity enables a more comprehensive understanding of its semantic connotation, providing detailed historical background information for subsequent semantic interpretation.
[0134] In step S305 of some embodiments, specifically, the knowledge of ancient text interpretation refers to the knowledge reasoning path of entity knowledge associated with the target ancient text and its importance weight.
[0135] Specifically, the importance weights of the target entity node and its associated entity nodes are calculated using GNN to output weighted interpretations of classical Chinese texts.
[0136] Through steps S301 to S305, by performing knowledge reasoning from the ancient Chinese knowledge graph, we can fully utilize the rich semantic information in the ancient Chinese knowledge graph to generate accurate and detailed ancient Chinese interpretations. This not only preserves the original meaning of the ancient Chinese text but also helps us understand the semantic and cultural connotations of the ancient Chinese text, which in turn helps improve the accuracy of subsequent ancient Chinese translations.
[0137] Please see Figure 4 In some embodiments, step S103 includes, but is not limited to, steps S401 to S403:
[0138] Step S401: Extract the temporal features of the target ancient text to obtain the temporal features of the ancient text.
[0139] Step S402: Extract knowledge features from the classical Chinese text interpretation knowledge to obtain classical Chinese text knowledge features.
[0140] Step S403: Context recognition is performed based on the semantic features, temporal features, and knowledge features of the classical Chinese text to obtain the context information of the classical Chinese text.
[0141] In step S401 of some embodiments, specifically, the chronological characteristics of ancient texts refer to the historical period in which events or concepts in ancient texts are located, or the chronological order of events and concepts in ancient texts.
[0142] Specifically, the target classical Chinese text can be segmented into words, and a context window of the segmented text can be generated in real time. The window size can be dynamically adjusted in real time (i.e., the window represents the number of controllable input classical Chinese sentences). The hidden state of the segmented target classical Chinese text can be captured through a pre-set window and a Bidirectional Long Short-Term Memory (Bi-LSTM) network. The hidden state of the LSTM is updated once every preset time (e.g., 200ms) to capture the temporal features of the past period of the classical Chinese text retained by the target text through the LSTM hidden state. The correlation strength between the current period of the classical Chinese text and the temporal features of the past period of the classical Chinese text is determined by superimposed temporal attention mechanism (i.e., the weight ratio of the temporal features of the past period of the classical Chinese text). The target classical Chinese text and the correlation strength are activated to output the temporal features of the classical Chinese text.
[0143] In this embodiment, by extracting the temporal features of the target classical Chinese text, it is possible to understand the chronological order of events or concepts in the target classical Chinese text or the historical period in which they occur, which helps to improve the accuracy of subsequent classical Chinese translation.
[0144] In step S402 of some embodiments, specifically, the ancient text knowledge features refer to the ancient text-related concepts, terms, entities, and entity relationships represented by spatial vectors.
[0145] Specifically, knowledge of classical Chinese interpretation can be mapped into spatial vector representations of classical Chinese knowledge features through knowledge embedding models (such as TransE).
[0146] In step S403 of some embodiments, specifically, the classical Chinese contextual information refers to the specific meaning of the text determined after comprehensively considering the contextual information, historical and cultural background, and historical period of the target classical Chinese text. The classical Chinese contextual information may include, but is not limited to, historical background, creation period, stylistic features, and ideological system.
[0147] Specifically, by concatenating the semantic features, temporal features, and knowledge features of classical Chinese texts to obtain a fused context vector, and then activating the fused context vector, we can obtain classical Chinese context information that comprehensively considers the semantic, temporal, and knowledge features of the classical Chinese texts.
[0148] For example, when translating passages about finance or medicine, we not only consider the semantic and temporal information of classical Chinese, but also combine historical background knowledge to generate contextual information that includes chronological order, connections between historical events, and cultural background.
[0149] In this embodiment, context recognition is performed based on the semantic features, temporal features, and knowledge features of classical Chinese texts to obtain context information. This helps to fully consider the context and historical and cultural background information of classical Chinese texts in subsequent translations, solving the problem of not being able to consider the cultural background of classical Chinese texts and the difficulty in recognizing the deep semantics of classical Chinese texts. This helps to generate more accurate translation results that are closer to the original text.
[0150] In one optional embodiment of this application, the contextual information of classical Chinese texts can be transformed into a three-axis graph representation using visualization generation technology. Specifically, the graph represents the X-axis (time evolution information), the Y-axis (historical and cultural background relevance), and the Z-axis (core semantic density). When an important context represented by the three-axis graph (such as a frequency > 3 times / thousand characters) is triggered, the contextual information of the target classical Chinese text is determined and highlighted.
[0151] Through steps S401 to S403, by extracting temporal and knowledge features from the semantic features of classical Chinese texts and performing contextual recognition, rich contextual and historical and cultural background information can be provided for subsequent classical Chinese text translation. This not only better preserves the original meaning of the classical Chinese texts but also further interprets their specific cultural connotations in conjunction with the historical and cultural background, which helps to improve the accuracy of subsequent classical Chinese text translation.
[0152] Please see Figure 5 In some embodiments, step S104 includes, but is not limited to, steps S501 to S503:
[0153] Step S501: Extract features from the classical Chinese context information to obtain classical Chinese context features.
[0154] Step S502: Perform terminology corpus retrieval on the contextual features of classical Chinese texts from the pre-constructed translation corpus to obtain classical Chinese translation terms.
[0155] In step S501 of some embodiments, specifically, the classical Chinese context features refer to the semantic features of the classical Chinese context extracted from the classical Chinese context information.
[0156] Specifically, the BERT model can be used to encode the contextual information of classical Chinese texts in order to extract the semantic vector of the contextual information.
[0157] In step S502 of some embodiments, specifically, classical Chinese translation terminology refers to translated words and phrases that can be used as references for current translation from historical translation records.
[0158] Specifically, natural language processing technology can be used to learn from translation corpora and, combined with real-time translation context, recommend the most accurate and industry-standard terminology translations to translators.
[0159] Specifically, the translation corpus features are obtained, the cosine similarity between the translation corpus features and the classical Chinese context features is calculated, and the translation corpus with the highest similarity is used as the classical Chinese translation data.
[0160] In this embodiment, since the contextual features of classical Chinese texts contain information on the temporal evolution of classical Chinese texts, the relevance of historical and cultural background, and the contextual information of core semantic density, when performing terminology corpus retrieval on the contextual features of classical Chinese texts from the pre-built translation corpus, the contextual information of classical Chinese texts is also comprehensively considered to ensure the accuracy and professionalism of translated terms, which helps to improve the accuracy of subsequent classical Chinese translations.
[0161] Through steps S501 to S503, translation terminology detection is performed on the semantic features of classical Chinese texts based on the contextual information of the classical texts. This comprehensively considers the contextual information and cultural background of the classical texts, providing accurate and professional terminology selection for subsequent classical Chinese translation.
[0162] Please see Figure 6 In some embodiments, step S105 includes, but is not limited to, steps S601 to S605:
[0163] Step S601: Obtain historical translation data of the target ancient text, and extract features from the historical translation data to obtain historical translation features.
[0164] Step S602: Calculate the cosine similarity between the historical translation features and the semantic features of the classical Chinese text to obtain the target similarity.
[0165] Step S603: Determine the historical translation feature weights based on target similarity.
[0166] Step S604: Adjust the weights of historical translation features based on the contextual information of classical Chinese texts to obtain the adjusted translation feature weights.
[0167] Step S605: Determine the ancient Chinese translation strategy based on the target similarity and adjusted translation feature weights.
[0168] In step S601 of some embodiments, specifically, historical translation data refers to historical translation records texts similar to the target ancient text.
[0169] Specifically, historical translation features refer to the historical translation semantic vectors extracted from historical translation data.
[0170] Specifically, the encoder of the Transformer model can be used to transform historical translation data into vector representations of historical translation features.
[0171] In step S602 of some embodiments, specifically, the target similarity is used to measure the degree of similarity between two vectors: historical translation features and classical Chinese semantic features.
[0172] Specifically, the cosine similarity between multiple historical translation features and ancient Chinese semantic features can be calculated, and the top 5 similarities can be retrieved as the target similarity.
[0173] In this embodiment, cosine similarity is calculated between historical translation features and classical Chinese semantic features to obtain target similarity. This can quantify the degree of similarity between historical translation data and the semantic features of the classical Chinese text to be translated, providing a basis for subsequent translation strategy selection.
[0174] In step S603 of some embodiments, specifically, the historical translation feature weight refers to the degree of similarity with the semantic features of the ancient text. The higher the historical translation feature weight value, the higher the similarity between the historical translation feature and the semantic features of the ancient text.
[0175] Specifically, an attention matrix for target similarity can be constructed using a Transformer decoder to dynamically adjust the weights of historical translation features used in the matching process.
[0176] For example, a higher weight value (such as 0.9) can be assigned to historical translation features with a target similarity of 0.85.
[0177] In this embodiment, the weight of historical translation features is determined based on the target similarity, which can determine the reference value of historical translation features for the ancient text to be translated based on the similarity of historical translation data.
[0178] In step S604 of some embodiments, specifically, the translation feature weights are adjusted to reflect the degree of similarity between the adjusted historical translation features and the semantic features of the ancient text.
[0179] For example, in the financial field, if the target classical Chinese context contains financial or medical concepts, and if the translation of financial or medical concepts in the historical translation features performs well in the classical Chinese context, then the attention matrix of the historical translation features can be adjusted to increase the weight of the historical translation features by 0.5.
[0180] In this embodiment, the weights of historical translation features are adjusted based on the classical Chinese context information to obtain adjusted translation feature weights. This allows for flexible adjustment of the weights of historical translation features according to specific classical Chinese context information, thereby generating translation results that are more consistent with the classical Chinese context.
[0181] In step S605 of some embodiments, specifically, the ancient Chinese translation strategy includes, but is not limited to, reusing historical translation templates, replacing historical translation terms, and translating through machine translation models.
[0182] For example, if the target similarity is 0.95 > the adjusted translation feature weight is 0.85, then the ancient Chinese translation strategy is to reuse the historical translation template; if the target similarity is equal to the adjusted translation feature weight is 0.85, then the ancient Chinese translation strategy is to replace the translation terms in the historical translation, and the replacement rate is usually 18%-32%; if the target similarity is less than 0.85, then the ancient Chinese translation strategy is to translate directly through the machine translation model.
[0183] In this embodiment, the ancient Chinese translation strategy is determined based on the target similarity and the adjustment of translation feature weights. By reusing historical translation templates, high-quality ancient Chinese translations can be generated quickly, or by replacing terms, the accuracy of the translation can be improved while maintaining a certain translation speed. For target ancient Chinese texts that differ significantly from historical translations, machine translation can be used to leverage the language processing capabilities of machine translation models to ensure the quality of the ancient Chinese translation results, which helps to improve the efficiency and accuracy of subsequent ancient Chinese translations.
[0184] Through steps S601 to S605, a translation strategy for classical Chinese is determined based on the contextual information, semantic features, and historical translation characteristics of the classical Chinese text. This allows for efficient use of historical translation records, which helps improve the efficiency of classical Chinese translation. At the same time, the translation strategy is dynamically adjusted according to the context of the target classical Chinese text, providing an accurate and flexible translation strategy and further improving the accuracy of classical Chinese translation.
[0185] Please see Figure 7 In some embodiments, step S106 includes, but is not limited to, steps S701 to S704:
[0186] Step S701: Based on knowledge of classical Chinese interpretation, contextual information of classical Chinese, translation terminology of classical Chinese, and translation strategies of classical Chinese, a preliminary translation of the target classical Chinese text is performed to obtain preliminary translation data.
[0187] Step S702: Perform an update check on the ancient Chinese knowledge graph to obtain an updated knowledge graph.
[0188] Step S703: Update the knowledge of ancient text interpretation based on the updated knowledge graph to obtain updated knowledge of ancient text interpretation.
[0189] Step S704: Update the preliminary translation data based on the updated knowledge of ancient Chinese text interpretation to obtain the target translation data.
[0190] In step S701 of some embodiments, specifically, the preliminary translation data refers to the initial translation of the target classical Chinese text.
[0191] For example, in the field of translation, machine translation models (such as Transformer) can be used to identify the semantic features of classical Chinese texts containing location information. Classical Chinese explanatory knowledge extracted from pre-built classical Chinese knowledge graphs can be combined with the contextual information of the classical Chinese texts to be translated, including the concepts and their historical and cultural background. The most matching translation terms can be retrieved from a pre-built terminology translation corpus. Based on classical Chinese translation strategies, the translation terms to replace the historical translations can be determined and then translated into English. During the translation process, a cross-attention mechanism can be used to ensure a balanced presentation of classical Chinese explanatory knowledge, classical Chinese contextual information, classical Chinese translation terms, and classical Chinese translation strategies in the translated text.
[0192] In this embodiment, a preliminary translation of the target classical Chinese text is performed based on knowledge of classical Chinese interpretation, contextual information of classical Chinese, translation terminology of classical Chinese, and classical Chinese translation strategies, resulting in preliminary translation data. In the process of translating classical Chinese, multiple dimensions of information, such as the deep semantic information of classical Chinese and the historical and cultural background to which the classical Chinese text belongs, are comprehensively considered. This solves the problem that traditional methods rely solely on fixed terminology interpretations and grammatical rules, which cannot consider the cultural background of classical Chinese, make it difficult to identify the deep semantics of classical Chinese, and also make it difficult to handle issues such as polysemy and differences between ancient and modern meanings, resulting in low accuracy in classical Chinese translation.
[0193] In step S702 of some embodiments, specifically, the node update degree and relationship confidence of the ancient Chinese knowledge graph are detected in real time. The node update degree reflects the latest status of each node (such as the definition of ancient Chinese concepts, historical periods, etc.) in the ancient Chinese knowledge graph to determine whether new research results or cultural interpretations about these nodes have been incorporated. The relationship confidence is used to measure the reliability of the relationship between nodes.
[0194] For example, if a new financial or medical research paper is detected that provides a new interpretation of financial or medical concepts, the update degree of the corresponding node in the ancient Chinese knowledge graph will increase, and the confidence of the relationship between the related concepts described by the node will also change accordingly.
[0195] Furthermore, the term similarity threshold is adjusted (e.g., ±0.5-0.15) to more accurately match and update relevant knowledge terms. Specifically, the knowledge graph retrieval depth is defined (e.g., 1 hop or 3 hops) to retrieve relevant knowledge, and the weights of different modalities of data in knowledge graph updates are dynamically adjusted according to the importance of different modalities of data such as ancient texts, images, and videos.
[0196] For example, if current translations of classical Chinese texts focus more on the content of the text, then the weight of the classical Chinese text itself will be increased accordingly, in order to more accurately capture the semantic information in the classical Chinese text.
[0197] Furthermore, the ancient Chinese translation is optimized using a reward function: Rt = 0.6xCSAT + 0.3xBLEUscore - 0.1xTdelay. This reward function comprehensively considers real-time customer satisfaction (CSAT), translation quality (BLEU score), and response delay penalty (Tdelay). That is, when the update of the rune knowledge graph can improve the quality of ancient Chinese translation, meet customer satisfaction, and reduce response time, the translation model will receive positive incentives.
[0198] Specifically, the PPO (Proximal Policy Optimization) algorithm can be used to update the policy network after every 200 interactions, ensuring that the machine translation model can adjust the translation process based on the latest feedback and reward signals. When the ancient Chinese knowledge graph is updated, such as when new nodes or entity relationship edges are added, the Q-table is triggered to dynamically reconstruct the ancient Chinese knowledge graph.
[0199] In this embodiment, by performing update detection on the ancient Chinese knowledge graph, an updated knowledge graph is obtained, which ensures that the information in the ancient Chinese knowledge graph is always up-to-date, providing the latest academic research reference for ancient Chinese translation and helping to further improve the accuracy of ancient Chinese translation.
[0200] In step S703 of some embodiments, specifically, if the entity node corresponding to the target ancient text is updated, the updated multi-hop (e.g., 3-hop) knowledge node and entity relationship edge are used as the updated ancient text interpretation knowledge.
[0201] In step S704 of some embodiments, specifically, the target ancient text can be retranslated based on updated knowledge of ancient text interpretation, ancient text context information, ancient text translation terminology, and ancient text translation strategies, so as to update the preliminary translation data and obtain the target translation data.
[0202] Through steps S701 to S704, the target classical Chinese text is translated based on classical Chinese interpretation knowledge, classical Chinese contextual information, classical Chinese translation terminology, and classical Chinese translation strategies. The translation is then optimized by combining the updated knowledge graph. This approach comprehensively considers the professional knowledge and cultural background of the classical Chinese text, accurately conveying both the literal meaning and the deeper semantics of the text. It effectively addresses the shortcomings of traditional methods in handling classical Chinese metaphors, allusions, phonetic loan characters, and polysemy, significantly improving the accuracy of classical Chinese translation.
[0203] In one optional embodiment of this application, an ancient Chinese translation system is also involved. The ancient Chinese translation method is applied to the ancient Chinese translation system, which includes a collaborative editing module, a translation task allocation module, and a visual collaboration module.
[0204] Specifically, the collaborative editing module is used for collaborative translation by multiple users. The collaborative function can be achieved through OperationalTransformation technology to ensure that at least 50 users can edit translations simultaneously, thereby achieving real-time synchronization of classical Chinese translations. Furthermore, a timestamp-based priority sorting algorithm ensures that the editing delay is less than a preset time (such as 200ms), effectively resolving the conflict problem when multiple users edit simultaneously.
[0205] For example, during translation, multiple translators can simultaneously edit paragraphs from different works using a collaborative editing module to improve translation efficiency.
[0206] Furthermore, the translation task allocation module is used to allocate classical Chinese translation tasks. Specifically, different professional weights (such as 0.6) and historical translation accuracy weights (such as 0.3) can be set according to the translator's professional ability, and the translation tasks are preferentially allocated to the top 3 translators.
[0207] Furthermore, the visual collaboration module displays the translation progress and annotations for each user. Specifically, it uses a real-time heatmap to show the translation task progress of each translator, with color intensity indicating the backlog of translation tasks. Terms conflicts are highlighted in red, and logical inconsistencies are highlighted in yellow as a warning, helping to identify and resolve potential translation problems promptly and assisting translators in timely corrections.
[0208] Specifically, the ancient Chinese translation system also incorporates reinforcement learning technology to continuously optimize the machine translation model based on translator feedback and translation quality assessment results. If a translator provides suggestions for modification, the ancient Chinese translation system will convert these suggestions into training data to train the machine translation model and continuously improve its translation capabilities.
[0209] Specifically, the quality assessment results can be that the consistency of classical Chinese translation terminology is ≥95% and the amount of user feedback is >50%. If the amount of user feedback in a single day is >50%, or the consistency of classical Chinese translation terminology is <95%, an abnormal warning will be triggered to remind the translator to make translation corrections.
[0210] In this embodiment, through the collaboration between the collaborative editing module, the translation task allocation module, and the visualization collaboration module of the classical Chinese translation system, precise task allocation can be performed, and the progress of translation tasks can be monitored in real time to continuously optimize the machine translation model, thereby significantly improving the efficiency and accuracy of classical Chinese translation.
[0211] This application first acquires the target classical Chinese text and extracts its semantic features. It then combines this with a classical Chinese knowledge graph for knowledge reasoning and contextual analysis of the semantic features. This enriches the semantic associations and cultural background knowledge of the classical Chinese text, facilitating a deeper understanding of its deeper semantics and cultural context. Second, by detecting translation terms related to the semantic features of the classical Chinese text, it ensures the accuracy of the translation results within the relevant professional field, effectively avoiding ambiguity in terminology translation. Furthermore, by determining a classical Chinese translation strategy, it ensures that subsequent translation results can adapt to different contexts and cultural backgrounds. Finally, based on classical Chinese interpretation knowledge, contextual information, translation terms, and translation strategies, the target classical Chinese text is translated. This comprehensive approach considers both the professional knowledge and cultural background of the classical Chinese text, accurately conveying both the literal meaning and the deeper semantics of the text. This effectively addresses the shortcomings of traditional methods in handling classical Chinese metaphors, allusions, phonetic loan characters, and polysemy, significantly improving the accuracy of classical Chinese translation.
[0212] Please see Figure 8 This application also provides an ancient Chinese translation device that can implement the above-mentioned ancient Chinese translation method. The device includes:
[0213] The classical Chinese semantic feature extraction module is used to acquire the target classical Chinese text and extract its semantic features to obtain the semantic features of the classical Chinese text.
[0214] The knowledge reasoning module is used to perform ancient Chinese knowledge reasoning on the semantic features of ancient Chinese texts from a pre-constructed ancient Chinese knowledge graph to obtain ancient Chinese interpretation knowledge.
[0215] The Classical Chinese Context Analysis module is used to analyze the semantic features of Classical Chinese texts in their context to obtain contextual information.
[0216] The translation terminology detection module is used to detect translation terms based on the semantic features of classical Chinese texts according to the contextual information of the classical Chinese texts, and to obtain the translation terms of the classical Chinese texts.
[0217] The translation strategy determination module is used to determine the translation strategy for classical Chinese based on the contextual information and semantic features of classical Chinese.
[0218] The Classical Chinese Translation module is used to translate target Classical Chinese texts based on knowledge of Classical Chinese interpretation, contextual information, translation terminology, and translation strategies, and to obtain target translation data.
[0219] The specific implementation of this ancient Chinese translation device is basically the same as the specific implementation of the ancient Chinese translation method described above, and will not be repeated here.
[0220] 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 method for translating classical Chinese texts. This electronic device can be any smart terminal, including tablet computers, in-vehicle computers, etc.
[0221] Please see Figure 9 , Figure 9 The hardware structure of an electronic device according to another embodiment is illustrated. The electronic device includes:
[0222] The processor 901 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.
[0223] The memory 902 can be implemented as a read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). The memory 902 can store the processing 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 902 and called by the processor 901 to execute the ancient Chinese translation method of the embodiments of this application.
[0224] The input / output interface 903 is used to implement information input and output;
[0225] The communication interface 904 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).
[0226] Bus 905 transmits information between various components of the device (e.g., processor 901, memory 902, input / output interface 903, and communication interface 904);
[0227] The processor 901, memory 902, input / output interface 903, and communication interface 904 are connected to each other within the device via bus 905.
[0228] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method for translating classical Chinese texts.
[0229] 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.
[0230] 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.
[0231] 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.
[0232] 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.
[0233] 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 suitable combinations thereof.
[0234] 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.
[0235] 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.
[0236] 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. The coupling or direct coupling or communication connection between the shown or discussed units may be through some interfaces, or indirect coupling or communication connection between the apparatus or units, and may be electrical, mechanical, or other forms.
[0237] 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.
[0238] 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.
[0239] 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.
[0240] 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 classical Chinese, characterized in that, The method includes: Obtain the target ancient text and extract its semantic features to obtain the semantic features of the ancient text; Ancient Chinese semantic features are inferred from a pre-constructed ancient Chinese knowledge graph to obtain ancient Chinese interpretation knowledge. The semantic features of the ancient text are analyzed using the context of the ancient text to obtain context information of the ancient text; Based on the contextual information of the classical Chinese text, translation terminology detection is performed on the semantic features of the classical Chinese text to obtain translation terms for the classical Chinese text. A translation strategy for classical Chinese is determined based on the contextual information and semantic features of the classical Chinese text. Based on the aforementioned knowledge of classical Chinese interpretation, the aforementioned contextual information of classical Chinese, the aforementioned terminology for classical Chinese translation, and the aforementioned translation strategies, the target classical Chinese text is translated to obtain target translation data.
2. The method according to claim 1, characterized in that, Before performing ancient Chinese knowledge reasoning on the semantic features of the ancient Chinese text from the pre-constructed ancient Chinese knowledge graph to obtain the ancient Chinese text interpretation knowledge, the method further includes: Acquire multimodal data of the target ancient text; the multimodal data includes the target ancient text text, the target ancient text image, and the target ancient text audio; The target ancient Chinese text is subjected to text semantic feature extraction to obtain text semantic features; Visual semantic features are extracted from the target ancient text image to obtain visual semantic features; The target ancient text audio is converted into audio text, and the audio text semantic features are extracted to obtain audio semantic features; The text semantic features, the visual semantic features, and the audio semantic features are fused to obtain fused semantic features.
3. The method according to claim 2, characterized in that, The step of performing classical Chinese knowledge reasoning on the semantic features of classical Chinese texts from a pre-constructed classical Chinese knowledge graph to obtain classical Chinese interpretation knowledge includes: The fused semantic features are fused with the classical Chinese semantic features to obtain fused classical Chinese semantic features; Ancient Chinese knowledge is retrieved from the ancient Chinese knowledge graph by performing ancient Chinese semantic features fusion; Entity knowledge subgraphs are extracted from the retrieved knowledge entities to obtain entity knowledge subgraphs; Obtain the target knowledge entity of the entity knowledge subgraph, and extract the context features of the target knowledge entity to obtain the entity context features; The ancient text interpretation knowledge is determined based on the entity context features and the entity knowledge subgraph.
4. The method according to claim 1, characterized in that, The step of performing classical Chinese contextual analysis on the semantic features of the classical Chinese text to obtain classical Chinese contextual information includes: Temporal features are extracted from the target ancient text to obtain the temporal features of the ancient text; Knowledge features are extracted from the aforementioned classical Chinese interpretation knowledge to obtain classical Chinese knowledge features; Contextual recognition is performed based on the semantic features, temporal features, and knowledge features of the ancient text to obtain the contextual information of the ancient text.
5. The method according to claim 1, characterized in that, The method for determining the translation strategy of classical Chinese based on the contextual information and semantic features of classical Chinese includes: The historical translation data of the target ancient text is obtained, and features are extracted from the historical translation data to obtain historical translation features; The cosine similarity of the historical translation features and the ancient Chinese semantic features is calculated to obtain the target similarity. The historical translation feature weights of the historical translation features are determined based on the target similarity. The weights of the historical translation features are adjusted based on the classical Chinese context information to obtain the adjusted translation feature weights; The ancient Chinese translation strategy is determined based on the target similarity and the adjusted translation feature weights.
6. The method according to claim 1, characterized in that, The step of detecting translation terms based on the semantic features of the classical Chinese text according to the classical Chinese context information to obtain classical Chinese translation terms includes: Feature extraction is performed on the classical Chinese context information to obtain classical Chinese context features; The terminology for the translation of classical Chinese texts is obtained by performing terminology corpus retrieval on the contextual features of the classical Chinese texts from a pre-constructed translation corpus.
7. The method according to any one of claims 1 to 6, characterized in that, The process of translating the target classical Chinese text based on the knowledge of classical Chinese interpretation, the contextual information of the classical Chinese text, the translation terminology of the classical Chinese text, and the translation strategy of the classical Chinese text, to obtain target translation data, includes: Based on the knowledge of ancient Chinese interpretation, the contextual information of ancient Chinese, the translation terminology of ancient Chinese, and the translation strategy of ancient Chinese, a preliminary translation of the target ancient Chinese is performed to obtain preliminary translation data. An update detection is performed on the ancient text knowledge graph to obtain an updated knowledge graph. The ancient text interpretation knowledge is updated based on the updated knowledge graph to obtain updated ancient text interpretation knowledge; The preliminary translation data is updated based on the updated knowledge of classical Chinese interpretation to obtain the target translation data.
8. A device for translating classical Chinese texts, characterized in that, The device includes: The classical Chinese semantic feature extraction module is used to acquire the target classical Chinese text and extract its semantic features to obtain the classical Chinese semantic features. The knowledge reasoning module is used to perform ancient Chinese knowledge reasoning on the semantic features of the ancient Chinese text from a pre-constructed ancient Chinese knowledge graph to obtain ancient Chinese interpretation knowledge. The classical Chinese context analysis module is used to perform classical Chinese context analysis on the semantic features of the classical Chinese text to obtain classical Chinese context information. The translation terminology detection module is used to detect translation terms based on the ancient Chinese context information and semantic features of the ancient Chinese text to obtain ancient Chinese translation terms. The translation strategy determination module is used to determine the translation strategy for the classical Chinese text based on the classical Chinese context information and the semantic features of the classical Chinese text. The classical Chinese translation module is used to translate the target classical Chinese text based on the classical Chinese interpretation knowledge, the classical Chinese context information, the classical Chinese translation terminology, and the classical Chinese translation strategy, to obtain target translation data.
9. 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 ancient text translation method according to any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the ancient Chinese translation method as described in any one of claims 1 to 7.
