Regulation retelling matching method and device

Through the context character representation and language knowledge attention model, combined with the nuclear power professional vocabulary database, the text matching difficulty when retelling by nuclear power plant maintenance personnel is solved, precise semantic matching between the retelling text and the original text is achieved, and the matching accuracy is improved.

CN118673906APending Publication Date: 2024-09-20CHINA NUCLEAR POWER OPERATION TECH CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311655934.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-01
Publication Date
2024-09-20

AI Technical Summary

Technical Problem

When nuclear power plant maintenance personnel retell procedure documents, the traditional text matching algorithm cannot adapt to the retelling habit, resulting in deviations between the retelling text and the original text. In particular, the polysemy of words in short texts is difficult to be captured by the model, resulting in difficulty in semantic matching.

Method used

The attention pooling model of contextual character representation is used to calculate word embedding and semantic embedding. Combined with the nuclear power professional vocabulary library and the language knowledge attention model, the feature vectors of characters and words are processed through multi-dimensional attention and layer normalization to achieve semantic knowledge enhancement. Character representation,and sentence matching using multi-angle cosine distance.

Benefits of technology

It achieves accurate semantic matching between the retelling text and the original text, solves the problem of lexical ambiguity, improves the accuracy and reliability of text matching, and is suitable for retelling scenarios in nuclear power plants.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118673906A
    Figure CN118673906A
Patent Text Reader

Abstract

The invention belongs to the technical field of nuclear power, and particularly relates to a regulation retelling matching method and device. The invention provides a rule retelling matching method based on deep learning and a cosine similarity matching algorithm. Semantic information of words is integrated. According to word lattice graph feature expression, text information is expressed as a graph structure, and the relation between vocabularies can be expressed through edges of a graph. The language knowledge attention model can associate contexts and deal with ambiguity of words, so that fuzzy matching of the words and words of the text is realized, and accurate matching of semantics of the text is realized. In addition, by combining a nuclear power specialized vocabulary library, regulation text graph structure representation and a pre-training language model, the method is used for solving the problem that during personnel retelling, a retelling text and an original regulation text are the same in semantics, different in vocabulary and difficult to accurately match.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of nuclear power, and in particular relates to a procedure repeat matching method and device. Background Art

[0002] In the related art, nuclear power plant maintenance personnel will repeat the contents of the procedure documents before repairing the equipment to deepen their understanding of the contents of the procedure and avoid the occurrence of erroneous operations due to unfamiliarity. Usually, maintenance personnel reorganize the language according to their own understanding to express the meaning of the contents of the procedure, so there is a certain deviation between the repeated text and the actual text content. The traditional text matching algorithm uses exact matching, that is, one-to-one correspondence between words, which cannot be applied to the repetition habits of nuclear power plant maintenance personnel. Secondly, nuclear power plant procedures are composed of short texts. The polysemy problem in short texts is more serious than that in long texts, because short texts usually have less contextual information, so it is difficult for the model to capture the correct semantics. Word-based models usually encounter some potential problems caused by word segmentation. Summary of the invention

[0003] In order to overcome the problems existing in the related art, a procedure repetition matching method and device are provided.

[0004] According to one aspect of an embodiment of the present disclosure, a procedure repetition matching method is provided, the method comprising:

[0005] Step 1: Perform word embedding calculation and semantic embedding calculation on the input text pair, including:

[0006] The attention pooling model represented by the contextual characters represents the i-th character xi in the input text with a feature vector wi. wi consists of some consecutive character tokens {ct1, ct1+1, ···, ct2}. For each character c in wi k , t1≤k≤t2, a two-layer feedforward network (FFN) is used to calculate a feature-based score vector C k , and then use formula 1 to determine the character c k The score vector C k The normalized score U k :

[0007] U k =MD-softmax k (FFN(C k )) Formula 1;

[0008] Use formula 2 to convert character c k The score vector C k With the normalized score U k Weighted, get the context word vector v of wi i:

[0009]

[0010] The Att-Pooling(·) pooling function is used to transform the context word vector to reduce the feature dimension of the word vector. The final output is a low-dimensional context word vector V i ;

[0011] V i =Att-Pooling({c k |t 1 ≤k≤t 2})

[0012] Step 2, introduction of nuclear power professional vocabulary: For each word wi, the word sense set of wi is represented as S(wi) = {si,1, si,2, ···, si,K}, si,k is the kth sememe of wi, and the sememe is represented as the smallest semantic unit of a word, indicating that its corresponding sememe is O(si,k). Formula 3 is used to determine the multi-dimensional attention O(si,k) of each sememe:

[0013]

[0014] Where e is the embedding vector of the sememe o;

[0015] We use Equation 4 to perform attention pooling on all sememes to get the embedding of each sememe si,k:

[0016]

[0017] Step 3: Build a language knowledge attention model, including:

[0018] Step 31, using formula 5 to update the semantic expression, the expression of the word is updated according to the context in the sentence, and each word meaning will first aggregate the useful information of the word from the forward and backward directions of the character xi;

[0019]

[0020] Where h represents the feature vector of the text in the hidden layer, and the two multidimensional attention functions MD-GAT(·) have different parameters.

[0021] Step 32, using formula 6 to update the word representation, after multiple iterations, the final word representation contains not only context word information but also semantic knowledge; for each sentence, hi is used to represent the final word representation;

[0022]

[0023] Step 4: After obtaining the semantic knowledge enhanced word representation of each sentence, use Formula 7 to fuse these word information into the feature vector expression of the character, so as to obtain the semantic knowledge enhanced character representation y t ;

[0024]

[0025] Where LayerNorm(·) represents layer normalization, c a t is the contextual character representation obtained using BERT; for each character c a t , using formula 8 to use multi-dimensional attention from sentence C a and C b Aggregate information;

[0026]

[0027] The above multi-dimensional attention function MD-GAT(·) shares the same parameters. Through this sharing mechanism, the model has a good property that when two sentences match completely:

[0028] Use multi-angle cosine distance for comparison: Through P distances d 1 d 2 、···、d P , and get the final character representation:

[0029]

[0030] The final character representation includes: the context information of the character, the word meaning knowledge of the character and the character-level similarity; for each sentence C a or C b , use the attention pooling of all the final character representations of the sentence to get the sentence representation vector r a or b ;

[0031] Formula 10 is used to predict the similarity between the original text and the paraphrase sentence;

[0032] p=FFN([c cls ,r a ,r b ,r a ⊙r b ,|r a -r b |]) Formula 10

[0033] Where FFN(·) is a feed-forward network with two hidden layers and a sigmoid activation after the output layer, and the training objective is to minimize the binary cross entropy loss:

[0034]

[0035] According to another aspect of an embodiment of the present disclosure, a procedure repetition matching device is provided, the device comprising:

[0036] The word grid graph expression module is used to perform word embedding and semantic embedding calculations on input text pairs, including:

[0037] The attention pooling model represented by the contextual characters represents the i-th character xi in the input text with a feature vector wi. wi consists of some consecutive character tokens {ct1, ct1+1, ···, ct2}. For each character c in wi k , t1≤k≤t2, a two-layer feedforward network (FFN) is used to calculate a feature-based score vector C k , and then use formula 1 to determine the character c k The score vector C k The normalized score U k :

[0038] U k =MD-softmax k (FFN(C k )) Formula 1;

[0039] Use formula 2 to convert character c k The score vector C k With the normalized score U k Weighted, get the context word vector v of wi i :

[0040]

[0041] The Att-Pooling(·) pooling function is used to transform the context word vector to reduce the feature dimension of the word vector. The final output is a low-dimensional context word vector V i ;

[0042] V i =Att-Pooling({c k |t 1 ≤k≤t 2})

[0043] The nuclear power professional vocabulary introduction module is used to introduce the nuclear power professional vocabulary library: for each word wi, the word meaning set of wi is represented as S(wi) = {si,1, si,2, ···, si,K}. si,k is the kth semantic primitive of wi, and the semantic primitive is represented as the smallest semantic unit of a word. The corresponding semantic primitive is O(si,k). Formula 3 is used to determine the multi-dimensional attention O(si,k) of each semantic primitive:

[0044]

[0045] Where e is the embedding vector of the sememe o;

[0046] We use Equation 4 to perform attention pooling on all sememes to get the embedding of each sememe si,k:

[0047]

[0048] The language knowledge attention module is used to build a language knowledge attention model, including:

[0049] Formula 5 is used to update the semantic expression. The expression of the word is updated according to the context in the sentence. Each word meaning will first aggregate the useful information of the word from the forward and backward of the character xi;

[0050]

[0051] Where h represents the feature vector of the text in the hidden layer. The two multidimensional attention functions MD-GAT(·) have different parameters.

[0052] Formula 6 is used to update the word representation. After multiple iterations, the final word representation contains not only the context word information but also the semantic knowledge. For each sentence, hi is used to represent the final word representation;

[0053]

[0054] The sentence matching layer is used to obtain the word representation enhanced by semantic knowledge of each sentence, and then fuse these word information into the feature vector expression of the character using Formula 7 to obtain the character representation enhanced by semantic knowledge y t .

[0055]

[0056] Where LayerNorm(·) represents layer normalization, c a t are the contextual character representations obtained using BERT.

[0057] For each character c at , using formula 8 to use multi-dimensional attention from sentence C a and C b Aggregate information.

[0058]

[0059] The above multi-dimensional attention function MD-GAT(·) shares the same parameters. Through this sharing mechanism, the model has a good property that when two sentences match completely:

[0060] Use multi-angle cosine distance for comparison: Through P distances d 1 d 2 、···、d P , and get the final character representation:

[0061]

[0062] The final character representation contains: the context information of the character, the word meaning knowledge of the character, and the character-level similarity. For each sentence C a or C b , use the attention pooling of all the final character representations of the sentence to get the sentence representation vector r a or b .

[0063] The sentence matching layer and relation classifier use Equation 10 to predict the similarity between the original text and the paraphrase sentence;

[0064] p=FFN([c cls ,r a ,r b ,r a ⊙r b ,|r a -r b |]) Formula 10

[0065] where FFN(·) is a feed-forward network with two hidden layers and a sigmoid activation after the output layer.

[0066] According to another aspect of an embodiment of the present disclosure, a procedure repetition matching device is provided, the device comprising:

[0067] processor;

[0068] a memory for storing processor-executable instructions;

[0069] Wherein, the processor is configured to execute the above method.

[0070] According to another aspect of an embodiment of the present disclosure, a non-volatile computer-readable storage medium is provided, on which computer program instructions are stored, and the computer program instructions implement the above method when executed by a processor.

[0071] The beneficial effects of the present disclosure are as follows: the present disclosure proposes a procedure repetition matching method based on deep learning and cosine similarity matching algorithm, integrating the semantic information of words. Among them, the word grid graph feature expression expresses text information as a graph structure, and the relationship between words can be represented by the edges of the graph. The language knowledge attention model can connect the context and deal with the ambiguity of words, realize fuzzy matching of words in the text, and accurately match the semantics of the text. In addition, the present disclosure combines the nuclear power professional vocabulary library, the procedure text graph structure representation and the pre-trained language model to solve the problem that when personnel retell, the retelling text has the same semantics as the original procedure text, but different vocabulary, and it is difficult to accurately match. BRIEF DESCRIPTION OF THE DRAWINGS

[0072] Figure 1 The present invention is a flowchart of a procedure repetition matching method according to an exemplary embodiment.

[0073] Figure 2 The invention is a block diagram of a procedure repeating and matching device according to an exemplary embodiment. DETAILED DESCRIPTION

[0074] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0075] Figure 1 is a flowchart of a procedure repetition matching method according to an exemplary embodiment. The method can be executed by a terminal device, wherein the terminal device can be a server, a desktop computer, a laptop computer, a tablet computer, etc. The terminal device can also be, for example, a user device, a vehicle-mounted device or a wearable device, etc. The embodiment of the present disclosure does not limit the type of the terminal device. Figure 1 As shown, the method includes:

[0076] Step 1: Perform word embedding calculation and semantic embedding calculation on the input text pair, including:

[0077] The attention pooling model represented by the contextual characters represents the i-th character xi in the input text with a feature vector wi. wi consists of some consecutive character tokens {ct1, ct1+1, ···, ct2}. For each character c in wi k (t1≤k≤t2), a two-layer feed-forward network (FFN) is used to calculate a feature-based score vector C k, and then normalize it using a feature-based multidimensional softmax function (such as MD-softmax).

[0078] For example, the character c can be determined by formula 1 k The score vector C k The normalized score U k :

[0079] U k =MD=softmax k (FFN(C k )) Formula 1

[0080] Among them, MD-softmax() is a function calculation formula used to determine the character c k The score vector C k The normalized score U k .

[0081] Use formula 2 to convert character c k The score vector C k With the normalized score U k Weighted, get the context word vector v of wi i :

[0082]

[0083] The Att-Pooling(·) pooling function is used to transform the context word vector to reduce the feature dimension of the word vector. The final output is a low-dimensional context word vector V i .

[0084] V i =Att-Pooling({c k |t 1 ≤kt 2})

[0085] Step 2: Introduction of nuclear power professional vocabulary database:

[0086] For each word wi, the word sense set of wi is represented as S(wi) = {si,1, si,2, ..., si,K}. si,k is the kth sememe of wi, and the sememe can be represented as the smallest semantic unit of a word. Its corresponding sememe is O(si,k). Formula 3 is used to determine the multi-dimensional attention O(si,k) of each sememe:

[0087]

[0088] Where e is the embedding vector of the sememe o.

[0089] We use Equation 4 to perform attention pooling on all sememes to get the embedding of each sememe si,k:

[0090]

[0091] Step 3, language knowledge attention model, including:

[0092] Step 31, update the semantic expression using Formula 5. Update the expression of the word according to the context in the sentence. Each word meaning will first aggregate the useful information of the word from the forward and backward directions of the character xi.

[0093]

[0094] Where h represents the feature vector of the text in the hidden layer. The two multidimensional attention functions MD-GAT(·) have different parameters.

[0095] [·,·] represents the concatenation of vectors. It is worth noting that m is not used directly. i,k As a new representation g i,k The reason is that m i,k It only contains contextual information and needs to use a gate, such as GRU, to control the fusion of contextual information and semantic information.

[0096] Step 32, update the word representation using formula 6. After multiple iterations, the final word representation contains not only context word information but also semantic knowledge. For each sentence, hi is used to represent the final word representation.

[0097]

[0098] Step 4: After obtaining the semantic knowledge enhanced word representation of each sentence, use Formula 7 to fuse these word information into the feature vector expression of the character, so as to obtain the semantic knowledge enhanced character representation y t .

[0099]

[0100] Where LayerNorm(·) represents layer normalization, c a t are the contextual character representations obtained using BERT.

[0101] For each character c a t , using formula 8 to use multi-dimensional attention from sentence C a and C b Aggregate information.

[0102]

[0103] The above multi-dimensional attention function MD-GAT(·) shares the same parameters. Through this sharing mechanism, the model has a good property that when two sentences match completely:

[0104] Use multi-angle cosine distance for comparison: Through P distances d 1 ,d 2 、···、d P , we can get the final character representation as shown in formula 9:

[0105]

[0106] The final character representation contains: the context information of the character, the word meaning knowledge of the character, and the character-level similarity. For each sentence C a or C b , use the attention pooling of all the final character representations of the sentence to get the sentence representation vector r a or b .

[0107] Formula 10 is used to predict the similarity between the original text and the paraphrase sentence.

[0108] p=FFN([c cls ,r a ,r b ,r a ⊙r b ,|r a -r b |]) Formula 10

[0109] Where FFN(·) is a feed-forward network with two hidden layers and a sigmoid activation after the output layer. The training goal is to minimize the binary cross entropy loss:

[0110]

[0111] The present invention proposes a comprehensive method, which combines a nuclear power professional vocabulary library, a graph structure representation of a procedure text and a pre-trained language model, to solve the problem that when a person repeats, the retelling text has the same semantics as the original procedure text, but different vocabulary, making it difficult to accurately match.

[0112] In a possible implementation, a procedure repetition matching device is provided, characterized in that the device comprises:

[0113] The word grid graph expression module is used to perform word embedding and semantic embedding calculations on input text pairs, including:

[0114] The attention pooling model represented by the contextual characters represents the i-th character xi in the input text with a feature vector wi. wi consists of some consecutive character tokens {ct1, ct1+1, ···, ct2}. For each character c in wi k , t1≤k≤t2, a two-layer feedforward network (FFN) is used to calculate a feature-based score vector C k , and then use formula 1 to determine the character c k The score vector C k The normalized score U k :

[0115] U k =MD-softmax k (FFN(C k )) Formula 1;

[0116] Use formula 2 to convert character c k The score vector C k With the normalized score U k Weighted, get the context word vector v of wi i :

[0117]

[0118] The Att-Pooling(·) pooling function is used to transform the context word vector to reduce the feature dimension of the word vector. The final output is a low-dimensional context word vector V i ;

[0119] V i =Att-Pooling({c k |t 1 ≤k≤t 2})

[0120] The nuclear power professional vocabulary introduction module is used to introduce the nuclear power professional vocabulary library: for each word wi, the word meaning set of wi is represented as S(wi) = {si,1, si,2, ···, si,K}. si,k is the kth semantic primitive of wi, and the semantic primitive is represented as the smallest semantic unit of a word. The corresponding semantic primitive is O(si,k). Formula 3 is used to determine the multi-dimensional attention O(si,k) of each semantic primitive:

[0121]

[0122] Where e is the embedding vector of the sememe o;

[0123] We use Equation 4 to perform attention pooling on all sememes to get the embedding of each sememe si,k:

[0124]

[0125] The language knowledge attention module is used to build a language knowledge attention model, including:

[0126] Formula 5 is used to update the semantic expression. The expression of the word is updated according to the context in the sentence. Each word meaning will first aggregate the useful information of the word from the forward and backward of the character xi;

[0127]

[0128] Where h represents the feature vector of the text in the hidden layer. The two multidimensional attention functions MD-GAT(·) have different parameters.

[0129] Formula 6 is used to update the word representation. After multiple iterations, the final word representation contains not only the context word information but also the semantic knowledge. For each sentence, hi is used to represent the final word representation;

[0130]

[0131] The sentence matching layer is used to obtain the word representation enhanced by semantic knowledge of each sentence, and then fuse these word information into the feature vector expression of the character using Formula 7 to obtain the character representation enhanced by semantic knowledge y t .

[0132]

[0133] Where LayerNorm(·) represents layer normalization, c a t are the contextual character representations obtained using BERT.

[0134] For each character c a t , using formula 8 to use multi-dimensional attention from sentence C a and C b Aggregate information.

[0135]

[0136] The above multi-dimensional attention function MD-GAT(·) shares the same parameters. Through this sharing mechanism, the model has a good property that when two sentences match completely:

[0137] Use multi-angle cosine distance for comparison: Through P distances d 1 ,d 2 、···、d P, and get the final character representation:

[0138]

[0139] The final character representation contains: the context information of the character, the word meaning knowledge of the character, and the character-level similarity. For each sentence C a or C b , use the attention pooling of all the final character representations of the sentence to get the sentence representation vector r a or b .

[0140] The sentence matching layer and relation classifier use Equation 10 to predict the similarity between the original text and the paraphrase sentence;

[0141] p=FFN([c cls ,r a ,r b ,r a ⊙r b ,|r a -r b |]) Formula 10

[0142] where FFN(·) is a feed-forward network with two hidden layers and a sigmoid activation after the output layer.

[0143] The description of the above-mentioned device has been explained in detail in the description of the above-mentioned method, and will not be repeated here.

[0144] Figure 2 1900 is a block diagram of a protocol repeat matching device according to an exemplary embodiment. For example, the device 1900 may be provided as a server. Figure 2 , the apparatus 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by a memory 1932 for storing instructions, such as an application, that can be executed by the processing component 1922. The application stored in the memory 1932 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute instructions to perform the above method.

[0145] The device 1900 may also include a power supply component 1926 configured to perform power management of the device 1900, a wired or wireless network interface 1950 configured to connect the device 1900 to a network, and an input / output (I / O) interface 1958. The device 1900 may operate based on an operating system stored in the memory 1932, such as Windows Server™, MacOS X™, Unix™, Linux™, FreeBSD™, or the like.

[0146] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 1932 including computer program instructions, which can be executed by the processing component 1922 of the device 1900 to perform the above method.

[0147] The present disclosure may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.

[0148] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.

[0149] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.

[0150] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.

[0151] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.

[0152] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0153] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0154] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.

[0155] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.

Claims

1. A procedure repetition matching method, characterized in that: The method comprises: Step 1: Perform word embedding calculation and semantic embedding calculation on the input text pair, including: The attention pooling model represented by the contextual characters represents the i-th character xi in the input text with a feature vector wi. wi consists of some consecutive character tokens {ct1, ct1+1, ···, ct2}. For each character c in wi k , t1≤k≤t2, a two-layer feedforward network (FFN) is used to calculate a feature-based score vector C k , and then use formula 1 to determine the character c k The score vector C k The normalized score U k : U k =MD-softmax k (FFN(C k )) Formula 1; Use formula 2 to convert character c k The score vector C k With the normalized score U k Weighted, get the context word vector v of wi i : The Att-Pooling(·) pooling function is used to transform the context word vector to reduce the feature dimension of the word vector. The final output is a low-dimensional context word vector V i ; V i =Att-Pooling({c k |t1≤k≤t2}) Step 2, introduction of nuclear power professional vocabulary: For each word wi, the word sense set of wi is represented as S(wi) = {si,1, si,2, ···, si,K}, si,k is the kth sememe of wi, and the sememe is represented as the smallest semantic unit of a word, indicating that its corresponding sememe is O(si,k). Formula 3 is used to determine the multi-dimensional attention O(si,k) of each sememe: Where e is the embedding vector of the sememe o; We use Equation 4 to perform attention pooling on all sememes to get the embedding of each sememe si,k: Step 3: Build a language knowledge attention model, including: Step 31, using formula 5 to update the semantic expression, the expression of the word is updated according to the context in the sentence, and each word meaning will first aggregate the useful information of the word from the forward and backward directions of the character xi; Where h represents the feature vector of the text in the hidden layer, and the two multidimensional attention functions MD-GAT(·) have different parameters. Step 32, using formula 6 to update the word representation, after multiple iterations, the final word representation contains not only context word information but also semantic knowledge; for each sentence, hi is used to represent the final word representation; Step 4: After obtaining the semantic knowledge enhanced word representation of each sentence, use Formula 7 to fuse these word information into the feature vector expression of the character, so as to obtain the semantic knowledge enhanced character representation y t ; Where LayerNorm(·) represents layer normalization, c a t is the contextual character representation obtained using BERT; for each character c a t , using formula 8 to use multi-dimensional attention from sentence C a and C b Aggregate information; The above multi-dimensional attention function MD-GAT(·) shares the same parameters. Through this sharing mechanism, the model has a good property that when two sentences match completely: Use multi-angle cosine distance for comparison: Through P distances d1, d2, ..., d P , and get the final character representation: The final character representation includes: the context information of the character, the word meaning knowledge of the character and the character-level similarity; for each sentence C a or C b , use the attention pooling of all the final character representations of the sentence to get the sentence representation vector r a or b ; Formula 10 is used to predict the similarity between the original text and the paraphrase sentence; p=FFN([c cls ,r a ,r b ,r a ⊙r b ,|r a -r b |]) Formula 10 Where FFN(·) is a feed-forward network with two hidden layers and a sigmoid activation after the output layer, and the training objective is to minimize the binary cross entropy loss:

2. A procedure repetition matching device, characterized in that: The device comprises: The word grid graph expression module is used to perform word embedding and semantic embedding calculations on input text pairs, including: The attention pooling model represented by the contextual characters represents the i-th character xi in the input text with a feature vector wi. wi consists of some consecutive character tokens {ct1, ct1+1, ···, ct2}. For each character c in wi k , t1≤k≤t2, a two-layer feedforward network (FFN) is used to calculate a feature-based score vector C k , and then use formula 1 to determine the character c k The score vector C k The normalized score U k : U k =MD-softmax k (FFN(C k )) Formula 1; Use formula 2 to convert character c k The score vector C k With the normalized score U k Weighted, get the context word vector v of wi i : The Att-Pooling(·) pooling function is used to transform the context word vector to reduce the feature dimension of the word vector. The final output is a low-dimensional context word vector V i ; V i =Att-Pooling({c k |t1≤k≤t2}) The nuclear power professional vocabulary introduction module is used to introduce the nuclear power professional vocabulary library: for each word wi, the word meaning set of wi is represented as S(wi) = {si,1, si,2, ···, si,K}; si,k is the kth sememe of wi, and the sememe is represented as the smallest semantic unit of a word; the corresponding sememe is represented as O(si,k); Formula 3 is used to determine the multi-dimensional attention O(si,k) of each sememe: Where e is the embedding vector of the sememe o; We use Equation 4 to perform attention pooling on all sememes to get the embedding of each sememe si,k: The language knowledge attention module is used to build a language knowledge attention model, including: Formula 5 is used to update the semantic expression; the expression of the word is updated according to the context in the sentence; each word meaning will first aggregate the useful information of the word from the forward and backward directions of the character xi; Where h represents the feature vector of the text in the hidden layer; where the two multidimensional attention functions MD-GAT(·) have different parameters; Formula 6 is used to update the word representation. After multiple iterations, the final word representation contains not only the context word information but also the semantic knowledge. For each sentence, hi is used to represent the final word representation. The sentence matching layer is used to obtain the word representation enhanced by semantic knowledge of each sentence, and then fuse these word information into the feature vector expression of the character using Formula 7 to obtain the character representation enhanced by semantic knowledge y t ; Where LayerNorm(·) represents layer normalization, c a t is the contextual character representation obtained using BERT; for each character c a t , using formula 8 to use multi-dimensional attention from sentence C a and C b Aggregate information; The above multi-dimensional attention function MD-GAT(·) shares the same parameters. Through this sharing mechanism, the model has a good property that when two sentences match completely: Use multi-angle cosine distance for comparison: Through P distances d1, d2, ..., d P , and get the final character representation: The final character representation includes: the context information of the character, the word meaning knowledge of the character and the character-level similarity; for each sentence C a or C b , use the attention pooling of all the final character representations of the sentence to get the sentence representation vector r a or b ; The sentence matching layer and relation classifier use Equation 10 to predict the similarity between the original text and the paraphrase sentence; p=FFN([c cls ,r a ,r b ,r a ⊙r b ,|r a -r b |]) Formula 10 where FFN(·) is a feed-forward network with two hidden layers and a sigmoid activation after the output layer.

3. A procedure repetition matching device, characterized in that: The device comprises: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to execute the method of claim 1.

4. A non-volatile computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method of claim 1 is implemented.