Chapter-level neural machine translation system, method, storage device, and electronic device

By introducing global context extraction modules and coding-end enhancement modules in chapter-level neural machine translation systems, the problem of insufficient consistency of vocabulary translation in the prior art is solved, and the consistency and accuracy of translation results are significantly improved.

CN114462432BActive Publication Date: 2025-03-25ZHONGKE FANYU TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111582595.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2021-11-22
Filing Date
2021-12-22
Publication Date
2025-03-25
Estimated Expiration
2041-12-22

AI Technical Summary

Technical Problem

The existing chapter-level neural machine translation methods have shortcomings in terms of vocabulary translation consistency, making it difficult to effectively deal with repeated words in the chapter.

Method used

By introducing a global context extraction module, semantic context vectors and consistency context vectors are extracted, and these vectors are fused in the encoding-side enhancement module to improve vocabulary consistency.

Benefits of technology

It improves the vocabulary consistency of the translation results and enhances the coherence and accuracy of word translation in the chapter.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114462432B_ABST
    Figure CN114462432B_ABST
Patent Text Reader

Abstract

The present disclosure provides a paragraph-level neural machine translation system, including: a global context extraction module, used to extract semantic context vectors and consistency context vectors; an encoding end enhancement module, used to fuse the semantic context vectors and consistency context vectors in the encoding state vector of the source end word, the input of the encoding end enhancement module is the output of the multi-layer encoder of the Transformer model, and the output of the encoding end enhancement module is used as the input of the multi-layer decoder of the Transformer model. The present disclosure also relates to a paragraph-level neural machine translation method, a storage device, and an electronic device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of natural language processing technology, and in particular to a paragraph-level neural machine translation system, method, storage device, and electronic device. Background Art

[0002] In recent years, driven by the wave of deep learning technology, machine translation technology has made rapid progress. The neural machine translation method based on end-to-end training of large-scale data has demonstrated excellent translation performance.

[0003] The paragraph-level neural machine translation method hopes to improve the translation quality and correctly translate the paragraph phenomena by integrating the contextual paragraph information during the translation process. Lexical consistency means that the repeated words on the source side of the paragraph tend to be translated into the same target side words during translation. In neural machine translation, which has completely replaced statistical machine translation and become the mainstream framework nowadays, how to improve lexical consistency has rarely been studied. Lexical translation inconsistency is still an important problem faced by the current paragraph-level neural machine translation methods. Summary of the invention

[0004] In order to solve at least one of the above technical problems, the present disclosure provides a paragraph-level neural machine translation system, method, storage device and electronic device.

[0005] According to one aspect of the present disclosure, a paragraph-level neural machine translation system is provided, including: a global context extraction module, used to extract semantic context vectors and consistency context vectors; an encoding-side enhancement module, used to fuse the semantic context vectors and consistency context vectors in the encoding state vectors of source-side words, the input of the encoding-side enhancement module is the output of the multi-layer encoder of the Transformer model, and the output of the encoding-side enhancement module is used as the input of the multi-layer decoder of the Transformer model.

[0006] According to the paragraph-level neural machine translation system of at least one embodiment of the present disclosure, the semantic context vector provides context information of the entire paragraph to improve the translation quality of the sentence model and assist in the judgment of vocabulary consistency.

[0007] According to the paragraph-level neural machine translation system of at least one embodiment of the present disclosure, the consistency context vector specifically utilizes repeated source language word information to impose consistency constraints on the encoding end.

[0008] According to the paragraph-level neural machine translation system of at least one embodiment of the present disclosure, the global context extraction module includes a semantic context vector extraction module and a consistency context vector extraction module.

[0009] According to the paragraph-level neural machine translation system of at least one embodiment of the present disclosure, the semantic context vector is extracted by adding a character tag " <doc>", using the self-attention mechanism of the Transformer multi-layer encoder, label" <doc>The state vector of " can encode the word information in the sentence; after completing the sentence encoding, the semantic context vector extraction module extracts the " <doc>"The label vector is used as the semantic representation of the sentence, thereby obtaining a set of sentence-level semantic vectors {h1, <doc> ,h2, <doc> ,…,h I , <doc>}; This group of vectors is input into an encoding layer with the same encoder structure as the standard Transformer model to model the semantic associations between sentences, thereby generating a semantic context vector that incorporates global information.

[0010] According to the paragraph-level neural machine translation system of at least one embodiment of the present disclosure, the consistency context vector is extracted in the following manner: each group of repeated words in the paragraph corresponds to a global consistency context vector, and if the jth word x in the i-th sentence i,j belongs to the nth group of repeated words in the passage, then the consistent context vector extraction module will extract x i,j The encoded state vector h i,j Extract the corresponding set of repeated word vectors Therefore Contains the encoding state vectors of all the repeated words in the chapter belonging to the nth group; then, generates the global consistency context vector u of the nth group of repeated words n : Among them, the input of MaxPooling(·) is All elements in are pooled by dimension, and the output is a vector. Repeated words belonging to the same group in the passage share the same consistent context vector. The global consistent context vector set of the entire passage is u = {u1, ..., u n }.

[0011] According to the paragraph-level neural machine translation system of at least one embodiment of the present disclosure, the encoding-side enhancement module fuses the semantic context vector and the consistency context vector in the encoding state vector of the source word in the following manner: for any word x i,j ,

[0012] If x i,j For repeated words, the group of repeated words to which it belongs is recorded as<i,j> Group, 1≦<i,j> ≦N, then its encoding state vector h i,j The corresponding consistency context vector u <i,j> Integration is done by:

[0013] r i,j =σ(FNN([u <i,j> ;h i,j ]))

[0014]

[0015] where FNN(·) represents a feedforward neural network, σ(·) represents a sigmoid activation function, and [·;·] represents a vector concatenation operation. The encoding state vector after consistency enhancement is denoted as Gate weight r i,j Balance the sentence-level encoding state vector of each word and its corresponding global consistency context vector;

[0016] If x i,j If it is a non-repeated word, its encoding state vector h i,j The semantic context vector v of the sentence in which it is located i To perform the fusion:

[0017] r′ i,j =σ(FNN([v i ;h i,j ]))

[0018]

[0019] For the tag " <doc>", directly use v i As its final enhanced encoding state vector.

[0020] According to another aspect of the present disclosure, a paragraph-level neural machine translation method is provided, which is used to perform paragraph-level neural machine translation through the above-mentioned paragraph-level neural machine translation system.

[0021] According to another aspect of the present disclosure, there is provided an electronic device, comprising:

[0022] a memory storing execution instructions; and

[0023] A processor executes the execution instructions stored in the memory, so that the processor executes the method as described above.

[0024] According to another aspect of the present disclosure, a readable storage medium is provided, wherein the readable storage medium stores execution instructions, and the execution instructions are used to implement any of the above methods when executed by a processor. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] The accompanying drawings illustrate exemplary embodiments of the present disclosure and together with the description serve to explain the principles of the present disclosure. These drawings are included to provide a further understanding of the present disclosure and are incorporated in and constitute a part of this specification.

[0026] Figure 1 This is a basic structural diagram of the existing neural machine translation system Transformer model.

[0027] Figure 2 It is a structural diagram of a paragraph-level neural machine translation system according to an embodiment of the present disclosure.

[0028] Figure 3 It is an extraction diagram of a global context extraction module according to an embodiment of the present disclosure.

[0029] Figure 4 It is a flowchart of a method for generating a paragraph-level neural machine translation model according to an embodiment of the present disclosure.

[0030] Figure 5 It is a structural diagram of a paragraph-level neural machine translation device according to one embodiment of the present disclosure.

[0031] Description of Reference Numerals

[0032] 1001 Transformer Model

[0033] 1002 Semantic Context Vector Extraction Module

[0034] 1003 Consistency Context Vector Extraction Module

[0035] 1004 Encoding end enhancement module

[0036] 1000-chapter neural machine translation device

[0037] 1100 Bus

[0038] 1200 processor

[0039] 1300 Memory

[0040] 1400 Other circuits. DETAILED DESCRIPTION

[0041] The present disclosure is further described in detail below in conjunction with the accompanying drawings and implementations. It is understood that the specific implementations described herein are only used to explain the relevant content, rather than to limit the present disclosure. It should also be noted that, for ease of description, only the parts related to the present disclosure are shown in the accompanying drawings.

[0042] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in the present disclosure can be combined with each other. The technical solution of the present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0043] Unless otherwise specified, the exemplary embodiments / embodiments shown will be understood as providing exemplary features of various details of some ways in which the technical concept of the present disclosure can be implemented in practice. Therefore, unless otherwise specified, the features of the various embodiments / embodiments can be combined, separated, interchanged and / or rearranged without departing from the technical concept of the present disclosure.

[0044] The use of cross-hatching and / or shading in the accompanying drawings is generally used to make the boundaries between adjacent components clear. As such, unless otherwise specified, the presence or absence of cross-hatching or shading does not convey or indicate any preference or requirement for the specific materials, material properties, dimensions, proportions, commonalities between the components shown, and / or any other characteristics, attributes, properties, etc. of the components. In addition, in the accompanying drawings, the sizes and relative sizes of the components may be exaggerated for clarity and / or descriptive purposes. When the exemplary embodiments can be implemented differently, the specific process sequence can be performed in a different order than described. For example, two successively described processes can be performed substantially simultaneously or in an order opposite to the described order. In addition, the same figure numbers represent the same components.

[0045] When a component is referred to as being "on" or "over," "connected to," or "coupled to" another component, the component may be directly on, directly connected to, or directly coupled to the other component, or intervening components may be present. However, when a component is referred to as being "directly on," "directly connected to," or "directly coupled to" another component, there are no intervening components. For this purpose, the term "connected" may refer to a physical connection, an electrical connection, etc., with or without intervening components.

[0046] The terms used herein are for the purpose of describing specific embodiments and are not intended to be restrictive. As used herein, unless the context clearly indicates otherwise, the singular forms "one (kind, person)" and "said (the)" are also intended to include plural forms. In addition, when the terms "comprise" and / or "include" and their variations are used in this specification, it is explained that there are stated features, integral bodies, steps, operations, parts, components and / or their groups, but it is not excluded that there are or add one or more other features, integral bodies, steps, operations, parts, components and / or their groups. It should also be noted that, as used herein, the terms "substantially", "approximately" and other similar terms are used as approximate terms and not as degree terms, so that they are used to explain the inherent deviations of the measured values, calculated values ​​and / or provided values ​​that will be recognized by those of ordinary skill in the art.

[0047] Figure 1 This is a basic structural diagram of the existing neural machine translation system Transformer model. The Transformer model is an end-to-end encoder-decoder framework. The encoder is composed of L layers of identical networks, each of which contains a sublayer based on multi-head attention (MHA mechanism) and a feedforward neural network sublayer. Each sublayer uses residual connection and layer normalization operations. The decoder of the Transformer model also has L layers of identical networks, each of which contains three sublayers. The first sublayer is similar to the first sublayer of the encoder, using the multi-head attention mechanism to encode the information of the target language. Considering that only the generated target words can be referenced during sequence decoding, a mask mechanism is used in this sublayer to mask the content that has not yet been generated. The second sublayer still uses the multi-head attention mechanism to consider the source information output by the encoder. The third sublayer is the same as the second sublayer in the encoder. Finally, the output vector of the L-th layer decoder is linearly transformed and softmax function is used to obtain the predicted probability distribution of the target vocabulary at the current decoding moment.

[0048] Figure 2 It is a structural diagram of a paragraph-level neural machine translation system of an embodiment of the present disclosure, in which the residual connection and layer normalization operation layer are not shown. The paragraph-level neural machine translation system of the embodiment of the present disclosure is based on the sentence-level translation model of Transformer, and introduces a global context extraction module and an encoding-side enhancement module. The global context extraction module is used to extract semantic context vectors and consistency context vectors; the encoding-side enhancement module is used to fuse the semantic context vectors and consistency context vectors in the encoding state vector of the source word. The input of the encoding-side enhancement module is the output of the multi-layer encoder of the Transformer model, and the output of the encoding-side enhancement module is used as the input of the multi-layer decoder of the Transformer model.

[0049] The global context extraction module includes a semantic context vector extraction module and a consistency context vector extraction module. The semantic context vector extraction module is used to extract semantic context vectors, which provide context information of the entire passage to improve the translation quality of the sentence model and assist in the judgment of vocabulary consistency. The consistency context vector extraction module is used to extract consistency context vectors, which specifically use repeated source language word information to impose consistency constraints on the encoding end.

[0050] Figure 3 It is an extraction diagram of a global context extraction module according to an embodiment of the present disclosure. Figure 3 The semantic context vector is extracted by adding a character label before each sentence in the passage. <doc>", using the self-attention mechanism of the Transformer multi-layer encoder, label" <doc>The state vector of " can encode the word information in the sentence; after completing the sentence encoding, the semantic context vector extraction module extracts the " <doc>"The label vector is used as the semantic representation of the sentence, thereby obtaining a set of sentence-level semantic vectors {h1, <doc> ,h2, <doc> ,…,h I , <doc>}; This group of vectors is input into an encoding layer with the same encoder structure as the standard Transformer model to model the semantic associations between sentences, thereby generating a semantic context vector that incorporates global information.

[0051] Figure 3 The consistent context vector is extracted as follows: each group of repeated words in the passage corresponds to a global consistent context vector. If the jth word x in the i-th sentence i,j belongs to the nth group of repeated words in the passage, then the consistent context vector extraction module will extract x i,j The encoding state vector h i,j Extract the corresponding set of repeated word vectors Therefore Contains the encoding state vectors of all the repeated words in the chapter belonging to the nth group; then, generates the global consistency context vector u of the nth group of repeated words n : Among them, the input of MaxPooling(·) is All elements in are pooled by dimension, and the output is a vector. Repeated words belonging to the same group in the passage share the same consistent context vector. The global consistent context vector set of the entire passage is u = {u1, ..., u n }.

[0052] The generated global semantic context vector and consistency context vector are integrated in the neural machine translation model. During the encoding process, the source words belonging to the same group of repeated words refer to the information between each other in the same group to increase the consistency of vocabulary translation. Figure 2 The paragraph-level neural machine translation system of one embodiment of the present disclosure adds an encoding-side enhancement module, which fuses the semantic context vector and the consistency context vector in the encoding state vector of the source word. The input of the encoding-side enhancement module is the output of the multi-layer encoder of the Transformer model, and the output of the encoding-side enhancement module is used as the input of the multi-layer decoder of the Transformer model.

[0053] The encoding enhancement module fuses the semantic context vector and the consistency context vector into the encoding state vector of the source word in the following way: For any word x i,j ,

[0054] If x i,j For repeated words, the group of repeated words to which it belongs is recorded as<i,j> Group, 1≦<i,j> ≦N, then its encoding state vector h i,j The corresponding consistency context vector u <i,j> Integration is done by:

[0055] r i,j =σ(FNN([u <i,j> ;h i,j ]))

[0056]

[0057] where FNN(·) represents a feedforward neural network, σ(·) represents a sigmoid activation function, and [·;·] represents a vector concatenation operation. The encoding state vector after consistency enhancement is denoted as Gate weight r i,j Balance the sentence-level encoding state vector of each word and its corresponding global consistency context vector;

[0058] If x i,j If it is a non-repeated word, its encoding state vector h i,j The semantic context vector v of the sentence in which it is located i To perform the fusion:

[0059] r′ i,j =σ(FNN([v i ;h i,j ]))

[0060]

[0061] where FNN(·) represents a feedforward neural network, σ(·) represents a sigmoid activation function, and [·;·] represents a vector concatenation operation. The encoding state vector after consistency enhancement is denoted as Gate weight r i,j Balance the sentence-level encoding state vector of each word and its corresponding global consistency context vector; for the label " <doc>", directly use v i As its final enhanced encoding state vector.

[0062] The paragraph-level neural machine translation model of an embodiment of the present disclosure can be Figure 4 The method shown here generates a paragraph-level neural machine translation model. Figure 4 It is a flow chart of a method for generating a paragraph-level neural machine translation model according to an embodiment of the present disclosure. The method for generating a paragraph-level neural machine translation model according to an embodiment of the present disclosure comprises the following steps: S1, obtaining a standard sentence-level Transformer translation model through training; wherein the training is performed using data from a training set and a development set; S2, the global context extraction module is used to extract semantic context vectors and consistency context vectors; the encoding-end enhancement module is used to fuse the semantic context vectors and consistency context vectors into the encoding state vector of the source-end word; S3, continuing to train the Transformer translation model to which the global context extraction module and the decoding-end enhancement module are added to optimize the model parameters. The global context extraction module and the encoding-end enhancement module in this embodiment can extract semantic context vectors and consistency context vectors and fuse semantic context vectors and consistency context vectors in the same manner as in the previous embodiment.

[0063] The paragraph-level neural machine of the present disclosure can be implemented using a paragraph-level neural machine translation device. Figure 5 is a structural diagram of a paragraph-level neural machine translation device 1000 according to an embodiment of the present disclosure.

[0064] The device may include a corresponding module for performing each or several steps in the above flowchart. Therefore, each step or several steps in the above flowchart may be performed by a corresponding module, and the device may include one or more modules in these modules. The module may be one or more hardware modules specially configured to perform the corresponding steps, or implemented by a processor configured to perform the corresponding steps, or stored in a computer-readable medium for implementation by a processor, or implemented by some combination.

[0065] The hardware structure can be implemented using a bus architecture. The bus architecture can include any number of interconnecting buses and bridges, depending on the specific application and overall design constraints of the hardware. The bus 1100 connects various circuits including one or more processors 1200, memory 1300, and / or hardware modules together. The bus 1100 can also connect various other circuits 1400 such as peripherals, voltage regulators, power management circuits, external antennas, etc.

[0066] The bus 1100 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Component (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the figure only uses one connecting line, but does not mean that there is only one bus or one type of bus.

[0067] Figure 5 In the passage-level neural machine translation device 1000, the Transformer model 1001 is a sentence-level Transformer translation model obtained by training with a training set and a development set. The semantic context vector extraction module 1002 is used to extract the semantic context vector. The semantic context vector provides the context information of the entire passage to improve the translation quality of the sentence model and assist in the judgment of vocabulary consistency. The consistency context vector extraction module 1003 is used to extract the consistency context vector. The consistency context vector specifically uses repeated source language word information to impose consistency constraints on the encoding end; the encoding end enhancement module 1004 is used to fuse the semantic context vector and the consistency context vector in the encoding state vector of the source end word. The input of the encoding end enhancement module 1004 is the output of the multi-layer encoder of the Transformer model 1001, and the output of the encoding end enhancement module 1004 is used as the input of the multi-layer decoder of the Transformer model 1001.

[0068] Any process or method description in the flowchart or otherwise described herein can be understood as a module, fragment or portion of a code representing one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present disclosure includes other implementations, in which the functions may not be performed in the order shown or discussed, including performing the functions in a substantially simultaneous manner or in a reverse order according to the functions involved, which should be understood by a person skilled in the art of the present disclosure. The processor performs the various methods and processes described above. For example, the method implementation in the present disclosure can be implemented as a software program, which is tangibly contained in a machine-readable medium, such as a memory. In some embodiments, part or all of the software program can be loaded and / or installed via a memory and / or a communication interface. When the software program is loaded into the memory and executed by the processor, one or more steps in the method described above can be performed. Alternatively, in other embodiments, the processor can be configured to perform one of the above methods in any other appropriate manner (e.g., by means of firmware).

[0069] The logic and / or steps represented in the flowchart or otherwise described herein may be embodied in any readable storage medium for use by an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other system that can fetch instructions from and execute instructions on an instruction execution system, apparatus, or device), or in combination with such instruction execution systems, apparatuses, or devices.

[0070] For the purposes of this specification, a "readable storage medium" may be any device that can contain, store, communicate, propagate or transmit a program for use with or in conjunction with an instruction execution system, device or apparatus. More specific examples of readable storage media (a non-exhaustive list) include the following: an electrical connection with one or more wirings (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and editable read-only memory (EPROM or flash memory), a fiber optic device, and a portable read-only memory (CDROM). In addition, the readable storage medium may even be paper or other suitable medium on which the program may be printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a memory.

[0071] It should be understood that the various parts of the present disclosure can be implemented in hardware, software, or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented in software stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0072] A person skilled in the art may understand that all or part of the steps of implementing the above-mentioned implementation method may be completed by instructing related hardware through a program, and the program may be stored in a readable storage medium, which, when executed, includes one or a combination of the steps of the implementation method.

[0073] In addition, each functional unit in each embodiment of the present disclosure may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a readable storage medium. The storage medium may be a read-only memory, a disk or an optical disk, etc.

[0074] The present disclosure also provides an electronic device, including: a memory, the memory storing execution instructions; and a processor or other hardware module, the processor or other hardware module executes the execution instructions stored in the memory, so that the processor or other hardware module executes the above method.

[0075] The present disclosure also provides a readable storage medium, in which execution instructions are stored. When the execution instructions are executed by a processor, they are used to implement the above method.

[0076] In the description of this specification, the description with reference to the terms "one embodiment / method", "some embodiments / methods", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment / method or example are included in at least one embodiment / method or example of the present application. In this specification, the schematic representations of the above terms are not necessarily the same embodiment / method or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments / methods or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments / methods or examples described in this specification and the features of the different embodiments / methods or examples, unless they are contradictory.

[0077] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, "plurality" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0078] Those skilled in the art should understand that the above embodiments are only for the purpose of clearly illustrating the present disclosure, and are not intended to limit the scope of the present disclosure. For those skilled in the art, other changes or modifications may be made based on the above disclosure, and these changes or modifications are still within the scope of the present disclosure.< / doc> < / doc> < / doc> < / doc> < / doc> < / doc> < / doc> < / doc> < / doc> < / doc> < / doc> < / doc> < / doc> < / doc>

Claims

1. A paragraph-level neural machine translation system, characterized in that: include: The global context extraction module is used to extract semantic context vectors and consistency context vectors; An encoding-end enhancement module, used for fusing a semantic context vector and a consistency context vector into an encoding state vector of a source-end word, wherein the input of the encoding-end enhancement module is the output of a multi-layer encoder of a Transformer model, and the output of the encoding-end enhancement module is used as the input of a multi-layer decoder of the Transformer model; The semantic context vector is extracted by adding a character tag before each sentence in the passage. <doc>", using the self-attention mechanism of the Transformer multi-layer encoder, label" <doc>The state vector of " can encode the word information in the sentence; after completing the sentence encoding, the semantic context vector extraction module extracts the " <doc>"The label vector is used as the semantic representation of the sentence, thereby obtaining a set of sentence-level semantic vectors {h 1, <doc>< / doc> ,h 2, <doc>< / doc> ,…,h I, <doc>< / doc> }; This set of vectors is input into an encoding layer with the same encoder structure as the standard Transformer model to model the semantic associations between sentences, thereby generating a semantic context vector that incorporates global information;< / doc> < / doc> < / doc> The consistency context vector is extracted in the following way: each group of repeated words in the passage corresponds to a global consistency context vector, if the jth word x in the i-th sentence i,j belongs to the nth group of repeated words in the passage, then the consistent context vector extraction module will extract x i,j The encoding state vector h i,j Extract the corresponding set of repeated word vectors Therefore Contains the encoding state vectors of all the repeated words in the chapter belonging to the nth group; then, generates the global consistency context vector u of the nth group of repeated words n : Among them, the input of MaxPooling(·) is All elements in are pooled by dimension, and the output is a vector. Repeated words belonging to the same group in the passage share the same consistent context vector. The global consistent context vector set of the entire passage is u = {u1, ..., u n }; The encoding enhancement module fuses the semantic context vector and the consistency context vector into the encoding state vector of the source word in the following way: For any word x i,j , If x i,j For repeated words, the group of repeated words to which it belongs is recorded as<i,j> Group, 1 ≦<i,j> ≦N, then its encoding state vector h i,j The corresponding consistency context vector u <i,j> Integration is achieved by: r i,j σ(FNN([u <i,j> h i,j ])) where FNN(·) represents a feedforward neural network, σ(·) represents a sigmoid activation function, and [·;·] represents a vector concatenation operation. The encoding state vector after consistency enhancement is denoted as Gate weight r i,j Balance the sentence-level encoding state vector of each word and its corresponding global consistency context vector; If x i , j is a non-repeated word, then its encoding state vector h i , j and its semantic context vector v i To perform the fusion: r′ i,j =σ(FNN([v i ;h i,j ])) For the tag " <doc>", directly use v j As its final enhanced encoding state vector.< / doc> 2. The paragraph-level neural machine translation system according to claim 1, characterized in that: The semantic context vector provides context information of the entire passage to improve the translation quality of the sentence model and assist in determining vocabulary consistency.

3. The paragraph-level neural machine translation system according to claim 1, characterized in that: The consistency context vector specifically utilizes repeated source language word information to impose consistency constraints on the encoding end.

4. The paragraph-level neural machine translation system according to claim 1, characterized in that: The global context extraction module includes a semantic context vector extraction module and a consistency context vector extraction module.

5. A paragraph-level neural machine translation method, characterized in that: Used to perform paragraph-level neural machine translation through the paragraph-level neural machine translation system described in any one of claims 1 to 4.

6. An electronic device, characterized in that: include: A memory storing execution instructions; as well as A processor, wherein the processor executes the execution instructions stored in the memory so that the processor executes the paragraph-level neural machine translation method as claimed in claim 5.

7. A readable storage medium, characterized in that: The readable storage medium stores execution instructions, which, when executed by a processor, are used to implement the paragraph-level neural machine translation method as claimed in claim 5.