Text knowledge extraction method based on multi-dimensional characteristics of Chinese characters

Through the text knowledge extraction method based on multi-dimensional features of Chinese characters, combined with the Flat-lattice structure and Co-Transformer model, the attention score function is optimized, and the trigger rules and trigger words are combined to solve the problem of inaccurate feature extraction and inaccurate relationship prediction in Chinese knowledge extraction. problem, improving the accuracy and versatility of extraction.

CN118535691AInactive Publication Date: 2024-08-23NANJING UNIV OF AERONAUTICS & ASTRONAUTICS
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202410537641.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-30
Publication Date
2024-08-23
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing technology ignores the overall semantics of the sentence in Chinese knowledge extraction, resulting in inaccurate Chinese character feature extraction and inaccurate relationship prediction. Moreover, manual-assisted recognition requires professional knowledge, making it difficult to achieve efficient extraction.

Method used

Using a text knowledge extraction method based on multi-dimensional features of Chinese characters, using the Chinese character dictionary database and Chinese database to extract structural features and glyph features, bidirectional input through the Flat-lattice structure and Co-Transformer model, optimizing the attention score function, combining trigger rules and triggers Words are used for relation extraction.

Benefits of technology

It improves the accuracy of named entity recognition and relationship prediction, solves the problems of fuzzy Chinese character feature extraction and inaccurate relationship prediction, and reduces dependence on professional knowledge.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118535691A
    Figure CN118535691A
Patent Text Reader

Abstract

The invention relates to a text knowledge extraction method based on Chinese character multi-dimensional features, which comprises the following steps of: extracting character multi-dimensional information: respectively extracting Chinese character radical feature information and font feature information by using a convolutional neural network and VGG16; the method comprises the following steps: extracting context position information by utilizing a Flat-slice structure; a neural network model of Co-Transform bidirectional coding data is used to carry out modeling and extraction on a plurality of input features. And for the optimal tag sequence, carrying out global prediction through a CRF model. And extracting the relationship between the entities, and carrying out joint extraction by using a mode based on a trigger word and a trigger rule. According to the method, deep semantic coding of multiple dimensions of Chinese characters is realized, and the accuracy of entity recognition is improved; multi-dimensional information is efficiently compounded by using an improved neural network, and the relevance of dispersed entities in a complex text is improved; for multi-dimensional complex information, an attention function and an extraction rule are optimized, and the accuracy of knowledge extraction is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention discloses a text knowledge extraction method based on multi-dimensional features of Chinese characters, which relates to the field of natural language processing Background Art

[0002] In the field of natural language processing, knowledge extraction has always been an important part of this field, and it is necessary to study the knowledge of knowledge extraction. Most of the existing research on named entity recognition tasks focuses on extracting single-dimensional Chinese character features to achieve entity extraction tasks, while ignoring the overall semantics of the sentence. In the task of relation extraction, deep learning-based methods are mainly used to adjust variable parameters for specific test sets. Such methods have great limitations in terms of versatility and accuracy.

[0003] In the Chinese field, due to the complexity of Chinese characters’ grammar and glyphs, the extracted text triples often fail to meet expectations or the relationships between entities are incorrect. In addition, in the face of massive amounts of Chinese text data, manual assisted recognition requires personnel to have professional domain knowledge, which is not feasible in reality. Summary of the invention

[0004] In view of the above technical problems, the present invention proposes a text knowledge extraction method based on the multi-dimensional features of Chinese characters to solve the main problems in the field of Chinese knowledge extraction. It uses a Chinese character dictionary database and a Chinese database to extract text features, bidirectionally transmits multi-dimensional Chinese text features to Co-Transformer, optimizes the self-attention score function, performs named entity recognition, and solves the problem of fuzzy entity extraction; by introducing rule databases in different Chinese fields, based on trigger rules and trigger words, it solves the problem of inaccurate relationship prediction between entities.

[0005] To achieve the above-mentioned purpose, the technical solution adopted by the present invention is as follows:

[0006] A text knowledge extraction method based on multi-dimensional features of Chinese characters, the method comprising the following steps:

[0007] S1, using a manually annotated Chinese character dictionary database and a public Chinese database as original text, preprocessing the original text to obtain structural features and character shape features, and obtaining a feature vector after fusion;

[0008] S2, using the preprocessed text information, constructs a weight matrix about semantic similarity and contextual semantic information through the Flat-lattice structure, and obtains the weighted summation encoding representation;

[0009] S3, jointly embedding the feature vector and the encoding representation into the Co-Transformer encoding layer, and obtaining the output result of the encoding layer, i.e., the classification label sequence, by bidirectionally inputting Lattice information and fusion features and combining the optimized attention score function;

[0010] S4, using the classification label sequence output by the model, the CRF model is combined with the global prediction to predict the optimal label sequence;

[0011] S5, through the relation extraction of triggering rules, combined with the special rules of the extracted target text field, returns the triple information.

[0012] Furthermore, the step S1 specifically includes the following contents:

[0013] Splitting a single Chinese character in the original text to obtain a number of radicals, each of which is set as a structural component SC of the Chinese character; inputting the structural component SC into a CNN network, and obtaining radical features through a maximum pooling layer and a fully connected layer;

[0014] Then extract the glyph feature part, use the VGG16 network with increased channel number, convert the input image into a 50-dimensional vector representation, reduce the radical features and glyph features to the same dimension, and concatenate the radical features and glyph features into a new high-dimensional Chinese character enhanced feature vector.

[0015] Furthermore, the step S2 specifically includes the following contents:

[0016] Input the preprocessed text information into the Flat-lattice structure and use h i Indicates the word head position, use t i Indicates the end position of the word, and obtains the position encoding formula:

[0017]

[0018]

[0019]

[0020] In the above formula, R ij Represents relative position encoding, W r is a learnable parameter, p is an enhanced position encoding vector, and d represents the head i -head j 、head i -tail j 、tail i -head j 、tail i -tail j, Represents vector concatenation operation; through the above formula, the three relationships of position information: intersection, inclusion, and separation are encoded by relative position R ij Express it.

[0021] Furthermore, the feature vector and the encoding representation are jointly embedded into the Co-Transformer encoding layer, and the bidirectional input of Lattice information and fusion features specifically includes the following contents:

[0022] The feature vector and the encoding representation are obtained, and the fused character feature information and lattice position information are transmitted to both ends of the Co-Transformer structure respectively. The Co-Transformer encoding layer is a bidirectional model formed by combining the Transformer encoder and the FLAT method.

[0023] Furthermore, the Co-Transformer encoding layer uses two Transformer encoders to cross the position information and character feature information of Chinese characters, and fuses the position information and character feature information through a special linear transformation to obtain the input of each Transformer. The linear transformation rule is shown in the following formula:

[0024]

[0025] In the above formula, Q L (Q R ), K L (K R ), V L (V R ) represents the input in different Transformers, E L represents Flat-lattice embedding, E R represents the enhanced Chinese character feature embedding, I is the unit matrix, and W is the linear transformation matrix.

[0026] Furthermore, the attention calculation expression is:

[0027]

[0028]

[0029] Attention L(R) (A R(L) ,V L(R) )=softmax(A R(L) )V L(R) ;

[0030] Among them, A Lis the Flat-lattice attention mechanism, A R To enhance the character information attention mechanism, R ij is the relative position encoding vector, and u and v are learnable parameters of the attention bias.

[0031] Furthermore, the step S4 specifically includes the following contents:

[0032] For the classification label sequence H = (h1, h2, ..., h n ), contains n characters, for the predicted label sequence Y = (y1, y2, ..., y n ), calculated by the following formula:

[0033]

[0034] Among them, P is the probability matrix output by Co-Transformer, Indicates that the i-th character label is y i The probability score of A is the transfer matrix generated by the CRF model. Indicates that from y i to y i+1 transfer score;

[0035] After all labels are normalized, we get y n The maximum probability of achieving the optimal label sequence prediction is calculated by the following formula:

[0036] y max =argmaxs(H,y i ).

[0037] Furthermore, the step S5 specifically includes the following contents:

[0038] Select professional documents in different fields as original texts, and use HanLP for word segmentation and part-of-speech tagging; after performing the above steps S1 to S4, use the TF-IDF algorithm to calculate high-frequency words as trigger words, and extract triples corresponding to the trigger rules in the Chinese knowledge base.

[0039] The advantages of the present invention are:

[0040] Different from the existing feature extraction methods, multi-dimensional considerations are taken for Chinese character information capture. Not only the complex glyphs of Chinese characters are disassembled and extracted, but for Chinese characters with the same composition, such as "duo" and "ji", "gu" and "ye", considering such special cases, the improved VGG16 network is used to extract the structural features and glyph features of Chinese characters; at the same time, Flat-lattice embedding is adopted to obtain the position information, further improving the accuracy of named entity recognition; the Co-Transformer structure is used to bidirectionally analyze the position information and Chinese character enhancement features, realizing deep semantic encoding for multiple dimensions. The improved structure captures tagged entities more precisely, solving the problem of unclear semantics in Chinese entity recognition; through the relationship extraction method of trigger words and trigger rules, the problem of difficult relationship extraction in special fields is solved. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required in the embodiments. The drawings described below are only some embodiments of the present invention.

[0042] Figure 1 It is a schematic flow chart of the method in the embodiment of the present invention;

[0043] Figure 2 It is a flow chart of the Chinese character feature extraction and fusion mentioned in the embodiment of the present invention;

[0044] Figure 3 It is a schematic flow chart of the Flat-lattice embedding method provided in the embodiment of the present invention;

[0045] Figure 4 It is a schematic work flow chart of the Co-Transformer structure provided in the embodiment of the present invention;

[0046] Figure 5 It is a schematic flow chart of the professional field entity relationship extraction provided in the embodiment of the present invention. SPECIFIC IMPLEMENTATION METHODS

[0047] The following will further describe the present invention in detail with reference to the drawings and specific embodiments. The implementation manners described in the following embodiments do not represent all implementation manners consistent with the present application. They are only examples of systems and methods consistent with some aspects of the present application detailed in the claims.

[0048] The present application provides a text knowledge extraction method based on multi-dimensional features of Chinese characters, and the method includes the following steps:

[0049] S1, using the manually annotated Chinese character dictionary database and the public Chinese database as data support, preprocessing the original text to obtain structural features and glyph features, and fusing them to obtain a feature vector;

[0050] S2. Use the preprocessed text information to construct a weight matrix for semantic similarity and position information through a Flat-lattice structure, and obtain the encoded representation after weighted summation;

[0051] S3. Jointly embed the Chinese features obtained in S1 and S2 into the Co-Transformer encoding layer, and through bidirectional input of Lattice information and fusion features, combined with the optimized attention scoring function, obtain the output result of the encoding layer;

[0052] S4. Use the calculated joint distribution probability to predict the optimal label sequence globally through the CRF model;

[0053] S5. Through relation extraction by triggering rules, combine with the special rules of the target text domain to be extracted, and return triple information;

[0054] Further, the specific content of step S1 is as follows:

[0055] Split Chinese characters into independent radicals. For example, "渡" is split into "氵广廿又", and the split parts are the structural components (SC) of Chinese characters; input the radical information into the CNN, and obtain radical features through the max-pooling layer and the fully connected layer; in the part of extracting glyph features, use the VGG16 network that increases the number of channels to convert the input image into a 50-dimensional vector representation, obtain the radical features and glyph features reduced to the same dimension, and splice the two vectors into a new high-dimensional Chinese character enhanced feature vector.

[0056] Further, the specific content of step S2 is as follows:

[0057] Input the text into the Flat-lattice structure, use h i to represent the head position of the word, and use t i to represent the tail position of the word. Obtain the calculation formula for position encoding:

[0058]

[0059]

[0060]

[0061] In the above formula, R ij represents the relative position encoding, W r is a learnable parameter, p is an enhanced position encoding vector, d represents head i - head j 、head i - tailj 、tail i -head j 、tail i -tail j , Represents vector concatenation operation; through the above formula, the three relationships of position information: intersection, inclusion, and separation are encoded by relative position R ij Express it.

[0062] Furthermore, the S3 comprises the following steps:

[0063] Get the multi-dimensional text feature information obtained in steps S1 and S2, and transmit the fused character feature information and lattice position information to both ends of the Co-Transformer structure respectively. Co-Transformer is a bidirectional model formed by combining the Transformer encoder and the FLAT method, which is used to model and extract fused structural features and glyph features.

[0064] Specifically, two Transformer encoders are used to cross the position information and character feature information of Chinese characters, and the position information and character feature information are fused through a special linear transformation to obtain the input of each Transformer. The linear transformation rule is shown in the following formula:

[0065]

[0066] In the above formula, Q L (Q R ), K L (K R ), V L (V R ) represents the input in different Transformers, E L represents Flat-lattice embedding, E R represents the enhanced Chinese character feature embedding, I is the unit matrix, and W is the linear transformation matrix.

[0067] Furthermore, in order to reduce the impact of the diversity of input information on the self-attention mechanism, a variant formula is designed and modified to effectively capture position encoding information and enhance Chinese character information, that is, the following attention calculation formula is used for bidirectional information input:

[0068]

[0069]

[0070] Attention L(R) (A R(L) ,V L(R))=softmax(A R(L) )V L(R) ;

[0071] Among them, A L is the Flat-lattice attention mechanism, A R To enhance the character information attention mechanism, R ij is the relative position encoding vector, and u and v are learnable parameters of the attention bias.

[0072] Furthermore, step S4 comprises the following steps:

[0073] For a given sequence H = (h1,h2,...,h n ), contains n characters, for the predicted label sequence Y = (y1, y2, ..., y n ), can be calculated by the following formula:

[0074]

[0075] Among them, P is the probability matrix output by Co-Transformer, Indicates that the i-th character label is y i The probability score of , A is the transfer matrix generated by CRF, Indicates that from y i to y i+1 After all labels are normalized, the maximum probability of y is obtained, and the score of the optimal label sequence prediction is calculated by the following formula:

[0076] y max =argmaxs(H,y i );

[0077] After S4, there is S5: professional documents in different fields are selected as original texts, and HanLP is used for word segmentation and part-of-speech tagging; after performing the above steps S1 to S4, the TF-IDF algorithm is used to calculate high-frequency words, which are further matched to the relationships in the Chinese knowledge base to achieve the purpose of extracting triples.

[0078] Example 1

[0079] Figure 1This is the overall process schematic diagram of the method of the present invention in the embodiment. The method shown is an improved multi-dimensional Chinese named entity recognition method, which extracts information by splitting Chinese characters, combines with glyph features to solve the problems of lack of accuracy and depth in Chinese semantic analysis; uses the Transformer structure of the bidirectional encoder-decoder to solve the problems of extraction and modeling of various features; uses the optimized attention mechanism function to solve the labeling errors caused by redundant position features and fusion feature information; and improves the extraction accuracy of relationships in specific fields through relationship extraction based on trigger words and trigger rules.

[0080] In this embodiment, taking the extraction in the field of medical clinical information by the optimized knowledge extraction method as an example, this method includes the following steps:

[0081] S1, Split Chinese characters to form independent radicals. For example, "渡" is split into "氵广廿又", then the split parts are the structural components (SC) of the Chinese characters; input the radical information into the CNN, and obtain radical features through the max-pooling layer and the fully connected layer; extract the glyph feature part, use the VGG16 network that increases the number of channels, convert the input image into a 50-dimensional vector representation, unify the size of the Filter sliding window to 3×3, with a stride of 1, and pass through 16 convolutional layers and 3 fully connected layers; the following main formulas are involved in this process:

[0082]

[0083]

[0084] D2 = K;

[0085] Among them, H2 is the height of the output image, W2 is the width of the output image, D2 is the number of output pictures, K is the number of Filters, F is the size of the Filter, S is the stride, and P is the zero-padding size; since the above formulas are common in CNN and VGG16, corresponding letters are used to replace the fixed characters.

[0086] As Figure 2 shown, it is the character feature extraction process and the multi-dimensional feature fusion process of the characters in the example of the present invention, obtaining that the radical feature and the glyph feature are reduced to the same dimension, and splicing the two vectors into a new high-dimensional Chinese character enhanced feature vector.

[0087] S2, After the text is denoised, construct a Flat-lattice flat directed acyclic graph, and input the text into the Flat-lattice structure; define a set of spans for the Flat-lattice, one span corresponds to one token, one head, and one tail, and use h i to represent the head position of the word, and use t iIndicates the tail position of a word; first take out the tokens with the same head and tail to construct a character sequence, and then use other token words and their heads and tails to construct a skip path. The calculation position encoding formula is obtained:

[0088]

[0089]

[0090]

[0091] In the above formula, R ij Represents relative position encoding, W r is a learnable parameter, p is an enhanced position encoding vector, and d represents the head i -head j 、head i -tail j 、tail i -head j 、tail i -tail j , Represents vector concatenation operation; through the above formula, the three relationships of position information: intersection, inclusion, and separation are encoded by relative position R ij Express it.

[0092] Furthermore, the S3 comprises the following steps:

[0093] Get the multi-dimensional text feature information obtained in steps S1 and S2, and transmit the fused character feature information and lattice position information to both ends of the Co-Transformer structure respectively. Co-Transformer is a bidirectional model formed by combining the Transformer encoder and the FLAT method, which is used to model and extract fused structural features and glyph features.

[0094] Specifically, two Transformer encoders are used to cross the position information and character feature information of Chinese characters, and the position information and character feature information are fused through a special linear transformation to obtain the input of each Transformer. The linear transformation rule is shown in the following formula:

[0095]

[0096] In the above formula, Q L (Q R ), K L (K R ), V L (V R) represents the input in different Transformers, E L represents Flat-lattice embedding, E R represents the enhanced Chinese character feature embedding, I is the unit matrix, and W is the linear transformation matrix.

[0097] Furthermore, in order to reduce the impact of the diversity of input information on the self-attention mechanism, a variant formula is designed and modified to effectively capture position encoding information and enhance Chinese character information, that is, the following attention calculation formula is used for bidirectional information input:

[0098]

[0099]

[0100] Attention L(R) (A R(L) ,V L(R) )=softmax(A R(L) )V L(R) ;

[0101] Among them, A L is the Flat-lattice attention mechanism, A R To enhance the character information attention mechanism, R ij is the relative position encoding vector, and u and v are learnable parameters of the attention bias.

[0102] Furthermore, step S4 comprises the following steps:

[0103] For a given sequence H = (h1,h2,...,h n ), contains n characters, for the predicted label sequence Y = (y1, y2, ..., y n ), can be calculated by the following formula:

[0104]

[0105] Among them, P is the probability matrix output by Co-Transformer, Indicates that the i-th character label is y i The probability score of , A is the transfer matrix generated by CRF, Indicates that from y i to y i+1 After all labels are normalized, the maximum probability of y is obtained, and the score of the optimal label sequence prediction is calculated by the following formula:

[0106] y max =argmaxs(H,y i );

[0107] S5: Due to the particularity of the extracted information, information in different fields is highly correlated, but most of them have too much contextual information and complex relationship networks, so relationship extraction based on trigger words and trigger rules is adopted.

[0108] In the medical clinical information field of this embodiment, five entity relationship types are defined according to the field characteristics and extraction and identification distinction as shown in the following table:

[0109] Table 1

[0110] Serial number Entity relationship type Example 1 Person Type Relationship Patients, physicians, and family members 2 Symptom relationship Impact, crushing, poisoning, allergy 3 Disease relationship Mild, severe, acute, chronic 4 Therapeutic relationship Surgery, dialysis, chemotherapy, drugs 5 Part Affiliation Head, limbs, trunk, internal organs, blood vessels

[0111] The medical clinical information field is constructed. For most department types in clinical information, this embodiment only selects four main department categories, such as internal medicine, surgery, and obstetrics and gynecology, for extraction, and expands them using the extended version of the synonym dictionary; some examples are shown in the following table.

[0112] Table 2

[0113] Serial number Department Type Example 1 Internal Medicine Nephrology, respiratory medicine, endocrinology, gastroenterology 2 surgical Cardiothoracic, neurological, orthopedic, urological, gastrointestinal 3 Obstetrics and Gynecology Gynecology, obstetrics, reproductive medicine, eugenics 4 Pediatrics Neonatology, Pediatrics, Pediatric Surgery

[0114] After defining the trigger words and trigger rules, perform relationship extraction. The specific implementation process is as follows: select the required case text from the medical clinical cases and retain the text data containing complete clinical information; use word segmentation and part-of-speech tagging, and then use the aforementioned named entity recognition technology to extract doctor-patient related entities from the clinical text data; then, based on the processing results, use the TF-IDF algorithm to calculate the word frequency of a certain word in the clinical case knowledge base and the inverse document frequency in the entire corpus, and extract the three words with the highest TF-IDF values ​​from the clinical data as feature words and entity information; if there is no case-related information in the current sentence, process the next sentence. If the current text sentence contains corresponding information, match the current sentence with the entity relationship type in the knowledge base. If there is a corresponding relationship, return the corresponding entity and relationship information triple.

[0115] Example 2

[0116] In order to verify the applicability of the present invention in multiple fields and the extraction effect on ordinary Chinese texts, daily Chinese texts are used for combined training, such as: "Li Ming and Wang Hua are roommates in the same university. They both study computer science at Tsinghua University." A brief example of model training is given.

[0117] 1. Multi-dimensional glyph feature extraction

[0118] like Figure 2, split the Chinese characters into independent radicals; then extract the glyph feature part, reduce the radical feature and glyph feature to the same dimension, and concatenate the two vectors into a new high-dimensional Chinese character enhanced feature vector.

[0119] 2. Flat-lattice information extraction

[0120] like Figure 3 ,The preprocessed data is flattened through the Flat-lattice structure to obtain embeddable position information encoding.

[0121] 3. Co-Transformer structure encoding

[0122] like Figure 4 , the position information and multi-dimensional feature information are bidirectionally input into the Co-Transformer structure. In the Transformer structure, the bidirectional input data is processed by self-attention mechanism, normalization and feedforward network to obtain the splicing vector result.

[0123] 4. Label prediction

[0124] After the features are extracted, the conditional random field is used to predict the optimal label sequence by learning the joint probability distribution of the label sequence.

[0125] 5. Relationship Extraction

[0126] like Figure 5 , use HanLP for word segmentation and part-of-speech tagging; after performing the above steps 1 to 4, use the TF-IDF algorithm to calculate high-frequency words, further correspond to the relations in the Chinese knowledge base, and achieve the purpose of extracting triples.

[0127] Finally, the example sentence "Li Ming and Wang Hua are roommates in the same university, and they both study computer science at Tsinghua University." gets the output results [Li Ming, is, a roommate at the same university]; [Wang Hua, is, a roommate at the same university]; [Li Ming, studies, computer science]; [Wang Hua, studies, computer science]; [Li Ming, university, Tsinghua University]; [Wang Hua, university, Tsinghua University].

[0128] Similar parts between the embodiments provided in this application can be referenced to each other. The specific implementation methods provided above are only a few examples under the general concept of this application and do not constitute a limitation on the protection scope of this application. For those skilled in the art, any other implementation methods expanded based on the scheme of this application without creative work belong to the protection scope of this application.

Claims

1. A text knowledge extraction method based on multi-dimensional features of Chinese characters, characterized in that: The method comprises the following steps: S1, using a manually annotated Chinese character dictionary database and a public Chinese database as original text, preprocessing the original text to obtain structural features and character shape features, and obtaining a feature vector after fusion; S2, using the preprocessed text information, constructs a weight matrix about semantic similarity and contextual semantic information through the Flat-lattice structure, and obtains the weighted summation encoding representation; S3, jointly embedding the feature vector and the encoding representation into the Co-Transformer encoding layer, and obtaining the output result of the encoding layer, i.e., the classification label sequence, by bidirectionally inputting Lattice information and fusion features and combining the optimized attention score function; S4, using the classification label sequence output by the model, the CRF model is combined with the global prediction to predict the optimal label sequence; S5, through the relation extraction of triggering rules, combined with the special rules of the extracted target text field, returns the triple information.

2. According to claim 1, a text knowledge extraction method based on multi-dimensional features of Chinese characters is characterized in that: The step S1 specifically includes the following contents: Splitting a single Chinese character in the original text to obtain a number of radicals, each of which is set as a structural component SC of the Chinese character; inputting the structural component SC into a CNN network, and obtaining radical features through a maximum pooling layer and a fully connected layer; Then extract the glyph feature part, use the VGG16 network with increased channel number, convert the input image into a 50-dimensional vector representation, reduce the radical features and glyph features to the same dimension, and concatenate the radical features and glyph features into a new high-dimensional Chinese character enhanced feature vector.

3. The text knowledge extraction method based on multi-dimensional features of Chinese characters according to claim 1 is characterized in that: The step S2 specifically includes the following contents: Input the preprocessed text information into the Flat-lattice structure and use h i Indicates the word head position, use t i Indicates the end position of the word, and obtains the position encoding formula: In the above formula, R ij Represents relative position encoding, W r is a learnable parameter, p is an enhanced position encoding vector, and d represents the head i -head j 、head i -tail j 、tail i -head j 、tail i -tail j , Represents vector concatenation operation; through the above formula, the three relationships of position information: intersection, inclusion, and separation are encoded by relative position R ij Express it.

4. The text knowledge extraction method based on multi-dimensional features of Chinese characters according to claim 1 is characterized in that: The method of jointly embedding the feature vector and the encoding representation into the Co-Transformer encoding layer by bidirectionally inputting Lattice information and fusion features specifically includes the following contents: The feature vector and the encoding representation are obtained, and the fused character feature information and lattice position information are transmitted to both ends of the Co-Transformer structure respectively. The Co-Transformer encoding layer is a bidirectional model formed by combining the Transformer encoder and the FLAT method.

5. The text knowledge extraction method based on multi-dimensional features of Chinese characters according to claim 4 is characterized in that: The Co-Transformer encoding layer uses two Transformer encoders to cross the position information and character feature information of Chinese characters, and fuses the position information and character feature information through a special linear transformation to obtain the input of each Transformer. The linear transformation rule is shown in the following formula: In the above formula, Q L (Q R ), K L (K R ), V L (V R ) represents the input in different Transformers, E L represents Flat-lattice embedding, E R represents the enhanced Chinese character feature embedding, I is the unit matrix, and W is the linear transformation matrix.

6. A text knowledge extraction method based on multi-dimensional features of Chinese characters according to claim 5, characterized in that: The attention calculation expression is: Attention L(R) (A R(L) ,V L(R) )=softmax(A R(L) )V L(R) ; Among them, A L is the Flat-lattice attention mechanism, A R To enhance the character information attention mechanism, R ij is the relative position encoding vector, and u and v are learnable parameters of the attention bias.

7. The text knowledge extraction method based on multi-dimensional features of Chinese characters according to claim 1 is characterized in that: The step S4 specifically includes the following contents: For the classification label sequence H = (h1, h2, ..., h n ), contains n characters, for the predicted label sequence Y = (y1, y2, ..., y n ), calculated by the following formula: Among them, P is the probability matrix output by Co-Transformer, Indicates that the i-th character label is y i The probability score of A is the transfer matrix generated by the CRF model. Indicates that from y i to y i+1 transfer score; After all labels are normalized, we get y n The maximum probability of achieving the optimal label sequence prediction is calculated by the following formula: and max =argmaxs(H,y i )。 8. The text knowledge extraction method based on multi-dimensional features of Chinese characters according to claim 1 is characterized in that: The step S5 specifically includes the following contents: Select professional documents in different fields as original texts, and use HanLP for word segmentation and part-of-speech tagging; after performing the above steps S1 to S4, use the TF-IDF algorithm to calculate high-frequency words as trigger words, and extract triples corresponding to the trigger rules in the Chinese knowledge base.

Citation Information

Patent Citations

  • Chinese named entity recognition method fusing time sequence convolution and Transform encoder

    CN114169330A

  • Event joint extraction model and method combined with sequence labeling

    CN114818721A

  • Judicial named entity recognition method based on vocabulary enhancement

    CN117875326A