Text marking method and device, equipment and storage medium

By adding text type markers to the text and using BERT and CRF models for semantic feature extraction, the problem of not being able to simultaneously determine the text type and key information in existing technologies is solved, thereby increasing the amount of text marker information and reducing its complexity.

CN113609866BActive Publication Date: 2025-12-23TENPAY PAID TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110920440.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-11
Publication Date
2025-12-23
Estimated Expiration
2041-08-11

AI Technical Summary

Technical Problem

Existing text tagging methods cannot effectively determine both the text type and key information simultaneously, resulting in limited information content and high complexity.

Method used

By adding text type markers to the text and using BERT and CRF models for semantic feature extraction, a character sequence role label probability distribution is generated. Combining key information and text type markers, structured tag information is generated.

Benefits of technology

It increases the amount of information in text tagging, reduces tagging complexity, and can simultaneously determine the key information and text type of the text, thus improving the efficiency of text tagging.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113609866B_ABST
    Figure CN113609866B_ABST
Patent Text Reader

Abstract

The application discloses a text marking method and device, equipment and a storage medium, and belongs to the technical field of artificial intelligence. The method comprises the following steps: obtaining a target text; splicing a text type marker to the target text to obtain a character sequence corresponding to the target text; performing semantic feature extraction processing on the character sequence to obtain a role label probability distribution corresponding to each character in the character sequence; determining key information of the target text and a text type corresponding to the text type marker according to the role label probability distribution; and generating marking information of the target text based on the key information and the text type. In the technical scheme provided by the application, the semantic feature extraction is performed on the character sequence formed after the classification mark is added, the probability distribution of the key information type and the text type corresponding to each character is obtained, and then the key information and the text type of the text are determined at the same time, so that the efficiency of text marking is effectively improved, and the complexity of text marking is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of artificial intelligence, and in particular relates to a text marking method and device, equipment and a storage medium. BACKGROUND

[0002] With the rapid development of Internet information technology, the amount of text data is rapidly increasing, and how to manage massive text data has become the focus of the industry.

[0003] In related technologies, the classification task and the information extraction task of the text are usually performed separately. For the text classification task, a keyword triggering method is usually used for the text classification task, or a common classification model is used to classify the complaint text into a corresponding category. For the information extraction task, a keyword extraction model is usually used to extract keywords in the text, or a topic model is used to mark the text to a corresponding topic label, or a named entity recognition model is used to extract entity information in the text.

[0004] In related technologies, the amount of extracted text information is limited and the complexity is high. SUMMARY

[0005] The embodiments of the present application provide a text marking method, device, equipment and storage medium, which can determine the text type and key information of the text at the same time, improve the information amount of the text marking information, and reduce the complexity of the text marking.

[0006] According to an aspect of an embodiment of the present application, a text marking method is provided, and the method comprises:

[0007] obtaining a target text;

[0008] concatenating a text type marker to the target text to obtain a character sequence corresponding to the target text;

[0009] performing semantic feature extraction processing on the character sequence to obtain a role label probability distribution corresponding to each character in the character sequence, the role label probability distribution being used to represent the probability that each character corresponds to each role label, and each role label being used to represent the key information attribute and the text type attribute of the character;

[0010] determining the key information of the target text and the text type corresponding to the text type marker according to the role label probability distribution;

[0011] generating marking information of the target text based on the key information and the text type.

[0012] According to an aspect of an embodiment of the present application, a text marking device is provided, and the device comprises:

[0013] The text acquisition module is configured to acquire a target text;

[0014] The label splicing module is configured to splice a text type label symbol to the target text to obtain a character sequence corresponding to the target text.

[0015] The label probability determination module is configured to perform semantic feature extraction processing on the character sequence to obtain a role label probability distribution corresponding to each character in the character sequence, the role label probability distribution being used to represent probabilities of the each character corresponding to each role label, the each role label being used to represent a key information attribute and a text type attribute of a character.

[0016] The information determination module is configured to determine, according to the role label probability distribution, key information of the target text and a text type corresponding to the text type label symbol.

[0017] The information labeling module is configured to generate labeled information of the target text based on the key information and the text type.

[0018] According to an aspect of an embodiment of the present application, a computer device is provided, the computer device comprising a processor and a memory, the memory storing at least one instruction, at least one program, a code set or an instruction set, the at least one instruction, the at least one program, the code set or the instruction set being loaded and executed by the processor to implement the above-mentioned text labeling method.

[0019] According to an aspect of an embodiment of the present application, a computer readable storage medium is provided, the storage medium storing at least one instruction, at least one program, a code set or an instruction set, the at least one instruction, the at least one program, the code set or the instruction set being loaded and executed by a processor to implement the above-mentioned text labeling method.

[0020] According to an aspect of an embodiment of the present application, a computer program product or a computer program is provided, the computer program product or the computer program comprising computer instructions stored in a computer readable storage medium. A processor of a computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions to enable the computer device to perform the above-mentioned text labeling method.

[0021] The technical solution provided by the embodiments of the present application can bring the following beneficial effects:

[0022] By adding text classification labels on the original text, and performing semantic feature extraction on the character sequence formed after adding the text classification labels, the role label probability distribution corresponding to each character is obtained, the above probability distribution is not only used to predict whether each character is key information, but also used to predict the text type corresponding to the text classification label, finally the key information and the text type of the target text can be determined according to the above role label probability distribution, and the target text is taken as the structured label information, the unstructured text data is combed through the structured label, the efficiency of text labeling is effectively improved, the information amount of the labeled information is improved, and the complexity of text labeling is reduced. BRIEF DESCRIPTION OF DRAWINGS

[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0024] Figure 1 is a schematic diagram of an application running environment provided by an embodiment of the present application;

[0025] Figure 2 is a flowchart of a text labeling method provided by an embodiment of the present application;

[0026] Figure 3 is a flowchart of a text labeling method provided by an embodiment of the present application;

[0027] Figure 4 Exemplarily shows a schematic diagram of determining character embedding features through a BERT model;

[0028] Figure 5 Exemplarily shows a basic structure schematic diagram of a transformation (Transformer) model in a BERT model;

[0029] Figure 6 Exemplarily shows a schematic diagram of determining a role label probability distribution based on a conditional random field (CRF) model;

[0030] Figure 7 Exemplarily shows a network structure schematic diagram of a complaint text labeling model;

[0031] Figure 8 is a flowchart of a text labeling method provided by another embodiment of the present application;

[0032] Figure 9 is a block diagram of a text labeling device provided by an embodiment of the present application;

[0033] Figure 10 is a structural block diagram of a computer device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0034] The text marking method provided by the embodiment of the present application relates to artificial intelligence technology and blockchain technology, which is briefly described below to facilitate understanding by those skilled in the art.

[0035] Artificial intelligence (AI) is the use of digital computers or digital computer-controlled machines to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use the knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology of computer science, which attempts to understand the essence of intelligence and produce a new intelligent machine that can react in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines, so that machines have the functions of perception, reasoning and decision-making.

[0036] Artificial intelligence technology is a comprehensive discipline, involving a wide range of fields, both hardware and software technologies. Artificial intelligence basic technologies generally include sensors, special artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics and other technologies. Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology and machine learning / deep learning and other major directions.

[0037] Machine learning (ML) is a multi-disciplinary subject, involving probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and other disciplines. It is a special study of how computers simulate or implement human learning behavior to acquire new knowledge or skills, reorganize existing knowledge structure to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental approach to making computers intelligent, and its applications are widespread in various fields of artificial intelligence. Machine learning and deep learning usually include artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and rule-based learning.

[0038] Deep learning: the concept of deep learning comes from the research of artificial neural networks. Multi-layer perceptron with multiple hidden layers is a deep learning structure. Deep learning forms more abstract high-level representation attribute classes or features by combining low-level features to discover distributed feature representation of data.

[0039] Natural language processing (NLP) is an important direction in the field of computer science and artificial intelligence. It studies various theories and methods that can realize effective communication between people and computers using natural language. Natural language processing is a science that integrates linguistics, computer science and mathematics. Therefore, the research in this field will involve natural language, i.e. the language used in daily life, so it is closely related to the study of linguistics. Natural language processing technology usually includes text processing, semantic understanding, machine translation, robot question and answer, knowledge graph and other technologies.

[0040] The method provided by the embodiments of the present application can be related to the field of cloud technology, for example, related to the field of big data. The method provided by the embodiments of the present application can mark text based on big data to generate structured text data. Big data refers to a collection of data that cannot be captured, managed and processed within a certain time range by conventional software tools, and is a massive, high-growth and diversified information asset that requires new processing modes to have stronger decision-making, insight discovery and process optimization capabilities. With the advent of the cloud era, big data has attracted more and more attention. Big data requires special technology to effectively process large amounts of data over time. Technologies suitable for big data include large-scale parallel processing databases, data mining, distributed file systems, distributed databases, cloud computing platforms, the Internet and scalable storage systems.

[0041] The method provided by the embodiments of the present application can also be related to blockchain, i.e. the method provided by the embodiments of the present application can be implemented based on blockchain, or the data involved in the method provided by the embodiments of the present application can be stored based on blockchain, or the execution subject of the method provided by the embodiments of the present application can be located in the blockchain. Blockchain is a new application mode of distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm and other computer technologies. Blockchain, in essence, is a decentralized database, which is a series of data blocks associated using cryptographic methods. Each data block contains information about a batch of network transactions, which is used to verify the validity (anti-fake) of the information and generate the next block. Blockchain can include a blockchain underlying platform, a platform product service layer and an application service layer.

[0042] The blockchain underlying platform can include user management, basic service, smart contract, and operation monitoring processing modules. Among them, the user management module is responsible for the identity information management of all blockchain participants, including maintaining public and private key generation (account management), key management, and user real identity and blockchain address correspondence maintenance (permission management), etc., and under authorization, supervising and auditing the transaction of certain real identities, providing risk control rule configuration (risk audit); the basic service module is deployed on all blockchain node devices to verify the validity of business requests, and after consensus, the valid request is recorded on the storage. For a new business request, the basic service first performs interface adaptation analysis and authentication processing (interface adaptation), then encrypts the business information through a consensus algorithm (consensus management), and after encryption, the complete and consistent transmission is transmitted to the shared ledger (network communication), and is recorded and stored; the smart contract module is responsible for contract registration and issuance, contract triggering and contract execution. Developers can define contract logic through a certain programming language, publish it to the blockchain (contract registration), trigger execution according to the logic of the contract terms, complete the contract logic, and also provide contract upgrade and cancellation functions; the operation monitoring module is mainly responsible for the deployment, configuration modification, contract setting, cloud adaptation of the product release process, and the real-time state visualization output of the product running, such as alarm, monitoring network condition, monitoring node device health status, etc.

[0043] In order to make the purpose, technical scheme and advantages of the present application clearer, the embodiments of the present application will be further described in detail below with reference to the drawings.

[0044] Please refer to Figure 1 which shows a schematic diagram of an application running environment provided by an embodiment of the present application. The application running environment can include a terminal 10 and a server 20.

[0045] The terminal 10 can be an electronic device such as a mobile phone, a tablet computer, a game console, an e-book reader, a multimedia playback device, a wearable device, a PC (Personal Computer), etc. The terminal 10 can install a client of an application.

[0046] In the embodiments of the present application, the above-mentioned application can be any application that generates text data. For example, a financial application, a news application, a social application, an interactive entertainment application, a browser application, a shopping application, a content sharing application, a VR (Virtual Reality) application, an AR (Augmented Reality) application, etc., which are not limited in the embodiments of the present application.

[0047] The server 20 is configured to provide background services for clients of the application program in the terminal 10. For example, the server 20 can be a background server of the application program described above. The server 20 can be a standalone physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and basic cloud computing services such as big data and artificial intelligence platforms. Alternatively, the server 20 can provide background services for application programs in multiple terminals 10.

[0048] Optionally, the terminal 10 and the server 20 can communicate with each other through the network 30. The terminal 10 and the server 20 can be directly or indirectly connected through wired or wireless communication, which is not limited in the present application.

[0049] Before introducing the method embodiments provided in the present application, the application scenarios, related terms or names that can be involved in the method embodiments of the present application are briefly introduced, so as to facilitate the understanding of the skilled in the art.

[0050] Named Entity Recognition (NER), also known as "Named Entity Recognition", is to identify entities with specific meanings in text, mainly including names, place names, organization names, and proper nouns.

[0051] Information extraction is a technology for extracting specific information from text data.

[0052] Bidirectional Encoder Representation from Transformers (BERT) based on conversion model: a model for pre-training language representation, training a general "language understanding" model based on text corpus, and assisting in performing natural language processing (NLP) tasks through the BERT model.

[0053] Conditional Random Fields (CRF): A kind of probability graph model, often used for labeling or analyzing sequence data, such as natural language text or biological sequences. Conditional Random Fields is a conditional probability distribution model P(Y|X), which represents the conditional Markov random field of another set of output random variables Y given a set of input random variables X, that is, the characteristic of CRF is to assume that the output random variable constitutes a Markov random field. Conditional Random Fields can be regarded as a generalization of the maximum entropy Markov model in labeling problems.

[0054] Long Short Term Memory (LSTM): A kind of recurrent neural network suitable for capturing position information before and after the sequence and making predictions on the sequence.

[0055] Bi-directional Long Short-Term Memory (BiLSTM) is an abbreviation of Bi-directional Long Short-Term Memory, which is composed of forward LSTM and backward LSTM.

[0056] Please refer to Figure 2 , which shows the flowchart of the text labeling method provided by an embodiment of the present application. The method can be applied in a computer device, which refers to an electronic device with data calculation and processing capability, such as the server 20 in the application program running environment shown in the figure. The execution subject of each step can be the server 20 in the application program running environment shown in the figure. The method can include the following steps (210-250). Figure 1

[0057] Step 210, obtaining a target text.

[0058] In the embodiment of the present application, the target text can be a comment text, a dialogue text, a message text, etc. The source and type of the text are not limited in the embodiment of the present application.

[0059] In some actual business scenarios, complaint data is a kind of extremely valuable data, which reflects the intuitive feedback of users to enterprises, and is an important clue source for timely discovering enterprise risks. The above complaint data mostly exists in the form of text, and the most typical one is the complaint text generated in the financial application program. Therefore, the target text in the embodiment of the present application can be the above complaint text.

[0060] ​​Optionally, the target text mentioned above is text that has undergone data cleaning. In some application scenarios, the original text data often has characteristics such as large data volume, a lot of text noise, excessively long text descriptions, and complex semantic expressions. Therefore, in this embodiment, the original text can be obtained first, and then the original text can be processed by data cleaning to obtain the target text. Optionally, the above data cleaning process is a data preprocessing stage. The data preprocessing stage mainly involves cleaning operations on the target text, including but not limited to noise reduction operations, punctuation mark removal operations, misspelling correction operations, and emoticon recognition and removal operations. Optionally, noise reduction operations include removing illegal characters, stop words, etc.

[0061] In one example, the original text is a user-uploaded complaint. The original text reads, "Movie app doesn't deliver after payment... how to scam people by profiting from short videos." After the data cleaning process described above, the target text becomes, "Movie app doesn't deliver after payment... scam people by profiting from short videos." Clearly, redundant punctuation marks in the original text have been removed, and typos have been corrected, resulting in high-quality target text. This effectively removes text noise and improves text quality.

[0062] Step 220: Concatenate the text type marker to the target text to obtain the character sequence corresponding to the target text.

[0063] To extract key information from the target text and determine its type simultaneously, the aforementioned text type marker can be added to the target text as a classification label. Optionally, the text type marker can be denoted as "[CTL]". This text type marker can be appended to the end of the target text to predict its text type.

[0064] In this embodiment of the application, the target text with the concatenated text type marker can be input into a pre-trained machine learning model. In this way, while the model is training and predicting the role label of each character in each target text, that is, the category of each character, it will also predict the category of the text type marker [CTL]. The category of the text type marker [CTL] is the final category of the target text.

[0065] Optionally, the text type identifier is a placeholder. Optionally, the text type identifier is a character with a preset encoding.

[0066] Each word in the target text has a corresponding encoding representation in the computer system. The above character sequence is a sequence composed of the character encodings corresponding to the target text after concatenating the text type markers. Optionally, the last character in the above character sequence is the text type marker.

[0067] At step 230, semantic feature extraction processing is performed on the character sequence to obtain a role label probability distribution corresponding to each character in the character sequence.

[0068] The role label probability distribution is used to represent the probability that each character corresponds to each role label, and each role label is used to represent the key information attribute and the text type attribute of the character.

[0069] The role label includes but is not limited to a key information label, a text type label, and other labels. The key information label represents the key information attribute of the character, the text type label represents the text type attribute of the character, and the other label represents that the character is not concerned by the current task.

[0070] In a possible implementation, the role labels are divided according to a BIO (Begin Inside Outside, sequence labeling) annotation format. Optionally, the key information label includes a key information first character label and a key information middle character label. Optionally, the text type label includes first character labels and middle character labels corresponding to various text types. In a text type division manner, the text type can include valid complaint text and invalid complaint text. Correspondingly, the text type label includes a valid complaint text first character label, a valid complaint text middle character label, an invalid complaint text first character label, and an invalid complaint text middle character label. The sequence labeling format is not limited in the embodiments of the application, and the types and quantities of the role labels are also not limited. The annotation format and the required role labels can be determined according to actual conditions.

[0071] In some actual business scenarios, it is desired to classify the text and extract the key information in the text as a text label. Through the role label probability distribution corresponding to each character, the probability that each character belongs to each text type and the probability that each character belongs to the key information can be determined, and then the text type and the key information of the text are determined at the same time, which simultaneously satisfies the above two requirements, without performing two computing tasks, effectively reducing the complexity of text labeling, and improving the efficiency of text labeling.

[0072] In an exemplary embodiment, as shown in FIG. 2, Figure 3 The step 230 can be implemented by the following step 231.

[0073] At step 231, the character sequence is input into a text classification and extraction model for semantic feature extraction processing to obtain a role label probability distribution corresponding to each character in the character sequence.

[0074] The text classification and extraction model is a machine learning model obtained by taking the sample text as a training sample, taking the text type of the sample text and the key information in the sample text as label information, and performing joint training based on the text classification task and the information extraction task.

[0075] Optionally, the text type marker corresponding to the text type of the sample text can be spliced to the sample text as the text type label corresponding to the sample text. Optionally, a key information label is added to each word in the sample text. For example, if a word in the sample text is the first word of the key information, a key information first word label is added to the word.

[0076] The text classification and extraction model is a machine learning model obtained by taking the sample text as a training sample, taking the text type of the sample text and the key information in the sample text as label information, and performing joint training based on the text classification task and the information extraction task.

[0077] Optionally, the text classification and extraction model can extract the key information phrase in the text based on the named entity recognition technology, and expand the entity to the length of the phrase. In addition, the text classification and extraction model implicitly introduces prior knowledge through joint extraction of key information and text type, thereby improving the accuracy of the text classification task and the information extraction task.

[0078] The text classification and extraction model can be a language processing model based on BERT+CRF, a language processing model based on BiLSTM+CRF, or a language processing model based on BERT+BiLSTM+CRF. The text classification task and the information extraction task can also be performed as two independent tasks, which can be specifically referred to as a pipeline form.

[0079] In the embodiments of the present application, based on a sequence-to-sequence (Seq2Seq) model, a corresponding labeling scheme for the sample text is designed, and a text type marker is added to the original text, so that the model can predict the key information label corresponding to each character and the text type label corresponding to the text type marker, thereby achieving the purpose of joint training based on the text classification task and the information extraction task. In some application scenarios, the text classification and extraction model achieves good results in the complaint text labeling task.

[0080] In a possible implementation, the target text is a complaint text, and the BERT+CRF framework is further improved by adding a complaint classification mark “[CTL]” to the original text, i.e., the text type mark described above, and predicting the complaint text type label of the complaint classification mark while predicting the key information label of each character, so that the complaint type of the complaint text can be determined and the complaint key information in the complaint text can be extracted through training of the model.

[0081] In some embodiments, the text is annotated only by extracting keywords, and the annotation result is good or bad, which depends on the segmentation effect of the segmenter, and a general keyword extraction algorithm cannot achieve good results in a specific business scenario. The key information label corresponding to the above sample text is a word-level annotation label information, which is independent of the segmenter and can be adjusted according to the business scenario. Therefore, the above text classification and extraction model can output a character-level role label probability distribution, which is suitable for complex semantic scenarios and can output a key text as key information, not just a word, which can effectively improve the accuracy of the text classification task and the key information extraction task. In some other embodiments, the text is annotated based on a topic model, which has a relatively obvious long tail effect, and most of the labels are inaccurate. The above role label is clear and accurate, which can effectively avoid the above long tail effect. In some other embodiments, the text is classified by a named entity model, but the named entity model is suitable for extracting entities with clear boundaries, such as persons and addresses. The text classification and extraction model in the embodiment can be applied to complex semantic environments and can extract a key text information with unclear boundaries due to the particularity of the sample text label information.

[0082] In an example embodiment, the implementation process of step 231 is as follows.

[0083] First, the character sequence is embedded to obtain a character feature sequence.

[0084] For the target character in the character sequence, the word embedding feature, the sentence embedding feature and the position embedding feature of the target character are determined.

[0085] In a possible implementation, the word embedding feature, the sentence embedding feature and the position embedding feature corresponding to the target character can be obtained by performing word embedding processing, sentence embedding processing and position embedding processing on the target character respectively.

[0086] The word embedding feature can be a word embedding feature vector corresponding to the character, used to represent the feature value of the character in a feature space, and has the characteristics of low dimension and high density. The sentence embedding feature is used to represent the feature of the sentence where the character is located, and can be a sentence embedding feature vector corresponding to the sentence where the character is located. Alternatively, the sentence embedding features of different characters in the same sentence are the same. The position embedding feature is used to represent the position feature of the character in the character sequence, and is used to reflect the position difference between different characters.

[0087] Based on the word embedding feature, the sentence embedding feature, and the position embedding feature, a character embedding feature of the target character is obtained.

[0088] Alternatively, the word embedding feature, the sentence embedding feature, and the position embedding feature of the target character are superimposed to obtain the character embedding feature of the target character. The character embedding feature fully reflects the feature information carried by each character from the word dimension, the sentence dimension, and the position dimension.

[0089] The character embedding features of the characters are arranged to obtain a character feature sequence.

[0090] The character embedding features of the characters are arranged according to the position order of the characters in the character sequence to obtain the character feature sequence.

[0091] In one example, as Figure 4As shown, it exemplarily shows a schematic diagram for determining character embedding features by a BERT model. The BERT model can process the input text by word segmentation, that is, the BERT model can process in units of word segmentation results, and obtain character embedding features corresponding to each word segmentation result. In the process of feature extraction, the BERT model can add additional marks to the word segmentation results, exemplarily, [CLS] represents a classification mark, and [SEP] represents a sentence mark. On the basis of the word segmentation results, word embedding processing (Token Embeddings), sentence embedding processing (Segment Embeddings) and position embedding processing (Position Embeddings) can be performed. Taking "my dog is cute helikes playing" as an input text, it is processed by word segmentation to obtain a plurality of "words". The word segmentation result of "my dog is cute he likes playing" is "my", "dog", "is", "cute", "he", "likes", "play" "##ing", and after adding [CLS] classification mark and [SEP] classification mark, the character sequence "[CLS]", "my", "dog", "is", "cute", "[SEP]", "he", "likes", "play" "##ing", "[SEP]" is obtained. Token Embeddings, Segment Embeddings and Position Embeddings are performed on each character in the character sequence, and finally the word embedding features, sentence embedding features and position embedding features corresponding to each character are obtained. The word embedding features corresponding to each character in the character sequence {“[CLS]”, “my”, “dog”, “is”, “cute”, “[SEP]”, “he”, “likes”, “play” “##ing”, “[SEP]”} are E [CLS] , E my , E dog , E is , E cute , E [SEP] , E he , E likes , E play , E ##ing , E [SEP] ; the sentence embedding features corresponding to each character are E A , E A , E A , E A , E A , E A , E B , E BE B E B E B The positional embedding features corresponding to each character are E0, E1, E2, E3, E4, E5, E6, E7, E8, E9, and E1, respectively. 10 Optionally, the word embedding features, sentence embedding features, and position embedding features of a character can be added together to obtain the character embedding features of that character.

[0092] Next, bidirectional semantic feature extraction is performed on the character feature sequence to obtain the probability distribution of role labels corresponding to each character in the character sequence.

[0093] Bidirectional semantic feature extraction is performed on the character feature sequence to obtain the first role label probability distribution of each character corresponding to each key information label, and the second role label probability distribution of each character corresponding to each text type label.

[0094] Among them, the role tag probability distribution includes the first role tag probability distribution and the second role tag probability distribution, the key information tag includes the first character tag of key information and the middle character tag of key information, and the text type tag includes at least one tag corresponding to a text type.

[0095] In an exemplary embodiment, the above character feature sequence is input into the Transformer model in the BERT model for bidirectional semantic feature extraction processing to obtain the first role label probability distribution of each character corresponding to each key information label, and the second role label probability distribution of each character corresponding to each text type label.

[0096] In the Transformer model described above, based on a multi-head attention mechanism, the correlation between character embedding features can be mined and quantified numerically into feature values ​​on each feature dimension. The weight information of each character embedding feature on each feature dimension can then be determined, thereby determining the probability distribution of each character as a role label. These role labels include both key information labels and text type labels; therefore, the probability label distribution can be decomposed into a first role label probability distribution and a second role label probability distribution.

[0097] In one example, such as Figure 5 As shown, this example illustrates the basic structure of the Transformer model in the BERT model. The Transformer is a novel architecture that can replace traditional recurrent neural networks and convolutional neural networks for machine learning. The Transformer structure consists of a left encoder and a right decoder, incorporating multi-head attention (Multi-head attention). Head Attention), which also adds self-attention (Self) inside Attention and fusion normalization (Add & Norm), and finally through linearization (Linear) and activation layer. The activation layer uses Softmax as the activation function. The Transformer learns different features from different dimensions and adds position information through positional encoding. The conversion model can extract high-order semantic features of the above input corpus.

[0098] Step 240, according to the role label probability distribution, determining the key information of the target text, and the text type label corresponding to the text type.

[0099] The key information can be a short phrase representing the content of the text description, similar to a keyword.

[0100] In one possible implementation, the above-mentioned key information is at the phrase level, not at the word level. Therefore, the key information has more information content.

[0101] In an exemplary embodiment, the role label includes a key information label and a text type label. Accordingly, as shown in Figure 3 Step 240 includes the following sub-steps (241-244).

[0102] Step 241, based on the role label probability distribution, determining the label transition probability between adjacent characters in each character.

[0103] The above-mentioned label transition probability is used to represent the possibility that the respective role labels corresponding to adjacent characters are correct labels. For example, the rationality of the label prediction combination composed of the character before the adjacent characters as the first character of the key information and the character after the adjacent characters as the middle character of the key information is higher than that of the label prediction combination composed of the character before the adjacent characters as the middle character of the key information and the character after the adjacent characters as the first character of the key information.

[0104] Step 242, according to the label transition probability, determining the role label sequence corresponding to the character sequence.

[0105] The role label sequence includes the role label corresponding to each character.

[0106] When each character in the character sequence corresponds to different role labels, different role label combinations can be formed to constitute different role label sequences. However, each character has a probability value corresponding to each role label, so the joint probabilities of these different role label sequences are different. The joint probability of the same role label sequence can be determined through the above-mentioned label transition probability, and then the role label sequence corresponding to the character sequence can be determined based on the joint probability of each role label sequence.

[0107] Step 243, identify the characters corresponding to each key information label in the role label sequence to obtain the key information of the target text.

[0108] In one example, the character sequence is "movie app payment not delivery, small video profiteering fraud [CTL]", and the characters corresponding to the key information labels in the corresponding role label sequence are "movie, small, video, fraud", i.e. the key information of the target text is "movie small video fraud". Further, "movie" and "small" correspond to the first character label of the key information, so the key information of the target text is "movie" and "small video fraud".

[0109] Step 244, identify the text type label corresponding to the text type marker in the role label sequence to determine the text type of the target text.

[0110] In one example, the character sequence is "movie app payment not delivery, small video profiteering fraud [CTL]", and the character corresponding to the text type label in the corresponding role label sequence is "[CTL]", i.e. the text type of the target text can be determined according to the specific text type label corresponding to [CTL]. For example, the text type label corresponding to [CTL] is specifically the valid complaint text label, then the target text is determined to be a valid complaint text, which can be recorded as complaint type: True (valid).

[0111] In one example, as shown in Figure 6 , an example is shown for determining the probability distribution of the role label based on the Conditional Random Field (CRF) model. As described above, the BERT model can output the probability distribution of the role label corresponding to each character (Token). For example, the probability of the character belonging to B KW, I KW…I T, wherein B KW represents the first character label of the key information, I KW represents the middle character label of the key information, and I T represents the middle character label of the valid complaint text. The probability of the character corresponding to B KW represents the possibility of the character being the first character of the key information, the probability of the character corresponding to I KW represents the possibility of the character being the middle character of the key information, and the probability of the character corresponding to I The probability of T represents the possibility that the character is the first character of the valid complaint text. The role label probability distribution corresponding to each character (Token) is input into the CRF model, and the optimal label prediction sequence corresponding to each character is finally output by adding label transition constraints to the CRF model. For any character, the role label probability distribution corresponding to the character finally determines the role label corresponding to the character. For example, a character is determined as B KW label, the next character is determined as I KW label, the last character is determined as I T label. Among them, the last character is often a text type marker. If the label corresponding to the last character is I T label, it means that the text type of the text is a valid complaint text, and it also means that the end of the text is spliced with at least two [CTL] characters, so the middle word label I T appears in the valid complaint type. If the end of the text is spliced with only one [CTL] character, since the character representing the valid complaint text is only one [CTL] character, there is no corresponding middle word, the last [CTL] character may be determined as the valid complaint type first word label B T or invalid complaint type first word label B F label, instead of I-T label.

[0112] Step 250, generating the label information of the target text based on the key information and the text type.

[0113] Combining the words in the key information as the key word label of the target text.

[0114] By extracting the key information as the text key word label, the core information of the text can be quickly understood, which assists in judging the type of the text.

[0115] The text type is taken as the type label of the target text.

[0116] Based on the key word label and the type label, the label information is generated.

[0117] In one example, the target text is "movie app payment does not deliver, small video fraud", and the structured label information of the target text finally output is { "complaint type": True, "key information": "movie", "small video fraud"}.

[0118] In an exemplary embodiment, the subtype of the text type to which the target text belongs can be further determined based on the identified key information. Furthermore, word clouds of different dimensions can be drawn based on the aforementioned key information. For example, after summarizing the key information of all complaint texts for a particular merchant, a word cloud diagram corresponding to that merchant can be determined using word cloud drawing technology. This word cloud diagram can visually display an overview of the merchant's complaints.

[0119] In one example, such as Figure 7 As shown, this example illustrates a network structure diagram of a complaint text tagging model. This complaint text tagging model is a text tagging model based on BERT and CRF, used to tag complaint texts. First, the character sequence {[CLS], Tok1, Tok2, ..., TokN} formed by adding text classification tags to the complaint text is input into the BERT layer. Here, [CLS] is the classification tag, Tok1 and Tok2 represent the first and second characters in the character sequence, respectively, and TokN represents the added text type tag. Internally, the BERT layer determines the character features corresponding to each character, that is, the character features corresponding to each character in the character sequence {[CLS], Tok1, Tok2, ..., TokN} are E... [CLS] E1, E2, ..., E N Next, the Transformer model inside the BERT layer performs bidirectional semantic feature extraction on the character features, obtaining the high-level semantic recognition results corresponding to each character. That is, the high-level semantic recognition results corresponding to each character in the character sequence {[CLS], Tok1, Tok2, ..., TokN} are C, T1, T2, ..., TN, respectively. N The advanced semantic recognition result is the probability distribution of characters corresponding to role tags. For example, role tags include the key information initial character tag B. KW, Key Information Middleware Tag I KW, Valid Complaint Type Initial Label B T, Valid Complaint Type Middle Label I T, Invalid Complaint Type First-letter Tag B F. Invalid Complaint Type Middle Label B T, and other character labels O. Finally, the high-level semantic recognition results corresponding to each character, i.e., the probability distribution of the role labels corresponding to each character, are input into the CRF layer. The CRF layer adds label transition probability constraints, and finally outputs the optimal role label sequence. For example, the label corresponding to the character Tok1 is B. KW, the character Tok2 corresponds to the tag I. The role tag corresponding to KW and the text type identifier TokN is I. T. That is, the character Tok1 and the character Tok2 are the first character and the middle character of the key information respectively, and the text type of the complaint text is a valid complaint text.

[0120] To sum up, the technical scheme provided by the embodiments of the present application adds a text classification mark to the target text, inputs the character sequence formed after adding the text classification mark into a text classification extraction model to extract semantic features, and obtains the role label probability distribution corresponding to each character. The above probability distribution is not only used to predict whether each character is key information, but also used to predict the text type corresponding to the text classification mark, and then determines the optimal label sequence of the target text from the above role label probability distribution based on a conditional random field model. According to the characters corresponding to each label in the label sequence, the key information and the text type of the target text can be determined, and they are used as the structured mark information of the target text. Through the above text classification extraction model, unstructured text data can be combed through structured labels, which can quickly assist auditors to judge the key information contained in the complaint text, and greatly save the manual auditing time. At the same time, the deep learning model actively learns high-level semantic knowledge, without the need to maintain a large-scale keyword library or feature library.

[0121] Compared with the keyword triggered mode, the accuracy and coverage of the text marking scheme based on the above text classification extraction model are obviously improved. In addition, by adding a text type mark in the text, the text classification task and the information extraction task are jointly trained, which can share the semantic information between the two tasks compared with the two tasks alone, implicitly introduces prior knowledge, and improves the overall effect.

[0122] Please refer to Figure 8 , which shows a flowchart of a text marking method provided by another embodiment of the present application. The method can be applied in a computer device, which refers to an electronic device with data calculation and processing capability, such as the execution subject of each step, which can be a server 20 in the application program running environment as shown. Figure 1 The method can include the following steps (801~813).

[0123] Step 801, obtaining a target text.

[0124] Step 802, concatenating a text type mark to the target text to obtain a character sequence corresponding to the target text.

[0125] Step 803, for a target character in the character sequence, determining the word embedding feature, the sentence embedding feature and the position embedding feature of the target character.

[0126] Step 804, based on the word embedding feature, the sentence embedding feature and the position embedding feature, obtaining the character embedding feature of the target character.

[0127] Step 805, arranging the character embedding features of each character to obtain a character feature sequence.

[0128] Step 806, performing bidirectional semantic feature extraction processing on the character feature sequence to obtain a first role label probability distribution of each character corresponding to each key information label and a second role label probability distribution of each character corresponding to each text type label.

[0129] Step 807, determining the label transition probability between adjacent characters in each character based on the first role label probability distribution and the second role label probability distribution.

[0130] Step 808, determining the role label sequence corresponding to the character sequence according to the label transition probability.

[0131] The role label sequence includes the role label corresponding to each character;

[0132] Step 809, identifying the characters corresponding to each key information label in the role label sequence to obtain the key information of the target text.

[0133] Step 810, identifying the text type label corresponding to the text type marker in the role label sequence to determine the text type of the target text.

[0134] Step 811, combining the words in the key information as the keyword label of the target text.

[0135] Step 812, taking the text type as the type label of the target text.

[0136] Step 813, generating the structured label information of the target text based on the keyword label and the type label.

[0137] The descriptions of the steps in the embodiments have been described above, and will not be repeated here.

[0138] To sum up, the technical scheme provided by the embodiments of the present application adds a text classification marker to the original text, extracts semantic features from the character sequence formed after adding the text classification marker to obtain the role label probability distribution corresponding to each character. The above probability distribution is not only used to predict whether each character is key information, but also used to predict the text type corresponding to the text classification marker. Finally, the key information and the text type of the target text can be determined simultaneously based on the above role label probability distribution, and used as the structured label information of the target text. The unstructured text data is combed through the structured label, effectively improving the efficiency of text labeling, increasing the information amount of the labeled information, and reducing the complexity of text labeling.

[0139] The following is an apparatus embodiment of the present application, which can be used to execute the method embodiments of the present application. For details not disclosed in the apparatus embodiments of the present application, refer to the method embodiments of the present application.

[0140] Please refer to Figure 9 which shows a block diagram of a text marking apparatus provided by an embodiment of the present application. The apparatus has the functions of implementing the above-mentioned text marking method, which can be implemented by hardware or corresponding software executed by hardware. The apparatus can be a computer device or can be arranged in a computer device. The apparatus 900 can include a text acquisition module 910, a marking splicing module 920, a label probability determination module 930, an information determination module 940, and an information marking module 950.

[0141] The text acquisition module 910 is configured to acquire a target text.

[0142] The marking splicing module 920 is configured to splice a text type marker to the target text to obtain a character sequence corresponding to the target text.

[0143] The label probability determination module 930 is configured to perform semantic feature extraction processing on the character sequence to obtain a role label probability distribution corresponding to each character in the character sequence, the role label probability distribution being used to represent probabilities of the each character corresponding to each role label, and the each role label being used to represent a key information attribute and a text type attribute of a character.

[0144] The information determination module 940 is configured to determine, according to the role label probability distribution, a key information of the target text and a text type corresponding to the text type marker.

[0145] The information marking module 950 is configured to generate marking information of the target text based on the key information and the text type.

[0146] In an example embodiment, the label probability determination module 930 includes a label probability determination unit.

[0147] The label probability determination unit is configured to input the character sequence into a text classification and extraction model to perform the semantic feature extraction processing to obtain the role label probability distribution corresponding to each character in the character sequence.

[0148] The text classification and extraction model is a machine learning model obtained based on joint training of a text classification task and an information extraction task, with a sample text as a training sample, and with a text type of the sample text and key information in the sample text as label information.

[0149] In an example embodiment, the label probability determination unit comprises a character feature determination subunit and a bidirectional semantic feature extraction subunit.

[0150] The character feature determination subunit is configured to perform embedding processing on the character sequence to obtain a character feature sequence.

[0151] The bidirectional semantic feature extraction subunit is configured to perform bidirectional semantic feature extraction processing on the character feature sequence to obtain a role label probability distribution corresponding to each character in the character sequence.

[0152] In an example embodiment, the bidirectional semantic feature extraction subunit is specifically configured to:

[0153] perform bidirectional semantic feature extraction processing on the character feature sequence to obtain a first role label probability distribution corresponding to each character in each key information label and a second role label probability distribution corresponding to each character in each text type label.

[0154] The role label probability distribution comprises the first role label probability distribution and the second role label probability distribution, the key information label comprises a key information first character label and a key information middle character label, and the text type label comprises a label corresponding to at least one text type.

[0155] In an example embodiment, the character feature determination subunit is specifically configured to:

[0156] For a target character in the character sequence, determine a word embedding feature, a sentence embedding feature, and a position embedding feature of the target character;

[0157] obtain a character embedding feature of the target character based on the word embedding feature, the sentence embedding feature, and the position embedding feature;

[0158] arrange the character embedding features of the characters to obtain the character feature sequence.

[0159] In an example embodiment, the information determination module 940 comprises a transition probability determination unit, a label sequence determination unit, a key information identification unit, and a text type identification unit.

[0160] The transition probability determination unit is configured to determine a label transition probability between adjacent characters in the characters based on the role label probability distribution.

[0161] The label sequence determination unit is configured to determine a role label sequence corresponding to the character sequence according to the label transition probability, wherein the role label sequence comprises role labels corresponding to the characters.

[0162] A key information identifying unit is configured to identify characters corresponding to each key information label in the role label sequence, to obtain key information of the target text.

[0163] A text type identifying unit is configured to identify a text type label corresponding to the text type marker in the role label sequence, to determine a text type of the target text.

[0164] In an example embodiment, the information marking module 950 includes a keyword label determining unit, a type label determining unit, and a marked information generating unit.

[0165] The keyword label determining unit is configured to combine words in the key information as a keyword label of the target text.

[0166] The type label determining unit is configured to take the text type as a type label of the target text.

[0167] The marked information generating unit is configured to generate the marked information based on the keyword label and the type label.

[0168] To sum up, the technical scheme provided by the embodiments of the present application adds a text classification marker to an original text, extracts semantic features from a character sequence formed after adding the text classification marker, obtains a role label probability distribution corresponding to each character, and uses the above probability distribution to not only predict whether each character is key information, but also predict a text type corresponding to the text classification marker. Finally, the key information and the text type of the target text can be determined simultaneously according to the above role label probability distribution, and used as structured marked information of the target text. The unstructured text data is combed through the structured labels, the efficiency of text marking is effectively improved, the information amount of the marked information is improved, and the complexity of text marking is reduced.

[0169] It should be noted that the apparatus provided in the above embodiments is only used as an example to divide the above functional modules, and in actual applications, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the above described functions. In addition, the apparatus and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process is described in detail in the method embodiments, which will not be repeated here.

[0170] Please refer to Figure 10 which shows a structural block diagram of a computer device provided in an embodiment of the present application. The computer device can be a server for executing the above text marking method. Specifically:

[0171] The computer device 1000 includes a central processing unit (CPU) 1001, a system memory 1004, including a random access memory (RAM) 1002 and a read-only memory (ROM) 1003, and a system bus 1005 that couples the system memory 1004 to the central processing unit 1001. The computer device 1000 also includes a basic input / output system (I / O) 1006 that helps to transfer information between elements of the computer, and a mass storage device 1007 for storing an operating system 1013, application programs 1014, and other program modules 1015.

[0172] The basic input / output system 1006 includes a display 1008 for displaying information and an input device 1009, such as a mouse, keyboard, or the like, for inputting information into the computer. The display 1008 and input device 1009 are connected to the central processing unit 1001 through an input / output controller 1010 that is connected to the system bus 1005. The basic input / output system 1006 can also include the input / output controller 1010 for receiving and processing input from a number of other devices, including a keyboard, mouse, or electronic stylus. Similarly, the input / output controller 1010 provides output to a display screen, printer, or other type of output device.

[0173] The mass storage device 1007 is connected to the central processing unit 1001 through a mass storage controller (not shown) that is connected to the system bus 1005. The mass storage device 1007 and its associated computer readable media provide non-volatile storage for the computer device 1000. That is, the mass storage device 1007 can include a computer readable medium (not shown) such as a hard disk or a CD-ROM (Compact Disc Read-Only Memory) drive.

[0174] Without loss of generality, computer-readable media can include computer storage media and communication media. Computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes RAM, ROM, EPROM (Erasable Programmable Read Only Memory), EEPROM (Electrically Erasable Programmable Read Only Memory), flash memory or other solid state memory technology, CD-ROM, digital video disk (DVD), or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices. Computer storage media does not, however, include communication media. The system memory 1004 and mass storage device 1007 described above can be embodied as computer storage media.

[0175] According to various embodiments of the present application, the computer device 1000 can also operate in the networked environment via the network interface 1011 connected to the system bus 1005. The computer device 1000 can be connected to the network 1012 through a network interface 1011 connected to the system bus 1005. It is to be appreciated that the network interface 1011 can also be utilized to connect the computer device 1000 to other types of networks and remote computer systems (not shown).

[0176] The memory also includes a computer program that is stored in the memory and configured to be executed by one or more processors to implement the text labeling method described above.

[0177] In an exemplary embodiment, a computer-readable storage medium is also provided, in which at least one instruction, at least one program, a code set or an instruction set is stored, and when executed by a processor, the at least one instruction, the at least one program, the code set or the instruction set implements the text labeling method described above.

[0178] Optionally, the computer readable storage medium can include: ROM (Read Only Memory), RAM (Random Access Memory), SSD (Solid State Drives) or optical disc, etc. Among them, the random access memory can include ReRAM (Resistance Random Access Memory) and DRAM (Dynamic Random Access Memory).

[0179] In the example embodiment, a computer program product or computer program is also provided, which includes computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions, so that the computer device executes the above-mentioned text marking method.

[0180] It should be understood that "multiple" mentioned herein refers to two or more. The "and / or" describes the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B can represent: A exists alone, A and B exist together, and B exists alone. The character " / " generally represents that the associated objects before and after it are in an "or" relationship. In addition, the step numbers described herein only exemplarily show a possible execution order between steps. In some other embodiments, the above steps can also be executed in a different order, such as two different numbered steps being executed simultaneously, or two different numbered steps being executed in an order opposite to that shown in the figure, and the embodiments of the present application do not limit this.

[0181] The above only describes the example embodiments of the present application, and does not limit the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A text labeling method characterized by, The method comprises: acquiring a complaint text; concatenating a text type marker to the complaint text to obtain a character sequence corresponding to the complaint text; inputting the character sequence into a text classification and extraction model for semantic feature extraction processing to obtain a role label probability distribution corresponding to each character in the character sequence; the text classification and extraction model is a machine learning model obtained by jointly training sample texts as training samples, text types of the sample texts and key phrases in the sample texts as label information, and based on a text classification task and an information extraction task; the role label probability distribution is used to represent probabilities of the each character corresponding to each role label; and the each role label is used to represent key phrase attributes and text type attributes of the character; based on the role label probability distribution corresponding to the each character, determining a label transition probability between adjacent characters in the each character; based on the label transition probability between adjacent characters in the each character, determining respective joint probabilities of different role label sequences corresponding to each other, and based on the respective joint probabilities of different role label sequences, determining a role label sequence corresponding to the character sequence; different role label sequences are composed of different role label combinations corresponding to each character in the character sequence; identifying characters corresponding to each key phrase label in the role label sequence corresponding to the character sequence to obtain a key phrase of the complaint text; identifying a text type label corresponding to the text type marker in the role label sequence corresponding to the character sequence to determine a text type of the complaint text, the text type indicating a valid complaint type or an invalid complaint type; based on the key phrase and the text type, generating label information of the complaint text.

2. The method of claim 1, wherein, The inputting the character sequence into a text classification and extraction model for semantic feature extraction processing to obtain a role label probability distribution corresponding to each character in the character sequence comprises: performing embedding processing on the character sequence to obtain a character feature sequence; performing bidirectional semantic feature extraction processing on the character feature sequence to obtain the role label probability distribution corresponding to each character in the character sequence.

3. The method of claim 2, wherein, The performing bidirectional semantic feature extraction processing on the character feature sequence to obtain the role label probability distribution corresponding to each character in the character sequence comprises: performing bidirectional semantic feature extraction processing on the character feature sequence to obtain a first role label probability distribution corresponding to each key phrase label of the each character, and a second role label probability distribution corresponding to each text type label of the each character; wherein the role label probability distribution comprises the first role label probability distribution and the second role label probability distribution, the key phrase label comprises a key phrase first word label and a key phrase middle word label, and the text type label comprises a label corresponding to at least one text type.

4. The method of claim 2, wherein, The embedding processing on the character sequence to obtain a character feature sequence comprises: for a target character in the character sequence, determining a word embedding feature, a sentence embedding feature and a position embedding feature of the target character; obtaining a character embedding feature of the target character based on the word embedding feature, the sentence embedding feature, and the position embedding feature; arranging the character embedding features of the characters to obtain the character feature sequence.

5. The method of claim 1, wherein, The generating the label information of the complaint text based on the key phrase and the text type comprises: combining words in the key phrase as a keyword label of the complaint text; taking the text type as a type label of the complaint text; generating the label information based on the keyword label and the type label.

6. A text marking apparatus characterized by comprising: The device comprises: a text acquisition module configured to acquire a complaint text; a label concatenation module configured to concatenate a text type label to the complaint text to obtain a character sequence corresponding to the complaint text; a label probability determination module configured to input the character sequence into a text classification and extraction model to perform semantic feature extraction processing, so as to obtain a role label probability distribution corresponding to each character in the character sequence; the text classification and extraction model is a machine learning model obtained based on joint training of a text classification task and an information extraction task, with sample texts as training samples, and with text types of the sample texts and key phrases in the sample texts as label information; the role label probability distribution is used to represent probabilities of the characters corresponding to respective role labels; and the respective role labels are used to represent key phrase attributes and text type attributes of the characters; an information determination module configured to determine a label transition probability between adjacent characters in the characters based on the role label probability distribution corresponding to the characters; determine respective joint probabilities of different role label sequences based on the label transition probability between the adjacent characters in the characters; and determine a role label sequence corresponding to the character sequence based on the respective joint probabilities of the different role label sequences; the different role label sequences are formed by different combinations of the role labels corresponding to each character in the character sequence; identify characters corresponding to respective key phrase labels in the role label sequence corresponding to the character sequence to obtain key phrases of the complaint text; and identify a text type label corresponding to the text type label in the role label sequence corresponding to the character sequence to determine a text type of the complaint text, the text type indicating a valid complaint type or an invalid complaint type; an information labeling module configured to generate label information of the complaint text based on the key phrases and the text type.

7. The apparatus of claim 6, wherein, The label probability determination module comprises: a character feature determination subunit configured to perform embedding processing on the character sequence to obtain a character feature sequence; a bidirectional semantic feature extraction subunit configured to perform bidirectional semantic feature extraction processing on the character feature sequence to obtain the role label probability distribution corresponding to each character in the character sequence.

8. The apparatus of claim 7, wherein, The bidirectional semantic feature extraction subunit is specifically configured to perform bidirectional semantic feature extraction processing on the character feature sequence to obtain first role label probability distributions of the characters corresponding to respective key phrase labels, and second role label probability distributions of the characters corresponding to respective text type labels. The role label probability distribution includes the first role label probability distribution and the second role label probability distribution, the key phrase label includes a key phrase first character label and a key phrase middle character label, and the text type label includes a label corresponding to at least one text type.

9. The apparatus of claim 7, wherein, The character feature determination subunit is specifically configured to determine, for a target character in the character sequence, a word embedding feature, a sentence embedding feature, and a position embedding feature of the target character. The character embedding feature of the target character is obtained based on the word embedding feature, the sentence embedding feature, and the position embedding feature. The character embedding features of the characters are arranged to obtain the character feature sequence.

10. The apparatus of claim 6, wherein, The information marking module includes: A keyword label determination unit configured to combine words in the key phrase as a keyword label of the complaint text. A type label determination unit configured to take the text type as a type label of the complaint text. A marked information generation unit configured to generate the marked information based on the keyword label and the type label.

11. A computer device, comprising: The computer device includes a processor and a memory, and the memory stores at least one instruction, at least one program, a code set, or an instruction set. The at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement the text marking method of any one of claims 1 to 5.

12. A computer-readable storage medium, characterized in that, The storage medium stores at least one instruction, at least one program, a code set, or an instruction set. The at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement the text marking method of any one of claims 1 to 5.

13. A computer program product, characterised in that, The computer program product includes computer instructions stored in a computer readable storage medium. The processor of the computer device reads and executes the computer instructions from the computer readable storage medium, so that the computer device executes the text marking method of any one of claims 1 to 5.

Citation Information

Patent Citations

  • Keyword extraction method and system for financial and economic messages

    CN112507190A

  • Corpus processing model training method, device, storage medium and electronic equipment

    CN113010647A