A method and system for intent recognition based on thematic event analysis
By generating a topic graph and dividing it into topic clusters, and combining event context analysis and attention mechanisms, the problem of insufficient model adaptability in massive social media text scenarios is solved, enabling real-time processing and efficient intent recognition of large-scale text data.
Patent Information
- Application Number
- CN202310397632.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-13
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2043-04-13
AI Technical Summary
Existing technologies lack model adaptability in scenarios with massive social media texts. The sparsity of text content features makes it difficult to detect topic events. Redundant information is not eliminated, contextual information is not considered, and important features are not weighted enough, which affects the effectiveness of intent recognition.
A topic-event-based approach is adopted, which generates a topic graph, uses a graph segmentation algorithm to divide topic clusters, combines word co-occurrence relationships and part-of-speech recognition to construct a word vector model, uses event context analysis and attention mechanism to perform intent recognition, extracts key sub-events and activity sequences, and integrates CNN and Bi-LSTM models for feature modeling.
It enables real-time processing of large-scale text data, improves the accuracy of topic event detection and the precision of intent recognition, solves the problem of model adaptability in dynamic data flow and online analysis scenarios, and uncovers potential event features.
Smart Images

Figure CN116401368B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intention recognition, and in particular to an intention recognition method and system based on subject event analysis. Background Art
[0002] With the rapid development of the internet and social media, people have become accustomed to viewing the internet as the optimal platform for obtaining information. Beyond the activities described, people often focus on two other aspects of an event: the context and type of the event, known as the theme; and the causes and consequences of the event. Using topic detection technology, user-focused topics and events can be extracted from disorganized information sources. Through effective screening and organized organization, concise and clear information about themed events can be generated. With the rapid development of data analysis and mining technologies, it is increasingly being discovered that many seemingly unrelated events harbor underlying relationships. By analyzing massive amounts of event data and identifying and summarizing the inherent patterns within complex event activities, it is possible to effectively predict the purpose and intent behind events.
[0003] Chinese invention patent application number 202111465255.1 discloses a multi-intent recognition method that integrates topic information, including the following steps: obtaining the user's input text and normalizing it to obtain a processed text; obtaining sentence-based topic information and word-based topic information in the processed text; fusing the processed text with the sentence-based topic information; converting the fused text and word-based topic information into vector representations respectively; constructing an intent recognition model and training it; inputting the converted vector representation into the intent recognition model to obtain the intent classification result. The above structure improves the accuracy of multi-intent recognition. The disadvantage of this method is that it does not take into account the adaptability of the model in the context of massive social media texts. The fragmented text content leads to feature sparsity in the text content, which brings great difficulties to the detection of topic events.
[0004] The Chinese invention patent application number 202210146473.7 discloses an intent recognition method, comprising the following steps: obtaining a message text and multiple category information, wherein the message text includes multiple words, and the category information includes multiple category tags, determining the intent representation information corresponding to the category information based on the multiple category tags, and then determining the text representation information corresponding to the message text based on the multiple words, performing enhanced fusion processing on the text representation information and the multiple intent representation information respectively to obtain multiple fused representation information; the multiple fused representation information is used to train the intent recognition model to perform intent recognition. In this way, fine-grained representation information fusion can be achieved, and the fusion effect of representation information of different dimensions can be improved, thereby improving the intent recognition accuracy of the intent recognition model for the message text. The disadvantage of this method is that redundant information in the text is not eliminated, and representative text information is not extracted from it to represent the event; and only local information is extracted in the model, and contextual information is not taken into account when training word vectors.
[0005] Chinese invention patent application number 202210617940.X discloses a method for intent recognition and model training, comprising the following steps: obtaining the original feature coding sequence corresponding to the text to be recognized; masking the tags in the text to be recognized to obtain the masked text and the feature coding sequence corresponding to the masked text; determining the structural information between the tags in the text to be recognized based on the original feature coding sequence and the masked feature coding sequence, and obtaining the structural feature vector corresponding to the structural information; aggregating the original feature coding sequence and the structural feature vector, and performing intent recognition of the text to be recognized based on the aggregation result. The disadvantage of this method is that it does not combine the use of the attention mechanism, and does not assign higher weight coefficients to some important features that can affect the intent category, making the model effect less than ideal. Summary of the Invention
[0006] The present invention aims to at least solve one of the technical problems in the prior art, namely, that the traditional topic detection model is difficult to meet the needs of dynamic and continuous changes in data streams and online analysis scenarios, does not consider the model's adaptability in massive social media text scenarios, and the fragmented text content leads to feature sparsity in the text content, which brings great difficulties to topic event detection; the redundant information in the text is not eliminated, and representative text information is not extracted from it to represent events; and only local information is extracted in the model, and contextual information is not taken into account when training word vectors; some important features that can affect the intent category are not given a higher weight coefficient, resulting in less than ideal model effect.
[0007] To this end, the first aspect of the present invention provides an intention recognition method based on topic event analysis.
[0008] A second aspect of the present invention provides an intention recognition system based on topic event analysis.
[0009] The present invention provides an intention recognition method based on subject event analysis, including event subject analysis and subject event intention recognition;
[0010] The event theme analysis includes:
[0011] Extract co-occurring word pairs, model the text content by generating a graph, and define the graph generated by modeling the word co-occurrence relationship as a topic graph;
[0012] The community identification algorithm based on graph segmentation is used to divide the topic clusters in the topic graph;
[0013] The subject event intention recognition includes:
[0014] Use a text clustering algorithm based on vector similarity calculation to cluster texts according to existing topics;
[0015] Identify key sub-events at each stage of the theme event, and construct an event context algorithm based on word burstiness. By finding important sub-event keywords in the text, the development context of the theme event is constructed.
[0016] Identify the activity trigger words in the text, identify the activity arguments based on the activity trigger words, and express the event activities contained in the text in the form of subject-verb-object triples;
[0017] The event intent recognition model is used to extract important features from various locations in the text and activity sequence. Sequence modeling is used to extract the contextual sequence information of the vocabulary. Sequence units that are highly relevant to the intent are assigned higher weights to complete the representation of the subject event.
[0018] Use the softmax function to identify the intent of events.
[0019] The intention recognition method based on subject event analysis according to the above technical solution of the present invention may also have the following additional technical features:
[0020] In the above technical solution, the extraction of co-occurring word pairs and modeling of text content by generating a graph are performed, and the graph generated by modeling the word co-occurrence relationship is defined as a topic graph, including:
[0021] Use the word segmentation tool to segment each text in the text collection and generate a word list;
[0022] Use part-of-speech recognition tools to identify the part of speech of each word in the word list, retain only verbs and nouns, and extract co-occurring word pairs;
[0023] The retained nouns and verbs are used as nodes, and the co-occurrence relationships of co-occurring word pairs are used as edges to generate a topic graph.
[0024] In the above technical solution, the weight of the edge in the topic graph is the total number of times the corresponding two node words co-occur in the data stream within a certain period of time. The topic graph G corresponding to the text set is defined as:
[0025]
[0026] in, Represents a collection of nodes, represents the edge set, Represents the edge weight matrix.
[0027] In the above technical solution, the method for extracting co-occurring word pairs includes:
[0028] Get all text within a time window;
[0029] Use LTP tools for sentence segmentation, word segmentation, part-of-speech tagging, and named entity recognition;
[0030] Filter out non-verb and noun units to obtain a vocabulary list consisting entirely of gerunds;
[0031] Match each word with all the words that follow it sequentially in the list to generate co-occurring word pairs;
[0032] Add co-occurring word pairs to a set.
[0033] In the above technical solution, the method of dividing the topic clusters in the topic graph by using a community identification algorithm based on graph segmentation includes:
[0034] Randomly assign voltages to all nodes;
[0035] The process of calculating the voltage of each node is regarded as a diffusion process, and the diffusion distance of the edge between each two connected nodes is calculated;
[0036] Perform iterative calculations to find the edge with the maximum diffusion distance;
[0037] Cut the edge with the maximum diffusion distance to form a new graph structure;
[0038] Reinitialize the nodes and perform iterative calculations until the divided communities meet the algorithm termination conditions, and obtain several well-divided communities, thereby obtaining several topic clusters.
[0039] In the above technical solution, modularity Q is used to measure the quality of community division. The maximum value of modularity Q is used as the termination condition of the community identification algorithm based on graph segmentation. The calculation method of modularity Q is as follows:
[0040]
[0041] in, Representing the community and The ratio of the number of edges between to the total number of edges in the graph, It represents the ratio of the number of edges within community i to the total number of edges.
[0042] In the above technical solution, the text clustering algorithm based on vector similarity calculation is used to cluster texts according to existing topics, including:
[0043] Get the text collection within a time window and the text detected in the time window Lists of topic candidate words;
[0044] right The words in are normalized according to the relative entropy scores;
[0045] Calculate the weight of each candidate word representing the topic;
[0046] Use the word vector representation model to map all candidate words into the vector space;
[0047] right The words in are weightedly summed up to obtain the vector representation of the topic; and
[0048] Use word vector representation model to map all words in the text into vector space;
[0049] right Calculate the sum and average of the word vectors for all words in to get the vector representation of the text;
[0050] calculate Similarity to each topic;
[0051] Will Group them into the most similar topics;
[0052] Arrange the text grouped into topics in chronological order.
[0053] In the above technical solution, the identification of key sub-events at each stage of the theme event and the construction of the event context based on word burstiness construct the development context of the theme event by finding important sub-event keywords in the text, including:
[0054] Calculate the burstiness score of all words in the current time window. If the burstiness score of a word is greater than the set threshold, it is judged as a sub-event keyword and marked with the timestamp of the current time window. If the sub-event keyword set in the current time window is not empty, it is considered that a representative key event occurred on that day. Conversely, if the sub-event keyword set is empty, it is considered that the event on that day did not play a role in promoting the development of the event. Generate a sub-event keyword sequence according to the chronological order of the time window to complete the event context initialization.
[0055] All texts are retraversed according to the generated initial event context; for each text, the key sub-event to which it belongs is searched according to the event context. If the words in the current text intersect with the sub-event keywords within a certain time window, the text is judged as a key text that can represent the development stage of the event, and then it is divided into the time window, and finally a thematic event context represented by multiple groups of texts is generated.
[0056] In the above technical solution, the process of identifying activity trigger words in a text, identifying activity arguments based on the activity trigger words, and expressing the event activities contained in the text in the form of subject-verb-object triples includes:
[0057] With the help of dependency syntax analysis tools, extraction rules are designed to identify the activities in the text. First, the activity trigger words in the text are identified, and then the activity arguments are identified based on the trigger words. Finally, the event activities contained in the text are represented in the form of subject-verb-object triples.
[0058] In the above technical solution, the event intent recognition model is used to extract important features from various positions in the text and activity sequence, extract the context sequence information of the vocabulary through sequence modeling, and assign higher weights to sequence units that are highly relevant to the intent, thereby completing the complete representation of the subject event, including:
[0059] Obtain the vocabulary sequence for vector representation and train the word vector representation;
[0060] Use CNN models to extract important features from various positions in text and activity sequences, thereby reducing the dimension of the vector representing the features;
[0061] Use the Bi-LSTM model or Bi-GRU model to perform sequence modeling on the vocabulary vectors processed by the CNN model to obtain the context sequence information of the vocabulary;
[0062] The attention mechanism is used to assign higher weights to sequence units that are highly relevant to intent, thereby increasing the accuracy of sub-event intent recognition.
[0063] In the above technical solution, the use of the attention mechanism to assign higher weights to sequence units that are highly relevant to intent, thereby increasing the accuracy of sub-event intent recognition, includes:
[0064] Get the hidden layer vector output after sequence modeling;
[0065] Calculate the hidden representation of the attention layer based on the hidden layer vector output after sequence modeling;
[0066] Normalized calculation based on the hidden representation of the attention layer The attention weight corresponding to the word vector at that moment;
[0067] According to the attention weight corresponding to each word vector, all word vectors are weighted summed to obtain the final vector representation of the topic event vocabulary sequence.
[0068] In the above technical solution, the use of the softmax function to identify the intent of the event includes:
[0069] For each topic event, calculate the score for each intent category. Then use the softmax function to calculate the probability of each intent. Finally, select the intent with the highest probability as the final intent category.
[0070] The calculation method of the softmax function is:
[0071]
[0072] in, Represents the weight coefficient matrix required from the attention layer to the output layer, Indicates the corresponding offset, is the output intent category label, and s is the final vector representation of the topic event vocabulary sequence.
[0073] The present invention also provides an intention recognition system based on subject event analysis, comprising:
[0074] The topic graph construction module is used to process text data streams, generate topic graphs, and assign corresponding weights to each node and edge in the topic graph;
[0075] The topic text aggregation module is connected to the topic graph construction module and is used to use the community identification algorithm to divide the clusters that can represent the text event topics from the topic graph. It aggregates the text stream into several topic event text sets based on the topic candidate words in the topic clusters, completing the entire topic analysis process.
[0076] The event context analysis module is connected to the topic text aggregation module and is used to detect the sub-event texts of the topic event text set through the sub-event identification and key text identification processes;
[0077] The activity sequence generation module is connected to the event context analysis module and is used to extract the key activity sequence of the event from the representative sub-event text and mark the text source for the activity;
[0078] The intent feature modeling module, connected to the activity sequence generation module, is used to vectorize the word sequence generated by merging text and activities. After performing primary feature extraction and word vector dimensionality reduction, it trains the word vector's ability to represent context. It also uses the attention mechanism to focus on features that can affect the intent category and determines the intent category of an event by calculating the probability of the event for each intent.
[0079] In summary, due to the adoption of the above technical features, the beneficial effects of the present invention are:
[0080] In response to large-scale text data streams, the present invention constructs a topic graph model based on word co-occurrence, which can process any form of text data in real time without being affected by the text structure and content, solving the problem that traditional topic detection models are difficult to meet the dynamic and continuous changes of data streams and online analysis scenarios; in response to the problem of redundant information of topic events, the present invention adopts a method based on event context analysis to obtain key sub-events that promote the progress of events, and uses a small amount of representative text information to represent events. The representative event text and key activity sequence are then combined as the overall information of the event and input into the intent model for intent recognition; in response to the problem of not utilizing important text features, the present invention integrates the attention mechanism on the basis of CNN and Bi-LSTM to construct an intent recognition model, and adaptively performs intent feature modeling and intent recognition through training parameters, solving the problem of difficulty in mining potential event features in intent recognition.
[0081] Additional aspects and advantages of the invention will become apparent from the description which follows, or may be learned by practice of the invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0082] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the following description of the embodiments with reference to the accompanying drawings, in which:
[0083] Figure 1 This is a framework diagram of an event topic analysis method based on a topic graph model in an intention recognition method based on topic event analysis according to an embodiment of the present invention;
[0084] Figure 2 is a partial schematic diagram of a topic graph in an intention recognition method based on topic event analysis according to an embodiment of the present invention;
[0085] Figure 3This is a diagram of an event intent recognition framework in an intent recognition method based on topic event analysis according to an embodiment of the present invention;
[0086] Figure 4 This is an architecture diagram of an event intent recognition model based on CBL-Attention in an intent recognition method based on topic event analysis in one embodiment of the present invention. DETAILED DESCRIPTION
[0087] In order to more clearly understand the above-mentioned objects, features and advantages of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that, in the absence of conflict, the embodiments of the present application and the features therein can be combined with each other.
[0088] In the following description, many specific details are set forth to facilitate a full understanding of the present invention. However, the present invention may also be implemented in other ways different from those described herein. Therefore, the scope of protection of the present invention is not limited to the specific embodiments disclosed below.
[0089] Refer to the following Figures 1 to 4 To describe an intention recognition method and system based on topic event analysis provided according to some embodiments of the present invention.
[0090] Some embodiments of the present application provide an intent recognition method based on topic event analysis.
[0091] The first embodiment of the present invention proposes an intent recognition method based on topic event analysis, which includes two parts: event topic analysis and topic event intent recognition. The event topic analysis method based on the topic graph model is divided into topic graph construction and topic text aggregation, wherein the output of topic graph construction is the input of topic text aggregation. Figure 1 A framework diagram of an event topic analysis method based on a topic graph model is shown.
[0092] In the construction of the topic map in this embodiment, the topic map is defined as follows: In each text, each word is a node, the co-occurrence relationship between words is the edge, and the number of co-occurrences of word pairs is the weight of the edge, thus generating a graph ,in Represents a collection of nodes, represents the edge set, The weight matrix representing the edge is called graph For text collection The corresponding theme image is shown below.
[0093] The text data stream used in this embodiment is evenly distributed in each time period with time as the axis, and the data stream is divided into a time window of 24 hours a day, and then the theme events reported on that day are identified. Represents the current time window, then During a time period, all text in the data stream can be represented as a set , the number of texts contained in the set is expressed as . Indicates that the data flow is The first Each text is segmented using the word segmentation tool, and then a word list is generated.
[0094] Extracting co-occurring word pairs from each text from a large-scale text stream usually requires an algorithm with a complexity of , in the scenario of processing large-scale data, it is a very time-consuming complexity for computers. Considering the actual situation of text content, it usually contains a large number of auxiliary words, function words and noise, and only a small part of the words have positive meaning for the representation of the subject. These words are usually entities and actions, such as people, places, organizations and behaviors. In order to balance the efficiency and quality of the algorithm, this embodiment uses a part-of-speech recognition tool to identify the part of speech of each word from the text, and then only retains verbs and nouns as the next research objects, and extracts co-occurring word pairs. The specific extraction steps are as follows:
[0095] Input: All text within a time window ;
[0096] Output: All co-occurring word pairs in the text within the time window;
[0097] for in do;
[0098] Use LTP tools to perform sentence segmentation, word segmentation, part-of-speech tagging, and named entity recognition in sequence;
[0099] Filter out non-verb and noun units to obtain a vocabulary list consisting entirely of gerunds;
[0100] forwordindo;
[0101] Match word with all the words that follow it in the list to generate co-occurring word pairs;
[0102] Add the co-occurring word pairs to the set Co-Words;
[0103] end for;
[0104] endfor;
[0105] returnCo-Words;
[0106] For the extracted co-occurring word pairs, the text content is modeled by generating a graph. From the previous analysis, it can be seen that the occurrence of word co-occurrence phenomenon has an inevitable correlation with the distribution of text topics. Therefore, this embodiment defines the graph generated by modeling the word co-occurrence relationship as a topic graph, and then uses the topic graph to deeply study the implicit topics in the text. The generation of the topic graph will use the retained nouns and verbs as nodes, and the co-occurrence relationship of the co-occurring words as the edge of the node. The constructed topic graph is partially shown as follows Figure 2 As shown in , the weight of the edge is the total number of times the two connected node words co-occur in the data stream within a certain period of time, which can be understood as the co-occurrence intensity between the two words.
[0107] In topic text aggregation, community identification is also known as community detection, which is a method used to detect community structures in complex networks. In the community identification algorithm, a community is usually composed of a group of closely connected nodes, and the nodes within the community are sparsely connected to the nodes outside the community. The topic clusters in the topic graph constructed in this embodiment have the same properties as the communities in complex networks, that is, the internal association density of the topic clusters is high, and the connections between topic clusters are sparse. Therefore, this embodiment uses a community identification algorithm to divide the topic clusters in the topic graph. Currently, community identification methods are generally divided into two categories, one is a community identification method based on graph segmentation, and the other is a community identification method based on similarity calculation. Since it is difficult to calculate the similarity between nodes in the topic graph generated in the present invention, this embodiment draws on the more classic voltage-based identification algorithm (WH algorithm) in the community identification method based on graph segmentation, and improves and optimizes it in combination with the usage scenario of this embodiment.
[0108] The WH algorithm uses the voltage difference between nodes to divide the communities in the graph, while the improved algorithm proposed in the present invention divides the communities based on the concept of diffusion. Unlike WH, which sets the starting and ending nodes at the initial stage, the present invention randomly assigns voltages to all nodes in the algorithm. The process of calculating the voltage of each node can be regarded as a diffusion process. In this process, the diffusion distance between dense nodes will be significantly greater than the diffusion distance between sparse nodes. After a certain number of iterations, an edge in the graph will become an edge with a stable maximum diffusion distance, and then the maximum diffusion distance edge will be cut to form a new graph structure, and then the nodes will be reinitialized for iterative calculation. Repeat the above process, and eventually several well-divided communities can be obtained.
[0109] If the maximum diffusion distance edge is continuously cut, each independent node will eventually represent a community. In order to determine the optimal state of community division, that is, the termination state of the algorithm, the present invention uses modularity Q to measure the quality of community division. The modularity function is calculated as follows:
[0110] (1);
[0111] in, Representing the community and The ratio of the number of edges between to the total number of edges in the graph, It represents the ratio of the number of edges within community i to the total number of edges. In the process of identifying communities, if the value of Q increases, it means that the closeness within the community is enhanced and the connectivity between communities is weakened. Therefore, the larger the Q value, the more reasonable the community division result is. When the Q value reaches the maximum, the optimal state of community division is achieved, and several topic clusters are obtained. The specific algorithm steps for obtaining topic clusters are as follows:
[0112] Input: Topic map ;
[0113] Output: topic cluster set;
[0114] 1. for inVdo;
[0115] 2. Randomly generate node voltage ;
[0116] 3.endfor;
[0117] 4. Update the voltage value of each node;
[0118] 5. Calculate the diffusion distance between each two connected nodes ;
[0119] 6. Find the edge with the maximum diffusion distance and record the edge id ;
[0120] 7. If the calculated result in this round is If the result is the same as the previous round, delete the edge from the graph, otherwise go to step 4;
[0121] 8. If the number of communities obtained by the current division does not increase, go to step 1;
[0122] 9. Calculate the modularity Q according to formula (1). If the Q value increases, go to step 1. Otherwise, record the Q obtained in the previous iteration as the maximum value.
[0123] Several topic cluster sets are obtained when the returnQ value is the largest.
[0124] In the above algorithm, the time complexity of randomly generating node voltage is , updating node voltage values and calculating diffusion distance are mainly edge traversal operations, and the time complexity is When the number of edges is much larger than the number of nodes, the number of edges that need to be cut is usually much smaller than , combined with the definition of topic graph in this embodiment, the number of edges in a text is usually much larger than the number of nodes, so the time complexity of executing the above algorithm in the topic graph can be approximately .
[0125] Existing clustering models mainly adopt an unsupervised approach, usually clustering texts while generating topics. This is not suitable for the present invention, which clusters texts based on existing topics. Considering that the present invention mainly utilizes the characteristics of words, such as word frequency, distribution, and co-occurrence relationships between words, and the generated topic candidate words have corresponding representation ability scores. In combination with the above conditions, the present invention proposes a text clustering algorithm based on vector similarity calculation, the specific steps are as follows:
[0126] Input: A text collection within a time window, the text detected in the time window Lists of topic candidate words;
[0127] Output: A collection of texts;
[0128] for inListsdo
[0129] right The words in are normalized according to the relative entropy scores;
[0130] Calculate the weight of each candidate word representing the topic;
[0131] Use Word2Vec to map all candidate words into the vector space;
[0132] right The words in the vector are weighted summed to obtain the vector representation of the topic;
[0133] endfor
[0134] for in do
[0135] Use Word2Vec to map all words in the text into a vector space;
[0136] right Calculate the sum and average of the word vectors for all words in to get the vector representation of the text;
[0137] calculate Similarity to each topic;
[0138] Will Group them into the most similar topics;
[0139] Arrange the texts grouped into themes in chronological order;
[0140] endfor;
[0141] Returnn topic event text collection;
[0142] It is understandable that the Word2Vec used in the topic event clustering algorithm can also be replaced by other word vector representation models, such as GloVe or BERT models.
[0143] After the subject events are aggregated, it is necessary to identify the intent of each event. This embodiment constructs an event intent identification framework, and its framework diagram is shown in FIG. Figure 3 shown.
[0144] The development of a topic event is determined by several key sub-events. By identifying the key sub-events at each stage, we can describe the overall development of the event. This example proposes an event context construction algorithm based on word burstiness. This algorithm constructs the development context of the event by searching for important sub-event keywords in the text. The algorithm mainly includes two parts: event context initialization and key text identification.
[0145] For the generated theme event text set, since the texts in the theme event text set have been arranged in chronological order, sliding processing is still performed here based on one time window per day. First, the burst score of all words in the current time window is calculated. If the burst score of a word is greater than the set threshold, it is judged as a sub-event keyword and marked with the timestamp of the current time window. If the event keyword set in the current time window is not empty, it is considered that a representative key event occurred on that day. On the contrary, if the event keyword set is empty, it is considered that the event on that day did not play a role in promoting the development of events. Finally, a sub-event keyword sequence is generated in the order of the time window to complete the event context initialization.
[0146] Considering that descriptions of key sub-events may be distributed across different time windows, to obtain a more comprehensive understanding of the event, the present invention retraverses all texts in the collection based on the generated initial event context. First, for each text, the event context is searched from front to back for the key sub-events to which it belongs. If a word in the current text intersects with a sub-event keyword within a certain time window, the text is identified as a key text that represents the development stage of the event. It is then divided into that time window, ultimately generating a thematic event context represented by multiple groups of texts.
[0147] By processing the subject event text set, we further obtained the event context composed of different key sub-events under the subject event, and selected several representative texts for each key sub-event. On this basis, we also need to identify the target activity in each key sub-event to provide support for subsequent event intention recognition research. This embodiment uses dependency syntactic analysis tools as an aid to design corresponding extraction rules to identify the activities in the text. First, we identify the activity trigger words in the text, and then identify the activity arguments based on the trigger words. Finally, we represent the event activities contained in the text in the form of subject-verb-object triples.
[0148] Figure 4 The following diagram shows the architecture of the event intent recognition model based on CBL-Attention. Intent refers to the desire or intention of a single subject or multiple subjects to achieve a certain goal. This embodiment combines the advantages of LSTM, CNN and attention mechanism, and proposes a topic event intent recognition model CBL-Attention that integrates CNN, Bi-LSTM and attention mechanism. First, CNN is used to extract important features from various positions of text and activity sequences, thereby reducing the dimension of the vector representing the features. Then, Bi-LSTM is used to extract contextual information in the sequence from the features obtained from the convolutional layer. Finally, the attention mechanism is used to assign higher weights to sequence units that are highly relevant to the intent to increase the accuracy of sub-event intent recognition. Among them, the Bi-LSTM model can also be replaced by a Bi-GRU model to simplify the model structure and accelerate training.
[0149] This embodiment uses the Word2Vec method, which can generate low-dimensional word vectors by training large-scale text corpora, to vectorize the vocabulary sequence, and selects the Skip-gram model, which is more accurate in expressing semantic information, to train the word vector representation, where the dimension of each word vector is 300.
[0150] The convolutional layer extracts low-level semantic features from the input word sequence and reduces the vector dimension. This embodiment uses a one-dimensional convolution kernel to convolve the input word sequence vector. First, the vector representation of the word sequence in an event is formally defined as shown in Equation (2).
[0151] (2);
[0152] in is the number of words in the sequence. In order to capture the inherent characteristics of the sequence using the convolutional layer, convolution kernels of different sizes are applied to the vocabulary sequence. When filter windows of different sizes move on the vocabulary sequence, multiple subsequences with semantic features are generated.
[0153] If the convolution kernel size is , then take arrive Subsequences of words The generated feature representation is shown in formula (3).
[0154] (3);
[0155] in, is a weight matrix that can be trained and learned, is the bias vector.
[0156] Since each filter must cover all positions of the text, the convolution kernel size is The feature representation generated by the filter is shown in formula (4).
[0157] (4);
[0158] An important aspect of using convolutional neural networks to extract features of word sequences under topic events is that it can reduce the number of training parameters during feature learning. This effect is achieved through the maximum pooling mechanism. After the input word sequence vector is convolved with several convolution kernels of different sizes, the same number of column vectors as the convolution kernels can be obtained. The maximum pooling operation is to extract the largest value among the column items obtained by each convolution kernel. For each convolution kernel, the feature representation obtained by maximum pooling is shown in Equation (5).
[0159] (5);
[0160] By using CNN to perform convolution processing on the topic event word sequence vector features, the vector dimension of each word is reduced from 300 generated by Word2Vec to 100.
[0161] However, the feature vector generated by the convolutional layer does not contain the contextual information of the sequence. In the Bi-LSTM layer, the word vector processed by CNN is used as input, and the contextual sequence information of the word can be further obtained through sequence modeling. The feature representation generated in the forward and backward directions at a moment is shown in formula (6).
[0162] (6);
[0163] for The hidden layer vector output by the Bi-LSTM layer at the moment is used as the input of the attention layer.
[0164] First, we calculate it through a layer of perceptron As the hidden representation of its attention layer, the calculation method is shown in formula (7).
[0165] (7);
[0166] Then normalize the calculation Attention weight corresponding to the word vector at the moment , the calculation method is shown in formula (8).
[0167] (8);
[0168] Finally, according to the attention weight corresponding to each word, all word vectors are weighted and summed to obtain the final vector representation of the topic event vocabulary sequence. The calculation method is shown in formula (9).
[0169] (9);
[0170] in, Indicates the The weight coefficient matrix of the word vector at this moment, is the offset corresponding to the eigenvector, It can be regarded as a high-level representation of the importance of different words. is the number of words in the vocabulary sequence.
[0171] After obtaining the complete representation of the subject event through the attention mechanism layer, the softmax function is used in the output layer to identify the intent of the event. The calculation method is shown in formula (10).
[0172] (10);
[0173] in, Represents the weight coefficient matrix required from the attention mechanism layer to the output layer, Indicates the corresponding offset, is the output intent category label.
[0174] The softmax function is essentially a generalization of the sigmoid function. In multi-intent recognition tasks, there is no need to establish multiple binary classification models to complete the multi-intent recognition process. For each topic event, the model calculates the score corresponding to each type of intent, then calculates the probability corresponding to each intent through the softmax function, and finally selects the intent with the highest probability as the final category.
[0175] This embodiment proposes a topic event detection method based on TGM. For large-scale text data streams generated online in real time, this embodiment proposes a topic graph construction model based on word co-occurrence, which can process any form of text data in real time without being affected by the text structure and content. Using an improved voltage-based community recognition algorithm, the topic graph is divided into several topic clusters, and the time complexity of the algorithm is optimized to a linear level. For redundant information in the topic event text set, a method based on event context analysis is used to obtain the key sub-events that promote the progress of the event, and extraction rules are designed to extract key activity sequences from the topic event text, and mine event information related to intent at a more fine-grained level.
[0176] The second embodiment of the present invention proposes an intention recognition method based on subject event analysis, and on the basis of the first embodiment, as Figures 1 to 4 As shown, including the problem of model adaptability in scenarios with massive social media texts not being considered, this embodiment proposes a topic event detection method based on TGM. For large-scale text data streams generated online in real time, this embodiment proposes a topic graph construction model based on word co-occurrence, which can process any form of text data in real time without being affected by the text structure and content. After generating the topic graph, in order to improve the efficiency and quality of topic identification, a graph simplification method is designed to filter out nodes and noise data that are not related to the topic in the graph. The generated topic graph contains several dense topic clusters. This embodiment proposes an improved voltage-based community identification algorithm to divide the topic graph into several topic clusters and optimize the time complexity of the algorithm to a linear level. Different from traditional text clustering algorithms, this embodiment designs a text clustering algorithm based on word vector similarity for actual application scenarios, which aggregates texts related to specific topics to obtain several topic event text sets.
[0177] In response to the problems of redundant information of subject events and unclear intent features, this embodiment proposes an event intent recognition framework based on deep learning. For the redundant information in the subject event text set, a method based on event context analysis is used to obtain the key sub-events that drive the progress of the event, and a small amount of representative text information is used to represent the event. This embodiment extracts key activity sequences from the subject event text by designing extraction rules, and mines event information related to intent at a more fine-grained level. In order to accurately extract intent-related features from event information, this embodiment proposes a subject event intent recognition model CBL-Attention that integrates CNN, Bi-LSTM and attention mechanism, merges representative sub-event texts and key activity sequences as the overall information of the event and inputs them into the model, and adaptively performs intent feature modeling and intent recognition by training network layer parameters.
[0178] The TGM model is a topic event detection model proposed in this embodiment. This embodiment uses accuracy as an evaluation indicator. In order to verify the effectiveness of the detection method based on the TGM model proposed in this embodiment, three typical methods that currently perform well in topic event detection tasks are selected for comparative experiments. They are the Sampled Min-Hashing (SMH)-based method proposed by Fuentes, the Incremental Clustering (IC)-based method proposed by Hasan, and the LDA-based method proposed by Arisa. The experimental results of each method are shown in Table 1. For the detected topic events, the topic cluster keywords and their corresponding texts are compared with events that occurred in the real world to determine their accuracy.
[0179] Table 1 Comparison of experimental results of topic event detection
[0180]
[0181] Table 1 lists the number of all events detected by each model and the number of events ultimately judged to be accurate, from which the model accuracy is calculated. Among the four methods, the LDA-based method has an accuracy rate of only 54.13% in detecting topic events, which is the worst performance among several methods. By analyzing its experimental process, the main reason is that the LDA-based method performs topic modeling on daily texts and uses the intensity change of the topic as an indicator for judging topic events. However, the dataset used in this paper contains a large number of short texts from social media. The content of the text is sparse and the time distribution of events is uneven. Performing topic modeling only on daily data will cause the model to be affected by a lot of noise. In addition, Aliello's experiment also mentioned that LDA is very effective in identifying narrow topics, but has certain limitations for identifying topic events in open domains. The accuracy rates of the minimum hashing and incremental clustering methods were 69.19% and 65.75%, respectively. While these two methods have similar performance, their accuracy rates are still low. One important reason for this is that these two methods fail to consider the heterogeneity of text when processing text data streams. The authors of the incremental clustering method only considered short text data from Twitter when proposing the model, while the minimum hashing method only considered long text data published by professional news websites. This impacts performance when processing the texts of varying lengths and structures in the dataset of the present invention. Furthermore, the incremental clustering method detected a greater number of events. This is primarily because the minimum hashing method considers more topic consistency and coherence issues, such as controlling the number of identified events by changing the word set overlap parameter, while the incremental clustering method retains both major and minor events by setting different event filters. The TGM model-based method proposed in this example achieved the highest accuracy rate of 82.48%. However, observing the number of detected topic events shows that the method proposed in this example only detected 839 events, a 37% reduction compared to the incremental clustering method, which detected the most events. Analyzing the experimental process revealed that after the community identification algorithm divided the topic clusters, a total of 2,073 candidate topic clusters were generated. However, after verification during the topic event evolution phase, most of these clusters were filtered out. Therefore, it can be concluded that the evolution verification module designed in this embodiment is very effective in verifying the authenticity of topic events. Furthermore, during the topic graph construction phase before dividing the topic clusters, a large amount of noisy data was filtered out through graph simplification, which is also a major factor in the small number of topic events.
[0182] The CBL-Attention model is the event intent recognition model proposed in this embodiment. This embodiment uses precision, recall, and F1 score as evaluation metrics. Deep learning models in the field of text classification are divided into three categories based on their implementation methods: sequence-based, word embedding-based, and graph convolution-based methods. This embodiment selects currently performing models from these three categories as baselines for comparison with the CBL-Attention model proposed in this embodiment. These include the LSTM model based on recurrent neural networks proposed by Liu, the LEAM (Label Embedding Attentive Model) model based on label embedding proposed by Wang, and the TextGCN (Text Graph Convolutional Network) model based on graph convolution proposed by Yao. The experimental results of each model are shown in Table 2.
[0183] Table 2 Comparison of experimental results of topic event intention recognition
[0184]
[0185] In the topic event intent recognition task, the CBL-Attention model proposed in this embodiment achieved the highest precision of 89.75%, recall of 90.57%, and F1 value of 90.18%, all of which were achieved, resulting in the best overall performance. The LEAM model uses a method that embeds words and labels into the same joint space for intent recognition. This method directly represents features of text vocabulary sequences. However, the text features of the dataset used in this embodiment are relatively sparse. In this scenario, considering only the features of word embeddings will lose much of the key event information and the dependencies between activity sequences. Therefore, the F1 value of this model only reached 77.08%. Compared with the LEAM model, the LSTM model extracts contextual dependencies in the sequence through a recurrent neural network. However, the unidirectional LSTM can only obtain the pre-depen- dencies in the sequence. Therefore, although the F1 value of this model is higher than LEAM at 81.46%, it is still relatively low. This shows that extracting contextual features in vocabulary sequences and the dependencies between words are more important for event intent recognition. The TextGCN model constructs a word co-occurrence graph for each text and then uses a graph convolutional network (GCN) to simultaneously learn vocabulary and text features under the supervision of known intent labels. Word co-occurrence features are potentially correlated with topic features, which are crucial for identifying topic and event intent. Consequently, the TextGCN model achieved an accuracy of 88.18%, 1.57% lower than the CBL-Attention model proposed in this example. Furthermore, its F1 score was 88.75%, only 1.43% lower than that of CBL-Attention. However, because TextGCN continuously extracts co-occurrence relationships, it consumes the most computational resources and time. From a feature extraction and extraction perspective, the CBL-Attention model proposed in this example, using a single CNN layer and two bidirectional LSTM layers, not only extracts primary semantic features from text and activity sequences, reducing the vector dimensionality, but also captures contextual dependencies within the word sequence. Using an attention mechanism, it adaptively assigns weights to different features, achieving optimal performance in experiments.
[0186] The third embodiment of the present invention proposes an intention recognition system based on subject event analysis, and based on any of the above embodiments, such as Figures 1 to 4As shown, it includes a topic graph construction module for processing large-scale text data streams, generating a topic graph according to the designed construction method, and assigning corresponding weights to each node and edge in the topic graph; a topic text aggregation module, connected to the topic graph construction module, for using the community identification algorithm to divide clusters that can represent text event topics from the topic graph, and aggregate the text stream into several topic event text sets based on the topic candidate words in the topic cluster to complete the entire topic analysis process; an event context analysis module, connected to the topic text aggregation module, for detecting the sub-event texts of the topic event text set through the sub-event identification and key text identification processes ... The sequence generation module is connected to the event context analysis module and is used to extract the key activity sequence of the event from the representative sub-event text and mark the text source for the activity; the intent feature modeling module is connected to the activity sequence generation module and is used to use Word2Vec to vectorize the vocabulary sequence generated by merging text and activities, and input it into the one-dimensional CNN network layer for primary feature extraction and word vector dimensionality reduction. After that, the Bi-LSTM network layer is used to train the word vector's ability to represent context, and combined with the attention mechanism to focus on features that can affect the intent category, and to determine the intent category of the event by calculating the probability of the event on each intent.
[0187] In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any suitable manner in any one or more embodiments or examples.
[0188] Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for intention recognition based on topic event analysis, characterized in that: Including event theme analysis and theme event intention identification; The event theme analysis includes: Extract co-occurring word pairs, model the text content by generating a graph, and define the graph generated by modeling the word co-occurrence relationship as a topic graph; The community identification algorithm based on graph segmentation is used to divide the topic clusters in the topic graph, including: Randomly assign voltages to all nodes; The process of calculating the voltage of each node is regarded as a diffusion process, and the diffusion distance of the edge between each two connected nodes is calculated; Perform iterative calculations to find the edge with the maximum diffusion distance; Cut the edge with the maximum diffusion distance to form a new graph structure; And reinitialize the nodes for iterative calculation until the divided communities meet the algorithm termination conditions, and obtain several well-divided communities, thereby obtaining several topic clusters; The subject event intention recognition includes: Using a text clustering algorithm based on vector similarity calculation, the texts are aggregated according to existing topics to obtain a collection of topic event texts; Identify key sub-events at each stage of the theme event, and construct an event context algorithm based on word burstiness. By finding important sub-event keywords in the text, the development context of the theme event is constructed, including: Calculate the burstiness score of all words in the current time window. If the burstiness score of a word is greater than the set threshold, it is judged as a sub-event keyword and marked with the timestamp of the current time window. If the sub-event keyword set in the current time window is not empty, it is considered that a representative key event occurred on that day. Conversely, if the sub-event keyword set is empty, it is considered that the event on that day did not play a role in promoting the development of the event. Generate a sub-event keyword sequence according to the chronological order of the time window to complete the event context initialization. Furthermore, all texts are retraversed based on the generated initial event context. For each text, the key sub-event to which it belongs is searched according to the event context. If the words in the current text intersect with the sub-event keywords within a certain time window, the text is determined to be a key text that can represent the development stage of the event, and then it is divided into the time window, ultimately generating a thematic event context represented by multiple groups of texts. Identify the activity trigger words in the text, identify the activity arguments based on the activity trigger words, and express the event activities contained in the text in the form of subject-verb-object triples; The event intent recognition model is used to extract important features from various locations in the text and activity sequence. Sequence modeling is used to extract the contextual sequence information of the vocabulary. Sequence units that are highly relevant to the intent are assigned higher weights to complete the representation of the topic event, including: Obtain the vocabulary sequence for vector representation and train the word vector representation; Use CNN models to extract important features from various positions in text and activity sequences, thereby reducing the dimension of the vector representing the features; Use the Bi-LSTM model or Bi-GRU model to perform sequence modeling on the vocabulary vectors processed by the CNN model to obtain the context sequence information of the vocabulary; Also, an attention mechanism is used to assign higher weights to sequence units that are highly relevant to intent, thereby increasing the accuracy of sub-event intent recognition; Use the softmax function to identify the intent of events.
2. The method for identifying intentions based on topic event analysis according to claim 1, characterized in that: The co-occurring word pairs are extracted, and the text content is modeled by generating a graph. The graph generated by the word co-occurrence relationship modeling is defined as a topic graph, including: Use the word segmentation tool to segment each text in the text collection and generate a word list; Use part-of-speech recognition tools to identify the part of speech of each word in the word list, retain only verbs and nouns, and extract co-occurring word pairs; The retained nouns and verbs are used as nodes, and the co-occurrence relationships of co-occurring word pairs are used as edges to generate a topic graph.
3. The method for identifying intentions based on topic event analysis according to claim 2, characterized in that: Methods for extracting co-occurring word pairs include: Get all text within a time window; Use LTP tools for sentence segmentation, word segmentation, part-of-speech tagging, and named entity recognition; Filter out non-verb and noun units to obtain a vocabulary list consisting entirely of gerunds; Match each word with all the words that follow it sequentially in the list to generate co-occurring word pairs; Add co-occurring word pairs to a set.
4. The method for identifying intentions based on topic event analysis according to claim 1, characterized in that: The text clustering algorithm based on vector similarity calculation is used to cluster texts according to existing topics, including: Get the text collection within a time window and the text detected in the time window Lists of topic candidate words; right The words in are normalized according to the relative entropy scores; Calculate the weight of each candidate word representing the topic; Use the word vector representation model to map all candidate words into the vector space; right The words in are weightedly summed up to obtain the vector representation of the topic; and Use word vector representation model to map all words in the text into vector space; right Calculate the sum and average of the word vectors for all words in to get the vector representation of the text, where Represents the i-th text in the data stream within the t time period; calculate Similarity to each topic; Will Group them into the most similar topics; Arrange the text grouped into topics in chronological order.
5. The method for intention recognition based on topic event analysis according to claim 1, characterized in that: The process of identifying activity trigger words in a text, identifying activity arguments based on the activity trigger words, and expressing the event activities contained in the text in the form of subject-verb-object triples includes: With the help of dependency syntax analysis tools, extraction rules are designed to identify the activities in the text. First, the activity trigger words in the text are identified, and then the activity arguments are identified based on the trigger words. Finally, the event activities contained in the text are represented in the form of subject-verb-object triples.
6. The method for identifying intentions based on topic event analysis according to claim 1, characterized in that: The use of the attention mechanism to assign higher weights to sequence units that are highly relevant to intent, thereby increasing the accuracy of sub-event intent recognition, includes: Get the hidden layer vector output after sequence modeling; Calculate the hidden representation of the attention layer based on the hidden layer vector output after sequence modeling; Normalized calculation based on the hidden representation of the attention layer The attention weight corresponding to the word vector at that moment; According to the attention weight corresponding to each word vector, all word vectors are weighted summed to obtain the final vector representation of the topic event vocabulary sequence.
7. An intention recognition system based on topic event analysis, characterized in that: The method for identifying intentions based on topic event analysis as described in any one of claims 1 to 6, wherein the system comprises: The topic graph construction module is used to process text data streams, generate topic graphs, and assign corresponding weights to each node and edge in the topic graph; The topic text aggregation module is connected to the topic graph construction module and is used to use the community identification algorithm to divide the clusters that can represent the text event topics from the topic graph. It aggregates the text stream into several topic event text sets based on the topic candidate words in the topic clusters, completing the entire topic analysis process. The event context analysis module is connected to the topic text aggregation module and is used to detect the sub-event texts of the topic event text set through the sub-event identification and key text identification processes; The activity sequence generation module is connected to the event context analysis module and is used to extract the key activity sequence of the event from the representative sub-event text and mark the text source for the activity; The intent feature modeling module, connected to the activity sequence generation module, is used to vectorize the word sequence generated by merging text and activities. After performing primary feature extraction and word vector dimensionality reduction, it trains the word vector's ability to represent context. It also uses the attention mechanism to focus on features that can affect the intent category and determines the intent category of an event by calculating the probability of the event for each intent.
Citation Information
Patent Citations
Multi-intention recognition method and system fused with theme information
CN114154492A
Intention recognition method and device, electronic equipment and storage medium
CN114528403A
Intention recognition and model training method, electronic equipment and computer storage medium
CN115017313A
Method and device for recognizing event key progress
CN103500163A
Intention recognition method and device, equipment and medium
CN114036289A