Text translation model translation difficulty evaluation method and device

By using a translation difficulty assessment model consisting of a global feature extraction layer, a semantic alignment layer, and an output layer, the problem of inaccurate translation difficulty assessment in existing technologies is solved, and a more accurate translation difficulty assessment is achieved.

CN121118922BActive Publication Date: 2026-03-24PENG CHENG LAB
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-14
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

In existing technologies, the methods for assessing the translation difficulty of text translation models cannot fully exploit the features of the translation model on the text, resulting in a discrepancy between the assessment results and the actual translation difficulty.

Method used

A translation difficulty assessment model consisting of a global feature extraction layer, a semantic alignment layer, and an output layer is adopted. By obtaining the source text and translation text vectors, global feature extraction, semantic fusion, and difficulty score mapping are performed to obtain the translation difficulty assessment value.

Benefits of technology

It improves the accuracy of translation difficulty assessment, captures the semantic and structural features of the text in the overall dimension, explores the deep feature representation capabilities, and provides more accurate translation difficulty information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121118922B_ABST
    Figure CN121118922B_ABST
Patent Text Reader

Abstract

The embodiment of the application provides a translation difficulty evaluation method and device of a text translation model, and relates to the technical field of text processing. The method obtains a source text vector from an encoder of a target text translation model, obtains a translated text vector from a decoder, performs global feature extraction on the source text vector and the translated text vector to obtain corresponding global source vectors and global translated vectors, performs semantic fusion on the global source vectors and the global translated vectors to obtain first semantic vectors and second semantic vectors, obtains deep feature vectors based on the first semantic vectors and the second semantic vectors, inputs the deep feature vectors into an output layer for difficulty score mapping, and obtains a translation difficulty evaluation value corresponding to the target text translation model. Through a multi-level mining process, the overall feature mining capability of the target text translation model is obtained, accurate information basis is provided for difficulty evaluation, and the accuracy of difficulty evaluation is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of text processing, in particular to a translation difficulty evaluation method and device of a text translation model. BACKGROUND

[0002] In the field of text translation, accurately evaluating the translation difficulty of a translation model helps to know the complexity of a specific translation task in advance, so as to reasonably arrange resources and waiting time, and also helps to optimize the text translation model according to the evaluation result.

[0003] In related technologies, a corresponding evaluation model is constructed to directly analyze the source text and the translated text in multiple dimensions, including the number of words, the number of semantics, the proportion of common words and rare words, the number of sentences, the structure of sentences, and other factors. However, this direct analysis of the text has limited representation ability. It fails to fully exploit the feature mining capability of the translation model for the text, resulting in a certain deviation between the evaluation result and the actual translation difficulty. SUMMARY

[0004] The main purpose of the embodiments of the present application is to propose a translation difficulty evaluation method and device of a text translation model to improve the accuracy of translation difficulty evaluation of the text translation model.

[0005] To achieve the above purpose, a first aspect of the embodiments of the present application proposes a translation difficulty evaluation method of a text translation model, which is executed by a translation difficulty evaluation model, the translation difficulty evaluation model at least includes a global feature extraction layer, a semantic alignment layer and an output layer, and the method includes:

[0006] obtaining a source text vector from an encoder of a target text translation model, and obtaining a translated text vector from a decoder of the target text translation model;

[0007] inputting the source text vector and the translated text vector into the global feature extraction layer for global feature extraction to obtain a corresponding global source vector and a global translation vector;

[0008] inputting the global source vector and the global translation vector into the semantic alignment layer for semantic fusion to obtain a first semantic vector and a second semantic vector, and obtaining a deep feature vector based on the first semantic vector and the second semantic vector;

[0009] inputting the deep feature vector into the output layer for difficulty score mapping to obtain a translation difficulty evaluation value corresponding to the target text translation model.

[0010] In some embodiments, the step of inputting the global source vector and the global translation vector into the semantic alignment layer for semantic fusion to obtain a first semantic vector and a second semantic vector includes:

[0011] The first semantic vector is obtained by calculating the vector difference between the global source vector and the global translation vector.

[0012] The second semantic vector is obtained by calculating the vector product of the global source vector and the global translation vector.

[0013] In some embodiments, obtaining the deep feature vector based on the first semantic vector and the second semantic vector includes:

[0014] The semantic alignment vector is obtained by sequentially concatenating the global source vector, the global translation vector, the first semantic vector, and the second semantic vector.

[0015] The semantic alignment vector is multiplied by the first feature matrix to obtain a high-dimensional feature vector, and the high-dimensional feature vector is multiplied by the second feature matrix to obtain the deep feature vector, wherein the dimension of the first feature matrix is ​​higher than that of the second feature matrix.

[0016] In some embodiments, the step of sequentially concatenating the global source vector, the global translation vector, the first semantic vector, and the second semantic vector to obtain a semantic alignment vector includes:

[0017] Obtain the global similarity value between the global source vector and the global translation vector, and calculate the first similarity value based on the global similarity value;

[0018] Obtain the semantic similarity value between the first semantic vector and the second semantic vector, and calculate the second similarity value based on the semantic similarity value;

[0019] The global source vector, the global translation vector, the first semantic vector, and the second semantic vector are sequentially weighted and summed based on the global similarity value, the first similarity value, the semantic similarity value, and the second similarity value to obtain a semantic similarity vector;

[0020] The semantic alignment vector is obtained by sequentially concatenating the global source vector, the global translation vector, the first semantic vector, the second semantic vector, and the semantic similarity vector.

[0021] In some embodiments, the step of inputting the deep feature vector into the output layer for difficulty score mapping to obtain the translation difficulty assessment value corresponding to the target text translation model includes:

[0022] The deep feature vector is divided into multiple sub-vectors using the output layer, and the total information entropy of the deep feature vector and the sub-information entropy of each sub-vector are calculated.

[0023] The difference between the maximum and minimum values ​​of the sub-information entropy is calculated as the uncertainty difference.

[0024] The translation difficulty assessment value is obtained based on the total information entropy and the uncertainty difference.

[0025] In some embodiments, after obtaining the translation difficulty assessment value based on the total information entropy and the uncertainty difference, the method further includes:

[0026] Obtain at least one source context vector corresponding to the source text vector to form a first vector set, and obtain the translation context vector corresponding to the source context vector to form a second vector set, and calculate the set similarity between the first vector set and the second vector set;

[0027] The corresponding source text vectors and translation context vectors are used as mapping pairs. The mapping difficulty assessment value and vector similarity of the mapping pairs are calculated, and the average similarity of the vector similarity and the average difficulty of the mapping difficulty assessment value are calculated.

[0028] The context weight is obtained based on the set similarity and the average similarity, and the difficulty reference value is obtained by multiplying the context weight and the average difficulty.

[0029] The sum of the translation difficulty assessment value and the difficulty reference value is normalized, and the translation difficulty assessment value is updated.

[0030] In some embodiments, the training process of the translation difficulty assessment model includes at least:

[0031] Based on the source language and target language, multiple translated text samples corresponding to the source text sample are obtained, a quality score is obtained for each translated text sample, and the quality score is normalized as a label for translation difficulty assessment.

[0032] The source text sample is input into the target text translation model for translation, resulting in the source vector sample output by the encoder and the translation vector sample output by the decoder.

[0033] Training samples are generated based on the source vector samples, the translation vector samples, and the translation difficulty assessment labels, and the translation difficulty assessment model is trained using the training samples.

[0034] To achieve the above objectives, a second aspect of this application proposes a translation difficulty assessment device for a text translation model, executed by the translation difficulty assessment model, which includes at least a global feature extraction layer, a semantic alignment layer, and an output layer. The device includes:

[0035] Vector acquisition module: used to acquire source text vectors from the encoder of the target text translation model, and to acquire translated text vectors from the decoder of the target text translation model;

[0036] Global extraction module: used to input the source text vector and the translated text vector into the global feature extraction layer for global feature extraction, and obtain the corresponding global source vector and global translation vector;

[0037] Semantic alignment module: used to input the global source vector and the global translation vector into the semantic alignment layer for semantic fusion to obtain a first semantic vector and a second semantic vector, and to obtain a deep feature vector based on the first semantic vector and the second semantic vector;

[0038] Difficulty assessment module: used to input the deep feature vector into the output layer to perform difficulty score mapping, and obtain the translation difficulty assessment value corresponding to the target text translation model.

[0039] 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.

[0040] To achieve the above objectives, a fourth aspect of the present application provides a storage medium that stores a computer program, which, when executed by a processor, implements the method described in the first aspect.

[0041] The translation difficulty assessment method and apparatus for a text translation model proposed in this application are executed by a translation difficulty assessment model, which includes at least a global feature extraction layer, a semantic alignment layer, and an output layer. The method includes: obtaining source text vectors from the encoder of the target text translation model and translated text vectors from the decoder of the target text translation model; inputting the source text vectors and translated text vectors into the global feature extraction layer for global feature extraction to obtain corresponding global source vectors and global translated vectors; inputting the global source vectors and global translated vectors into the semantic alignment layer for semantic fusion to obtain a first semantic vector and a second semantic vector; obtaining a deep feature vector based on the first and second semantic vectors; and inputting the deep feature vector into the output layer for difficulty score mapping to obtain the translation difficulty assessment value corresponding to the target text translation model. This application first selects the source text vectors and translated text vectors of the target text translation model as processing objects, using these two vectors to indicate the degree of understanding and feature representation ability of the target text translation model during the translation process. Next, the global vector extraction process captures the semantic and structural features of the two texts at the overall level, avoiding the analysis process being limited to local character and word features. This further explores the deep feature representation capabilities of the text translation model. Finally, semantic fusion enables vectors to interact at the semantic level, using deep feature vectors to indicate corresponding semantic differences and relationships during the translation process, further uncovering subtle semantic differences in the translation process. Through the above multi-level mining process, an accurate information foundation is provided for difficulty assessment, thereby improving the accuracy of difficulty assessment. Attached Figure Description

[0042] Figure 1 This is a schematic diagram of the translation difficulty assessment model provided in the embodiments of this application.

[0043] Figure 2 This is a flowchart of the translation difficulty assessment method for the text translation model provided in this application embodiment.

[0044] Figure 3 This is a flowchart provided in this application embodiment, in which global source vectors and global translation vectors are input into a semantic alignment layer for semantic fusion to obtain a first semantic vector and a second semantic vector.

[0045] Figure 4 This is a flowchart of obtaining deep feature vectors based on the first semantic vector and the second semantic vector, provided in an embodiment of this application.

[0046] Figure 5 This is a flowchart provided in an embodiment of the present application, showing how to sequentially concatenate a global source vector, a global translation vector, a first semantic vector, and a second semantic vector to obtain a semantic alignment vector.

[0047] Figure 6This is a flowchart provided in this application embodiment, which maps deep feature vectors into the output layer to obtain the translation difficulty assessment value corresponding to the target text translation model.

[0048] Figure 7 This is a flowchart of updating the translation difficulty assessment value provided in an embodiment of this application.

[0049] Figure 8 This is a schematic diagram of the training process of the translation difficulty assessment model provided in the embodiments of this application.

[0050] Figure 9 This is a structural block diagram of a text translation difficulty assessment device provided in another embodiment of this application.

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

[0052] 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.

[0053] It should be noted that although functional modules are divided in the device schematic diagram and the 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.

[0054] 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.

[0055] First, let's analyze some of the terms used in this application:

[0056] 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.

[0057] In the field of text translation, translation difficulty refers to the ease or difficulty of translating given text from a source language to a target language. Accurately assessing the translation difficulty of a translation model helps to anticipate the complexity of a specific translation task, allowing for the rational allocation of resources and waiting time, thereby improving the speed and quality of translation tasks and reducing the translation cost. Furthermore, the assessment results can also assist in optimizing the model parameters of the text translation model.

[0058] Related technologies construct corresponding evaluation models to directly analyze the source and translated texts from multiple dimensions, including the number of words, semantic content, the proportion of common and rare words, the number of sentences, and sentence structure. However, this method of directly analyzing text has limited representational capabilities. It fails to fully exploit the feature extraction capabilities of translation models, leading to a certain deviation between the evaluation results and the actual translation difficulty.

[0059] Based on this, this application provides a method and apparatus for assessing the translation difficulty of a text translation model. First, the source text vector and the translation text vector of the target text translation model are selected as processing objects. These two vectors indicate the target text translation model's understanding of the text and its feature representation ability during the translation process. Next, a global vector extraction process is used to capture the semantic and structural features of the two texts at the overall dimension, avoiding the analysis process being limited to local character and word features, thereby further exploring the text translation model's deep feature representation capabilities. Finally, semantic fusion is used to achieve interaction between vectors at the semantic level, using deep feature vectors to indicate corresponding semantic differences and correspondences during the translation process, further exploring subtle semantic differences in the translation process. Through the above multi-level mining process, an accurate information foundation is provided for difficulty assessment, thereby improving the accuracy of difficulty assessment.

[0060] This application provides a method and apparatus for evaluating the translation difficulty of a text translation model, which will be described in detail through the following embodiments. First, the method for evaluating the translation difficulty of a text translation model in this application embodiment is described.

[0061] This application's embodiments can acquire and process relevant data based on artificial intelligence (AI) technology. AI is the theory, methods, technology, and application system that uses 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. In other words, AI is a comprehensive technology within computer science that attempts to understand the essence of intelligence and produce a new type of intelligent machine that can react in a way similar to human intelligence. AI also studies the design principles and implementation methods of various intelligent machines, enabling them to possess perception, reasoning, and decision-making capabilities.

[0062] Artificial intelligence (AI) is a comprehensive discipline encompassing a wide range of fields, including both hardware and software technologies. Fundamental AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies primarily include computer vision, speech processing, natural language processing, and machine learning / deep learning.

[0063] The translation difficulty assessment method for a text translation model provided in this application relates to the field of text processing technology. This method can be applied to a terminal, a server, or a computer program running on either the terminal or the server. For example, the computer program can be a native program or software module in an operating system; it can be a native application (APP), i.e., a program that needs to be installed in the operating system to run, such as a client supporting the translation difficulty assessment of a text translation model, i.e., a program that only needs to be downloaded to a browser environment to run; or it can be a small program that can be embedded in any APP. In short, the above-mentioned computer program can be any form of application, module, or plugin. The terminal communicates with the server via a network. The translation difficulty assessment method for this text translation model can be executed by the terminal or the server, or by the terminal and the server working together.

[0064] In some embodiments, the terminal can be a smartphone, tablet, laptop, desktop computer, or smartwatch, etc. The server can be a standalone server, 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, content delivery networks (CDNs), and big data and artificial intelligence platforms; it can also be a service node in a blockchain system, where the service nodes form a peer-to-peer (P2P) network. The P2P protocol is an application layer protocol running on top of the Transmission Control Protocol (TCP). The terminal and server can connect via Bluetooth, Universal Serial Bus (USB), or a network, etc., and this embodiment does not impose any limitations.

[0065] 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.

[0066] The structure of the translation difficulty assessment model provided in the embodiments of this application is described below.

[0067] In one embodiment, reference is made to Figure 1 , Figure 1 This is a schematic diagram of the translation difficulty assessment model provided in this application embodiment. First, the translation difficulty assessment model evaluates the translation difficulty of the target text translation model; therefore, it needs to be connected to the target text translation model. (Refer to...) Figure 1The target text translation model can be based on the Transformer architecture, including at least an encoder and a decoder. The encoder receives the source text and extracts features from it to obtain a source text vector, while the decoder extracts features from the input vector to obtain a translated text vector, which corresponds to the translation result of the source text. It's important to understand that neither the source text vector nor the translated text vector is explicit text; rather, it is semantically encoded data that represents the semantic extraction capabilities of the encoder and decoder, thus providing a preliminary indication of the translation difficulty of the target text translation model.

[0068] After obtaining the source text vector and the translated text vector, they are input into the global feature extraction layer of the translation difficulty assessment model for global feature extraction. The two corresponding outputs of the global feature extraction layer are then used as input to the semantic alignment layer. After semantic alignment, a deep feature vector is obtained. This deep feature vector is then input into the output layer to obtain the translation difficulty assessment value corresponding to the target text translation model.

[0069] The following is combined with Figure 1 The structural description of the Chinese translation difficulty assessment model in this application is as follows: The text translation model in this embodiment is used to assess the translation difficulty.

[0070] Figure 2 This is an optional flowchart of the translation difficulty assessment method for the text translation model provided in the embodiments of this application. Figure 2 The method may include, but is not limited to, steps 110 to 140. It is also understood that this embodiment... Figure 2 The order of steps 110 to 140 is not specifically limited. The order of steps can be adjusted or some steps can be reduced or added according to actual needs.

[0071] Step 110: Obtain the source text vector from the encoder of the target text translation model, and obtain the translated text vector from the decoder of the target text translation model.

[0072] In one embodiment, such as Figure 1As shown, firstly, the source text is segmented into multiple source tokens in the encoder of the target text translation model. These source tokens can be words in English, or characters or phrases in Chinese. After obtaining the source tokens, each source token is semantically encoded to obtain a source text vector. The encoder consists of multiple identical stacked layers, each containing a multi-head self-attention mechanism and a feedforward neural network. In the multi-head self-attention mechanism, each source token in the source text interacts with other source tokens, calculating different attention weights to obtain global semantic information. After multiple layers of encoding, the output of the last layer of the encoder is the source text vector. The source text vector integrates the information of each source token in the source text and the relationships between them, representing the semantics of the source text in a compact way. The source text vector... It can be represented as: ,in, Let S represent the semantic encoding data of the i-th source word, and let S represent the number of source words.

[0073] Similarly, the translated text vector is obtained by the decoder in the target text translation model through semantic encoding of the input data. Represented as: ,in, Let T represent the semantic encoding data corresponding to the i-th translated word, and let T represent the number of translated words.

[0074] Step 120: Input the source text vector and the translated text vector into the global feature extraction layer to perform global feature extraction, and obtain the corresponding global source vector and global translation vector.

[0075] In one embodiment, after obtaining the source text vector and the translated text vector, both are input into the global feature extraction layer of the translation difficulty assessment model for further processing. The global feature extraction layer can be a pooling layer, such as a max pooling layer or an average pooling layer. The core purpose of pooling is to reduce data dimensionality while retaining important semantic features, thus obtaining more representative global features. Therefore, this embodiment performs a pooling operation on the source text vector to obtain the global source vector. The global translation vector is obtained by pooling the translated text vector. The global source vector and global translation vector indicate the key features of the source and translation texts in a compact and representative manner. Subsequent analysis based on these two vectors can clarify the semantic and structural differences between the source and translation texts, thus providing a basis for subsequent assessment of translation difficulty.

[0076] Step 130: Input the global source vector and global translation vector into the semantic alignment layer for semantic fusion to obtain the first semantic vector and the second semantic vector, and obtain the deep feature vector based on the first semantic vector and the second semantic vector.

[0077] In one embodiment, reference is made to Figure 3 , Figure 3 This is a flowchart provided in this application embodiment of which introduces global source vectors and global translation vectors into a semantic alignment layer for semantic fusion to obtain a first semantic vector and a second semantic vector. The flowchart specifically includes the following steps:

[0078] Step 310: Calculate the vector difference between the global source vector and the global translation vector to obtain the first semantic vector.

[0079] In one embodiment, the first semantic vector is obtained based on the difference between the global source vector and the global translation vector, and is represented as: By comparing the numerical differences between two vectors across various dimensions, we can quantify the degree of deviation between the source and translated texts in the corresponding semantic feature dimensions after global feature extraction—that is, the semantic difference. For example, in a translated text, a certain dimension might represent sentiment. The difference between the global source vector and the global translation vector in that dimension can, to some extent, reflect the difference in sentiment between the source and translated texts. A larger vector difference usually means a greater semantic difference between the source and translated texts, potentially indicating a higher translation difficulty.

[0080] Step 320: Calculate the vector product of the global source vector and the global translation vector to obtain the second semantic vector.

[0081] In one embodiment, the second semantic vector is obtained by the vector product of the global source vector and the global translation vector, denoted as: The vector product here is the Hadamard product, calculated by multiplying corresponding elements of the two vectors. Element-wise multiplication captures the semantic correlation between the global source vector and the global translation vector across various dimensions. When the element values ​​of both vectors are large in a certain dimension, the second semantic vector corresponding to the product will also be large in that dimension, indicating a high degree of consistency or correlation between the source and translated texts in that semantic feature dimension.

[0082] Unlike the first semantic vector, the second semantic vector provides more comprehensive feature information for subsequent translation difficulty assessment through a simple calculation process. The first semantic vector highlights the semantic differences between the source and translated texts, while the second semantic vector highlights the semantic consistency between them. For example, if the first semantic vector shows significant differences in certain dimensions, but the second semantic vector also shows high values ​​in those dimensions, this may mean that although the source and translated texts differ in the degree of expression of these semantic features, they are still strongly related semantically. The translation difficulty may not be entirely due to semantic differences, but may involve other factors such as language expression habits. Therefore, this application embodiment sets these two different semantic vectors to gain a deeper understanding of the characteristics of semantic transformation during the translation process, thereby more accurately assessing translation difficulty.

[0083] In one embodiment, after obtaining the first semantic vector and the second semantic vector, further analysis is required. (Refer to...) Figure 4 , Figure 4 This is a flowchart of obtaining deep feature vectors based on a first semantic vector and a second semantic vector, provided in an embodiment of this application, including the following steps:

[0084] Step 410: Concatenate the global source vector, global translation vector, first semantic vector, and second semantic vector in sequence to obtain the semantic alignment vector.

[0085] In one embodiment, to retain more information for translation difficulty assessment, in addition to the first and second semantic vectors, it is also necessary to retain the global source vector and the global translation vector. (Refer to...) Figure 5 , Figure 5 This is a flowchart provided in an embodiment of the present application, showing how to sequentially concatenate a global source vector, a global translation vector, a first semantic vector, and a second semantic vector to obtain a semantic alignment vector. The flowchart specifically includes the following steps:

[0086] Step 510: Obtain the global similarity value between the global source vector and the global translation vector, and calculate the first similarity value based on the global similarity value.

[0087] In one embodiment, using cosine similarity as an example, the global similarity value is used to evaluate the difference between the global source vector and the global translation vector, reflecting the similarity between the source text and the translated text in the overall semantic feature distribution. A higher global similarity value may indicate that the translation difficulty is relatively low, because the source text and the translated text are more semantically similar; conversely, a lower global similarity value may indicate that the translation difficulty is higher.

[0088] Next, a first similarity value needs to be calculated based on the global similarity value. Here, a non-linear function (such as the sigmoid function) is used to transform the global similarity value, mapping it to a specific interval. For example, the global similarity value may be 0.7, but the first similarity value obtained after transformation may be 0.72 or 0.75. Since translation difficulty assessment often requires high sensitivity to subtle differences in similarity, relying solely on the global similarity value may not accurately distinguish some similar cases that have different actual translation difficulties. Therefore, this embodiment uses a non-linear transformation to add a perturbation to the global similarity value to obtain the first similarity value, thereby highlighting these subtle differences and making the assessment of translation difficulty more accurate.

[0089] Step 520: Obtain the semantic similarity value between the first semantic vector and the second semantic vector, and calculate the second similarity value based on the semantic similarity value.

[0090] In one embodiment, referring to the above process, the semantic similarity values ​​of the first semantic vector and the second semantic vector are obtained respectively, and the second similarity value is calculated based on the semantic similarity values.

[0091] Step 530: The global source vector, global translation vector, first semantic vector, and second semantic vector are weighted and summed sequentially based on the global similarity value, the first similarity value, the semantic similarity value, and the second similarity value to obtain the semantic similarity vector.

[0092] In one embodiment, since the global similarity value reflects the overall similarity between the global source vector and the global translation vector, it is used as the weight of the global source vector. The first similarity value, obtained by transforming the global similarity value, highlights subtle differences in the global similarity value and is therefore used as the weight of the global translation vector. Similarly, the semantic similarity value is used as the weight of the first semantic vector, and the second similarity value is used as the weight of the second semantic vector.

[0093] Next, a weighted summation method is used to fuse vectors, resulting in a semantic similarity vector. This semantic similarity vector integrates similarity information between the source and translated texts at different levels. It includes not only the overall semantic similarity represented by the global source and global translation vectors, but also relevant information from the first semantic vector reflecting semantic differences and the second semantic vector reflecting semantic connections. Furthermore, the fusion process involves weighting the vectors with corresponding weights, ensuring that the final semantic similarity vector comprehensively reflects the semantic relationship between the source and translated texts. This provides richer and more representative semantic information for the translation difficulty assessment process, enabling the translation difficulty assessment model to more accurately learn and judge the impact of the semantic relationship between the source and translated texts on translation difficulty, thereby improving the accuracy and reliability of translation difficulty assessment.

[0094] Step 540: Sequentially concatenate the global source vector, global translation vector, first semantic vector, second semantic vector, and semantic similarity vector to obtain the semantic alignment vector.

[0095] In one embodiment, the global source vector, global translation vector, first semantic vector, second semantic vector, and semantic similarity vector are concatenated in sequence to obtain a semantic alignment vector. The semantic alignment vector can characterize the influence of multiple factors such as overall semantic similarity, semantic difference, and semantic association on translation difficulty.

[0096] Step 420: Multiply the semantic alignment vector by the first feature matrix to obtain the high-dimensional feature vector, and multiply the high-dimensional feature vector by the second feature matrix to obtain the deep feature vector.

[0097] In one embodiment, the first feature matrix has a higher dimension than the second feature matrix. Therefore, the process of transforming the semantic alignment vector into a deep feature vector is a process of first increasing the dimension and then decreasing the dimension. Since a higher-dimensional space can provide more dimensions to represent semantic features, semantic relationships that are difficult to distinguish or express in a lower-dimensional space can be more finely characterized in a higher-dimensional space. Therefore, obtaining a higher-dimensional feature vector through the dimensionality increase process can expand the information contained in the semantic alignment vector in the vector space.

[0098] Next, considering that while high-dimensional space can richly represent semantic features, it may contain redundant information, the high-dimensional feature vector is multiplied by the lower-dimensional second feature matrix to remove some unnecessary dimensions and extract the most representative and crucial semantic features as the deep feature vector. This dimensionality reduction process from high-dimensional feature vectors to deep feature vectors is not simply a reduction in dimensionality, but rather a refinement and compression of information in high-dimensional space, retaining the most important information while reducing the amount of data. In subsequent translation difficulty assessment, the dimensionality-reduced deep feature vectors can represent the semantic relationship between the source and translated texts in a more compact form.

[0099] Step 140: Map the deep feature vectors into the output layer to obtain the translation difficulty assessment value corresponding to the target text translation model.

[0100] In one embodiment, the simplest sigmoid function can be used to map deep feature vectors to scores between 0 and 1, obtaining a translation difficulty assessment value. Alternatively, information entropy can be used for a more accurate mapping process. (See reference...) Figure 6 , Figure 6 This is a flowchart provided in this application embodiment that maps deep feature vectors into the output layer to obtain the translation difficulty assessment value corresponding to the target text translation model, specifically including the following steps:

[0101] Step 610: Divide the deep feature vector into multiple sub-vectors using the output layer, and calculate the total information entropy of the deep feature vector and the sub-information entropy of each sub-vector.

[0102] In one embodiment, deep feature vectors This includes at least one dimension, which is divided into multiple different sub-vectors based on the data dimension, such as by rows or columns. Assume the deep feature vector, after partitioning, is represented as: ,in, Let i represent the i-th subvector.

[0103] Next, after partitioning, the information entropy is calculated for the deep feature vectors to obtain the total information entropy. Then, the information entropy is calculated for each sub-vector to obtain the sub-information entropy corresponding to each sub-vector. Information entropy measures information uncertainty, and its calculation is based on the probability density of each element in the corresponding vector. The calculation process of information entropy will not be elaborated here.

[0104] Step 620: Calculate the difference between the maximum and minimum values ​​of the sub-information entropy as the uncertainty difference.

[0105] In one embodiment, the number of sub-information entropies is at least one. The maximum and minimum values ​​of these sub-information entropies are then obtained. These two maximum and minimum values ​​reflect extreme cases of uncertainty in features at different levels. The difference between the maximum and minimum values ​​is calculated to obtain the uncertainty difference, which represents the degree of fluctuation in uncertainty of features at different levels. If the uncertainty difference is large, it indicates a significant difference in uncertainty between features at different levels between the source and translated texts. This may mean that multiple uncertainties of varying degrees need to be addressed during the translation process, increasing the translation difficulty.

[0106] Step 630: Obtain the translation difficulty assessment value based on the total information entropy and the uncertainty difference.

[0107] In one embodiment, after obtaining the total information entropy and the uncertainty difference, the sum of the total information entropy and the uncertainty difference is calculated as the translation difficulty assessment value. It is understood that the translation difficulty assessment value can be normalized to facilitate analysis and comparison.

[0108] In one embodiment, the translation difficulty assessment value can also be updated based on contextual information. (See also...) Figure 7 , Figure 7 This is a flowchart of updating the translation difficulty assessment value provided in an embodiment of this application, which specifically includes the following steps:

[0109] Step 710: Obtain at least one source context vector corresponding to the source text vector to form a first vector set, and obtain the translation context vector corresponding to the source context vector to form a second vector set, and calculate the set similarity between the first vector set and the second vector set.

[0110] In one embodiment, for the source text corresponding to the source text vector, the source text context of the source text is obtained. For example, multiple texts are selected above and below the source text as source text contexts. Then, for each source text context, a source context vector corresponding to the source text vector is obtained. The vector set formed by these source context vectors is called the first vector set. Similarly, each source context vector has a corresponding translation context vector. The set formed by these translation context vectors is called the second vector set.

[0111] Next, the set similarity between the first vector set and the second vector set is calculated. First, the distance between each vector in the first set and each vector in the second set is calculated, where the distance can be cosine distance or Euclidean distance. Then, the average of all distances is calculated to obtain a value representing the similarity between the two sets, which is used as the set similarity. Set similarity reflects the degree of semantic similarity between the source text and its context and the translated text and its context.

[0112] Step 720: Take the corresponding source text vectors and translation context vectors as mapping pairs, calculate the mapping difficulty assessment value and vector similarity of the mapping pairs, and calculate the average similarity of the vector similarity and the average difficulty of the mapping difficulty assessment value.

[0113] In one embodiment, the corresponding source text vectors and translation context vectors are used as mapping pairs. For each mapping pair, the vector similarity between the two vectors is first calculated, and then the mapping difficulty assessment value related to the mapping pair is calculated according to the translation difficulty assessment process described above. Then, the average vector similarity of all mapping pairs is calculated as the average similarity, and similarly, the average mapping difficulty assessment value of all mapping pairs is calculated as the average difficulty.

[0114] Step 730: Obtain the context weight based on set similarity and average similarity, and obtain the difficulty reference value by multiplying the context weight and the average difficulty.

[0115] In one embodiment, the context weight is obtained based on set similarity and the average similarity value. This can be calculated using a weighted method, and the weight coefficients used in the weighting process can be adjusted using training data. The context weight can reasonably reflect the impact of the relationship between the source text and the translation text's context on the translation difficulty.

[0116] Next, the difficulty reference value is obtained by multiplying the context weight and the average difficulty value. In other words, the difficulty reference value takes into account the overall similarity between the source text and the translation text, and provides a context-based reference value for translation difficulty assessment.

[0117] Step 740: Normalize the sum of the translation difficulty assessment value and the difficulty reference value, and update the translation difficulty assessment value.

[0118] In one embodiment, after obtaining a difficulty reference value that characterizes the impact of context on translation difficulty, the previously obtained translation difficulty assessment value is added to the difficulty reference value and then normalized to obtain an updated translation difficulty assessment value. In this process, incorporating contextual information allows for the capture of the relationship between the source and translation texts in a broader context, enabling the updated translation difficulty assessment value to more comprehensively reflect the actual difficulty of the translation task.

[0119] The training process of the translation difficulty assessment model in the embodiments of this application is described below. (Refer to...) Figure 8 , Figure 8 This is a schematic diagram of the training process of the translation difficulty assessment model provided in this application embodiment, which specifically includes the following steps:

[0120] Step 810: Based on the source language and target language, obtain multiple translation text samples corresponding to the source text sample, obtain the quality score of each translation text sample, and average the quality scores as a label for translation difficulty assessment.

[0121] In one embodiment, during the text translation process, the language corresponding to the source text is the source language, and the language corresponding to the translated text is the target language. Different text translation models can be used to switch between different languages. At this time, based on the source and target languages ​​corresponding to the target text translation model, multiple source texts are selected as source text samples. For each source text sample, multiple different text translation models can be used for translation, resulting in multiple corresponding translated text samples. These text translation models may include the target text translation model.

[0122] Once the translated text samples are available, their translation quality can be labeled, and each translated text sample can be scored to obtain a quality score. The quality scores are then averaged, and the average value is used as the translation difficulty assessment label corresponding to the source text sample. This labeling can be performed manually or by a labeling model; this embodiment does not limit the specific method used.

[0123] Assuming the source text sample includes N translation text samples, the translation difficulty assessment label is... Represented as:

[0124]

[0125] in, This represents the quality score corresponding to the k-th translated text sample.

[0126] Step 820: Input the source text sample into the target text translation model for translation to obtain the source vector sample output by the encoder and the translation vector sample output by the decoder.

[0127] In one embodiment, following the reasoning process described above, the source text sample is input into the target text translation model for translation. At this time, the encoder outputs the source vector sample, and the decoder outputs the translation vector sample.

[0128] Step 830: Generate training samples based on source vector samples, translation vector samples, and translation difficulty assessment labels, and use the training samples to train the translation difficulty assessment model.

[0129] In one embodiment, training samples are generated based on source vector samples, translation vector samples, and translation difficulty assessment labels. The source vector samples and translation vector samples are then input into the translation difficulty assessment model for prediction to obtain predicted values. The predicted values ​​are compared with the translation difficulty assessment labels to calculate the loss value. The translation difficulty assessment model is then trained using the loss value. When the training is completed, the trained translation difficulty assessment model is obtained.

[0130] The technical solution provided in this application is executed by a translation difficulty assessment model. This model includes at least a global feature extraction layer, a semantic alignment layer, and an output layer. It includes: obtaining source text vectors from the encoder of the target text translation model and translated text vectors from the decoder of the target text translation model; inputting the source text vectors and translated text vectors into the global feature extraction layer for global feature extraction to obtain corresponding global source vectors and global translated vectors; inputting the global source vectors and global translated vectors into the semantic alignment layer for semantic fusion to obtain a first semantic vector and a second semantic vector; obtaining a deep feature vector based on the first and second semantic vectors; and inputting the deep feature vector into the output layer for difficulty score mapping to obtain the translation difficulty assessment value corresponding to the target text translation model. This application first selects the source text vectors and translated text vectors of the target text translation model as processing objects, using these two vectors to indicate the target text translation model's understanding of the text and its feature representation ability during the translation process. Next, the global vector extraction process captures the semantic and structural features of the two texts in the overall dimension, avoiding the analysis process being limited to local character and word features, thereby further exploring the deep feature representation ability of the text translation model. Finally, semantic fusion enables vectors to interact at the semantic level. Deep feature vectors are used to indicate semantic differences and correspondences during the translation process, further uncovering subtle semantic nuances. This multi-layered mining process provides an accurate information foundation for difficulty assessment, thereby improving its accuracy.

[0131] This application also provides a translation difficulty assessment device for a text translation model, which can implement the above-mentioned text translation model translation difficulty assessment method, referring to... Figure 9 The device includes:

[0132] Vector acquisition module 910: used to acquire source text vectors from the encoder of the target text translation model and translated text vectors from the decoder of the target text translation model.

[0133] Global Extraction Module 920: This module is used to input the source text vector and the translated text vector into the global feature extraction layer for global feature extraction, thereby obtaining the corresponding global source vector and global translation vector.

[0134] Semantic alignment module 930: It is used to input the global source vector and the global translation vector into the semantic alignment layer for semantic fusion to obtain the first semantic vector and the second semantic vector, and to obtain the deep feature vector based on the first semantic vector and the second semantic vector.

[0135] Difficulty assessment module 940: This module maps the deep feature vectors into the output layer to a difficulty score, thereby obtaining the translation difficulty assessment value corresponding to the target text translation model.

[0136] The specific implementation of the translation difficulty assessment device of the text translation model in this embodiment is basically the same as the specific implementation of the translation difficulty assessment method of the text translation model described above, and will not be repeated here.

[0137] This application also provides an electronic device, including:

[0138] At least one memory;

[0139] At least one processor;

[0140] At least one program;

[0141] The program is stored in a memory, and the processor executes the at least one program to implement the translation difficulty assessment method of the text translation model described above in this application. The electronic device can be any smart terminal, including mobile phones, tablets, personal digital assistants (PDAs), in-vehicle computers, etc.

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

[0143] The processor 1001 can be implemented using a general-purpose central processing unit (CPU), 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.

[0144] The memory 1002 can be implemented as a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1002 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 1002 and is called and executed by the processor 1001 to perform the translation difficulty assessment method of the text translation model in the embodiments of this application.

[0145] Input / output interface 1003 is used to implement information input and output;

[0146] Communication interface 1004 is used to enable communication and interaction between this device and other devices. Communication can be achieved via wired means (e.g., USB, Ethernet cable) or wireless means (e.g., mobile network, Wi-Fi, Bluetooth).

[0147] Bus 1005 transmits information between various components of the device (e.g., processor 1001, memory 1002, input / output interface 1003, and communication interface 1004);

[0148] The processor 1001, memory 1002, input / output interface 1003 and communication interface 1004 are connected to each other within the device via bus 1005.

[0149] This application embodiment also provides a storage medium that stores a computer program. When the computer program is executed by a processor, it implements the translation difficulty assessment method of the above-mentioned text translation model.

[0150] Memory, as a non-transitory 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.

[0151] The translation difficulty assessment method and apparatus for the text translation model proposed in this application have both technical solutions and beneficial effects.

[0152] 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.

[0153] 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.

[0154] 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.

[0155] 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.

[0156] 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 a 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.

[0157] 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.

[0158] 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.

[0159] 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.

[0160] 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.

[0161] 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.

[0162] 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 assessing the translation difficulty of a text translation model, characterized in that, The translation difficulty assessment is performed by a translation difficulty assessment model, which includes at least a global feature extraction layer, a semantic alignment layer, and an output layer. The method includes: The source text vector is obtained from the encoder of the target text translation model, and the translated text vector is obtained from the decoder of the target text translation model; The source text vector and the translated text vector are input into the global feature extraction layer for global feature extraction to obtain the corresponding global source vector and global translation vector. Calculate the vector difference between the global source vector and the global translation vector to obtain a first semantic vector; calculate the vector product between the global source vector and the global translation vector to obtain a second semantic vector; and obtain a deep feature vector based on the first semantic vector and the second semantic vector. The deep feature vector is divided into multiple sub-vectors using the output layer, and the total information entropy of the deep feature vector and the sub-information entropy of each sub-vector are calculated. The difference between the maximum and minimum values ​​of the sub-information entropy is calculated as the uncertainty difference. The translation difficulty assessment value is obtained based on the total information entropy and the uncertainty difference. A first vector set is formed by obtaining at least one source context vector corresponding to the source text vector, and a second vector set is formed by obtaining the translation context vector corresponding to the source context vector. The set similarity between the first vector set and the second vector set is calculated. The corresponding upper and lower source text vectors and the translation context vector are used as mapping pairs. The mapping difficulty assessment value and vector similarity of the mapping pairs are calculated. The average similarity of the vector similarity and the average difficulty of the mapping difficulty assessment value are calculated. The context weight is obtained based on the set similarity and the average similarity. The difficulty reference value is obtained by multiplying the context weight and the average difficulty. The sum of the translation difficulty assessment value and the difficulty reference value is normalized, and the translation difficulty assessment value is updated.

2. The translation difficulty assessment method for the text translation model according to claim 1, characterized in that, The process of obtaining deep feature vectors based on the first semantic vector and the second semantic vector includes: The semantic alignment vector is obtained by sequentially concatenating the global source vector, the global translation vector, the first semantic vector, and the second semantic vector. The semantic alignment vector is multiplied by the first feature matrix to obtain a high-dimensional feature vector, and the high-dimensional feature vector is multiplied by the second feature matrix to obtain the deep feature vector, wherein the dimension of the first feature matrix is ​​higher than that of the second feature matrix.

3. The translation difficulty assessment method for the text translation model according to claim 2, characterized in that, The step of sequentially concatenating the global source vector, the global translation vector, the first semantic vector, and the second semantic vector to obtain the semantic alignment vector includes: Obtain the global similarity value between the global source vector and the global translation vector, and calculate the first similarity value based on the global similarity value; Obtain the semantic similarity value between the first semantic vector and the second semantic vector, and calculate the second similarity value based on the semantic similarity value; The global source vector, the global translation vector, the first semantic vector, and the second semantic vector are sequentially weighted and summed based on the global similarity value, the first similarity value, the semantic similarity value, and the second similarity value to obtain a semantic similarity vector; The semantic alignment vector is obtained by sequentially concatenating the global source vector, the global translation vector, the first semantic vector, the second semantic vector, and the semantic similarity vector.

4. The method for assessing the translation difficulty of a text translation model according to any one of claims 1 to 3, characterized in that, The training process of the translation difficulty assessment model includes at least the following: Based on the source language and target language, multiple translated text samples corresponding to the source text sample are obtained, a quality score is obtained for each translated text sample, and the quality score is normalized as a label for translation difficulty assessment. The source text sample is input into the target text translation model for translation, resulting in the source vector sample output by the encoder and the translation vector sample output by the decoder. Training samples are generated based on the source vector samples, the translation vector samples, and the translation difficulty assessment labels, and the translation difficulty assessment model is trained using the training samples.

5. A translation difficulty assessment device for a text translation model, characterized in that, The translation difficulty assessment is performed by a translation difficulty assessment model, which includes at least a global feature extraction layer, a semantic alignment layer, and an output layer. The device includes: Vector acquisition module: used to acquire source text vectors from the encoder of the target text translation model, and to acquire translated text vectors from the decoder of the target text translation model; Global extraction module: used to input the source text vector and the translated text vector into the global feature extraction layer for global feature extraction, and obtain the corresponding global source vector and global translation vector; Semantic alignment module: used to calculate the vector difference between the global source vector and the global translation vector to obtain a first semantic vector, calculate the vector product between the global source vector and the global translation vector to obtain a second semantic vector, and obtain a deep feature vector based on the first semantic vector and the second semantic vector; Difficulty assessment module: used to divide the deep feature vector into multiple sub-vectors using the output layer, calculate the total information entropy of the deep feature vector and the sub-information entropy of each sub-vector, calculate the difference between the maximum and minimum values ​​of the sub-information entropy as the uncertainty difference, and obtain the translation difficulty assessment value based on the total information entropy and the uncertainty difference; A first vector set is formed by obtaining at least one source context vector corresponding to the source text vector, and a second vector set is formed by obtaining the translation context vector corresponding to the source context vector. The set similarity between the first vector set and the second vector set is calculated. The corresponding upper and lower source text vectors and the translation context vector are used as mapping pairs. The mapping difficulty assessment value and vector similarity of the mapping pairs are calculated. The average similarity of the vector similarity and the average difficulty of the mapping difficulty assessment value are calculated. The context weight is obtained based on the set similarity and the average similarity. The difficulty reference value is obtained by multiplying the context weight and the average difficulty. The sum of the translation difficulty assessment value and the difficulty reference value is normalized, and the translation difficulty assessment value is updated.

6. An electronic device, characterized in that, The electronic device includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it implements the translation difficulty assessment method of the text translation model according to any one of claims 1 to 4.

7. A storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the translation difficulty assessment method of the text translation model according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Machine translation quality estimation method and device, equipment and storage medium

    CN111783478A

  • Translation difficulty assessment method and device based on back-translated text, equipment and medium

    CN120337944A