An entity recognition method for Chinese oral text and related equipment

By constructing an attention entropy-driven entity recognition and recovery model, the problem of low efficiency and accuracy of named entity recognition in Chinese colloquial text is solved, achieving efficient entity recognition and recovery, and improving the model's adaptability and recognition accuracy.

CN121787414BActive Publication Date: 2026-07-21HUNAN INST OF INFORMATION TECH
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HUNAN INST OF INFORMATION TECH
Filing Date
2026-03-05
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Existing named entity recognition methods in spoken Chinese text lack deep learning capabilities and fail to systematically define spoken entity categories, resulting in low recognition efficiency and accuracy.

Method used

The entity recognition and recovery model is trained using attention entropy-driven dynamic balancing parameters and joint loss, including an input encoding module, a multi-layer encoder stacking module, a multi-task output module, and a dynamic loss balancing module. Feature extraction and entity recognition and recovery are performed through multi-head attention units and feedforward neural networks.

Benefits of technology

It improves the efficiency and accuracy of named entity recognition in colloquial Chinese text, enhances the model's adaptability to noise and non-standard expressions, and optimizes the coordination process between recognition and recovery tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121787414B_ABST
    Figure CN121787414B_ABST
Patent Text Reader

Abstract

The application provides a Chinese oral text-oriented entity recognition method and related equipment, including: obtaining a Chinese oral text training set; training an entity recognition recovery model constructed by using the Chinese oral text training set, a dynamic balance parameter and a joint loss to obtain a trained entity recognition recovery model; inputting a target Chinese oral text into the trained entity recognition recovery model for entity detection and recovery to obtain an oral entity; the entity recognition recovery model includes an input encoding module for reasoning, a multi-layer encoder stacking module, a multi-task output module, a dynamic loss balancing module for training and an overall parameter updating module; the efficiency and accuracy of oral text entity recognition are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of natural language processing and artificial intelligence, and in particular to an entity recognition method and related equipment for spoken Chinese text. Background Technology

[0002] In recent years, Transformer technology has achieved widespread application and significant results in the field of natural language processing due to its multi-head self-attention mechanism and global dependency modeling capabilities. Existing research has yielded several advancements. For example, researchers have proposed a BERT-BiGRU-CRF model that integrates attention mechanisms for product entity recognition. This model first obtains the semantic representation of the input through a pre-trained language representation model (BERT, Bidirectional Encoder Representations from Transformer), resulting in a vector representation of each character in the sentence. Then, the character vector sequence is input into a Bidirectional Gated Recurrent Unit (BiGRU) for further semantic encoding. Finally, a Conditional Random Field (CRF) layer outputs the label sequence with the highest probability. Other researchers have designed a Transformer-BiLSTM-CRF model suitable for bridge engineering. This model first uses a Transformer encoder to model the long-range positional dependency features of the detected text character sequence, and then employs a Bidirectional Long Short-Term Memory (BiLSTM) network. The Transformer architecture further captures orientation-sensitive features and ultimately achieves labeled sequence prediction in the CRF model, achieving superior performance with and without pre-trained models. Other researchers have proposed a named entity recognition method for the medical field based on a reading comprehension framework, which significantly improves the recognition ability of nested entities. Some researchers have also proposed a named entity recognition model applicable to multiple fields by integrating BERT, Multi-Head Self-Attention (MHSA), and Iterated Dilated Convolutional Neural Network (IDCNN), which effectively improves the overall performance on multiple datasets. These results demonstrate that the Transformer architecture has good application potential in entity recognition tasks in professional fields.

[0003] However, spoken text presents significant challenges to traditional named entity recognition methods due to issues such as non-standard expression, disordered word order, mixed parts of speech, and blurred entity boundaries. Therefore, existing technologies have proposed a comprehensive named entity recognition system for spoken text. This method, based on custom rules, achieves entity recognition, but suffers from two significant shortcomings: first, it lacks the ability to model complex semantic features by not incorporating deep learning technology; second, it does not systematically define the categories of spoken entities in spoken text, resulting in a discrepancy between the application scenario and real-world spoken text scenarios. Other existing technologies propose a Chinese spoken text named entity recognition model and its compression method. This research systematically defines the concept of spoken entities and uses a pre-trained language model for entity boundary detection. Subsequent character reordering through a recovery module effectively improves the accuracy and interpretability of spoken entity recognition, pioneering a related research direction. However, this approach still suffers from system complexity and error propagation issues. Summary of the Invention

[0004] This invention provides a method and related equipment for entity recognition of spoken Chinese text, with the aim of improving the efficiency and accuracy of entity recognition of spoken Chinese text.

[0005] To achieve the above objectives, this invention provides an entity recognition method for spoken Chinese text, comprising: Step 1: Obtain a training set of colloquial Chinese texts; Step 2: Train the constructed entity recognition and recovery model using the Chinese colloquial text training set, attention entropy-driven dynamic equilibrium parameters, and joint loss to obtain the trained entity recognition and recovery model. Step 3: Input the target Chinese colloquial text into the trained entity recognition and recovery model to perform entity recognition and recovery, and obtain the colloquial entities; The entity recognition and recovery model includes an input encoding module for recognition inference, a multi-layer encoder stacking module, a multi-task output module, a dynamic loss balancing module for training, and an overall parameter update module.

[0006] Furthermore, step 1 includes: Obtain the original spoken Chinese text; The original Chinese colloquial texts are preprocessed to obtain a training set of Chinese colloquial texts.

[0007] Furthermore, the multi-layer encoder stacking module includes multiple standard encoders connected in sequence. Each standard encoder includes a multi-head attention unit, a first residual connection layer normalization unit, a feedforward neural network unit, and a second residual connection layer normalization unit. The input terminals of the multi-head attention unit are the same as those of a standard encoder. The first output of the multi-head attention unit is connected to the first input of the first residual connection layer normalization unit, and the second output of the multi-head attention unit is connected to the second input of the first residual connection layer normalization unit. During the training of the entity recognition and recovery model, the third output of the multi-head attention unit is connected to the first input of the dynamic loss balancing module; The output of the normalization unit in the first residual connection layer is connected to the input of the feedforward neural network unit; The first output of the feedforward neural network unit is connected to the first input of the normalization unit of the second residual connection layer, and the second output of the feedforward neural network unit is connected to the second input of the normalization unit of the second residual connection layer. The output of the normalization unit in the second residual connection layer is the output of the standard encoder.

[0008] Furthermore, the multi-task output module includes a linear unit, a multi-task learning unit, an entity recognition unit, and an entity recovery unit; The input of the linear unit is connected to the output of the normalization unit of the second residual connection layer in the last standard encoder; The output of the linear unit is connected to the input of the multi-task learning unit; The output of the multi-task learning unit is connected to the input of the entity recognition unit and the input of the entity recovery unit, respectively. The output terminals of the entity recognition unit and the entity recovery unit are the output terminals of the multi-task output module; During the training of the entity recognition and recovery model, the output of both the entity recognition unit and the entity recovery unit is connected to the second input of the dynamic loss balancing module.

[0009] Furthermore, the dynamic loss balancing module is used for: Through formula Calculate the attention entropy of each attention head in the multi-head attention unit, where, Indicates attention head attention entropy, Represents the attention matrix. Indicates the length of the input sequence. This indicates the current encoded position index. Indicates the index of the currently viewed location; The average attention entropy is calculated using the attention entropy of each attention head. The calculation expression is as follows: ; in, Represents the average attention entropy. Indicates the number of attention heads; The dynamic balance parameters between the entity recognition unit and the entity recovery unit are dynamically adjusted using the average attention entropy.

[0010] Furthermore, the overall parameter update module is used for: The detection loss of the entity recognition unit and the recovery loss of the entity reconstruction unit are adjusted by dynamically balancing parameters; Calculate the joint loss value based on the adjusted detection loss and recovery loss; The parameters of the entity recognition recovery model are updated by backpropagation using the joint loss value.

[0011] Furthermore, the formula for calculating the joint loss value based on the adjusted detection loss and recovery loss is as follows: ; in, Represents the joint loss value. Indicates detection loss, Indicates recovery from losses. This represents the dynamic equilibrium parameter.

[0012] The present invention also provides an entity recognition device for spoken Chinese text, comprising: The acquisition module is used to acquire a training set of colloquial Chinese texts. The training module is used to train the constructed entity recognition and recovery model using a Chinese colloquial text training set, attention entropy-driven dynamic equilibrium parameters, and joint loss, to obtain the trained entity recognition and recovery model. The recognition module is used to input the target Chinese colloquial text into the trained entity recognition and recovery model to perform entity recognition and recovery, and obtain the colloquial entities; The entity recognition and recovery model includes an input encoding module for recognition inference, a multi-layer encoder stacking module, a multi-task output module, a dynamic loss balancing module for training, and an overall parameter update module.

[0013] The present invention also provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements an entity recognition method for spoken Chinese text.

[0014] The present invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements an entity recognition method for spoken Chinese text.

[0015] The above-described solution of the present invention has the following beneficial effects: This invention utilizes an acquired training set of colloquial Chinese text, attention entropy-driven dynamic balancing parameters, and joint loss to train a constructed entity recognition and recovery model, resulting in a trained entity recognition and recovery model. The target colloquial Chinese text is then input into the trained entity recognition and recovery model for entity recognition and recovery, yielding colloquial entities. The entity recognition and recovery model includes an input encoding module for recognition and inference, a multi-layer encoder stacking module, a multi-task output module, a dynamic loss balancing module for training, and an overall parameter update module. Compared to existing technologies, this invention achieves named entity recognition and recovery in colloquial Chinese text based on the entity recognition and recovery model. Simultaneously, it introduces attention entropy-driven dynamic balancing parameters to adaptively coordinate the optimization process of the two tasks, thereby improving the overall processing efficiency of the model. Furthermore, by outputting recognition and recovery branches in parallel based on a shared encoder, the model can fully mine and utilize the contextual information in the colloquial text, enhancing its adaptability to noise and non-standard expressions, thus improving recognition accuracy.

[0016] Other beneficial effects of the present invention will be described in detail in the following detailed description section. Attached Figure Description

[0017] Figure 1 This is a flowchart illustrating an embodiment of the present invention; Figure 2 This is a schematic diagram of the entity recognition and recovery model in an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of a standard encoder in an embodiment of the present invention; Figure 4 This is a schematic diagram of the entity recognition device in an embodiment of the present invention; Figure 5 This is a schematic diagram of the structure of the terminal device in an embodiment of the present invention. Detailed Implementation

[0018] To make the technical problems, solutions, and advantages of this invention clearer, a detailed description will be provided below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0019] In the description of this invention, it should be noted that the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0020] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a locking connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.

[0021] Furthermore, the technical features involved in the different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0022] This invention addresses existing problems by providing an entity recognition method and related equipment for spoken Chinese text.

[0023] like Figure 1 , Figure 2 As shown, embodiments of the present invention provide an entity recognition method for spoken Chinese text, including: Step 1: Obtain a training set of colloquial Chinese texts; Step 2: Train the constructed entity recognition and recovery model using the Chinese colloquial text training set, dynamic balance parameters, and joint loss to obtain the trained entity recognition and recovery model. Step 3: Input the target Chinese colloquial text into the trained entity recognition and recovery model to perform entity detection and recovery, and obtain the colloquial entities; The entity recognition and recovery model includes an input encoding module for recognition inference, a multi-layer encoder stacking module, a multi-task output module, a dynamic loss balancing module for training, and an overall parameter update module.

[0024] Specifically, step 1 includes: Obtain the original spoken Chinese text; The original Chinese colloquial texts are preprocessed to obtain a training set of Chinese colloquial texts.

[0025] In this embodiment of the invention, preprocessing of the original spoken Chinese text includes: Noise filtering is applied to the original colloquial Chinese text to obtain a filtered colloquial Chinese text sequence; The filtered Chinese colloquial text sequence is text-normalized to obtain the normalized Chinese colloquial text sequence; Data augmentation was performed on the standardized Chinese colloquial text sequence to obtain a high-quality Chinese colloquial text training set. .

[0026] Specifically, the input encoding module of the entity recognition and recovery model is embedded and positionally encoded by inputting the training set of colloquial Chinese text into the model to form a preliminary feature representation; The preliminary feature representation is input into the multi-layer encoder stacking module to extract global contextual information and form deep semantic features; Deep semantic features are input into the multi-task output module for entity recognition and entity recovery, enabling entity boundary recognition and standard entity restoration.

[0027] Specifically, the input encoding module maps the input sequence of colloquial Chinese text to a fixed-dimensional vector using an embedding matrix. The mapping expression is as follows: ; in, This indicates the first [item] in the sequence of colloquial Chinese texts. A fixed-dimensional vector of characters. Represents the embedding matrix. This represents the input sequence of colloquial Chinese text. Indicates the number of characters; Introducing position coding For example, using sine-cosine functions or learnable parameters, we obtain a preliminary feature representation, expressed as: ; in, This indicates preliminary feature representation. This indicates the first [item] in the sequence of colloquial Chinese texts. The positional encoding corresponding to a fixed-dimensional vector of characters.

[0028] Specifically, the multi-layer encoder stacking module includes multiple standard encoders connected in sequence. Each standard encoder includes a multi-head attention unit, a first residual connection layer normalization unit, a feedforward neural network unit, and a second residual connection layer normalization unit, such as... Figure 3 As shown; The input terminals of the multi-head attention unit are the same as those of a standard encoder. The first output of the multi-head attention unit is connected to the first input of the first residual connection layer normalization unit, and the second output of the multi-head attention unit is connected to the second input of the first residual connection layer normalization unit. During the training of the entity recognition and recovery model, the third output of the multi-head attention unit is connected to the first input of the dynamic loss balancing module; The output of the normalization unit in the first residual connection layer is connected to the input of the feedforward neural network unit; The first output of the feedforward neural network unit is connected to the first input of the normalization unit of the second residual connection layer, and the second output of the feedforward neural network unit is connected to the second input of the normalization unit of the second residual connection layer. The output of the normalization unit in the second residual connection layer is the output of the standard encoder.

[0029] In this embodiment of the invention, the multi-head attention unit is used for: The query matrix, key matrix, and value matrix are calculated using the following expression: ; ; ; in, Represents the query matrix. This indicates preliminary feature representation. Indicates the query weight. Represents the key matrix, Indicates key weight. Represents a value matrix, Indicates the value weight; Multi-head attention is calculated using scaled dot product attention on the query matrix, key matrix, and value matrix. The calculation expression is as follows: ; in, This represents the scaled dot product attention function. This represents the activation function. Indicates dimension.

[0030] In this embodiment of the invention, the feedforward neural network unit is used to perform two fully connected layers at each location, as expressed in the following expression: ; in, This represents a two-layer fully connected mapping function. This represents the ReLU activation function, used to introduce nonlinearity. This represents the hidden state vector at a certain position in the output of the standard encoder. , These represent the weight matrices of the first fully connected layer and the weight matrix of the second fully connected layer, respectively. , These represent the bias vectors of the first fully connected layer and the second fully connected layer, respectively.

[0031] In this embodiment of the invention, the calculation expression for the normalization unit of the first residual connection layer is: ; The calculation expression for the normalized unit of the second residual connection layer is: ; in, Indicates the first The multi-head attention module output of the layer is the intermediate feature representation after the first residual connection and layer normalization. This indicates the layer number of the current standard encoder. The representation layer normalization operation is used to standardize the distribution of each sample along the feature dimension, thereby improving training stability. This indicates a multi-head attention mechanism. This indicates the output of the previous standard encoder. It represents deep semantic features.

[0032] Specifically, the multi-task output module includes a linear unit, a multi-task learning unit, an entity recognition unit, and an entity recovery unit; The input of the linear unit is connected to the output of the normalization unit of the second residual connection layer in the last standard encoder; The output of the linear unit is connected to the input of the multi-task learning unit; The output of the multi-task learning unit is connected to the input of the entity recognition unit and the input of the entity recovery unit, respectively.

[0033] The multi-task learning unit in this embodiment of the invention introduces independent parameter mapping methods for different tasks, enabling each task to participate in differentiated calculations in a shared feature space, thereby reducing cross-task gradient interference.

[0034] The output terminals of the entity recognition unit and the entity recovery unit are both output terminals of the multi-task output module. During model training, the output terminals of both the entity recognition unit and the entity recovery unit are connected to the second input terminal of the dynamic loss balancing module. In this embodiment of the invention, the linear unit corresponds to the hidden state output by the standard encoder. A linear transformation is performed to generate an interval-aware feature representation that serves as the basis for multi-task sharing. This representation is used to simultaneously support joint modeling of entity interval discrimination and interval internal structure recovery tasks. The expression is as follows: ; in, Indicates the first The interval discriminant feature vector corresponding to each character The weight matrix represents the linear transformation. The first output of the standard encoder The hidden state vector of each character. This represents the bias vector. In different subtasks, the corresponding parameter mappings are used to participate in the calculation, thereby achieving implicit differentiation between entity interval discrimination semantics and entity structure recovery semantics while maintaining the sharing of underlying features.

[0035] In this embodiment of the invention, the entity recognition unit achieves entity boundary recognition based on the idea of ​​direct modeling of entity intervals. Instead of performing position-by-position label decoding on the character sequence, it determines the entity boundary by jointly predicting the start and end positions of the entity interval. Specifically, it predicts the start and end boundary response values ​​of each character in the entity interval boundary determination space, as expressed by: ; ; in, Indicates the first One character is used as the confidence level for the starting position of the entity. Indicates the first One character is used as the confidence level for the entity termination position. This represents the Sigmoid activation function. These are learnable parameters.

[0036] Based on the confidence scores of the starting and ending positions, a candidate set of entity intervals is constructed, expressed as: ; in, Represents the candidate set of entity intervals. Indicates from the first The character to the 1st An entity range consisting of 1 character. and These are the confidence thresholds for the start and end positions, respectively. The maximum length of the entity interval can be dynamically constrained by combining the average attention entropy of the multi-head attention units to reduce invalid intervals and improve the stability of interval selection.

[0037] For each entity interval candidate By aggregating the hidden states within an interval, an interval-level semantic representation is constructed, expressed as: ; in, This represents the pooling operator used to generate interval-level semantic representations. .

[0038] Based on interval-level semantic representation, entity intervals are classified to determine whether they constitute valid entities. The expression is as follows: ; in, Representing an interval The comprehensive score that constitutes the entity, These are learnable parameters.

[0039] The training objective of the entity recognition branch consists of interval start boundary constraints, interval end boundary constraints, and interval validity discrimination constraints. Its overall loss function is defined as: ; in, and The cross-entropy loss is used for binary classification and is employed to supervise entity boundary prediction. Used to supervise the results of interval-level entity discrimination. The starting position prediction loss... This constraint is used to determine the model's ability to identify entity starting boundaries. It is constructed through binary classification supervision, which checks whether each character represents the starting position of an entity. The specific calculation method is as follows: ; in, Indicates the length of the input sequence. Indicates the first Are these characters the actual markers for the starting position of the entity? This represents the model's prediction probability that the character is the starting position of an entity. The termination position prediction loss... This is used to supervise the model's ability to distinguish entity termination boundaries. Its loss form is consistent with the starting position prediction loss, and the calculation formula is as follows: ; in, Indicates the first Are these characters the actual markers for the termination position of the entity? This represents the model's predicted probability that the character is the termination position of an entity. The interval-level entity discrimination loss... To supervise the model's overall ability to determine whether candidate entity intervals constitute valid entities, it uses interval-level binary classification cross-entropy loss as a constraint, and the calculation formula is as follows: ; in, Indicates the size of the candidate entity interval set. Representing an interval Whether it corresponds to a real entity's supervisory label, where v represents the interval-level entity scoring result. This represents the Sigmoid activation function.

[0040] After the entity recognition branch outputs the entity interval result, the model enters the entity recovery branch. The entity recovery branch takes the entity interval output by the entity recognition branch as input and performs structural consistency modeling on the character sequence within the interval to recover the standard entity form. Its prediction process is represented as follows: ; in, Represents the entity interval The corresponding recovery results The character structure prediction function represents the entity recovery unit. This represents the character sequence within the interval. The recovery loss of the entity recovery branch is defined as the combination of the character preservation discrimination loss and the character structure prediction loss, expressed as: ; in, The actual label indicating whether a character is retained in the entity. This indicates the corresponding prediction result. and These represent the true value and the predicted value of the character structure prediction, respectively. The recovery loss is calculated only for characters within the entity interval output by the entity recognition branch.

[0041] The dynamic loss balancing module calculates the attention entropy of each attention head in the multi-head attention unit and obtains the average attention entropy accordingly to dynamically adjust the loss weights between the entity recognition and entity recovery tasks, thereby achieving adaptive balance between the two tasks during joint training. The overall parameter update module weights and fuses the entity recognition loss and entity recovery loss based on the dynamic balancing parameters to form a joint loss function. This joint loss is then used to update the standard encoder parameters, entity recognition unit parameters, and entity recovery unit parameters through backpropagation, thereby improving the model's convergence stability and overall robustness in spoken text scenarios. To verify the feasibility of the provided method, the following experimental environment was configured in this embodiment: In terms of hardware, a high-performance computer was used as the experimental platform, equipped with an E5-2680V4 CPU, 64GB of memory, and a Tesla V100 professional computing card. In terms of software, Ubuntu 22.04 operating system, Python 3.9 programming language, and PyTorch 1.13 deep learning framework were used. Specifically, the open-source Chinese colloquial text named entity dataset ULNER (https: / / github.com / Xu-913 / ULNER) was used. The multi-layer encoder stacking module of the entity recognition and recovery model was loaded with pre-trained parameters from the BERT model. The F1-score, training time, and inference speed of various named entity recognition models on the ULNER dataset were compared, as shown in Table 1 below. Table 1. Comparison results of various named entity recognition modules on the ULNER dataset.

[0042] As shown in Table 1, compared with the existing Word2vec-BiLSTM-CRF model and BERT-CRF-Restorer model, the entity recognition and recovery model shows better detection performance in ULNER. At the same time, compared with the Word2vec-BiLSTM-CRF model and BERT-CRF-Restorer model, the entity recognition and recovery model consumes less time in both training and inference scenarios. The above results are sufficient to show that the entity recognition and recovery model is a more comprehensive and superior spoken entity detection model.

[0043] This invention utilizes an acquired training set of colloquial Chinese text, attention entropy-driven dynamic balancing parameters, and joint loss to train a constructed entity recognition and recovery model, resulting in a trained entity recognition and recovery model. The target colloquial Chinese text is then input into the trained entity recognition and recovery model for entity recognition and recovery, yielding colloquial entities. The entity recognition and recovery model includes an input encoding module for recognition inference, a multi-layer encoder stacking module, a multi-task output module, a dynamic loss balancing module for training, and an overall parameter update module. Compared to existing technologies, this invention achieves named entity recognition and recovery in colloquial Chinese text based on the entity recognition and recovery model. It also introduces attention entropy-driven dynamic balancing parameters to adaptively coordinate the optimization process of the recognition and recovery tasks, thereby improving the overall processing efficiency of the model. Furthermore, by outputting recognition and recovery branches in parallel based on a shared encoder, the model can fully mine and utilize the contextual information in the colloquial text, enhancing its adaptability to noise and non-standard expressions, thus improving recognition accuracy.

[0044] Corresponding to the entity recognition method for spoken Chinese text described in the above embodiments, such as Figure 4As shown, the present invention also provides an entity recognition device 100 for spoken Chinese text, the entity recognition device 100 comprising: Module 101 is used to acquire a training set of colloquial Chinese texts. Training module 102 is used to train the constructed entity recognition and recovery model using a Chinese colloquial text training set, attention entropy-driven dynamic equilibrium parameters, and joint loss, so as to obtain the trained entity recognition and recovery model. The recognition module 103 is used to input the target Chinese colloquial text into the trained entity recognition and recovery model for entity recognition and recovery, so as to obtain colloquial entities; The entity recognition and recovery model includes an input encoding module for recognition inference, a multi-layer encoder stacking module, a multi-task output module, a dynamic loss balancing module for training, and an overall parameter update module.

[0045] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.

[0046] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0047] This invention also provides a terminal device, such as... Figure 5 As shown, the terminal device D10 of this embodiment includes: at least one processor D100 ( Figure 5 The diagram shows only one processor, a memory D101, and a computer program D102 stored in the memory D101 and executable on the at least one processor D100. When the processor D100 executes the computer program D102, it implements the aforementioned entity recognition method for spoken Chinese text.

[0048] The terminal device D10 can be a desktop computer, laptop, handheld computer, server, server cluster, or cloud server, etc. This terminal device may include, but is not limited to, a processor D100 and a memory D101. Those skilled in the art will understand that... Figure 5 This is merely an example of terminal device D10 and does not constitute a limitation on terminal device D10. It may include more or fewer components than shown in the figure, or combine certain components, or different components, such as input / output devices, network access devices, etc.

[0049] The processor D100 can be a central processing unit (CPU), or it can be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.

[0050] In some embodiments, the memory D101 may be an internal storage unit of the terminal device D10, such as a hard disk or memory of the terminal device D10. In other embodiments, the memory D101 may be an external storage device of the terminal device D10, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, etc., equipped on the terminal device D10. Furthermore, the memory D101 may include both internal and external storage units of the terminal device D10. The memory D101 is used to store the operating system, applications, bootloader, data, and other programs, such as the program code of the computer program. The memory D101 can also be used to temporarily store data that has been output or will be output.

[0051] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.

[0052] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0053] The present invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements an entity recognition method for spoken Chinese text.

[0054] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying the computer program code to a building device / terminal device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks.

[0055] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A method for entity recognition in spoken Chinese text, characterized in that, include: Step 1: Obtain a training set of colloquial Chinese texts; Step 2: Train the constructed entity recognition and recovery model using the Chinese colloquial text training set, attention entropy-driven dynamic balance parameters, and joint loss to obtain the trained entity recognition and recovery model. Step 3: Input the target Chinese colloquial text into the trained entity recognition and recovery model to perform entity recognition and recovery, and obtain the colloquial entities; The entity recognition and recovery model includes an input encoding module for recognition inference, a multi-layer encoder stacking module, a multi-task output module, a dynamic loss balancing module for training, and an overall parameter update module. The multi-layer encoder stacking module includes multiple standard encoders connected in sequence. Each standard encoder includes a multi-head attention unit, a first residual connection layer normalization unit, a feedforward neural network unit, and a second residual connection layer normalization unit. The input terminal of the multi-head attention unit is the input terminal of the standard encoder; The first output of the multi-head attention unit is connected to the first input of the first residual connection layer normalization unit, and the second output of the multi-head attention unit is connected to the second input of the first residual connection layer normalization unit. During the training process of the entity recognition and recovery model, the third output of the multi-head attention unit is connected to the first input of the dynamic loss balancing module; The output of the normalization unit of the first residual connection layer is connected to the input of the feedforward neural network unit; The first output of the feedforward neural network unit is connected to the first input of the normalization unit of the second residual connection layer, and the second output of the feedforward neural network unit is connected to the second input of the normalization unit of the second residual connection layer. The output of the second residual connection layer normalization unit is the output of the standard encoder; The multi-task output module includes a linear unit, a multi-task learning unit, an entity recognition unit for recognizing entity intervals, and an entity recovery unit for restoring the structure of characters within entity intervals. The input of the linear unit is connected to the output of the normalization unit of the second residual connection layer; The output of the linear unit is connected to the input of the multi-task learning unit; The output of the multi-task learning unit is connected to the input of the entity recognition unit and the input of the entity recovery unit, respectively. The output terminals of the entity recognition unit and the entity recovery unit are the output terminals of the multi-task output module; During the training process of the entity recognition and recovery model, the output terminals of the entity recognition unit and the entity recovery unit are both connected to the second input terminal of the dynamic loss balancing module. The entity recognition unit calculates the probability value of the entity's start position and the probability value of the entity's end position for each character, and constructs a candidate entity interval set based on the probability values ​​and a preset threshold. It further performs interval-level semantic representation aggregation and validity judgment on the candidate entity intervals to output the final entity interval result. The candidate entity interval set is constructed in the following way: calculating the entity's start position for each character... Probability of entity termination position And based on a preset threshold, filter those that meet the requirements. , and interval pair As candidate entity intervals; The entity recovery unit predicts the retention flag and sorting value of the characters in each entity interval, and rearranges the retained characters based on the sorting value to generate a standard entity. The dynamic loss balancing module is described by the formula Calculate the attention entropy of each attention head in the multi-head attention unit, where, Indicates attention head attention entropy, Represents the attention matrix. Indicates the length of the input sequence. This indicates the current encoded position index. Indicates the index of the currently viewed location; The average attention entropy is calculated using the attention entropy of each attention head. The calculation expression is as follows: ; in, Represents the average attention entropy. Indicates the number of attention heads; The dynamic balance parameters between the entity recognition unit and the entity recovery unit are dynamically adjusted using the average attention entropy.

2. The entity recognition method for spoken Chinese text according to claim 1, characterized in that, Step 1 includes: Obtain the original spoken Chinese text; The original Chinese colloquial text is preprocessed to obtain a Chinese colloquial text training set.

3. The entity recognition method for spoken Chinese text according to claim 1, characterized in that, The overall parameter update module is used for: The detection loss of the entity recognition unit and the recovery loss of the entity recovery unit are adjusted using the dynamic balancing parameters. Calculate the joint loss value based on the adjusted detection loss and recovery loss; The parameters of the entity recognition and recovery model are updated by backpropagation using the joint loss value.

4. The entity recognition method for spoken Chinese text according to claim 3, characterized in that, The formula for calculating the joint loss value based on the adjusted detection loss and recovery loss is as follows: ; in, Represents the joint loss value. Indicates detection loss, Indicates recovery from losses. This represents the dynamic equilibrium parameter.

5. An entity recognition device for spoken Chinese text, characterized in that, include: The acquisition module is used to acquire a training set of colloquial Chinese texts. The training module is used to train the constructed entity recognition and recovery model using the Chinese colloquial text training set, attention entropy-driven dynamic balance parameters, and joint loss, so as to obtain the trained entity recognition and recovery model. The recognition module is used to input the target Chinese colloquial text into the trained entity recognition and recovery model to perform entity recognition and recovery, and obtain the colloquial entities; The entity recognition and recovery model includes an input encoding module for recognition inference, a multi-layer encoder stacking module, a multi-task output module, a dynamic loss balancing module for training, and an overall parameter update module. The multi-layer encoder stacking module includes multiple standard encoders connected in sequence. Each standard encoder includes a multi-head attention unit, a first residual connection layer normalization unit, a feedforward neural network unit, and a second residual connection layer normalization unit. The input terminal of the multi-head attention unit is the input terminal of the standard encoder; The first output of the multi-head attention unit is connected to the first input of the first residual connection layer normalization unit, and the second output of the multi-head attention unit is connected to the second input of the first residual connection layer normalization unit. During the training process of the entity recognition and recovery model, the third output of the multi-head attention unit is connected to the first input of the dynamic loss balancing module; The output of the normalization unit of the first residual connection layer is connected to the input of the feedforward neural network unit; The first output of the feedforward neural network unit is connected to the first input of the normalization unit of the second residual connection layer, and the second output of the feedforward neural network unit is connected to the second input of the normalization unit of the second residual connection layer. The output of the second residual connection layer normalization unit is the output of the standard encoder; The multi-task output module includes a linear unit, a multi-task learning unit, an entity recognition unit for recognizing entity intervals, and an entity recovery unit for restoring the structure of characters within entity intervals. The input of the linear unit is connected to the output of the normalization unit of the second residual connection layer; The output of the linear unit is connected to the input of the multi-task learning unit; The output of the multi-task learning unit is connected to the input of the entity recognition unit and the input of the entity recovery unit, respectively. The output terminals of the entity recognition unit and the entity recovery unit are the output terminals of the multi-task output module; During the training process of the entity recognition and recovery model, the output terminals of the entity recognition unit and the entity recovery unit are both connected to the second input terminal of the dynamic loss balancing module. The entity recognition unit calculates the probability value of the entity's start position and the probability value of the entity's end position for each character, and constructs a candidate entity interval set based on the probability values ​​and a preset threshold. It further performs interval-level semantic representation aggregation and validity judgment on the candidate entity intervals to output the final entity interval result. The candidate entity interval set is constructed in the following way: calculating the entity's start position for each character... Probability of entity termination position And based on a preset threshold, filter those that meet the requirements. , and interval pair As candidate entity intervals; The entity recovery unit predicts the retention flag and sorting value of the characters in each entity interval, and rearranges the retained characters based on the sorting value to generate a standard entity. The dynamic loss balancing module is described by the formula Calculate the attention entropy of each attention head in the multi-head attention unit, where, Indicates attention head attention entropy, Represents the attention matrix. Indicates the length of the input sequence. This indicates the current encoded position index. Indicates the index of the currently viewed location; The average attention entropy is calculated using the attention entropy of each attention head. The calculation expression is as follows: ; in, Represents the average attention entropy. Indicates the number of attention heads; The dynamic balance parameters between the entity recognition unit and the entity recovery unit are dynamically adjusted using the average attention entropy.

6. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the entity recognition method for spoken Chinese text as described in any one of claims 1 to 4.

7. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the entity recognition method for spoken Chinese text as described in any one of claims 1 to 4.