A text category annotation method, device, electronic device and storage medium

Through text segmentation and stop word removal processing, combined with the category target annotation network and prior knowledge, the existing technology solves the problems of strong manual annotation dependence and frequent field switching, and achieves the accuracy and versatility of automatic text category target annotation. sexual enhancement.

CN110941958BActive Publication Date: 2024-09-03TENCENT CLOUD COMPUTING (BEIJING) CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201911122451.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-11-15
Publication Date
2024-09-03
Estimated Expiration
2039-11-15

AI Technical Summary

Technical Problem

Existing text category annotation methods rely on manual annotation of training samples, which consume a lot of manpower and are highly dependent on quality. They cannot effectively handle complex multi-level categories, and traditional methods need to be retrained when switching fields, resulting in low efficiency.

Method used

By obtaining the target text for word segmentation and removal of stop words, the category annotation network is used to determine the correlation between text keywords and category keywords, and text category annotation is performed based on the correlation. Prior knowledge is introduced to improve annotation accuracy. , reducing dependence on manual annotation.

Benefits of technology

It realizes automatic determination of text categories without relying on manual annotation, saves labor costs, improves the accuracy and versatility of text category annotation, is suitable for complex multi-level categories, and does not require retraining when switching fields.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN110941958B
    Figure CN110941958B
Patent Text Reader

Abstract

The present invention provides a text category annotation method, including: obtaining a target text, and performing word segmentation processing on the target text to form a word segmentation processing result; performing stop word removal processing on the target text to form text keywords that match the target text; processing the hierarchical categories that match the target text to form category keywords corresponding to the hierarchical categories; processing the text keywords and the category keywords to determine the relevance between the text keywords and the category keywords; and annotating the text categories of the acquired text to be processed according to the relevance between the text keywords and the category keywords. The present invention also provides a category annotation device, an electronic device, and a storage medium. The present invention can realize automatic annotation of text categories, save the link of manually annotating categories in the traditional method, and improve the accuracy of text category annotation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to information processing technology, and in particular to a text category annotation method, device, electronic device and storage medium. Background Art

[0002] Machine reading comprehension technology refers to using machine learning methods to let the model predict the answer A (Answer) given a natural language question Q (Question) and a corresponding text paragraph P (Paragraph). Extractive machine reading comprehension requires that the answer A is a continuous segment from paragraph P.

[0003] Pre-trained language models have made breakthrough progress in machine reading comprehension tasks. The core idea is to pre-train language models on large-scale unsupervised text corpora to obtain semantic representations of texts. These semantic representations can be further applied to a series of natural language understanding tasks including machine reading comprehension in the form of features or fine-tuning. This understanding process requires text-based category annotation; text category annotation refers to labeling text into one or more categories in a category system. Text category annotation has a wide range of applications in a large number of business scenarios such as advertising, recommendation, and search. Determining the category to which a text belongs is an important part of text category annotation. In the traditional method of determining text categories, the categories to which a number of texts belong are manually annotated to obtain training samples, and then the machine learning models such as neural networks are trained based on the training samples to obtain a mapping model, and then the text to be processed is input into the mapping model, and the category of the text to be processed is determined by the mapping model. However, the process of manually annotating training samples consumes a lot of manpower. In addition, the mapping model is trained based on manually annotated training samples, so the quality of determining the category to which the text to be processed belongs is highly dependent on the quality of manual annotation. Summary of the invention

[0004] In view of this, an embodiment of the present invention provides a text category target annotation method, device, electronic device and storage medium. The technical solution of the embodiment of the present invention is implemented as follows:

[0005] The present invention provides a text category annotation method, the method comprising:

[0006] Acquire a target text, and perform word segmentation processing on the target text to form a word segmentation processing result;

[0007] In response to the word segmentation result, the target text is processed to remove stop words to form text keywords that match the target text;

[0008] Processing the hierarchical categories matching the target text through a category annotation network in a text processing model to form category keywords corresponding to the hierarchical categories;

[0009] Processing the text keywords and the category keywords to determine the relevance between the text keywords and the category keywords;

[0010] The text category of the acquired text to be processed is annotated according to the relevance between the text keywords and the category keywords through the category annotation network in the text processing model.

[0011] The embodiment of the present invention further provides a text category object annotation device, the device comprising:

[0012] Information transmission module, used to obtain target text;

[0013] An information processing module, used for performing word segmentation processing on the target text to form a word segmentation processing result;

[0014] The information processing module is used to perform stop word removal processing on the target text in response to the word segmentation processing result to form text keywords matching the target text;

[0015] The information processing module is used to process the hierarchical categories matching the target text through the category annotation network in the text processing model to form category keywords corresponding to the hierarchical categories;

[0016] The information processing module is used to process the text keyword and the category keyword based on the text keyword knowledge category annotation network corresponding to the text keyword to determine the relevance between the text keyword and the category keyword;

[0017] The information processing module is used to annotate the text category of the acquired text to be processed according to the relevance between the text keywords and the category keywords through the category annotation network in the text processing model.

[0018] In the above scheme,

[0019] The information processing module is used to determine a dynamic noise threshold that matches the usage environment of the text processing model;

[0020] The information processing module is used to perform denoising on the target text set according to the dynamic noise threshold and trigger a first word segmentation strategy that matches the dynamic noise threshold;

[0021] The information processing module is used to perform word segmentation processing on the target text according to a first word segmentation strategy matching the dynamic noise threshold to form a word segmentation processing result;

[0022] The information processing module is used to determine a fixed noise threshold corresponding to the text processing model;

[0023] The information processing module is used to perform denoising on the target text set according to the fixed noise threshold and trigger a second word segmentation strategy that matches the fixed noise threshold;

[0024] The information processing module is used to perform word segmentation processing on the target text according to a second word segmentation strategy that matches the fixed noise threshold to form a word segmentation processing result.

[0025] In the above scheme,

[0026] The information processing module is used to determine the hierarchical categories matching the target text through the category annotation network in the text processing model;

[0027] The information processing module is used to perform string replacement and extraction processing on the hierarchical categories matching the target text through the category annotation network in the text processing model to form at least one category keyword set, wherein the at least one category keyword set includes category keywords corresponding to the corresponding hierarchical categories.

[0028] In the above scheme,

[0029] The information processing module is used to determine a first number of occurrences of the text keyword in the category corresponding to the category keyword;

[0030] The information processing module is used to determine a second number of occurrences of the text keyword in all target texts;

[0031] The information processing module is used to process the first quantity and the second quantity based on a text keyword knowledge category annotation network corresponding to the text keyword to determine the relevance between the text keyword and the category keyword.

[0032] In the above scheme,

[0033] The information processing module is used to convert the relevance between the text keyword and the category keyword into the posterior probability of the category keyword based on the text keyword knowledge category annotation network corresponding to the text keyword;

[0034] The information processing module is used to determine the mapping relationship between the text keywords, the category keywords and the posterior probability;

[0035] The information processing module is used to convert the mapping relationship between the text keywords, the category keywords and the posterior probability into prior knowledge corresponding to the category annotation network in the text processing model based on the text keyword knowledge category annotation network corresponding to the text keywords.

[0036] In the above scheme,

[0037] The information processing module is used to determine a keyword knowledge graph that matches the usage environment of the text processing model;

[0038] The information processing module is used to encode and perform weighted average processing on the text to be processed through the keyword knowledge graph based on the category annotation network in the text processing model;

[0039] The information processing module is used to trigger the prior knowledge corresponding to the category annotation network according to the relevance between the text keyword and the category keyword;

[0040] The information processing module is used to label the text category of the text to be processed after encoding and weighted averaging processing according to the prior knowledge corresponding to the category annotation network.

[0041] In the above scheme,

[0042] The information processing module is used to determine the keywords in the text to be processed based on the category annotation network in the text processing model;

[0043] The information processing module is used to determine the relevance between each keyword in the text to be processed and the corresponding category keyword based on the category annotation network in the text processing model and the prior knowledge corresponding to the category annotation network;

[0044] The information processing module is used to sort the relevance between each keyword in the text to be processed and the corresponding category keyword;

[0045] The information processing module is used to determine the text category annotation result of the text to be processed according to the sorting result of the relevance between each keyword in the text to be processed and the corresponding category keyword.

[0046] An embodiment of the present invention further provides an electronic device, the electronic device comprising:

[0047] A memory for storing executable instructions;

[0048] The processor is used to implement the preceding text class target annotation method when running the executable instructions stored in the memory.

[0049] An embodiment of the present invention further provides a computer-readable storage medium storing executable instructions, which, when executed by a processor, implement the preceding text category annotation method.

[0050] The embodiments of the present invention have the following beneficial effects:

[0051] By acquiring a target text and performing word segmentation processing on the target text to form a word segmentation processing result; in response to the word segmentation processing result, the target text is processed to remove stop words to form text keywords matching the target text; through the category annotation network in the text processing model, the hierarchical category matching the target text is processed to form category keywords corresponding to the hierarchical category; the text keywords and the category keywords are processed to determine the relevance between the text keywords and the category keywords; through the category annotation network in the text processing model, the text category of the acquired text to be processed is annotated according to the relevance between the text keywords and the category keywords. This process can not only determine the category to which any text belongs by the running computer device based on the relevance between the text keywords and the category keywords in the absence of any text whose category is known, and annotate the text category, but also save the link of manually annotating categories in the traditional method, save labor costs, reduce the dependence of the quality of determining the category to which the text to be processed belongs on the quality of manual annotation, and improve the accuracy and universality of text category annotation. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1 A schematic diagram of a usage scenario of the text category object annotation method provided by an embodiment of the present invention;

[0053] Figure 2 A schematic diagram of the structure of a text category target annotation device provided by an embodiment of the present invention;

[0054] Figure 3 A schematic diagram of generating text category annotation results based on the Seq2Seq model of RNN in the prior art;

[0055] Figure 4 It is a schematic diagram of generating text category target annotation results based on the bidirectional attention neural network model (BERT Bidirectional Encoder Representations from Transformers) in the prior art;

[0056] Figure 5 An optional flow chart of a text category annotation method provided in an embodiment of the present invention;

[0057] Figure 6An optional flow chart of a text category annotation method provided in an embodiment of the present invention;

[0058] Figure 7 An optional flow chart of a text category annotation method provided in an embodiment of the present invention;

[0059] Figure 8 A schematic diagram of the data structure of a text category annotation method in an embodiment of the present invention;

[0060] Fig. 9 It is an optional process diagram of the text category object annotation method in an embodiment of the present invention;

[0061] Fig.10 Schematic diagram of the use environment of the text category object annotation method in an embodiment of the present invention. DETAILED DESCRIPTION

[0062] In order to make the purpose, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present invention. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present invention.

[0063] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0064] Before further describing the embodiments of the present invention in detail, the nouns and terms involved in the embodiments of the present invention are described. The nouns and terms involved in the embodiments of the present invention are subject to the following interpretations.

[0065] 1) In response, it is used to indicate the conditions or states on which the executed operations depend. When the dependent conditions or states are met, one or more operations executed may be in real time or have a set delay. Unless otherwise specified, there is no restriction on the order in which the multiple operations executed are executed.

[0066] 2) Neural Network (NN): Artificial Neural Network (ANN), referred to as neural network or quasi-neural network, is a mathematical model or computational model that imitates the structure and function of biological neural networks (the central nervous system of animals, especially the brain) in the field of machine learning and cognitive science, and is used to estimate or approximate functions.

[0067] 3) Speech Recognition (SR Speech Recognition): Also known as Automatic Speech Recognition (ASR Automatic Speech Recognition), Computer Speech Recognition (CSR Computer Speech Recognition) or Speech to Text (STT Speech To Text), its goal is to use computers to automatically convert human speech content into corresponding text.

[0068] 4) Machine Translation (MT): It belongs to the field of computational linguistics. Its research is to translate text or speech from one natural language into another natural language through computer programs. Neural Machine Translation (NMT) is a technology that uses neural network technology for machine translation.

[0069] 5) Encoder-decoder structure: A network structure commonly used in machine translation technology. It consists of two parts: an encoder and a decoder. The encoder converts the input text into a series of context vectors that can express the characteristics of the input text. The decoder receives the output of the encoder as its own input and outputs the corresponding text sequence in another language.

[0070] 6) Bidirectional Attention Neural Network Model (BERT Bidirectional Encoder Representationsfrom Transformers) Bidirectional Attention Neural Network Model proposed by Google.

[0071] 7) Token: Before any actual processing of the input text, it needs to be segmented into language units such as words, punctuation marks, numbers, or pure alphanumeric characters. These units are called tokens.

[0072] 8) Softmax: Normalized exponential function, which is a generalization of the logic function. It can "compress" a K-dimensional vector containing any real number into another K-dimensional real vector, so that each element is between [0, 1] and the sum of all elements is 1.

[0073] 9) Category system: A system formed by defining and dividing the target areas of text categories, which includes multiple categories.

[0074] 10) Text classification: Classify the text into a target category in a category system.

[0075] 11) Text category annotation: The task of labeling text into one or more categories in a category system, including text classification.

[0076] 12) Multi-level categories: In the category system, categories have a hierarchical relationship.

[0077] 13) Word vector: Represent a word or phrase with a fixed-dimensional distribution vector. Fusion algorithm: Fusion of multiple algorithms, including algorithm-level fusion and result-level fusion. Unsupervised algorithm: Learning internal features of unlabeled data. Keyword knowledge: In the knowledge graph, a set of keywords that have an equivalent and belonging relationship with keywords.

[0078] 14) K-means: An unsupervised clustering method that calculates the similarity between texts and iteratively clusters text sets into a specified number of clusters.

[0079] 15) Light GBM: A gradient boosting framework that uses a tree-based learning algorithm for text classification.

[0080] 16) Deep Learning Text Classification: Use a neural network to encode text and then classify the encoded text.

[0081] 17) Word segmentation: Use Chinese word segmentation tools to segment Chinese text and obtain a set of fine-grained words. Stop words: Characters or words that do not contribute to the semantics of the text or whose contribution can be ignored. Cosine similarity: The cosine similarity of two texts after they are represented as vectors.

[0082] 18) Transformers: A new network structure that uses an attention mechanism to replace the traditional encoder-decoder model that must rely on other neural networks. Word vector: A single word is represented by a distribution vector of fixed dimension. Compound word: A coarse-grained keyword composed of fine-grained keywords, whose semantics are richer and more complete than fine-grained keywords.

[0083] 19) Text keywords: Keywords generated after text segmentation.

[0084] 20) Hierarchical categories: In the category system, categories have a hierarchical relationship.

[0085] 21) Category keywords: In the hierarchical category system, the name corresponding to each level category.

[0086] 22) Semi-supervised learning: Use a small amount of labeled training data and a large amount of unlabeled data to learn the internal features of the data and then label (or classify) the data.

[0087] 23) Clustering: Based on the characteristics of the data, the data is divided into several clusters, each cluster contains one or more data.

[0088] 24) Unsupervised learning: Only use a large amount of unlabeled data to learn the features of unlabeled data and cluster the data.

[0089] 25) Supervised learning: Learn the relationship between labels and data in a large amount of labeled data through training, and apply the trained model to unlabeled data.

[0090] 26) Support Vector Machine: It finds an optimal hyperplane (in high-dimensional vectors) to separate data and can be used for text classification.

[0091] 27) Ensemble learning: combining multiple learners (classifiers) according to certain rules to achieve better learning results, which can be used for text classification.

[0092] 28) Stop words: characters or words that have no contribution to the semantics of the text or whose contribution can be ignored

[0093] Figure 1 A schematic diagram of a usage scenario of the text category annotation method provided by an embodiment of the present invention, see Figure 1 The terminal (including terminal 10-1 and terminal 10-2) is provided with a client of application software related to text input function. The user can input the corresponding question sentence through the set text input client, and the text input client can also receive the corresponding text category annotation result and display the received text category annotation result to the user; the terminal is connected to the server 200 through the network 300, and the network 300 can be a wide area network or a local area network, or a combination of the two, and a wireless link is used to realize data transmission.

[0094] As an example, server 200 is used to deploy the text processing model and, through the category annotation network in the text processing model, annotate the text category of the acquired text to be processed according to the relevance between the text keywords and the category keywords, and display the text category annotation results generated by the text processing model through the terminal (terminal 10-1 and / or terminal 10-2).

[0095] Of course, before the target question sentence is processed by the text processing model to generate the corresponding text category annotation result, it is also necessary to determine the relevance between the text keywords and the category keywords, and then based on the text keyword knowledge category annotation network corresponding to the text keywords, the mapping relationship between the text keywords, the category keywords and the posterior probability is converted into the prior knowledge corresponding to the category annotation network in the text processing model to achieve the corresponding text annotation processing, which specifically includes: obtaining the target text, and performing word segmentation processing on the target text to form a word segmentation processing result; in response to the word segmentation processing result, removing stop words from the target text to form text keywords matching the target text; processing the hierarchical categories matching the target text through the category annotation network in the text processing model to form category keywords corresponding to the hierarchical categories; processing the text keywords and the category keywords to determine the relevance between the text keywords and the category keywords; and annotating the text categories of the acquired text to be processed according to the relevance between the text keywords and the category keywords through the category annotation network in the text processing model.

[0096] The structure of the text category annotation device of the embodiment of the present invention is described in detail below. The text category annotation device can be implemented in various forms, such as a dedicated terminal with a text processing text category annotation function, or a server with a text processing text category annotation function, such as the preamble Figure 1 Server 200 in. Figure 2 The schematic diagram of the structure of the text category target annotation device provided by the embodiment of the present invention can be understood as follows: Figure 2 Only an exemplary structure of the text type target injection device is shown, not all structures, and can be implemented as needed. Figure 2 Partial or complete structure shown.

[0097] The text category annotation device provided in the embodiment of the present invention includes: at least one processor 201, a memory 202, a user interface 203 and at least one network interface 204. The various components in the text category annotation device are coupled together through a bus system 205. It can be understood that the bus system 205 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 205 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, in Figure 2 Various buses are labeled as bus system 205 .

[0098] The user interface 203 may include a display, a keyboard, a mouse, a trackball, a click wheel, keys, buttons, a touch pad or a touch screen.

[0099] It is understood that the memory 202 can be a volatile memory or a non-volatile memory, and can also include both volatile and non-volatile memories. The memory 202 in the embodiment of the present invention can store data to support the operation of the terminal (such as 10-1). Examples of these data include: any computer program for operating on the terminal (such as 10-1), such as an operating system and an application. Among them, the operating system includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., which are used to implement various basic services and process hardware-based tasks. The application can include various applications.

[0100] In some embodiments, the text category target annotation device provided by the embodiment of the present invention can be implemented in a combination of software and hardware. As an example, the text category target annotation device provided by the embodiment of the present invention can be a processor in the form of a hardware decoding processor, which is programmed to execute the text category target annotation method provided by the embodiment of the present invention. For example, the processor in the form of a hardware decoding processor can adopt one or more application specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field programmable gate arrays (FPGAs), or other electronic components.

[0101] As an example of a text category target annotation device provided in an embodiment of the present invention being implemented by a combination of software and hardware, the text category target annotation device provided in an embodiment of the present invention can be directly embodied as a combination of software modules executed by a processor 201, and the software module can be located in a storage medium, and the storage medium is located in a memory 202. The processor 201 reads the executable instructions included in the software module in the memory 202, and combines with necessary hardware (for example, including the processor 201 and other components connected to the bus 205) to complete the text category target annotation method provided in an embodiment of the present invention.

[0102] As an example, the processor 201 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.

[0103] As an example of hardware implementation of the text category target annotation device provided in the embodiment of the present invention, the device provided in the embodiment of the present invention can be directly executed by a processor 201 in the form of a hardware decoding processor, for example, one or more application specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field programmable gate arrays (FPGAs), or other electronic components to implement the text category target annotation method provided in the embodiment of the present invention.

[0104] The memory 202 in the embodiment of the present invention is used to store various types of data to support the operation of the text category target annotation device. Examples of such data include: any executable instructions for operating on the text category target annotation device, such as executable instructions, and the program for implementing the text category target annotation method of the embodiment of the present invention can be included in the executable instructions.

[0105] In other embodiments, the text type target annotation device provided by the embodiment of the present invention can be implemented in a software manner. Figure 2 The text category target annotation device stored in the memory 202 is shown, which can be software in the form of a program and a plug-in, and includes a series of modules. As an example of a program stored in the memory 202, a text category target annotation device can be included, and the text category target annotation device includes the following software modules: an information transmission module 2081 and an information processing module 2082. When the software modules in the text category target annotation device are read into the RAM by the processor 201 and executed, the text category target annotation method provided by the embodiment of the present invention will be implemented. Next, the functions of each software module in the text category target annotation device are described, wherein:

[0106] Information transmission module 2081, used to obtain target text;

[0107] The information processing module 2082 is used to perform word segmentation processing on the target text to form a word segmentation processing result;

[0108] The information processing module 2082 is used to perform stop word removal processing on the target text in response to the word segmentation processing result to form text keywords matching the target text;

[0109] The information processing module 2082 is used to process the hierarchical categories matching the target text through the category annotation network in the text processing model to form category keywords corresponding to the hierarchical categories;

[0110] The information processing module 2082 is used to process the text keywords and the category keywords to determine the relevance between the text keywords and the category keywords;

[0111] The information processing module 2082 is used to annotate the text category of the acquired text to be processed according to the relevance between the text keywords and the category keywords through the category annotation network in the text processing model.

[0112] Combination Figure 2 The text category annotation device shown illustrates the text category annotation method provided by the embodiment of the present invention. Before introducing the text category annotation method provided by the embodiment of the present invention, the process of generating corresponding text category annotation results according to the question text through the traditional text processing model in the related art is first introduced, wherein: Figure 3 The figure is a schematic diagram of the text category annotation results generated by the Seq2Seq model based on RNN in the prior art, where the eq2seq model is an architecture represented by an encoder (Encode) and a decoder (Decode), and the seq2seq model generates an output sequence Y based on an input sequence X. In the seq2seq model represented by the encoder (Encode) and the decoder (Decode), the encoder (Encode) converts the input sequence into a fixed-length vector, and the decoder (Decode) decodes the input fixed-length vector into an output sequence. Figure 3 As shown, the encoder encodes the input question sentence to obtain the text features of the question sentence; the decoder decodes the text features and outputs a corresponding reply, wherein the encoder and the decoder are in one-to-one correspondence.

[0113] It can be seen that for Figure 3 The disadvantage of the text annotation system based on the Seq2Seq model in the related art shown is that the model itself in the related art only establishes a one-to-one relationship between the training data target text y and the annotation information, and uses MLE to optimize the model, which causes the model to generate many high-frequency repeated annotations, which are usually meaningless and short. At the same time, in many actual scenarios, the same target text y can have many kinds of annotation information. The existing Seq2Seq model cannot effectively handle this one-to-many problem because the encoder (Encode) and the decoder (Decode) are one-to-one corresponding, resulting in a poor user experience.

[0114] In addition, continue to refer to Figure 4 , Figure 4 This is a schematic diagram of the text class annotation results generated based on the bidirectional attention neural network model (BERTBidirectional Encoder Representations from Transformers) in the prior art, where the Encoder consists of: N = 6 identical layers, each layer contains two sub-layers. The first sub-layer is a multi-head attention layer and then a simple fully connected layer. Each sub-layer has a residual connection and normalization.

[0115] The decoder includes: N=6 identical layers, where the layer and the encoder are not the same. The layer here contains three sub-layers, including a self-attention layer, an encoder-decoder attention layer and finally a fully connected layer. The first two sub-layers are based on the multi-head attention layer. Among them, the encoder and decoder parts both contain 6 encoders and decoders. The inputs entering the first encoder are combined with embedding and positional embedding. After passing through the 6 encoders, it is output to each decoder in the decoder part; the input target is "I am a student t". After being processed by the text processing model, the output text class target annotation result is: "student". However Figure 4 In the process of generating text category target attention results based on the bidirectional attention neural network model (BERT Bidirectional Encoder Representations from Transformers), the similarity between texts is calculated only from the data itself, and multiple different clusters are formed after continuous iteration. It is not effective in actual business scenarios because it cannot obtain information other than text similarity. For example, the unsupervised method cannot pre-acquire the knowledge that "Independence Day" belongs to science fiction movies, or that "If You Are the One" belongs to TV entertainment programs, and "Water Margin" can represent both game knowledge and TV series or movie knowledge in different business scenarios.

[0116] To solve the defects in the previous related technology, see Figure 5 , Figure 5 An optional flow chart of the text category annotation method provided by the embodiment of the present invention is provided. It can be understood that: Figure 5 The steps shown can be performed by various electronic devices running the text category annotation device, such as a dedicated terminal with a text category annotation function, a server with a text processing text category annotation function, or a server cluster. Figure 5 The steps shown are explained.

[0117] Step 501: The text category target annotation device obtains a target text, and performs word segmentation processing on the target text to form a word segmentation processing result.

[0118] In some embodiments of the present invention, the target text is segmented to form a segmentation result. This can be achieved in the following ways:

[0119] Determine a dynamic noise threshold that matches the use environment of the text processing model; perform denoising on the target text set according to the dynamic noise threshold, and trigger a first word segmentation strategy that matches the dynamic noise threshold; perform word segmentation on the target text according to the first word segmentation strategy that matches the dynamic noise threshold, and form a word segmentation result. Due to the different use environments of the text processing models, the dynamic noise threshold that matches the use environment of the text processing model is also different. For example, in the use environment of academic translation, the dynamic noise threshold that matches the use environment of the text processing model needs to be smaller than the dynamic noise threshold in the article reading environment.

[0120] In some embodiments of the present invention, the target text is segmented to form a segmentation result. This can be achieved in the following ways:

[0121] Determine a fixed noise threshold corresponding to the text processing model; perform denoising on the target text set according to the fixed noise threshold, and trigger a second word segmentation strategy matching the fixed noise threshold; perform word segmentation on the target text according to the second word segmentation strategy matching the fixed noise threshold to form a word segmentation result. Among them, when the text processing model is solidified in the corresponding hardware mechanism and the usage environment is colloquial translation, by fixing the fixed noise threshold corresponding to the text processing model, the text classification target injection speed of the text processing model can be effectively improved, the user's waiting time can be reduced, and the user's usage experience can be improved.

[0122] In some embodiments of the present invention, the semantic description information corresponding to the keyword can be determined based on the information (hereinafter referred to as expert description information) collated by relevant personnel and used to describe the keyword, and the relevant personnel can be experts in the relevant field. Specifically, the expert description information corresponding to each candidate keyword can be collated by an expert, and then an expert knowledge base can be constructed based on the matching relationship between each candidate keyword, each expert description information, and each candidate keyword and each expert description information. Based on this, when it is necessary to obtain the semantic description information of the keyword, the candidate keyword corresponding to the keyword is searched in the expert knowledge base, and the semantic description information of the keyword may include the expert description information matched by the candidate keyword found. Further, the semantic expression may include a positive semantic expression and a negative semantic expression, and the semantic relationship includes a positive semantic relationship and a negative semantic relationship. In addition, it also includes a limited semantic expression, which is an expression that describes the limited relationship in the semantics of the category. The limited semantic expression includes a limited keyword. The limited keyword is used to limit the keyword, which can express the category semantics more accurately. For example, for the two categories "Games - Water Margin" and "Books - Water Margin", because both have the common keyword "Water Margin", their keyword-level relevance is very high. However, from a semantic point of view, one is "game" and the other is "book", and the relevance between them is very low. After expressing them through limited semantic expressions, the relevance between them at the semantic level can be reflected.

[0123] Step 502: In response to the word segmentation result, the target text is processed to remove stop words to form text keywords that match the target text.

[0124] Step 503: Process the hierarchical categories matching the target text through the category annotation network in the text processing model to form category keywords corresponding to the hierarchical categories.

[0125] In some embodiments of the present invention, the processing of the hierarchical categories matching the target text by the category annotation network in the text processing model to form category keywords corresponding to the hierarchical categories can be achieved in the following manner:

[0126] The hierarchical categories matching the target text are determined through the category annotation network in the text processing model; the hierarchical categories matching the target text are subjected to string replacement and extraction processing through the category annotation network in the text processing model to form at least one category keyword set, wherein the at least one category keyword set includes category keywords corresponding to the corresponding hierarchical categories. Among them, for each hierarchical category, the name corresponding to the hierarchical category needs to be extracted through string replacement as the category keyword. For example, the category "Entertainment - Movies - Disaster Movies" generates a keyword set consisting of three category keywords "Entertainment / Movies / Disaster Movies" after processing in step 503, and the category "Entertainment - Games - Dungeons and Warriors - Mage" generates a keyword set consisting of four category keywords "Entertainment / Games / Dungeons and Warriors / Mage" after processing in step 503.

[0127] Step 504: Based on the text keyword knowledge category annotation network corresponding to the text keyword, the text keyword and the category keyword are processed.

[0128] Thus, the relevance between the text keyword and the category keyword is determined.

[0129] In some embodiments of the present invention, the processing of the text keyword and the category keyword based on the text keyword knowledge category annotation network corresponding to the text keyword to determine the relevance between the text keyword and the category keyword can be achieved in the following manner:

[0130] Determine the first number of occurrences of the text keyword in the category corresponding to the category keyword; determine the second number of occurrences of the text keyword in all target texts; based on the text keyword knowledge category annotation network corresponding to the text keyword, process the first number and the second number to determine the relevance of the text keyword and the category keyword. Wherein, the probability of the target text keyword to the category keyword can be equal to the probability of the text keyword to the category. The specific probability calculation formula includes: the relevance probability of the keyword ki to the category keyword = the number of times ki appears in the category where the keyword ki is located / the number of times ki appears in all data. For example, the text keyword "golden retriever" appears 7 times in the category "pet-dog-golden retriever" (the corresponding category keyword set is "pet / dog / golden retriever"), and the text keyword "golden retriever" appears 10 times in all data. The above formula is used to calculate the relevance probability knowledge of three text keywords "golden retriever" and category keywords: "golden retriever-pet-0.7", "golden retriever-dog-0.7", "golden retriever-pet-dog=0.7". We save all the triples obtained into the three corresponding columns of "keyword—cateword—confidence" in the computer database table.

[0131] In some embodiments of the present invention, the method further comprises:

[0132] Based on the text keyword knowledge category annotation network corresponding to the text keyword, the correlation between the text keyword and the category keyword is converted into the posterior probability of the category keyword; the mapping relationship between the text keyword, the category keyword and the posterior probability is determined; based on the text keyword knowledge category annotation network corresponding to the text keyword, the mapping relationship between the text keyword, the category keyword and the posterior probability is converted into the prior knowledge corresponding to the category annotation network in the text processing model. Among them, in real business scenarios, facing a complex and multi-level category system, the introduction of prior knowledge can help understand the category more simply and effectively, and the category keyword related knowledge is accumulated through the above-mentioned knowledge acquisition method. By cyclically accumulating high-quality relevant prior knowledge, it is finally possible to achieve unsupervised text category annotation using prior knowledge. For new technical fields, only a small amount of training data is needed to efficiently improve the accuracy of text to category annotation in real business scenarios.

[0133] Step 505: annotating the text category of the acquired text to be processed according to the relevance between the text keywords and the category keywords through the category annotation network in the text processing model.

[0134] See also Figure 6 , Figure 6An optional flow chart of the text category annotation method provided by the embodiment of the present invention is provided. It can be understood that: Figure 6 The steps shown can be performed by various electronic devices running the text category annotation device, such as a dedicated terminal with a text category annotation function, a server with a text processing text category annotation function, or a server cluster. Figure 6 The steps shown are explained.

[0135] Step 5051: Determine a keyword knowledge graph that matches the usage environment of the text processing model.

[0136] Among them, in real business scenarios, text processing models often require knowledge with more precise semantics, such as "Husky is a kind of dog" and "Dog belongs to pets". Therefore, the model manually constructs a small category system knowledge graph. The knowledge graph corresponding to this category system is a weighted graph, in which the nodes of the graph are entities corresponding to keywords (such as Husky, dog, and pet mentioned above), and the edges of the graph represent the relationship between nodes. In this category system knowledge graph, the model has "belongs to" and "equivalence" relationships. The "belongs to" relationship indicates that there are relationships between entities such as "Husky-belongs to → Dog" and "Dog-belongs to → Pet". The "equivalence" relationship includes "Siberian Husky-equivalent to → Husky" and "Husky-equivalent to → Erha", and the weights of these relationships are 1 by default. The construction of the knowledge graph is mainly assisted by machine-assisted manual construction. First, the machine matches a large amount of text with patterns such as "entity a belongs to entity b", "a contains b" and "a is equivalent to b", and then manually filters the correct relationship and adds it to the graph. Two relational tables are created in the database. One is an equivalence relational table, which mainly stores entity pairs with "equivalence" relations and related weights. For example, for the relation "Stephen Curry-Curry-1.0", the model stores "Stephen Curry, Curry, 1.0" in the three fields of "Entity 1, Entity 2, Weight" of the relational table. When annotating text categories, the model first removes stop words and segmentation from the text to be annotated, and then matches the keywords obtained by segmentation to entities in the knowledge graph, that is, the entity 1 and entity 2 fields in the above two relational tables, to obtain the entity keyword combination of the "equivalence" relationship and "belongs to" relationship of the keywords in the knowledge graph. Then the text processing model matches these keyword combinations with the category keywords one by one and calculates the score (matching the first-level category gets 1 point, the second-level category gets 2 points, and so on). For example, for the text to be annotated "Stephen Curry is an epic shooter", segmentation and removal of stop words get the three keywords "Steve Curry; epic; shooter". The equivalent relationships in the current knowledge graph include "Stephen Curry-equivalent-Curry", "Stephen Curry-equivalent-Curry", "shooter-equivalent-three-point shooter", and "shooter-equivalent-sniper". By matching the "equivalent" relationship keywords in the graph, we get the keyword set "Curry; Curry; three-point shooter; sniper". For the belonging relationship, the graph has "Stephen Curry-belongs to-player" and "Stephen Curry-belongs to-basketball player". By matching the "belongs to" relationship keywords in the graph, we get "player; basketball player". Then, the model matches basketball players with "basketball" in the category system, and the score of the category "sports-ball sports-basketball" in the category system is 3, which is the highest among all categories. Therefore, it can be obtained that the annotated category of the text is "sports-ball sports-basketball".

[0137] Step 5052: Based on the category annotation network in the text processing model, the text to be processed is encoded and weighted averaged through the keyword knowledge graph.

[0138] Step 5053: According to the relevance between the text keyword and the category keyword, trigger the prior knowledge corresponding to the category annotation network.

[0139] Step 5054: label the text category of the text to be processed after encoding and weighted averaging according to the prior knowledge corresponding to the category annotation network.

[0140] See also Figure 7 , Figure 7 An optional flow chart of the text category annotation method provided by the embodiment of the present invention is provided. It can be understood that: Figure 7 The steps shown can be performed by various electronic devices running the text category annotation device, such as a dedicated terminal with a text category annotation function, a server with a text processing text category annotation function, or a server cluster. Figure 7 The steps shown are explained.

[0141] Step 5055: Based on the category annotation network in the text processing model, determine the keywords in the text to be processed.

[0142] Step 5056: Based on the category annotation network in the text processing model, according to the prior knowledge corresponding to the category annotation network, determine the relevance between each keyword in the text to be processed and the corresponding category keyword.

[0143] Step 5057: Sort the relevance between each keyword in the text to be processed and the corresponding category keyword.

[0144] Step 5058: Determine the text category annotation result of the text to be processed according to the sorting result of the relevance between each keyword in the text to be processed and the corresponding category keyword. According to a preset value, the result with the first positive order in the sorting result can be selected as the text category annotation result of the text to be processed.

[0145] The text category annotation method provided by the embodiment of the present invention is explained below based on specific usage scenarios. In real text classification business scenarios, the category system corresponding to the text is often multi-level, rich and complex. The traditional processing method is to manually annotate the data, train the classifier to learn the characteristics of the data based on the annotated data, and then apply the learned classifier to the unlabeled data. This method can achieve better classification results when there are a large number of annotated samples. However, in this process, for a large number of complex multi-level categories that appear in real business scenarios, the annotators need to annotate the data while fully understanding all the complex hierarchical categories, and they need to annotate a large amount of data. This is time-consuming and labor-intensive, and it is also easy to have a large number of inaccurate annotation results.

[0146] Existing text class annotation methods are mainly divided into two directions: supervised learning methods and unsupervised learning methods. Common supervised methods include support vector machines, ensemble learning methods and neural networks. Common unsupervised learning methods mainly include unsupervised clustering methods (K-means, hierarchical clustering, etc.). The main idea of ​​text class annotation methods based on supervised methods is to first manually annotate a large amount of training data. For Chinese text, the text is first segmented (some neural network models can be unsegmented). The keywords obtained by segmenting the text are represented as vectors. For support vector machines and ensemble learning methods, the vectors corresponding to the keywords are usually high-dimensional and sparse vectors, that is, the values ​​of many positions in the vector are 0, while the keyword vectors of neural networks are dense vectors. They find the relationship between the text keyword set and the corresponding text label through complex nonlinear transformations, that is, model training. Finally, these models are applied to unlabeled data to perform label prediction on unlabeled data. The main idea of ​​the text classification annotation method based on unsupervised methods is to represent the text with sparse vectors after word segmentation, and then calculate the similarity between the texts to find the cluster with the closest distance to each data, and iterate continuously until the program termination condition is met. The number of clusters of the clustering result is usually specified by the user.

[0147] The above-mentioned traditional technical solutions mainly have the following defects, namely:

[0148] 1) Traditional supervised training methods cannot achieve cross-domain learning. Supervised methods can only learn independent models in specific sub-domains. When switching domains, the model must be retrained to learn the data features in the new domain. For example, the text classification model in the biomedical field is very different from the classification model of news text (the text keywords-category keywords-posterior probabilities as prior knowledge may be completely different). The model trained on news text data will result in a large number of category annotation errors when applied to biomedical text, which makes the error rate of traditional supervised training methods in real business scenarios with frequent domain switching far higher than the error rate threshold that can be adapted.

[0149] 2) Traditional manual labeling of training samples consumes a lot of manpower and financial resources. In real business scenarios, the category system actually required is usually complex and diverse. For example, for different movies, the corresponding hierarchical categories include "Entertainment-Movies-Disaster Movies", "Entertainment-Movies-Science Fiction Movies" and "Entertainment-Movies-Drama Movies". For complex multi-level categories (the number of categories in real business scenarios includes hundreds or even thousands of categories), the labeling personnel need to have knowledge of each sub-field to ensure accurate labeling of the data. At the same time, training based on supervised methods requires a large amount of training data. Insufficient training data will lead to poor model effects and failure to meet business needs.

[0150] 3) Traditional unsupervised text class annotation methods do not work well. Unsupervised class annotation methods can effectively solve the problem of manually annotating training data. However, starting from the data itself, calculating the similarity between texts and forming multiple different clusters through continuous iterations does not work well in actual business scenarios because it cannot obtain information other than text similarity. For example, unsupervised methods cannot pre-acquire the knowledge that "Independence Day" is a science fiction movie, or the knowledge that "If You Are the One" is a TV entertainment program.

[0151] In summary, due to the above-mentioned problems, the existing text category annotation methods cannot truly meet the needs of text category annotation for complex multi-level categories in real business scenarios. They also have the defect of only being able to learn independent models in specific sub-domains. When the domain is switched, the model must be retrained to learn the data features in the new domain.

[0152] The text category annotation method provided by the embodiment of the present invention is described below. Figure 8 and Fig. 9 , Figure 8The data structure diagram of the text category annotation method in the embodiment of the present invention is as follows, wherein the current user can input Chinese text data with labels and the corresponding category system, and perform text segmentation and stop word removal on the input text; the input category system is processed into hierarchical categories to generate category keywords; and then probability knowledge is generated from the posterior probability and stored in the database, so as to use the relevant probability knowledge to perform text category annotation.

[0153] Fig. 9 FIG. 1 is an optional process diagram of the text category annotation method in an embodiment of the present invention. It can be understood that: Fig. 9 The steps shown can be performed by various electronic devices running the text category annotation device, such as a dedicated terminal with a text category annotation function, a server with a text processing text category annotation function, or a server cluster. Fig. 9 The steps shown are described below, including:

[0154] Step 901: The server performs word segmentation and stop word removal on the text.

[0155] Unlike English, which directly uses spaces as the interval between words, Chinese text needs to be segmented accordingly, because only words in Chinese can contain complete information. The Chinese word segmentation tool Jieba is used to segment Chinese text accordingly. In addition, it is necessary to remove stop words from the keyword set after word segmentation, because words like "yes" and "can" are not helpful for the corresponding category annotation task. For example, for the text "Yes, I like huskies", the word segmentation and removal of stop words will obtain a set of two keywords "like / huskies" (use / as a separator, the same below).

[0156] Step 902: The server processes the hierarchical categories to generate category keywords.

[0157] For each hierarchical category, the corresponding name of the hierarchical category needs to be extracted as the category keyword through string replacement. For example, the category "Entertainment - Movies - Disaster Movies" is processed to generate a set of three category keywords "Entertainment / Movies / Disaster Movies".

[0158] Step 903: The server calculates the relevant probability knowledge of the keywords after the tagged text segmentation to the category keywords through the posterior probability.

[0159] Specifically, first, the relevant probability of the text keyword to each category is calculated accordingly. Then, for the category keywords contained in the category, the corresponding probability of the text keyword to the category keyword is taken = the probability of the text keyword to the category. Among them, the relevant probability calculation formula is: the relevant probability of the keyword ki to the category keyword = the ratio of the number of times ki appears in the category where the keyword ki is located to the number of times ki appears in all the data. For example, the text keyword "Erha" appears 9 times in the category "Pet-Dog-Husky" (the corresponding category keyword set is "Pet / Dog / Husky"), and the text keyword "Erha" appears 10 times in all the data. The above formula is used to calculate the relevant probability knowledge of three text keywords "Erha" and category keywords: "Erha-Pet-0.9", "Erha-Dog-0.9", "Erha-Husky-0.9". Correspondingly, all the triples obtained are saved in the three corresponding columns of "keyword-cateword-confidence" in the computer database table.

[0160] Step 904: The server uses the knowledge of related probabilities between keywords to perform text category annotation.

[0161] Among them, the knowledge saved after the statistical processing in step 903 is used to calculate the relevance score of each text keyword to the category keyword, so as to obtain the score from the text to the category, sort all the category scores, and obtain the categories with the top 10 scores as the text category annotation results. For example, the text "cute Erha" obtains the text keyword set "cute / Erha" after word segmentation and removal of stop words. The text keyword "cute" has "cute-pet-0.6", "cute-dog-0.4", "cute-husky-0.3", "cute-cat-0.4", "cute-Shiba Inu-0.4", "cute-Persian cat-0.3" and so on in the corresponding knowledge. The text keyword "Erha" has "Erha-pet-0.9", "Erha-dog-0.9", "Erha-Husky-0.9", "Erha-cat-0.1", "Erha-Persian cat-0.06", "Erha-Shiba Inu-0.2" in the corresponding knowledge base. Therefore, the score of the text keyword set "cute / Erha" to the category "pet-dog-husky" is:

[0162] “Cute—Pet” + “Cute—Dog” + “Cute—Husky” + “Husky—Pet” + “Husky—Dog” + “Husky—Husky” = 0.6 + 0.4 + 0.3 + 0.9 + 0.9 + 0.9 = 4.

[0163] The scores of the text keyword set "cute / Erha" to the category "pet-dog-Shiba Inu" are:

[0164] “Cute—Pet” + “Cute—Dog” + “Cute—Shiba Inu” + “Husky—Pet” + “Husky—Dog” + “Husky—Shiba Inu” = 0.6 + 0.4 + 0.4 + 0.9 + 0.9 + 0.2 = 3.4.

[0165] The scores of the text keyword set "cute / Husky" to the category "pets-cats-Persian cats" are:

[0166] “Cute—pet” + “Cute—cat” + “Cute—Persian cat” + “Husky—pet” + “Husky—cat” + “Husky—Persian cat” = 0.6 + 0.4 + 0.3 + 0.9 + 0.1 + 0.06 = 2.36.

[0167] Please refer to Table 1 for details;

[0168]

[0169] Table 1

[0170] Step 905: Calculate the scores of "cute / Husky" to all categories, sort them, and take the top 1 to obtain the annotation results. In this embodiment, the top 1 is the category "pet-dog-husky", thereby determining the category annotation results of the corresponding text.

[0171] Continue to refer Fig.10 , Fig.10 Schematic diagram of the use environment of the text category annotation method in the embodiment of the present invention, wherein, combined with the previous Fig. 9 The processing process shown in the figure first calculates the posterior probability of each text keyword to the corresponding category keyword of the label through word segmentation. Accordingly, the obtained "text keyword-category keyword-posterior probability" is stored as prior knowledge in the corresponding "keyword, category word, confidence" three columns of the computer database table. When annotating the text into categories, it is only necessary to calculate the relevance score of the keyword set after the text segmentation to the hierarchical category keyword set, and select the top ten categories with the highest score to determine the corresponding text category annotation results. For data sources that are easy to obtain the corresponding categories of texts, such as e-commerce product descriptions (the categories to which the products belong can be directly obtained), the category keyword related knowledge can be accumulated through the above-mentioned knowledge acquisition method. By cyclically accumulating high-quality related probability knowledge, it is finally possible to realize unsupervised text category annotation using knowledge. For new fields, only a small amount of training data is needed to efficiently improve the accuracy of Chinese text to category annotation in real business scenarios, avoiding the defects of traditional technologies that require a large amount of training data for training based on supervised methods, and insufficient training data will lead to poor model effects and fail to meet business needs.

[0172] Through the text category annotation method provided in this embodiment, 10,000 training data are used to generate relevant probability knowledge. On a test set of 10,000 items, the semi-supervised text category annotation method based on relevant probability knowledge is applied to the text classification problem, with a test accuracy of 84.3%. When applied to the text labeling problem, the test accuracy is 87.2%.

[0173] Beneficial technical effects:

[0174] By acquiring a target text and performing word segmentation processing on the target text to form a word segmentation processing result; in response to the word segmentation processing result, the target text is processed to remove stop words to form text keywords matching the target text; through the category annotation network in the text processing model, the hierarchical category matching the target text is processed to form category keywords corresponding to the hierarchical category; the text keywords and the category keywords are processed to determine the relevance between the text keywords and the category keywords; through the category annotation network in the text processing model, the text category of the acquired text to be processed is annotated according to the relevance between the text keywords and the category keywords. This process can not only determine the category to which any text belongs by the running computer device based on the relevance between the text keywords and the category keywords in the absence of any text whose category is known, and annotate the text category, but also save the link of manually annotating categories in the traditional method, save labor costs, reduce the dependence of the quality of determining the category to which the text to be processed belongs on the quality of manual annotation, and improve the accuracy and universality of text category annotation.

[0175] The above descriptions are merely embodiments of the present invention and are not intended to limit the protection scope of the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A text category annotation method, characterized in that: The method comprises: Acquire a target text, and perform word segmentation processing on the target text to form a word segmentation processing result; In response to the word segmentation result, the target text is processed to remove stop words to form text keywords that match the target text; Processing the hierarchical categories matching the target text through a category annotation network in a text processing model to form category keywords corresponding to the hierarchical categories; Processing the text keywords and the category keywords to determine the relevance between the text keywords and the category keywords; Based on the category annotation network in the text processing model, the text to be processed is encoded and weighted averaged through a keyword knowledge graph that matches the usage environment of the text processing model; According to the relevance between the text keyword and the category keyword, triggering the prior knowledge corresponding to the category annotation network; According to the prior knowledge corresponding to the category annotation network, the text category of the text to be processed after encoding and weighted averaging is labeled.

2. The method according to claim 1, characterized in that The word segmentation processing of the target text to form a word segmentation processing result includes: Determining a dynamic noise threshold that matches the usage environment of the text processing model; Performing denoising processing on the target text set according to the dynamic noise threshold, and triggering a first word segmentation strategy that matches the dynamic noise threshold; The target text is segmented according to a first segmentation strategy that matches the dynamic noise threshold to form a segmentation result.

3. The method according to claim 1, characterized in that The word segmentation processing of the target text to form a word segmentation processing result includes: determining a fixed noise threshold corresponding to the text processing model; Performing denoising processing on the target text set according to the fixed noise threshold, and triggering a second word segmentation strategy matching the fixed noise threshold; The target text is segmented according to a second segmentation strategy that matches the fixed noise threshold to form a segmentation result.

4. The method according to claim 1, characterized in that The process of processing the hierarchical categories matching the target text through the category annotation network in the text processing model to form category keywords corresponding to the hierarchical categories includes: Determining hierarchical categories matching the target text through a category annotation network in a text processing model; Through the category annotation network in the text processing model, the hierarchical categories matching the target text are subjected to string replacement and extraction processing to form at least one category keyword set, wherein the at least one category keyword set includes category keywords corresponding to the corresponding hierarchical categories.

5. The method according to claim 1, characterized in that The processing of the text keyword and the category keyword to determine the relevance between the text keyword and the category keyword includes: Determining a first number of occurrences of the text keyword in the category corresponding to the category keyword based on a text keyword knowledge category annotation network corresponding to the text keyword; determining a second number of occurrences of the text keyword in all target texts; Based on a text keyword knowledge category annotation network corresponding to the text keyword, the first number and the second number are processed to determine the relevance of the text keyword and the category keyword.

6. The method according to claim 5, characterized in that The method further comprises: Based on a text keyword knowledge category annotation network corresponding to the text keyword, converting the relevance between the text keyword and the category keyword into a posterior probability of the category keyword; Determining a mapping relationship between the text keywords, the category keywords, and the posterior probability; Based on the text keyword knowledge category annotation network corresponding to the text keyword, the mapping relationship between the text keyword, the category keyword and the posterior probability is converted into prior knowledge corresponding to the category annotation network in the text processing model.

7. The method according to claim 1, characterized in that The step of labeling the text categories of the text to be processed after encoding and weighted averaging according to the prior knowledge corresponding to the category annotation network includes: Determining keywords in the text to be processed based on a category annotation network in the text processing model; Based on the category annotation network in the text processing model, and according to the prior knowledge corresponding to the category annotation network, determining the relevance between each keyword in the text to be processed and the corresponding category keyword; Sorting the relevance between each keyword in the to-be-processed text and the corresponding category keyword; According to the ranking result of the relevance between each keyword in the text to be processed and the corresponding category keyword, the text category annotation result of the text to be processed is determined.

8. A text-type target annotation device, characterized in that: The device comprises: Information transmission module, used to obtain target text; An information processing module, used for performing word segmentation processing on the target text to form a word segmentation processing result; The information processing module is used to perform stop word removal processing on the target text in response to the word segmentation processing result to form text keywords matching the target text; The information processing module is used to process the hierarchical categories matching the target text through the category annotation network in the text processing model to form category keywords corresponding to the hierarchical categories; The information processing module is used to process the text keywords and the category keywords to determine the relevance between the text keywords and the category keywords; The information processing module is used to encode and perform weighted average processing on the text to be processed based on the category annotation network in the text processing model through a keyword knowledge graph that matches the usage environment of the text processing model; trigger prior knowledge corresponding to the category annotation network according to the relevance between the text keywords and the category keywords; and label the text category of the text to be processed that has been encoded and weighted averaged according to the prior knowledge corresponding to the category annotation network.

9. The device according to claim 8, characterized in that The information processing module is used to determine a dynamic noise threshold that matches the usage environment of the text processing model; The information processing module is used to perform denoising on the target text set according to the dynamic noise threshold and trigger a first word segmentation strategy that matches the dynamic noise threshold; The information processing module is used to perform word segmentation processing on the target text according to a first word segmentation strategy that matches the dynamic noise threshold to form a word segmentation processing result.

10. The device according to claim 8, characterized in that The information processing module is used to determine a fixed noise threshold corresponding to the text processing model; The information processing module is used to perform denoising on the target text set according to the fixed noise threshold and trigger a second word segmentation strategy that matches the fixed noise threshold; The information processing module is used to perform word segmentation processing on the target text according to a second word segmentation strategy that matches the fixed noise threshold to form a word segmentation processing result.

11. The device according to claim 8, characterized in that The information processing module is used to determine the hierarchical categories matching the target text through the category annotation network in the text processing model; The information processing module is used to perform string replacement and extraction processing on the hierarchical categories matching the target text through the category annotation network in the text processing model to form at least one category keyword set, wherein the at least one category keyword set includes category keywords corresponding to the corresponding hierarchical categories.

12. The device according to claim 8, characterized in that The information processing module is used to determine a first number of occurrences of the text keyword in the category corresponding to the category keyword; The information processing module is used to determine a second number of occurrences of the text keyword in all target texts; The information processing module is used to process the first quantity and the second quantity based on a text keyword knowledge category annotation network corresponding to the text keyword to determine the relevance between the text keyword and the category keyword.

13. An electronic device, characterized in that: The electronic device comprises: A memory for storing executable instructions; A processor is used to implement the text category annotation method described in any one of claims 1 to 7 when running the executable instructions stored in the memory.

14. A computer-readable storage medium storing executable instructions, characterized in that: When the executable instructions are executed by a processor, the text category annotation method described in any one of claims 1 to 7 is implemented.