A marketing text recognition method and system

By constructing text graphs and tag graphs, learning the correlation and semantic information between tags, and combining the joint learning of words and tags, the problem of difficulty in capturing the global semantics of tags is solved in the existing technology, and the accuracy of marketing text recognition is improved.

CN114724167BActive Publication Date: 2025-04-01UNIV OF JINAN

Patent Information

Application Number
CN202210498687.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-09
Publication Date
2025-04-01
Estimated Expiration
2042-05-09

AI Technical Summary

Technical Problem

The prior art is difficult to capture the global semantics and overall correlation relationship of the tag when identifying marketing texts, resulting in the lack of complete semantics of the tag representation and affecting the classification effect.

Method used

By constructing text graphs and tag graphs, the probability distribution of topic words is generated, and the correlation relationship and semantic information between tags are learned under the guidance of tag graphs, and the embedded representation of tags is obtained. Combining the joint learning of words and tags, extract more semantic information and improve the classification effect of the model.

Benefits of technology

It realizes capturing the global semantics and correlation relationships of tags, generating complete tag embeddings, and improving the accuracy of marketing text recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114724167B_ABST
    Figure CN114724167B_ABST
Patent Text Reader

Abstract

The present invention provides a marketing text recognition method and system, including: obtaining a text to be recognized and preprocessing it; constructing a text graph of the text to be recognized based on the preprocessed text to be recognized; generating a text-level word representation based on the text graph of the text to be recognized, and generating a text representation in combination with the embedding representations of all labels; using a classifier based on the text representation to obtain a result of whether the text to be recognized belongs to a marketing text; wherein the method for obtaining the embedding representation of the label is: generating a topic word probability distribution based on the text graph of the training set and its labels, mapping the topic word probability distribution to the label vector space, and learning the correlation relationship and semantic information between labels under the guidance of the label graph to obtain the embedding representation of the label. The purpose of generating complete label embedding is achieved, and the words and labels are jointly learned to capture more information related to classification, thereby improving the accuracy of marketing text recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of natural language processing, and in particular, relates to a marketing text recognition method and system. Background Art

[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.

[0003] Social media platforms publish a large number of marketing articles containing advertising content for promotional purposes every day. In order to eliminate readers' disgust and win the trust of potential customers, marketing content is often hidden in ordinary article content and is difficult to identify. Unlike traditional media, some self-media editors carefully design advertising content in order to gain profits, and even exaggerate facts and edit false information, which not only misleads consumers and harms their interests, but also destroys a healthy network environment. Therefore, there is an urgent need for corresponding methods and systems to detect self-media content marketing articles.

[0004] Most studies consider the detection of content marketing articles as a text classification problem. Among the existing methods, the methods for solving text classification tasks can be mainly divided into the following categories: (1) Traditional text classification methods include Naive Bayes, Maximum Entropy, Decision Tree, Support Vector Machine, etc. These methods mainly rely on manually annotated features, which not only ignore the correlation between words but also have low efficiency; (2) Deep learning methods, such as TextRNN, TextRCNN, and fastText, can automatically obtain classification features, but these methods focus on the locality of words and lack long-distance and non-continuous word interactions; (3) Methods based on graph neural networks, such as TextGCN, HyperGAT, and TextING, can directly process complex structured data and prioritize global features, but these methods do not consider fine-grained label information and text information related to labels.

[0005] In recent years, some studies have found that tags are directly related to text classification and can help models obtain information that is more relevant to classification. For multi-label classification tasks, a large number of tags are often involved, and the relationship between categories is complex, making it difficult to find a reasonable way to describe them. Therefore, effectively mining tag information is the key to successful multi-label text classification learning. In order to use tag information to improve classification performance, the deep extreme multi-label learning method (DXML) captures tag dependencies by exploring tag structures, and the sequence generation model (SGM) uses the long short-term memory network (LSTM) to process tag sequence dependencies and capture complex tag relationships. Although they learn tag information from different aspects to obtain tag relationships, they ignore the role of tag co-occurrence information in capturing tag relationships, making it difficult to reasonably describe tag relationships to help models improve classification results. The label embedding attention model (LEAM) combines words and tags to obtain text embedding representations, and the explicit interaction model (EXAM) uses class representations to obtain word-tag interaction information. These methods consider tag information in the form of tag embedding, but when the label space is vectorized, the label vector lacks feature information transmission between labels, so that the label representation cannot cover the complete semantics of the label space. Label-specific attention networks (LSANs) utilize self-attention mechanisms to identify label-specific information, and some autoencoder-based methods produce similar text label scores through ranking-based autoencoder architectures. However, such methods assume that all labels are independent of each other and do not fully consider label semantics and overall label correlation. Summary of the invention

[0006] In order to solve the technical problems existing in the above-mentioned background technology, the present invention provides a marketing text recognition method and system, which achieves the purpose of capturing the global semantics and overall correlation relationship of tags and generating complete label embedding, and jointly learns words and labels to capture more classification-related information, thereby improving the accuracy of marketing text recognition.

[0007] In order to achieve the above object, the present invention adopts the following technical solution:

[0008] A first aspect of the present invention provides a marketing text recognition method, which comprises:

[0009] Get the text to be recognized and perform preprocessing;

[0010] Based on the preprocessed text to be recognized, a text graph of the text to be recognized is constructed;

[0011] Generate text-level word representation based on the text graph of the text to be recognized, and combine the embedding representations of all labels to generate text representation;

[0012] Based on the text representation, a classifier is used to obtain the result of whether the text to be identified belongs to marketing text;

[0013] Among them, the method for obtaining the embedded representation of the label is: based on the text graph and its labels of the training set, generate the probability distribution of the topic words, map the probability distribution of the topic words to the label vector space, and learn the correlation relationship and semantic information between labels under the guidance of the label graph to obtain the embedded representation of the label.

[0014] Furthermore, the preprocessing includes cleaning non-text data, removing stop words, removing low-frequency words, removing high-frequency words and lemmatization.

[0015] Furthermore, the method for constructing the text graph is as follows: for a text, the number of co-occurrences of words in a fixed sliding window is counted, each word is a vertex of the text graph, and the number of co-occurrences between words is an edge of the text graph.

[0016] Furthermore, the label graph is constructed by counting the number of co-occurrences of labels in a fixed sliding window for all labels in the training set, with each label as a vertex and the number of label co-occurrences as an edge.

[0017] Furthermore, the method for generating the probability distribution of the topic words is:

[0018] Use the Dirichlet function of the first prior parameter to generate a multinomial probability distribution corresponding to all topics for each word in the training set word set to obtain a topic word probability distribution;

[0019] For each text in the training set, a second prior parameter is generated based on the text graph of the training set and its corresponding label information, a topic distribution is generated using the Dirichlet function of the second prior parameter, the topic distribution is used as a parameter of the multinomial distribution, the topic number corresponding to each word in each text is obtained, and the word distribution corresponding to each topic number is used as a parameter of the multinomial distribution to generate a word;

[0020] Based on the generated words, the model parameters and the topic word probability distribution are updated.

[0021] Furthermore, the method for generating the text-level word representation is:

[0022] Based on the text graph of the text to be recognized, a first-layer gated graph neural network is used to merge the representation of each text graph node with the information from its first-order neighbor nodes to update the embedding representation of each word;

[0023] Based on the updated embedding representation of each word, a second layer of gated graph neural network is used to obtain the text-level word representation of each word.

[0024] Furthermore, the text representation is generated by:

[0025] Based on the text-level word representation and the embedding representations of all tags, calculating the attention value of each text word relative to each tag;

[0026] The attention value is used to perform weighted summation on the embedding representations of all labels to obtain the label semantic component of each word;

[0027] Based on the label semantic component of each word, a bidirectional long short-term memory layer is used to obtain the label representation of each word;

[0028] The word label representation and the text-level word representation are concatenated and weighted to obtain weighted features;

[0029] Based on the weighted features, maximum pooling, summing and averaging operations are performed to obtain text representation.

[0030] A second aspect of the present invention provides a marketing text recognition system, comprising:

[0031] A preprocessing module is configured to: obtain the text to be recognized and perform preprocessing;

[0032] A graph construction module is configured to: construct a text graph of the text to be recognized based on the preprocessed text to be recognized;

[0033] A joint learning module, which is configured to: generate text-level word representations based on a text graph of the text to be recognized, and generate text representations by combining the embedding representations of all tags;

[0034] A classification module is configured to: based on the text representation, use a classifier to obtain a result of whether the text to be identified is a marketing text;

[0035] Among them, the method for obtaining the embedded representation of the label is: based on the text graph and its labels of the training set, generate the probability distribution of the topic words, map the probability distribution of the topic words to the label vector space, and learn the correlation relationship and semantic information between labels under the guidance of the label graph to obtain the embedded representation of the label.

[0036] A third aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the marketing text recognition method as described above.

[0037] A fourth aspect of the present invention provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps in a marketing text recognition method as described above are implemented.

[0038] Compared with the prior art, the present invention has the following beneficial effects:

[0039] The present invention provides a marketing text recognition method, which provides a topic prior adaptive labeled Dirichlet distribution topic model, which directly corresponds each topic to a label, and maps the document topic space to a k-dimensional space according to the label set of each document to modify the Dirichlet topic prior and generate a topic word probability distribution covering global semantic information.

[0040] The present invention provides a marketing text recognition method, which provides a tag information integration method. When generating tag embedding, the word topic probability distribution is mapped to a real-valued vector, and by transferring the statistical co-occurrence information of the tag between the real-valued vectors, the global semantics and correlation relationship of the tag are integrated into the tag representation, so as to obtain a tag embedding representation covering the global information.

[0041] The present invention provides a marketing text recognition method, which obtains word-specific tag representations and performs joint learning with word representations, can extract more semantic information between tags and texts, and improve model classification effects. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.

[0043] Figure 1 This is a flow chart of a marketing text recognition method according to the first embodiment of the present invention;

[0044] Figure 2 This is a topic prior adaptive Dirichlet distribution topic model diagram of the first embodiment of the present invention. DETAILED DESCRIPTION

[0045] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.

[0046] It should be noted that the following detailed descriptions are all illustrative and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.

[0047] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.

[0048] Terminology explanation:

[0049] Label embedding representation: The label of the text is represented in a vector form that is easy to operate.

[0050] Word embedding representation: Word embedding is actually a class of techniques in which a single word is represented as a real number vector in a predefined vector space, and each word is mapped to a vector, namely the word embedding representation.

[0051] Embodiment 1

[0052] This embodiment provides a marketing text recognition method, first constructing an independent text graph for each document, and using the label information of the training set to construct a label graph; then using the text graph nodes and the label information corresponding to the text graph to train the topic model, generating a probability distribution of topic words; then constructing a perceptron to map the probability distribution of topic words to the label vector space, constructing a graph convolutional network, learning the label correlation relationship and semantic information under the guidance of the label graph, updating the label vector to obtain a label embedding representation; finally, after jointly learning the words and labels to obtain the final text representation, the final classification result is output through the sigmoid layer. Figure 1 As shown, the specific steps include:

[0053] Step 1: Get the training set and the text to be recognized, and perform data preprocessing on the training set and the text to be recognized respectively. The preprocessing includes cleaning non-text data, removing stop words, removing low-frequency words, removing high-frequency words and word form restoration. Specifically:

[0054] Step (101), cleaning non-text data. The data may contain non-text content such as HTML tags and URL addresses, which are of little help to classification and may even have a negative impact;

[0055] Step (102), remove stop words. Auxiliary verbs, function words, punctuation marks, etc. exist in large quantities in all articles and cannot reflect the meaning of the text. Generally speaking, removing these stop words from the text can make the model better fit the semantic features, thereby improving the generalization ability of the model;

[0056] Step (103), remove low-frequency words and high-frequency words. The importance of a word is proportional to the number of times it appears in the text and inversely proportional to the frequency of its appearance in the corpus. Therefore, high-frequency words and low-frequency words in the corpus are of no help for classification and can be removed (this step is not required for short texts);

[0057] Step (104), word form restoration. Words like is, are, and am have completely different contents for computers, but they have the same meaning. Word form restoration can unify them to facilitate subsequent processing and analysis.

[0058] Step 2: Build a graph: For the text to be recognized, build a text graph for each text to be recognized based on the preprocessed text to be recognized; for the training set, build a text graph for each text in the training set based on the preprocessed text in the training set, and build a label graph based on all labels in the training set. Specifically:

[0059] Construct a text graph based on the number of co-occurrences of words in a sliding window of a certain size: For the text to be recognized or a text in the training set, count the number of co-occurrences of words in a fixed sliding window, use each unique word as a text graph vertex, and the number of co-occurrences between words as the edges of the text graph, and construct an independent text graph for each text; the text graph vertex is also called a text graph node.

[0060] Based on the label information (each text in the training set has a corresponding label set, that is, the set of categories to which the text belongs), a label graph is constructed. The label graph is constructed according to the number of label co-occurrences in a sliding window of a certain size: for all labels in the training set, the number of co-occurrences of labels in a fixed sliding window is counted, and a label graph is constructed with the category corresponding to each label as the vertex and the number of label co-occurrences as the edge.

[0061] Among them, the label graph and the text graph of all texts in the training set are used to train the marketing text recognition model; the marketing text recognition model includes a label embedding representation acquisition module, a word label joint learning module and a classification module. The text graph of the text to be recognized is input into the word label joint learning module and the classification module of the trained marketing text recognition model to obtain the label of the text to be recognized (i.e., whether the text to be recognized belongs to a marketing text), that is, the category to which it belongs (articles that do not contain advertising content and whose content is authentic and credible, articles with neutral opinions, articles containing advertising content, etc.). Specifically, based on the text graph of the text to be recognized, two gated graph neural networks connected in sequence are used to obtain text-level word representation; based on the text-level word representation, the text representation is obtained by combining the embedding representation of all labels; based on the text representation, a classifier is used to obtain the text classification result.

[0062] Step 3: The label embedding representation acquisition module generates the topic word probability distribution based on the text graph of the training set and its corresponding label information, maps the topic word probability distribution to the label vector space, and learns the correlation relationship and semantic information between labels under the guidance of the label graph to obtain the label embedding representation. It includes the topic word probability distribution acquisition module and the label information integration module.

[0063] (1) Obtaining topic word probability distribution module: First, construct a topic prior adaptive labeled Dirichlet distribution topic model, such as Figure 2As shown in Figure 1, Collapsed Gibbs sampling is then used to train the topic model in the process of generating all documents in the training set to obtain the probability distribution of topic words.

[0064] The topic prior adaptive labeled Dirichlet distribution topic model is a probabilistic graphical model. Each label in the model directly corresponds to a topic. For any topic k, a multinomial distribution with parameter η is used to generate a word distribution β k , for any document d, update α through matrix operations (d) The prior probability of all topics changes with the change of document label set, using parameter α (d) The Dirichlet function generates the topic distribution θ for it (d) ; For the jth word in document d, from the topic distribution θ (d) Get its subject number z j,d ~Multinomial(θ (d) ), and then get the word w from the topic number j,d ~Multinomial(βz j,d ), and repeat the above process until all documents are generated.

[0065] The process of constructing and training the topic prior adaptive labeled Dirichlet distribution topic model is as follows:

[0066] Step ①: Establish a one-to-one correspondence between labels and topics. The number of label categories in the dataset is equal to the number of topics K. Labels refer to the categories to which the articles belong, and topics refer to the words that can summarize the articles. Use the Dirichlet function with the first prior parameter η to generate a multinomial probability distribution corresponding to all topics for each word in the training set word set, and obtain the word distribution (topic word probability distribution) β corresponding to each topic. k =(β k,1 ,...,β k,V-1 ,β k,V )~Dir(.|η), where V also represents the number of words in the entire training set text, β k,v represents the probability that the vth word is generated by the kth topic, Dir (also known as Dirchlet) represents the Dirichlet function, η is the first prior parameter, β k represents the word distribution corresponding to the kth topic, k∈{1,...,K};

[0067] Step ②: For each text in the training set, generate the second prior parameter based on the text graph of the training set and its corresponding label information. Specifically: for each text d, d∈{1,...,D}, when its label is unknown, use the Bernoulli distribution with label prior Φ to generate the text label Λ (d), when the label is known, initialize a label matrix Λ with a dimension of 1*k (d) , the corresponding position of the label owned by the text is set to 1, otherwise it is set to 0; initialize the unit matrix q with a dimension equal to the number of topics (d) ,q (d) and the label matrix Λ of the text (d) After the summation operation, multiplication operation is performed with the second prior parameter α, that is, the second prior α (d) =(q (d) +Λ (d) )×α; Through the above operation, high topic priors are assigned to the topics corresponding to the text label set, and low topic priors are assigned to the remaining topics to update the second prior parameter α (d) ;

[0068] Step 3: Use the second prior parameter as α (d) The Dirichlet function generates the topic distribution θ (d) ,θ (d) ~Dirichlet(.|α (d) );

[0069] Step 4: Distribute the topics θ (d) As the parameter of the multinomial distribution, we get the topic number z corresponding to the jth word in the text d j,d ~Multinomial(θ (d) ), j∈{1,...,N d},N d is the number of words in text d;

[0070] Step ⑤: Number the topic as z j,d The word distribution of the corresponding topic βz j,d The word w is generated as the parameter of the multinomial distribution j,d ~Multinomial(βz j,d );

[0071] Step ⑥: Based on all words w j,d , use Collapsed Gibbs sampling to train the topic model, update the model parameters (including the first prior parameter η, the second prior parameter α, the topic distribution θ) and the topic word probability distribution. As the parameters are updated, β is also updated. Repeat steps ①-⑤ continuously, and obtain the topic word probability distribution β of all documents after training.

[0072] (2) Label information integration module: The label information integration module includes a label embedding representation generation module. The label embedding representation generation module maps the probability distribution of topic words to the label vector space through a layer of perceptron, and then uses a two-layer graph convolutional network to learn the label correlation relationship and semantic information under the guidance of the label graph and integrate them into the label vector to obtain the label embedding representation.

[0073] Step ①: Build a relu-activated multi-layer perceptron (MLP) to map the topic word probability distribution β to the label embedding space to obtain the embedding representation of all labels covering global information;

[0074] Step ②: Construct the first layer of graph convolutional network (GCN). Under the guidance of the label graph, transfer label correlation and semantic information between neighbor nodes, update the label embedding representation, and the updated label embedding representation is H 1 ;

[0075] Step 3: Construct the second layer of graph convolutional network (GCN) to transfer high-order information between label nodes and enhance the label embedding representation. The enhanced label embedding representation is H 2 ;

[0076] The learning process of graph convolutional network is:

[0077] H l+1 =σ(A L H l W l ) (1)

[0078] Among them, H l is the upper layer component representation, H l+1 is the current layer output, σ is the LeakyReLU activation function, W l is a trainable parameter, A L is the normalized adjacency matrix of the label graph, and the normalization process is:

[0079]

[0080]

[0081] in, is the adjacency matrix representation of the label graph, Represents the value of the i-th row and j-th column of the adjacency matrix.

[0082] Step 4: Word-label joint learning module: The word-label joint learning module includes obtaining text-level word representation components, extracting word-specific label semantic components, bidirectional long short-term memory layer, soft attention layer and readout layer; the text-level word representation component uses a two-layer gated graph neural network (GGNN) to interact with text-level information, update the word embedding representation, and then obtain the text-level word representation; extract word-specific label semantic components, calculate the attention value of the text word corresponding to all labels through the attention mechanism, and use the attention value to weight the label embedding to obtain the word-specific label semantic component; bidirectional long short-term memory layer, construct a bidirectional long short-term memory network (BiLSTM) to further study the dependency relationship and word label semantic information in the word-specific label representation, and generate word-specific label representation; the soft attention layer weights the representation of the text-level word embedding representation and the word-specific label representation to obtain weighted features; the readout layer first sums and averages the weighted features in a certain dimension, then performs a maximum pooling operation on the weighted features, and finally merges the results of the two steps to obtain a complete text representation.

[0083] Step (401): Based on the text graph of the text to be recognized, a first-layer gated graph neural network is used to learn the text graph in units of text. The text graph node updates the embedding representation of each word by merging its own semantic and other feature information from the first-order neighbor nodes;

[0084] Step (402): Based on the updated embedding representation of each word, a second layer of gated graph neural network is used to transfer high-order information between each text graph node to obtain a text-level word representation X;

[0085] The learning process of the gated graph neural network is:

[0086] a t =A T h t-1 W a (4)

[0087] z t =σ(W z a t +U z h t-1 +b z ) (5)

[0088] r t =σ(W r a t +U r h t-1 +b r ) (6)

[0089] h ~t =tanh(Wh a t +U h (r t ⊙h t-1 )+b h ) (7)

[0090] h t =h ~t ⊙z t +h t-1 ⊙(1-z t ) (8)

[0091] Among them, h t represents the word embedding representation of the t-th layer of the gated neural network, which represents the embedding representation of all words in a text graph. W, U, b are trainable parameters, σ is the sigmoid function, ⊙ represents the dot product operation, and A T is the normalized adjacency matrix of the text graph. Its normalization process is similar to that of the label graph adjacency matrix. The vector corresponding to the text graph node represents h t-1 It is the input of the t-1th layer of the gated graph neural network. When t=2, X=h 2 , when t is 1 in the formula, it is the first layer of the gated graph neural network, and when t is 2, it is the second layer of the gated neural network. Here, it represents the general expression of the gated neural network. Only two layers are used in the model described in this article. X is the text-level word representation after learning the two layers of the gated graph neural network. Step (403): Use equation (9) to calculate the attention value μ of each text word relative to each label in units of text;

[0092]

[0093] Among them, H 2 For enhanced label embedding representation, represents the j-th enhanced label embedding representation, X i Represents the text-level word representation of the i-th word in the text to be recognized, exp() is an exponential function, () T is the transpose operation.

[0094] Step (404): Based on the attention value, use equation (10) to embed all labels H 2 Perform weighted summation to obtain the specific label semantic component Q for each word;

[0095]

[0096] Step (405): Use equation (11) to construct a bidirectional long short-term memory layer to further learn the dependencies and semantic information of word-specific label semantic components and generate all word-specific label representations R;

[0097] R=BiLSTM(Q) (11)

[0098] Among them, μ ij is the attention value of the i-th word in the text relative to the j-th label, Q i Represents the specific label semantic component of the i-th word.

[0099] Step (406): concatenate all word-specific tag representations R along the second dimension of the matrix to the text-level word representations X of all words to obtain T;

[0100] Step (407): Calculate the soft attention value of T using equation (12), and use the soft attention value to weight the concatenated content to obtain the weighted feature H V ;

[0101] H V =σ(f att (T))⊙tanh(f tr (T)) (12)

[0102] Step (408): Use equation (13) to perform maximum pooling, summing and averaging operations on the weighted content and combine the operation results to obtain H G ;

[0103]

[0104] Among them, f att and f tr They are perceptrons with sigmoid and relu activation functions, respectively. The former represents soft attention and the latter is a nonlinear transformation. Max represents the maximum pooling operation, V represents a total of V weighted features, and h v Yes H V The vth weighted feature in .

[0105] Step 5: Classifier, use the sigmoid function to process the obtained text representation and get the final classification result: H G After the sigmoid function is applied, the text is obtained to be a "good article", i.e., an article that does not contain advertising content and whose content is authentic and reliable, an article with neutral views, an article with advertising content, and one or more of the following labels.

[0106] In this embodiment, the sliding window reads a fixed-length area from an article from left to right each time. The fixed length is the size of the sliding window, and the distance moved each time is the step length of the sliding window.

[0107] In this embodiment, the word co-occurrence information is the number of times the words co-occur within a sliding window of a certain size.

[0108] In this embodiment, the tag co-occurrence information is the number of times the tags co-occur in a sliding window of a certain size.

[0109] In this embodiment, the topic word probability distribution is the word probability distribution corresponding to any topic.

[0110] In this embodiment, Collapsed Gibbs sampling is a Markov Chain Monte Carlo algorithm, which is usually used for statistical inference.

[0111] In this embodiment, the perceptron is a type of neural network.

[0112] In this embodiment, the tag correlation relationship refers to a relationship of mutual dependence or mutual exclusion between tags.

[0113] In this embodiment, the graph convolutional network is an application of the convolutional network in machine learning in graph data.

[0114] In this embodiment, the gated graph neural network is a classic spatial domain information transfer model based on GRU.

[0115] In this embodiment, high-order information refers to stacking t layers of gated graph neural networks. The information of each node can reach the node t hops away from it. This process transmits high-order information.

[0116] In this embodiment, the text-level word representation refers to learning a text graph using a two-layer gated graph neural network, updating the word embedding representation after text-level information interaction, and the obtained new representation is the text-level word embedding representation.

[0117] In this embodiment, concatenation refers to adding one array to a specific dimension of another array along a specific direction axis.

[0118] In this embodiment, soft attention re-weights all information in an adaptive manner before being aggregated, so that important information can be separated and prevented from being disturbed by unimportant information.

[0119] In this embodiment, the maximum pooling is to take the point with the largest value in the local acceptance field.

[0120] Embodiment 2

[0121] This embodiment provides a marketing text recognition system, which specifically includes the following modules:

[0122] A preprocessing module is configured to: obtain the text to be recognized and perform preprocessing;

[0123] A graph construction module is configured to: construct a text graph of the text to be recognized based on the preprocessed text to be recognized;

[0124] A joint learning module, which is configured to: generate text-level word representations based on a text graph of the text to be recognized, and generate text representations by combining the embedding representations of all tags;

[0125] A classification module is configured to: based on the text representation, use a classifier to obtain a result of whether the text to be identified is a marketing text;

[0126] Among them, the method for obtaining the embedded representation of the label is: based on the text graph and its labels of the training set, generate the probability distribution of the topic words, map the probability distribution of the topic words to the label vector space, and learn the correlation relationship and semantic information between labels under the guidance of the label graph to obtain the embedded representation of the label.

[0127] It should be noted here that each module in this embodiment corresponds to each step in Example 1 one by one, and the specific implementation process is the same, which will not be repeated here.

[0128] Embodiment 3

[0129] This embodiment provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps in the marketing text recognition method described in the first embodiment are implemented.

[0130] Embodiment 4

[0131] This embodiment provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps in the marketing text recognition method described in the first embodiment are implemented.

[0132] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) containing computer-usable program code.

[0133] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0134] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0135] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0136] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0137] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A marketing text recognition method, characterized in that: include: Get the text to be recognized and perform preprocessing; Based on the preprocessed text to be recognized, a text graph of the text to be recognized is constructed; Generate text-level word representation based on the text graph of the text to be recognized, and combine the embedding representations of all labels to generate text representation; Based on the text representation, a classifier is used to obtain the result of whether the text to be identified belongs to marketing text; Among them, the method for obtaining the embedded representation of the label is: based on the text graph and its labels of the training set, generate the probability distribution of the topic words, map the probability distribution of the topic words to the label vector space, and learn the correlation relationship and semantic information between labels under the guidance of the label graph to obtain the embedded representation of the label.

2. A marketing text recognition method as claimed in claim 1, characterized in that: The preprocessing includes cleaning non-text data, removing stop words, removing low-frequency words, removing high-frequency words and lemmatization.

3. A marketing text recognition method as claimed in claim 1, characterized in that: The method for constructing the text graph is as follows: for a text, the number of co-occurrences of words in a fixed sliding window is counted, each word is a vertex of the text graph, and the number of co-occurrences between words is an edge of the text graph.

4. A marketing text recognition method as claimed in claim 1, characterized in that: The label graph is constructed by counting the number of co-occurrences of labels in a fixed sliding window for all labels in the training set, with each label as a vertex and the number of label co-occurrences as an edge.

5. A marketing text recognition method as claimed in claim 1, characterized in that: The method for generating the probability distribution of the topic words is: Use the Dirichlet function of the first prior parameter to generate a multinomial probability distribution corresponding to all topics for each word in the training set word set to obtain a topic word probability distribution; For each text in the training set, a second prior parameter is generated based on the text graph of the training set and its corresponding label information, a topic distribution is generated using the Dirichlet function of the second prior parameter, the topic distribution is used as a parameter of the multinomial distribution, the topic number corresponding to each word in each text is obtained, and the word distribution corresponding to each topic number is used as a parameter of the multinomial distribution to generate a word; Based on the generated words, the model parameters and the topic word probability distribution are updated.

6. A marketing text recognition method as claimed in claim 1, characterized in that: The method for generating the text-level word representation is: Based on the text graph of the text to be recognized, a first-layer gated graph neural network is used to merge each text graph node with its first-order neighbor nodes and update the embedding representation of each word. Based on the updated embedding representation of each word, a second layer of gated graph neural network is used to obtain the text-level word representation of each word.

7. A marketing text recognition method as claimed in claim 1, characterized in that: The method for generating the text representation is: Based on the text-level word representation and the embedding representations of all tags, calculating the attention value of each text word relative to each tag; The attention value is used to perform weighted summation on the embedding representations of all labels to obtain the label semantic component of each word; Based on the label semantic component of each word, a bidirectional long short-term memory layer is used to obtain the label representation of each word; The word label representation and the text-level word representation are concatenated and weighted to obtain weighted features; Based on the weighted features, maximum pooling, summing and averaging operations are performed to obtain text representation.

8. A marketing text recognition system, characterized in that: include: A preprocessing module is configured to: obtain the text to be recognized and perform preprocessing; A graph construction module is configured to: construct a text graph of the text to be recognized based on the preprocessed text to be recognized; A joint learning module, which is configured to: generate text-level word representations based on a text graph of the text to be recognized, and generate text representations by combining the embedding representations of all tags; A classification module is configured to: based on the text representation, use a classifier to obtain a result of whether the text to be identified is a marketing text; Among them, the method for obtaining the embedded representation of the label is: based on the text graph and its labels of the training set, generate the probability distribution of the topic words, map the probability distribution of the topic words to the label vector space, and learn the correlation relationship and semantic information between labels under the guidance of the label graph to obtain the embedded representation of the label.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps in a marketing text recognition method as described in any one of claims 1 to 7 are implemented.

10. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps in the marketing text recognition method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Deep learning multi-label text classification method based on graph model

    CN113806547A

  • Text classification method and device, equipment and storage medium

    CN113886577A

Cited By

  • A marketing content compliance auditing method based on a domain large model

    CN122509867A