Chinese named entity recognition method and system, medium, equipment and program product

By using a multi-dimensional semantic feature embedding and dynamic weight fusion mechanism, combined with attention mechanism and gating selection function, the problem of insufficient utilization of Chinese character shape and pronunciation information in traditional methods is solved, and high accuracy and robustness of Chinese named entity recognition are achieved.

CN121503483AActive Publication Date: 2026-02-10MALANSHAN AUDIO & VIDEO LABORATORY
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202610039168.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-13
Publication Date
2026-02-10
Estimated Expiration
2046-01-13

AI Technical Summary

Technical Problem

Traditional Chinese named entity recognition methods fail to effectively utilize the glyph and phonetic information of Chinese characters, resulting in difficulties in handling out-of-vocabulary words and ambiguities at entity boundaries, leading to insufficient accuracy and robustness.

Method used

A multi-dimensional semantic feature embedding and dynamic weight fusion mechanism is adopted. The representation vector is embedded through character, glyph and phonetic features. The attention mechanism and gating selection function are combined to perform cross-fusion and sequence encoding. The label decoding is performed using conditional random fields.

Benefits of technology

It significantly improves the accuracy and robustness of Chinese named entity recognition, can autonomously capture semantic differences between homophones, reduce interference from polyphonic characters and ambiguity at entity boundaries, and improve the accuracy and interpretability of recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121503483A_ABST
    Figure CN121503483A_ABST
Patent Text Reader

Abstract

The invention provides a Chinese named entity recognition method and system, a medium, equipment and a program product, and relates to the field of object recognition, and the method comprises the steps: obtaining to-be-recognized Chinese data; performing feature embedding on the Chinese data to be recognized to obtain Chinese character semantic information; according to the character embedding representation vector, the font embedding representation vector and the character pronunciation embedding representation vector, and respective corresponding learnable parameter matrixes, obtaining input parameters of the attention mechanism; performing cross fusion according to the input parameters to obtain enhanced feature embedding; calling a gating selection function to determine respective fusion weights of enhanced character feature embedding, enhanced font feature embedding and enhanced character pronunciation feature embedding; and embedding the enhanced feature and inputting the corresponding fusion weight into a sequence coding layer to obtain a sequence code, and performing tag decoding on the sequence code by using a conditional random field to obtain a named entity recognition result. According to the invention, ambiguity can be effectively reduced, and the accuracy and robustness of identification are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of natural language processing, and particularly to a Chinese named entity recognition method, system, medium, device and program product. Background Art

[0002] The large-scale implementation of Chinese AI (Artificial Intelligence) applications poses higher requirements for the accuracy and efficiency of named entity recognition. Traditional methods do not utilize the unique glyph and pronunciation information of Chinese characters, making it difficult to handle out-of-vocabulary words and entity boundary ambiguities. Chinese characters have the function of pictographic ideograms. For example, "Peng Hu" can be inferred as a geographical entity from the radical "氵" and the context; for polyphonic characters such as "Chang", in "Wuhan City / Yangtze River Bridge", through the pronunciation it can assist in correct segmentation. Single features are prone to weak generalization due to insufficient information. Combining glyphs and pronunciations is expected to improve the accuracy and robustness of Chinese named entity recognition. Summary of the Invention

[0003] The purpose of this application is to provide a Chinese named entity recognition method, system, computer-readable storage medium, electronic device and computer program product, which can improve the accuracy of Chinese recognition.

[0004] To solve the above technical problems, this application provides a Chinese named entity recognition method, and the specific technical solution is as follows:

[0005] Obtain the Chinese data to be recognized;

[0006] Perform feature embedding on the Chinese data to be recognized to obtain Chinese character semantic information; the Chinese character semantic information includes a character embedding representation vector, a glyph embedding representation vector, and a pronunciation embedding representation vector;

[0007] According to the character embedding representation vector, the glyph embedding representation vector, the pronunciation embedding representation vector, and their respective learnable parameter matrices, obtain the input parameters of the attention mechanism;

[0008] Perform cross-fusion according to the input parameters to obtain enhanced feature embeddings; the enhanced feature embeddings include enhanced character feature embeddings, enhanced glyph feature embeddings, and enhanced pronunciation feature embeddings;

[0009] Call a gating selection function to determine the fusion weights of the enhanced character feature embeddings, the enhanced glyph feature embeddings, and the enhanced pronunciation feature embeddings respectively;

[0010] Input the enhanced feature embeddings and their corresponding fusion weights into a sequence encoding layer to obtain a sequence encoding, and use a conditional random field to perform label decoding on the sequence encoding to obtain a named entity recognition result.

[0011] Optionally, feature embedding is performed on the Chinese data to be identified to obtain semantic information of Chinese characters, including:

[0012] The Chinese data to be identified is subjected to character feature recognition to obtain the character embedding representation vector;

[0013] The character shape feature is identified by performing character shape feature recognition on the Chinese data to be identified, and the character shape embedding representation vector is obtained;

[0014] The phonetic feature recognition of the Chinese data to be identified is performed to obtain the phonetic embedding representation vector.

[0015] Optionally, character feature recognition is performed on the Chinese data to be identified to obtain the character embedding representation vector, including:

[0016] The pre-trained language model is invoked to map each character in the Chinese data to be recognized to a fixed-dimensional vector representation by referring to the character embedding lookup table, thus obtaining the character embedding representation vector.

[0017] Optionally, the character shape feature recognition of the Chinese data to be identified to obtain the character shape embedding representation vector includes:

[0018] Obtain open-source character images;

[0019] The open-source character images are uniformly converted into grayscale images of a set size, and the grayscale images are stacked into a three-dimensional tensor. The three-dimensional tensor contains the number of image channels and the length and width of the grayscale images, and the number of sentence characters is added as a tensor parameter.

[0020] The three-dimensional tensor is input into a convolutional layer; the convolutional layer contains two three-dimensional convolutions to convert a 1-channel grayscale image into a multi-channel image;

[0021] The multi-channel image is sequentially subjected to two-dimensional convolution and two-dimensional pooling to extract the glyph embedding representation vector.

[0022] Optionally, performing phonetic feature recognition on the Chinese data to be identified to obtain the phonetic embedding representation vector includes:

[0023] The Chinese data to be identified is converted into a corresponding pinyin sequence; wherein each Chinese character corresponds to a text pinyin information; the text pinyin information is represented by a Roman letter sequence and includes diacritics symbols used to represent the first tone, second tone, third tone, fourth tone, and neutral tone respectively;

[0024] Local features of the pinyin sequence are extracted and sequentially passed through a multi-head attention layer, a residual connection layer, and a normalization layer to obtain a glyph embedding representation vector; the multi-head attention layer is used to capture the global long-distance dependency of the pinyin information in the text.

[0025] Optionally, the gating selection function is invoked to determine the fusion weights of the enhanced character feature embedding, the enhanced glyph feature embedding, and the enhanced phonetic feature embedding, including:

[0026] By concatenating the enhanced character feature embedding, the enhanced glyph feature embedding, and the enhanced phonetic feature embedding, the gated total input is obtained;

[0027] The input from the gating is written into a three-way selector, and the gating values ​​corresponding to the three channels of characters, pinyin, and semantics are output; wherein, the three-way selector includes three linear selectors with independently set learnable parameters;

[0028] Using the gate value as a coefficient, the enhanced character feature embedding, the enhanced glyph feature embedding, and the enhanced phonetic feature embedding are weighted and summed bit by bit to obtain the fused feature.

[0029] This application also provides a Chinese named entity recognition system, including:

[0030] The data acquisition module is used to acquire the Chinese data to be recognized.

[0031] The feature embedding module is used to embed features into the Chinese data to be identified to obtain Chinese character semantic information; the Chinese character semantic information includes character embedding representation vector, glyph embedding representation vector and phonetic embedding representation vector.

[0032] The parameter generation module is used to obtain the input parameters of the attention mechanism based on the character embedding representation vector, the glyph embedding representation vector, and the phonetic embedding representation vector, as well as their respective learnable parameter matrices.

[0033] The feature fusion module is used to perform cross-fusion based on the input parameters to obtain enhanced feature embeddings; the enhanced feature embeddings include enhanced character feature embeddings, enhanced glyph feature embeddings, and enhanced phonetic feature embeddings.

[0034] The fusion weight embedding module is used to call the gating selection function to determine the fusion weights of the enhanced character feature embedding, the enhanced glyph feature embedding, and the enhanced phonetic feature embedding.

[0035] The recognition module is used to input the enhanced feature embedding and its corresponding fusion weight into the sequence coding layer to obtain the sequence code, and to use a conditional random field to perform label decoding on the sequence code to obtain the named entity recognition result.

[0036] This application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described above.

[0037] This application also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method described above when it invokes the computer program in the memory.

[0038] This application also provides a computer program product, including a computer program that, when executed, implements the steps of the method described above.

[0039] This application provides a Chinese named entity recognition method, comprising: acquiring Chinese data to be recognized; performing feature embedding on the Chinese data to be recognized to obtain Chinese character semantic information; the Chinese character semantic information includes character embedding representation vector, glyph embedding representation vector, and phonetic embedding representation vector; obtaining input parameters for an attention mechanism based on the character embedding representation vector, the glyph embedding representation vector, and the phonetic embedding representation vector, and their respective learnable parameter matrices; performing cross-fusion based on the input parameters to obtain enhanced feature embedding; the enhanced feature embedding includes enhanced character feature embedding, enhanced glyph feature embedding, and enhanced phonetic feature embedding; calling a gating selection function to determine the fusion weights of the enhanced character feature embedding, the enhanced glyph feature embedding, and the enhanced phonetic feature embedding; inputting the enhanced feature embedding and its corresponding fusion weights into a sequence coding layer to obtain a sequence code, and using a conditional random field to perform label decoding on the sequence code to obtain a named entity recognition result.

[0040] This application significantly improves the robustness and accuracy of the Chinese named entity recognition system in complex contexts by introducing a multi-dimensional semantic feature embedding and dynamic weight fusion mechanism. It deeply couples the visual structural information carried by character morphology, the phonological association features implied by pronunciation, and the character semantic vector to form a three-in-one Chinese character semantic expression system. In the feature fusion stage, an attention mechanism constructed using a learnable parameter matrix achieves cross-perception and dynamic enhancement of three heterogeneous features: character shape, pronunciation, and character type. This enables the system to autonomously capture semantic differences between homophones or identify entity boundary changes caused by polyphonic characters. The introduction of a gating selection function solves the semantic dilution problem caused by static feature weight allocation in traditional methods. By simulating the selective attention process in human cognition, it effectively suppresses interference from polyphonic characters. At the sequence encoding level, the combination of enhanced feature embedding and conditional random fields significantly improves the entity boundary ambiguity problem. To address the common phenomenon of nested entities in Chinese text, this paper integrates enhanced glyph and phonetic features, enabling conditional random fields to more accurately identify entities during decoding based on enhanced semantic associations. Furthermore, by integrating multiple information sources to complement each other, it can effectively reduce ambiguity and improve the accuracy and robustness of recognition.

[0041] This application also provides a Chinese named entity recognition system, a computer-readable storage medium, an electronic device, and a computer program product, which have the above-mentioned beneficial effects, and will not be elaborated here. Attached Figure Description

[0042] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0043] Figure 1 A flowchart illustrating a Chinese named entity recognition method provided in this application embodiment;

[0044] Figure 2 This is a schematic diagram of the structure of a Chinese named entity recognition system provided in an embodiment of this application;

[0045] Figure 3 This is a structural diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0046] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0047] See Figure 1 , Figure 1 A flowchart of a Chinese named entity recognition method provided in this application embodiment, the method including:

[0048] S101: Obtain the Chinese data to be recognized;

[0049] S102: Perform feature embedding on the Chinese data to be identified to obtain Chinese character semantic information; the Chinese character semantic information includes character embedding representation vector, glyph embedding representation vector and phonetic embedding representation vector;

[0050] S103: Based on the character embedding representation vector, the glyph embedding representation vector, and the phonetic embedding representation vector, as well as their respective learnable parameter matrices, the input parameters of the attention mechanism are obtained;

[0051] S104: Perform cross-fusion based on the input parameters to obtain enhanced feature embeddings; the enhanced feature embeddings include enhanced character feature embeddings, enhanced glyph feature embeddings, and enhanced phonetic feature embeddings.

[0052] S105: Call the gating selection function to determine the fusion weights of the enhanced character feature embedding, the enhanced glyph feature embedding, and the enhanced phonetic feature embedding;

[0053] S106: The enhanced feature embedding and its corresponding fusion weights are input into the sequence coding layer to obtain the sequence code, and the sequence code is labeled and decoded using a conditional random field to obtain the named entity recognition result.

[0054] After acquiring the Chinese data to be recognized, feature embedding is required, specifically for character, glyph, and phonetic features. Specifically, character feature recognition can be performed on the Chinese data to obtain the character embedding vector; glyph feature recognition can be performed on the Chinese data to obtain the glyph embedding vector; and phonetic feature recognition can be performed on the Chinese data to obtain the phonetic embedding vector. The following section further explains the three feature embedding processes:

[0055] For each character, a pre-trained language model is invoked to map each character in the Chinese data to be recognized to a fixed-dimensional vector representation by referring to a character embedding lookup table, thus obtaining the character embedding representation vector.

[0056] In the field of Chinese named entity recognition, large-scale pre-trained models such as BERT (Bidirectional Encoder Representations from Transformers), built on the Transformer architecture, have achieved unexpected success. Therefore, this application can use BERT as the character embedding method in the model. BERT maps each character to a fixed-dimensional vector representation. Specifically, for each group of characters... The corresponding character embeddings can be obtained as follows: ,in This represents a character embedding lookup table. After BERT processing, it can be represented as follows: .in , This represents the dimension of the character embedding vector.

[0057] For glyphs, open-source character images can be obtained and uniformly converted into grayscale images of a set size. These grayscale images are then stacked into a three-dimensional tensor. The three-dimensional tensor includes the number of image channels and the length and width of the grayscale images, with the number of characters in the sentence added as tensor parameters. This three-dimensional tensor is then input into a convolutional layer. Finally, the multi-channel image is sequentially subjected to two-dimensional convolution and two-dimensional pooling to extract the glyph embedding representation vector. The convolutional layer contains two three-dimensional convolutions used to convert a one-channel grayscale image into a multi-channel image.

[0058] In one exemplary application, for glyph embedding, character images can be collected from an open-source dictionary and converted into 50×50 grayscale images using the PIL (Python Imaging Library) library in Python. These character images are then stacked into a three-dimensional tensor. The expression (L) represents the number of characters in the sentence, height represents the height, width represents the width, and channel represents the number of image channels, which are used as input to the convolutional layer. The convolutional layer consists of two 3D convolutions, which convert a 1-channel grayscale image into an 8-channel image with various features and contextual information. The 3D convolution is designed to extract features between each frame of a video image, and each Chinese character in a text sentence can be considered as a frame image; therefore, 3D convolution can be used to extract glyph vectors with contextual glyph information. Simultaneously, padding is used to maintain the consistency of the image sequence's dimensionality. The output of the 3D convolution is then further compressed through a series of convolutional pooling operations, including 2D convolution and 2D max pooling, to extract deeper glyph features. Through these operations, a 50×50 grayscale image of a character is successfully compressed into a 2×2 grid structure with 64 channels. To filter noise, the maximum value in the 2×2 structure is selected as the final glyph vector of the character, ultimately obtaining the embedded representation of the glyph features. ,in This represents the dimension of the glyph embedding vector.

[0059] For phonetic representation, the Chinese data to be identified can be converted into a corresponding pinyin sequence; each Chinese character corresponds to a text pinyin information; the text pinyin information is represented by a Roman letter sequence and includes diacritics to represent the first, second, third, fourth, and neutral tones respectively. Finally, local features of the pinyin sequence are extracted and sequentially passed through a multi-head attention layer, a residual connection layer, and a normalization layer to obtain a glyph embedding representation vector; the multi-head attention layer is used to capture the global long-range dependency of the text pinyin information.

[0060] In one exemplary application, the readily available open-source NLP (Natural Language Processing) tool Pypinyin library is used to convert character sequences into phonetic sequences. Pypinyin is a Python Pinyin library that can convert Chinese characters into their corresponding Pinyin, supports polyphonic characters, and provides multiple conversion methods. The Pinyin of Chinese characters is represented by a sequence of Roman letters with four diacritics to indicate tones. The numbers 0, 1, 2, 3, and 4 are used to represent different tones, where 0 represents a neutral tone, 1 represents a level tone, 2 represents a rising tone, 3 represents a falling tone, and 4 represents a falling tone. These tones are appended to the end of the Roman character sequence, and each character's input Pinyin sequence is specified to have a fixed length of 8. When the actual length of the Pinyin sequence is less than 8, the remaining spaces are filled with the special character "-". Then, a CNN is used to extract local features of the phonetic sequence, and a multi-head attention layer is added on top of this to capture the global long-range dependencies of the text's Pinyin information. Finally, adding a residual connection (Add) and layer normalization (Norm) ensures that the network does not completely ignore the original information while learning new features, which helps the model learn the mapping relationship between input and output better, and also alleviates the gradient vanishing problem.

[0061] The corresponding pinyin vector can be obtained in the following form:

[0062] ;

[0063] in This indicates the processing procedure of the Pypinyin library. It is a pinyin embedding vector that has had its local features extracted by a 2x2 CNN (Convolutional Neural Network). This vector is then input into a multi-head attention mechanism module to extract global features. The calculation process is as follows:

[0064] First, the obtained pinyin embeddings are linearly transformed to obtain the Query, Key, and Value:

[0065] ;

[0066] ;

[0067] ;

[0068] in , and The weight matrix is ​​a learnable matrix. , as well as This is the bias term. Therefore, the attention score is calculated as follows:

[0069] ;

[0070] in This represents the dimension of the input Pinyin embedding vector. Multi-head attention enhances the semantic representation of Pinyin, allowing each attention head to learn different types of semantic relationships and feature information in parallel. By linearly transforming the Pinyin embedding using different parameter matrices, we obtain h (the number of attention heads) sets of Q, K, and V, and then calculate the attention score for each head separately.

[0071] ;

[0072] Finally, concatenating all attention scores yields the final pinyin embedding vector:

[0073] ;

[0074] in , This represents the dimension of the pinyin embedding vector.

[0075] During cross-fusion, after the feature embedding layer, a character embedding representation vector is obtained. ( ), glyph embedding representation vector and phonetic embedding representation vector Each feature embedding vector has its unique meaning, and they are both complementary and different. Therefore, three different Cross-Transformers are used to cross-integrate the character, vocabulary, and pinyin information, that is, to concatenate the enhanced character feature embedding, the enhanced glyph feature embedding, and the enhanced phonetic feature embedding to obtain the gated total input.

[0076] The input from the gating is then written into a three-way selector, which outputs gating values ​​for each of the character, pinyin, and semantic channels. The three-way selector comprises three independently set linear selectors with learnable parameters. Using the gating values ​​as coefficients, the enhanced character feature embedding, the enhanced glyph feature embedding, and the enhanced phonetic feature embedding are weighted and summed bit-by-bit to obtain the fused features.

[0077] The three input parameters of the attention mechanism are obtained by multiplying character feature embedding, pinyin feature embedding, and glyph feature embedding by different learnable parameter matrices. , , .

[0078] ;

[0079] Each W is a learnable parameter, and I is the identity matrix. The attention score is calculated in the Cross-Transformer:

[0080] .

[0081] After character embedding, pinyin embedding, and dictionary embedding are cross-fused using three Cross-Transformers, two enhanced character feature embeddings, two enhanced glyph feature embeddings, and two enhanced phonetic feature embeddings are obtained. These are then concatenated separately into a fused feature vector. , , Then proceed to the next step of processing.

[0082] By designing a gating selection mechanism, the fusion weights of various feature information are automatically selected and adjusted according to task requirements. This gating selection mechanism can dynamically adjust the weights and importance of each modality based on the input features of the current task, ensuring that irrelevant modal information is suppressed while enhancing the integration of key modal information, thereby improving the accuracy and efficiency of multimodal information fusion.

[0083] First, a selective gate unit is designed for each representation level, which controls the amount of information used in the final representation. For example, if the current text is more colloquial, more information from the pinyin attention will flow into the hybrid representation. In this way, the model can not only better learn the correlation between modalities, but also adaptively adjust the fusion strategy according to specific contextual information, effectively improving the performance in the NER (Named Entity Recognition) task. The specific calculation process is as follows:

[0084] ;

[0085] ;

[0086] ;

[0087] ;

[0088] in It is the Sigmoid function. , , , , All are learnable parameters. This refers to the concatenation of vectors. Ultimately, all features are fused together. .

[0089] By using a gating mechanism, the model automatically reduces the phonetic weight in "high-confidence character shape scenarios" and automatically increases the phonetic and character shape weights in scenarios with polyphonic characters or blurred OCR, thereby significantly reducing the cost of manual parameter tuning and improving the robustness and interpretability of the system under different text sources and different noise environments.

[0090] In step S106, the enhanced feature embedding and its corresponding fusion weights are input into the sequence encoding layer to obtain the sequence encoding. A conditional random field is then used to decode the sequence encoding to obtain the named entity recognition result. The main task of the sequence encoding layer is to capture the contextual information and semantic relationships in the input sequence to better understand and recognize named entities. First, the fused feature vector h is used as the input to the sequence encoding layer, and then the sequence encoding H is obtained.

[0091] Sequence encoding layers can utilize various models such as CNNs, BiLSTM (Bidirectional Long Short-Term Memory), and Transformers. In the model disclosed in this application, BiLSTM can be chosen for sequence modeling. The BiLSTM model consists of forward and backward LSTM units, which can simultaneously obtain the forward and backward context vectors of the characters. The LSTM units control information transmission through three specially designed gates, thereby better capturing long-term dependencies in the sequence. After the input sequence passes through the embedding layer, the model inputs the character sequence, which has been fused with multiple features, into the forward and backward LSTMs respectively. By calculating the forward and backward vectors, these two vectors are concatenated as the output of the hidden layer, as specifically implemented below:

[0092] .

[0093] in, and These represent the outputs of the LSTM at the previous time step. This indicates a vector concatenation operation.

[0094] Finally, label decoding is performed using a Conditional Random Field (CRF) to obtain the final named entity recognition results. After CRF decoding, a first-order Viterbi algorithm is used to find the most probable label sequence for the sentence. Given N labeled data... The entire model is trained by minimizing the following negative log-likelihood function:

[0095] .

[0096] In one feasible implementation, after decoding, the system outputs a sequence of BMES (Beginning, Middle, End, Single, a tagging method in named entity recognition used to tag entities in text) or BIO (Beginning, Inside, Outside, a tagging method in named entity recognition). The system can automatically reconstruct the entity's start and end offsets, entity type, and confidence level. It supports callbacks to user-defined dictionaries for correction or integration with business rules to filter invalid entities. It also provides multiple write-back formats such as JSON, XML, and CoNLL, facilitating integration with downstream systems such as search engines, knowledge graphs, and approval workflows.

[0097] This step uses the aforementioned multi-modal encoding and CRF decoding strategies to transform the fused multimodal features into a legal and globally optimal named entity label sequence. The final output recognition result has high accuracy, high validity rate, and high interpretability.

[0098] This application significantly improves the robustness and accuracy of the Chinese named entity recognition system in complex contexts by introducing a multi-dimensional semantic feature embedding and dynamic weight fusion mechanism. It deeply couples the visual structural information carried by character morphology, the phonological association features implied by pronunciation, and the character semantic vector to form a three-in-one Chinese character semantic expression system. In the feature fusion stage, an attention mechanism constructed using a learnable parameter matrix achieves cross-perception and dynamic enhancement of three heterogeneous features: character shape, pronunciation, and character type. This enables the system to autonomously capture semantic differences between homophones or identify entity boundary changes caused by polyphonic characters. The introduction of a gating selection function solves the semantic dilution problem caused by static feature weight allocation in traditional methods. By simulating the selective attention process in human cognition, it effectively suppresses interference from polyphonic characters. At the sequence encoding level, the combination of enhanced feature embedding and conditional random fields significantly improves the entity boundary ambiguity problem. To address the common phenomenon of nested entities in Chinese text, this paper integrates enhanced glyph and phonetic features, enabling conditional random fields to more accurately identify entities during decoding based on enhanced semantic associations. Furthermore, by integrating multiple information sources to complement each other, it can effectively reduce ambiguity and improve the accuracy and robustness of recognition.

[0099] See Figure 2 , Figure 2 This is a schematic diagram of a Chinese named entity recognition system provided in an embodiment of this application. The system includes:

[0100] The data acquisition module is used to acquire the Chinese data to be recognized.

[0101] The feature embedding module is used to embed features into the Chinese data to be identified to obtain Chinese character semantic information; the Chinese character semantic information includes character embedding representation vector, glyph embedding representation vector and phonetic embedding representation vector.

[0102] The parameter generation module is used to obtain the input parameters of the attention mechanism based on the character embedding representation vector, the glyph embedding representation vector, and the phonetic embedding representation vector, as well as their respective learnable parameter matrices.

[0103] The feature fusion module is used to perform cross-fusion based on the input parameters to obtain enhanced feature embeddings; the enhanced feature embeddings include enhanced character feature embeddings, enhanced glyph feature embeddings, and enhanced phonetic feature embeddings.

[0104] The fusion weight embedding module is used to call the gating selection function to determine the fusion weights of the enhanced character feature embedding, the enhanced glyph feature embedding, and the enhanced phonetic feature embedding.

[0105] The recognition module is used to input the enhanced feature embedding and its corresponding fusion weight into the sequence coding layer to obtain the sequence code, and to use a conditional random field to perform label decoding on the sequence code to obtain the named entity recognition result.

[0106] Based on the above embodiments, as a preferred embodiment, the feature embedding module includes:

[0107] A character recognition unit is used to perform character feature recognition on the Chinese data to be recognized to obtain the character embedding representation vector;

[0108] The character shape recognition unit is used to perform character shape feature recognition on the Chinese data to be recognized, and obtain the character shape embedding representation vector;

[0109] The phonetic recognition unit is used to perform phonetic feature recognition on the Chinese data to be recognized, and obtain the phonetic embedding representation vector.

[0110] Based on the above embodiments, as a preferred embodiment, the character recognition unit is a unit used to call a pre-trained language model to map each character in the Chinese data to be recognized to a fixed-dimensional vector representation by referring to a character embedding lookup table, so as to obtain the character embedding representation vector.

[0111] Based on the above embodiments, as a preferred embodiment, the character recognition unit is a unit for performing the following steps:

[0112] Obtain open-source character images;

[0113] The open-source character images are uniformly converted into grayscale images of a set size, and the grayscale images are stacked into a three-dimensional tensor. The three-dimensional tensor contains the number of image channels and the length and width of the grayscale images, and the number of sentence characters is added as a tensor parameter.

[0114] The three-dimensional tensor is input into a convolutional layer; the convolutional layer contains two three-dimensional convolutions to convert a 1-channel grayscale image into a multi-channel image;

[0115] The multi-channel image is sequentially subjected to two-dimensional convolution and two-dimensional pooling to extract the glyph embedding representation vector.

[0116] Based on the above embodiments, as a preferred embodiment, the phonetic recognition unit is a unit for performing the following steps:

[0117] The Chinese data to be identified is converted into a corresponding pinyin sequence; wherein each Chinese character corresponds to a text pinyin information; the text pinyin information is represented by a Roman letter sequence and includes diacritics symbols used to represent the first tone, second tone, third tone, fourth tone, and neutral tone respectively;

[0118] Local features of the pinyin sequence are extracted and sequentially passed through a multi-head attention layer, a residual connection layer, and a normalization layer to obtain a glyph embedding representation vector; the multi-head attention layer is used to capture the global long-distance dependency of the pinyin information in the text.

[0119] Based on the above embodiments, as a preferred embodiment, the fusion weight embedding module includes:

[0120] The feature splicing unit is used to splice the enhanced character feature embedding, the enhanced glyph feature embedding, and the enhanced phonetic feature embedding to obtain the gated total input;

[0121] The gating value calculation unit is used to write the input from the gating into a three-way selector and output the gating values ​​corresponding to the three channels of characters, pinyin, and semantics; wherein, the three-way selector includes three linear selectors with independently set learnable parameters;

[0122] The feature fusion unit is used to perform a bit-by-bit weighted summation of the enhanced character feature embedding, the enhanced glyph feature embedding, and the enhanced phonetic feature embedding, using the gate value as a coefficient, to obtain the fused feature.

[0123] This application also provides an embodiment of a computer-readable storage medium and a computer program product. Both the computer-readable storage medium and the computer program product may store a computer program that, when executed by a processor, implements the steps of the method described in the above method embodiments.

[0124] It is understood that if the methods in the above embodiments are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and executes all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0125] The computer-readable storage medium provided in this embodiment includes the method mentioned above, and has the same effect.

[0126] This application also provides an electronic device, see [link to document]. Figure 3 The present application provides a structural diagram of an electronic device, such as... Figure 3 As shown, it may include a processor 1410 and a memory 1420.

[0127] The processor 1410 may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor 1410 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 1410 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 1410 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, the processor 1410 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.

[0128] The memory 1420 may include one or more computer-readable storage media, which may be non-transitory. The memory 1420 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In this embodiment, the memory 1420 is used to store at least the following computer program 1421, which, after being loaded and executed by the processor 1410, is capable of implementing the relevant steps in the methods executed by the electronic device side as disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 1420 may also include an operating system 1422 and data 1423, etc., and the storage method may be temporary storage or permanent storage. The operating system 1422 may include Windows, Linux, Android, etc.

[0129] In some embodiments, the electronic device may further include a display screen 1430, an input / output interface 1440, a communication interface 1450, a sensor 1460, a power supply 1470, and a communication bus 1480.

[0130] certainly, Figure 3 The structure of the electronic device shown does not constitute a limitation on the electronic device in the embodiments of this application. In practical applications, the electronic device may include more than [other components]. Figure 3 More or fewer components as shown, or combinations of certain components.

[0131] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. As the system provided in the embodiments corresponds to the method provided in the embodiments, the description is relatively simple; relevant parts can be found in the method section.

[0132] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. It should be noted that those skilled in the art can make several improvements and modifications to this application without departing from the principles of this application, and these improvements and modifications also fall within the protection scope of this application.

[0133] It should also be noted that, in this specification, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

Claims

1. A method for Chinese named entity recognition, characterized in that, include: Obtain the Chinese data to be recognized; Feature embedding is performed on the Chinese data to be identified to obtain Chinese character semantic information; the Chinese character semantic information includes character embedding representation vector, glyph embedding representation vector and phonetic embedding representation vector. The input parameters of the attention mechanism are obtained based on the character embedding representation vector, the glyph embedding representation vector, and the phonetic embedding representation vector, as well as their respective learnable parameter matrices. The enhanced feature embedding is obtained by cross-fusion based on the input parameters. The enhanced feature embedding includes enhanced character feature embedding, enhanced glyph feature embedding, and enhanced phonetic feature embedding; The gating selection function is invoked to determine the fusion weights of the enhanced character feature embedding, the enhanced glyph feature embedding, and the enhanced phonetic feature embedding. The enhanced feature embedding and its corresponding fusion weights are input into the sequence coding layer to obtain the sequence code, and the sequence code is then labeled using a conditional random field to obtain the named entity recognition result.

2. The method according to claim 1, characterized in that, Feature embedding is performed on the Chinese data to be identified to obtain semantic information of Chinese characters, including: The Chinese data to be identified is subjected to character feature recognition to obtain the character embedding representation vector; The character shape feature is identified by performing character shape feature recognition on the Chinese data to be identified, and the character shape embedding representation vector is obtained; The phonetic feature recognition of the Chinese data to be identified is performed to obtain the phonetic embedding representation vector.

3. The method according to claim 2, characterized in that, The character feature recognition of the Chinese data to be identified, and the resulting character embedding representation vector, includes: The pre-trained language model is invoked to map each character in the Chinese data to be recognized to a fixed-dimensional vector representation by referring to the character embedding lookup table, thus obtaining the character embedding representation vector.

4. The method according to claim 2, characterized in that, The character shape feature recognition is performed on the Chinese data to be recognized to obtain the character shape embedding representation vector, which includes: Obtain open-source character images; The open-source character images are uniformly converted into grayscale images of a set size, and the grayscale images are stacked into a three-dimensional tensor. The three-dimensional tensor contains the number of image channels and the length and width of the grayscale images, and the number of sentence characters is added as a tensor parameter. The three-dimensional tensor is input into a convolutional layer; the convolutional layer contains two three-dimensional convolutions to convert a 1-channel grayscale image into a multi-channel image; The multi-channel image is sequentially subjected to two-dimensional convolution and two-dimensional pooling to extract the glyph embedding representation vector.

5. The method according to claim 2, characterized in that, The phonetic feature recognition of the Chinese data to be identified, and the resulting phonetic embedding representation vector, includes: The Chinese data to be identified is converted into a corresponding pinyin sequence; wherein each Chinese character corresponds to a text pinyin information; the text pinyin information is represented by a Roman letter sequence and includes diacritics symbols used to represent the first tone, second tone, third tone, fourth tone, and neutral tone respectively; Local features of the pinyin sequence are extracted and sequentially passed through a multi-head attention layer, a residual connection layer, and a normalization layer to obtain a glyph embedding representation vector; the multi-head attention layer is used to capture the global long-distance dependency of the pinyin information in the text.

6. The method according to claim 1, characterized in that, The gating selection function is invoked to determine the fusion weights of the enhanced character feature embedding, the enhanced glyph feature embedding, and the enhanced phonetic feature embedding, including: By concatenating the enhanced character feature embedding, the enhanced glyph feature embedding, and the enhanced phonetic feature embedding, the gated total input is obtained; The input from the gating is written into a three-way selector, and the gating values ​​corresponding to the three channels of characters, pinyin, and semantics are output; wherein, the three-way selector includes three linear selectors with independently set learnable parameters; Using the gate value as a coefficient, the enhanced character feature embedding, the enhanced glyph feature embedding, and the enhanced phonetic feature embedding are weighted and summed bit by bit to obtain the fused feature.

7. A Chinese named entity recognition system, characterized in that, include: The data acquisition module is used to acquire the Chinese data to be recognized. The feature embedding module is used to embed features into the Chinese data to be identified to obtain Chinese character semantic information; the Chinese character semantic information includes character embedding representation vector, glyph embedding representation vector and phonetic embedding representation vector. The parameter generation module is used to obtain the input parameters of the attention mechanism based on the character embedding representation vector, the glyph embedding representation vector, and the phonetic embedding representation vector, as well as their respective learnable parameter matrices. The feature fusion module is used to perform cross-fusion based on the input parameters to obtain enhanced feature embeddings. The enhanced feature embedding includes enhanced character feature embedding, enhanced glyph feature embedding, and enhanced phonetic feature embedding; The fusion weight embedding module is used to call the gating selection function to determine the fusion weights of the enhanced character feature embedding, the enhanced glyph feature embedding, and the enhanced phonetic feature embedding. The recognition module is used to input the enhanced feature embedding and its corresponding fusion weight into the sequence coding layer to obtain the sequence code, and to use a conditional random field to perform label decoding on the sequence code to obtain the named entity recognition result.

8. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the steps of the method as claimed in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed, implements the steps of the method as described in any one of claims 1 to 6.

10. A computer program product, characterized in that, Includes a computer program, which, when executed, implements the steps of the method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Chinese named entity recognition method and device based on multi-view semantic feature fusion

    CN114580416A

  • Characterization learning-based Chinese automatic speech recognition text restoration method and system

    CN115438154A

  • Automatic text error correction algorithm and system based on improved BERT

    CN116187304A

  • Named entity identification method and system based on long-distance information enhancement and boundary smoothing

    CN120654692A

  • Method, product, and apparatus for determining the availability of similar identifiers and registering these identifiers across multiple naming systems

    US6901436B1