Interactive short text topic recognition method based on DW-ICNN and affair logic map
By using a method based on DW-ICNN and event graph, the problems of topic boundary identification and information utilization efficiency in interactive short text topic recognition were solved. This method achieves accurate identification and efficient separation of topic information for dynamic display, thereby improving the service accuracy and information processing efficiency of community management.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NANJING UNIV
- Filing Date
- 2025-02-26
- Publication Date
- 2026-07-07
AI Technical Summary
Existing interactive short text topic recognition technologies struggle to accurately identify topic boundaries and needs, cannot efficiently separate specific information from different topics, and cannot provide timely visualization and improve information utilization efficiency.
An interactive short text topic recognition method based on DW-ICNN and event graph extracts text features and user features of short texts through initial event detection, sentence pair recognition task of DW-ICNN and large model information extraction of QWEN2.5, and generates dynamic community event graph by using dynamic window calculation and ICNN training.
It achieves accurate identification of topic boundaries and needs in interactive texts, efficiently separates specific information of different topics, and improves information utilization efficiency by generating dynamic community event graphs in real time, providing more accurate event identification and topic evolution tracking.
Smart Images

Figure CN120146063B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of natural language processing technology, and in particular to an interactive short text topic recognition method based on DW-ICNN and event graph. Background Technology
[0002] The rapid iteration and application of digital technologies are gradually changing people's lives and drastically altering the ways in which information emerges, spreads, and is exchanged. Social governance is undergoing a continuous digital transformation under the influence of technologies such as the internet, big data, and blockchain. While digital technologies bring new impetus to social governance, they also become a crucial driving force for building a social governance community. The internet has "reorganized" social members, with people from all walks of life regrouping based on topics, demands, and interests. Individual netizens and virtual organizations formed through online connections have gained the ability to act online, leading to more micro-level transactions and covert behaviors emerging online, creating a more complex micro-governance environment for society.
[0003] The digital age has spurred the rapid development of instant messaging platforms (WeChat, QQ, Weibo, etc.), generating massive amounts of text-based information daily. Text containing two or more participants is called interactive text. This vast amount of interactive data often contains valuable information, reflecting not only user behavior and preferences but also revealing group interactions and social dynamics. Especially in the field of social governance, this type of data provides new perspectives for problem identification, demand feedback, policy formulation, and evaluation. Researchers can accurately capture public concerns and emotional changes through the analysis of these texts, providing data support for grassroots community governance and exploring more efficient and precise new approaches to social governance. However, unlike traditional social media text, interactive text is characterized by short data length, large capacity, high speed, and variable data distribution. These characteristics not only lead to data sparsity but also increase the challenge of concept drift. Furthermore, the diverse and arbitrary content of interactive text, containing numerous distracting words and multiple events mixed within the same window, makes traditional text processing techniques inadequate for this type of data, especially for short text semantic recognition algorithms, where this data characteristic presents a significant challenge. Existing research, represented by topic models and event classification algorithms, has provided some support for decision-makers, but it also suffers from coarse-grained topic identification, low information utilization, and difficulty in reconstructing true event details. Furthermore, the features of the objects generated by short texts are rarely incorporated into the semantic analysis of short texts, further increasing the difficulty of semantic recognition.
[0004] In summary, the following three existing technical problems need to be addressed: ① How to accurately identify topic boundaries and needs in interactive text, providing valuable references for community administrators to offer precise community services. ② For asynchronous dialogue, how to efficiently separate specific information from different topics and clarify the evolutionary logic of trending topics. ③ For rapidly generated interactive short texts, how to promptly visualize and display them, while improving the efficiency of information utilization. Summary of the Invention
[0005] To address the problems existing in the prior art, the purpose of this invention is to propose an interactive short text topic recognition method based on DW-ICNN and event graph. This method utilizes an initial event detection task (TASK1), a sentence pair recognition task using DW-ICNN (TASK2), and a topic recognition task using QWEN2.5 and event graph (TASK3). Using community-generated short texts as the dataset, it extracts textual and user features from the short texts. Event segmentation of the short texts is achieved through dynamic window computation and ICNN training. Information extraction from the QWEN2.5 large model is then used to obtain events and their evolutionary relationships, thereby generating a dynamic community event graph and achieving accurate perception of community topics and needs.
[0006] To achieve the above objectives, the present invention provides the following solution:
[0007] Interactive short text topic recognition methods based on DW-ICNN and event graph include:
[0008] Obtain interactive short text and preprocess the interactive short text;
[0009] Set up a sliding window, and during the sliding process of the sliding window, merge the pre-processed interactive short texts, and then perform event matching on the text in the window. Based on the event matching results, all interactive short texts are assigned to event bags.
[0010] The speaker's feature identifiers are obtained, including: speaker ID, speaking time, whether there was interaction, and the interaction target. The feature identifiers and text information from the event bag are input into the DW-ICNN model to obtain the recognition result of the interaction short text sentence pairs. The DW-ICNN model is trained using a training set, which includes: community short text data and its labels. Sentence pairs are constructed within a dynamic window in the DW-ICNN model using the text information from the event bag. The feature identifiers and the sentence pairs are input into the ICNN model to obtain the recognition result. The ICNN model dynamically adjusts the feature weights by introducing an attention mechanism.
[0011] Based on the recognition results, short texts of the same event are merged to form a virtual long text. Relevant information related to the long text is retrieved. The long text and the relevant information are input into the QWEN2.5 large model to obtain the events and evolutionary relationships. Based on the events and evolutionary relationships, an event graph is constructed.
[0012] Optionally, preprocessing the interactive short text includes:
[0013] Multiple cleaning and standardization operations are performed on the interactive short text to remove meaningless characters and emojis, while retaining interactive information that reflects the interaction relationship between members.
[0014] The meaningless characters include: newline characters, spaces, and links.
[0015] Optionally, obtaining the event matching result includes:
[0016] Identify common event types, extract common trigger words based on the common event types, and create initial trigger logic rules for each event type using the common trigger words;
[0017] According to the triggering logic rules, the sliding step size and window size are initialized to perform logical matching on the interactive short text within the sliding window, and it is determined whether the interactive short text is a single event case. If the interactive short text is a single event case, a temporary state is assigned to the interactive short text, which includes a current state and a final state. The temporary state is updated, and the initial event identification state of the interactive short text is obtained. The initial event identification state is used as the event matching result. If the interactive short text is a multi-event case, the contribution of the common trigger words in the interactive short text is calculated, thereby assigning a new event state to the interactive short text. The current state is updated through the sliding window, and the initial event identification state of the interactive short text is obtained.
[0018] Optionally, constructing sentence pairs using the text information in the event bag includes:
[0019] Based on the events in the event bag, obtain the occurrence time A of the current flag event. t The occurrence time includes: the start time A of the current flag event. start and end time A stop And the time interval T;
[0020] Obtain the initial time t0 of the dynamic window, and calculate the marginal event density and event similarity at fixed timestamp intervals. If A tIf -t0>T, then the upper and lower boundaries of the dynamic window are updated by the event density and the change in event similarity at the edge, and a termination condition is set. When the termination condition is met, the updating of the upper and lower boundaries is stopped.
[0021] Within the optimized dynamic window, sentence pairs are constructed using the text information in the event bag.
[0022] Optionally, calculating the marginal event density and the event similarity includes:
[0023]
[0024] in, Marginal event density, For marginal event similarity, and Each corresponds to a timestamp of A. t With A t+i The short text vector, n t To indicate the number of interactive short texts in a fixed window, when the timestamp t corresponding to the i-th interactive short text... i ∈[A t A t When +Δt], δ(t) i ∈[A t A t +Δt])=1, otherwise it is 0.
[0025] Optionally, setting the termination condition, and stopping the updating of the upper boundary and the lower boundary when the termination condition is met, includes:
[0026] Set the termination condition as follows: ΔW > τ;
[0027] If ΔW > τ, then update the upper boundary AT of the event window. u With lower boundary AT l Otherwise, stop updating the boundary;
[0028] AT u =A start -ΔW u *Δt
[0029] AT l =T stop +ΔW l *Δt
[0030] Where ΔW is the update coefficient and τ is a fixed value.
[0031] Optionally, obtaining the update coefficients includes:
[0032]
[0033] Wherein, λ represents the importance of the balance between changes in event density and changes in event similarity.
[0034] Optionally, obtaining the recognition result includes:
[0035] After the feature labels and the sentence are processed sequentially through convolutional layers, pooling layers, and attention weight layers, feature concatenation is further performed. The concatenation result is then expanded through a Flatten layer and input into a fully connected layer and a softmax layer for classification output to obtain the recognition result.
[0036] Optionally, the event graph includes: first-level nodes, second-level nodes, and third-level nodes;
[0037] The first-level nodes include: event type, event content, event time and location, and event attitude;
[0038] The secondary nodes include: topic, need, time, location, event attitude words, and event sentiment score;
[0039] The three-level nodes include: the first occurrence timestamp, the event duration timestamp, the occurrence location, and the associated location.
[0040] The beneficial effects of this invention are as follows:
[0041] Existing interactive short text methods face significant challenges due to their characteristics of short data length, large capacity, high speed, and variable data distribution, particularly in accurately identifying topic boundaries, needs, topic evolution, and improving information utilization efficiency. To address these challenges, this invention proposes a method for topic identification in interactive short text, providing solutions to the following three core technical problems:
[0042] (1) Accurately identify topic boundaries and needs in interactive texts: By introducing initial event detection (TASK1) and sentence pair recognition task based on DW-ICNN (TASK2), this invention can accurately identify topic boundaries and needs in interactive texts, avoiding the drawbacks of excessively coarse topic granularity and low information utilization in traditional methods. This provides community managers with precise service basis and reference, enabling them to better identify the actual problems that residents are concerned about and improve the accuracy and timeliness of community services.
[0043] (2) Efficiently separate specific information of different topics and clarify the evolution logic of hot topics: In response to the challenges of asynchronous dialogue and multiple events, this invention combines the QWEN2.5 big model for information extraction, deeply explores events and their evolutionary relationships, and effectively solves the dilemma of traditional methods being unable to efficiently identify topic evolution and handle the intertwining of multiple events through dynamic analysis of short texts and generation of community event graphs, thereby achieving accurate tracking of hot topic evolution and efficient extraction of hot information.
[0044] (3) Real-time visualization of short texts improves information utilization efficiency: For rapidly generated interactive short texts, this invention combines short text features with user features in an event segmentation method, and utilizes dynamic window calculation and ICNN training technology to achieve efficient processing and rapid response of short texts. This invention generates a dynamic community event graph in real time, enabling rapid and efficient utilization of information in short texts, greatly improving the efficiency and accuracy of information processing, and simultaneously achieving real-time perception of community topics and needs.
[0045] In summary, this invention effectively solves key technical challenges in short text recognition and analysis, enhancing the application value of short texts in social governance. Specifically, it provides more accurate event identification, more efficient topic evolution tracking, and more powerful short text information processing capabilities, thereby providing solid data support and decision-making basis for the precise resolution of grassroots community governance and social problems. Attached Figure Description
[0046] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0047] Figure 1 This is a schematic diagram of an interactive short text topic recognition method based on DW-ICNN and event graph according to an embodiment of the present invention;
[0048] Figure 2 This is a schematic diagram of the initial event bag construction according to an embodiment of the present invention;
[0049] Figure 3 This is a schematic diagram illustrating the implementation process of ICNN according to an embodiment of the present invention;
[0050] Figure 4 This is a schematic diagram of the training process of ICNN according to an embodiment of the present invention;
[0051] Figure 5 This is a schematic diagram comparing the model efficiency of different windows in an embodiment of the present invention;
[0052] Figure 6 This is to illustrate the information utilization efficiency of the model constructed in this embodiment of the invention; wherein, (a) is a schematic diagram of the semantic network captured by the window of the present invention, (b) is a schematic diagram of the semantic network obtained by expanding after retrieving the marker event, and (c) is a schematic diagram of the full event recognition extended network after recognition by the DW-ICNN sentence pair model;
[0053] Figure 7 This is a schematic diagram of the community time-series event graph in Window 1 according to an embodiment of the present invention;
[0054] Figure 8 This is a schematic diagram of the time-series event graph of the community in Window 2 according to an embodiment of the present invention;
[0055] Figure 9 This is a schematic diagram of the relationship between community health and parking topics in an embodiment of the present invention. Detailed Implementation
[0056] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0057] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0058] Research on Topic Identification on Social Media: With the widespread application of UGC technology in online social networks, online platforms such as Weibo, Twitter, and community group chats have become important platforms for users to express their opinions. The massive interactive data from these platforms often contains valuable information that can effectively assist administrators in providing accurate and personalized services to users. Scholars both domestically and internationally have conducted extensive research on topic detection, public opinion identification, rumor detection, and event identification. For example, Kasiviswanathan et al. proposed learning to construct a dictionary represented by term distributions from document streams and using this dictionary to perform sparse representation of new document vectors, identifying new topics by calculating reconstruction errors; Schubert et al. treated sudden topic detection as an outlier detection task, judging its suddenness by comparing the recent occurrence frequency of words and word pairs with dynamically updated exponentially weighted moving averages and variances; Wu Qi et al. used the SO-PMI method to identify the semantic tendencies of words, capture the sentiment information of unknown words, improve the risk dictionary, and use this dictionary and real-time data to assess the online public opinion risk of social security incidents. Such keyword dictionary-based analysis methods can accurately and quickly identify information in text, but the contextual limitations of the text may lead to ambiguity in information comprehension. Furthermore, different users' expression styles and approaches may affect the extraction of information. Zhang Liu et al. constructed a topic clustering map of Weibo users during the pandemic based on the LDA model, used perplexity to determine the optimal number of topics, and analyzed the topic dissemination path among online communities through the relationship between forwarding and commenting. Tang Jianghao et al. took the topic of "library" and its comments in Weibo's trending searches as their research object, using text mining software GooSeeker and social network analysis software UCINET to explore the topic characteristics of hot library topics from the perspectives of the association between topic leader attributes, topic themes, and comment sentiment, as well as keyword clustering. Ma Xiaoyue et al. constructed a three-dimensional dynamic topic evolution model based on text data from specific crisis events, using stakeholder theory and dynamic topic models to mine the classification and topic attention of different stakeholders in social media. Many scholars have combined multi-dimensional feature analysis with topic models. For example, Wu Qi et al. constructed a risk dictionary and indicators based on the semantics of negative public opinion, and established a risk assessment system for online public opinion on social security incidents by combining multiple dimensions. They also used the "XXXX incident" to show real-time risk changes. Zeng Ziming et al. combined LDA and BERT-BiLSTM-Attention to establish an online public opinion analysis model for public health emergencies. By combining the temporal characteristics of the number of blog posts and the life cycle theory, they explored the differences in public opinion themes and the evolution of emotions in different cycles.
[0059] Furthermore, machine learning methods based on multi-feature fusion are also frequently used for topic detection in social media texts. For example, Afyouni et al. proposed a hybrid learning model for spatiotemporal social event detection using social media data. Research combined convolutional neural networks (CNNs) and recurrent neural networks (RNNs) to classify events by mapping tweets to numerical feature vectors. Liu et al. collected WeChat information diffusion trees and proposed a randomized recursive tree (RRT) and randomized susceptible view-forward-remove (SVFR) model to understand the information propagation process and its dynamic behavior, and validated the key features of the model through data. Chen et al. proposed a multimodal generative adversarial network for detecting traffic events in smart cities, demonstrating how deep learning techniques can be used to detect and analyze complex events by utilizing social media data and other information sources.
[0060] However, information on social media platforms such as Weibo, WeChat, Twitter, and Facebook is often composed of short texts, characterized by brevity, information density, and limited context. Furthermore, interactive texts involving multiple participants often contain multiple asynchronous dialogues simultaneously, with information interwoven within these synchronous conversations, posing a significant challenge to traditional semantic recognition methods. Hao et al. proposed a mutual attention convolutional neural network for Chinese short text classification, which integrates word-level and character-level features without losing feature information. Jiang Cuiqing et al. proposed a feature-extended Weibo short text hot topic detection method (FE-HTD), which filters comment texts and extracts feature words using word co-occurrence and TF-IDF methods, calculates word pair velocity and intensity in the Weibo text stream, defines burst features, and finally determines the hot topic structure through clustering. Ji Jianrui et al. explored the focus of attention in forum sections, grasped user demands, and proposed a focus identification method based on a multi-iterative merging strategy. This method iteratively re-clusters short texts with similar focus distributions to ultimately form long texts. This study identified suicidal ideation; Guo Hengrui et al. proposed a semi-supervised event clustering model, SemiEC, which uses a linear model to calculate similarity and perform incremental event clustering based on small-scale labeled data and LSTM event representation; Ghanadian et al. used generative artificial intelligence models (such as ChatGPT, Flan-T5, and Llama) to synthesize suicidal ideation detection data, overcoming the need for large-scale annotated data. This study significantly improved the model's performance when combining only 30% of the UMD dataset with the synthetic data; Hanny et al. developed a joint topic-sentiment modeling framework that combines a pre-trained language model and clustering methods to simultaneously analyze topics and sentiment in social media text. Through dimensionality reduction and clustering techniques, the framework demonstrated high clustering quality and sentiment classification accuracy in multiple experiments, providing important information for research fields such as crisis management; Khademi et al. evaluated different cueing strategies on Reddit, using a large language model (LLM) and cueing engineering to detect vaccine responses on social media, finding that the GPT model can effectively identify relevant text information, especially mind chain cueing, which helps identify marginal cases.
[0061] Research on Event Evolutionary Graphs: An event evolutionary graph is a directed graph describing the logical evolution of relationships between events. It focuses on events as its core research object, aiming to study chain dependencies and the possibility of representing the development direction of events. Although event evolutionary graphs are a relatively new concept, they are closely related to earlier research on event relationship identification. For example, the event graph proposed by Glavas and Snajder is a hybrid graph that uses events as vertices and relationships as edges, emphasizing temporal and coreference relationships between events. These early studies laid the foundation for the evolution of event evolutionary graphs, enabling the effective mining of relationships between events from large-scale data.
[0062] In public opinion analysis, event graphs help understand the dynamic changes in public opinion by identifying the sequential and causal relationships between events. For example, research on the evolution of public opinion based on Weibo data constructs event graphs by identifying sequential and causal event pairs, and further generalizes them into abstract event graphs to predict the future evolution of public opinion events. This event graph-based public opinion analysis can not only reveal the evolution of individual events, but also generalize similar events into a category through hierarchical clustering, helping researchers analyze the evolution path of public opinion from multiple dimensions. The application of event graphs is particularly important in major emergencies. Researchers use event graphs to study the dynamic evolution of emergencies, analyze the driving forces of events using abstract event graphs, and simulate the evolution process of events through system dynamics models, thereby providing decision-making basis for relevant departments. For example, during the pandemic, researchers constructed event causal relationship graphs to reveal the evolution mechanism of pandemic-related public opinion, and combined event influencing factors and the time dimension to further analyze the spread path of online public opinion during the pandemic, providing decision support for pandemic management.
[0063] In recent years, the integration of event graphs and knowledge graphs has gradually become a new research direction. Researchers not only enhance the event representation capabilities of event graphs through knowledge graphs but also apply them to practical public opinion analysis systems. For example, in research on public health emergencies, event graphs have constructed a knowledge representation model for the epidemic by integrating the spatiotemporal evolution of the epidemic and information organization methods. This integration enhances the expressive power of event graphs, making their application more widespread in fields such as intelligence support and public opinion analysis. With technological advancements, event graphs are evolving towards greater efficiency and intelligence to gradually enhance their generalization capabilities. The rise of large language models has provided new ideas for the construction of event graphs through event extraction techniques based on these models. For instance, using large models such as ChatGPT to achieve zero-sample event relationship extraction, combined with multi-turn prompt templates and objective evaluation indicators, significantly improves the construction efficiency of event graphs.
[0064] This invention discloses a method for topic recognition of interactive short texts based on DW-ICNN and event graphs, comprising: acquiring interactive short texts and preprocessing them; setting a sliding window, merging the preprocessed interactive short texts during the sliding window process, and then performing event matching on the text within the window; based on the event matching results, assigning all interactive short texts to an event bag; acquiring the speaker's feature identifier, including: speaker ID, speaking time, whether there is interaction, and the interaction target; inputting the feature identifier and the text information in the event bag into the DW-ICNN model to obtain the recognition result; DW-ICN The N model is trained using a training set, which includes short text data from the community and its labels. Within a dynamic window in the DW-ICNN model, sentence pairs are constructed using text information from the event bag. Feature labels and sentence pairs are input into the ICNN model to obtain the recognition results of the relationships between interactive short text sentence pairs. The ICNN model dynamically adjusts the weights of features by introducing an attention mechanism. Based on the recognition results, short texts of the same event are merged to form virtual long texts. Relevant information related to the long texts is retrieved. The long texts and relevant information are input into the QWEN2.5 large model to obtain events and their evolutionary relationships. Based on the events and their evolutionary relationships, an event graph is constructed.
[0065] Specifically, this invention takes into account the characteristics of interactive short texts on social media, and achieves accurate and efficient topic identification by combining the advantages of convolutional neural networks, the QWEN2.5 large model, and event graphs. The specific implementation process is as follows: Figure 1 As shown, it includes three tasks. The first task is an initial event detector (TASK1), which uses logical matching of keywords within a fixed window to coarsely identify the topics of short text discussions. The second task is to construct a self-attention convolutional neural network model that considers the characteristics of the speakers (such as speaking time, short text interaction identifiers, etc.) and text features to further identify the topics of interactive texts. The third task is to use QWEN2.5 and RAG to extract information from the identified short text event bags and combine them with an event graph to achieve accurate perception of community needs.
[0066] Furthermore, the preprocessing of interactive short texts includes: performing multiple cleaning and standardization operations on the interactive short texts to remove meaningless characters and emojis, while retaining interactive information that reflects the interaction relationship between members; among them, meaningless characters include: line breaks, spaces and links.
[0067] Specifically: Initial event bag construction;
[0068] Data collection and preprocessing:
[0069] Interactive short texts are characterized by sparse features, ambiguity, and non-standard information. Therefore, effective identification requires clearly defining the content of data collection and the preprocessing procedure. During data collection, it's necessary to obtain the short text content from community group chats and the characteristics of speakers, such as identity, role, or frequency, based on the research objectives. In the data preprocessing stage, meaningless characters, such as line breaks, spaces, and links, need to be removed; simultaneously, non-textual content such as emoticons should be removed to ensure text purity. Furthermore, meaningful interactive information, especially symbols like @, should be retained, as they reflect the interactive relationships between group members. These steps lay the foundation for subsequent event identification and event bag construction.
[0070] Furthermore, obtaining event matching results includes: identifying common event types, extracting common trigger words based on common event types, creating initial trigger logic rules for each event type using common trigger words; initializing the sliding step size and window size according to the trigger logic rules to perform logical matching on interactive short texts within the sliding window, and determining whether the interactive short text is a single event case. If the interactive short text is a single event case, a temporary state is assigned to the interactive short text, including the current state and the final state. The temporary state is updated, and the initial event recognition state of the interactive short text is obtained. The initial event recognition state is used as the event matching result. If the interactive short text is a multi-event case, the contribution of common trigger words to the interactive short text is calculated, thereby assigning a new event state to the interactive short text. The current state is updated through the sliding window, and the initial event recognition state of the interactive short text is obtained.
[0071] Specifically: Event triggering logic rules:
[0072] Event recognition methods based on event-triggered logic dictionary matching are characterized by clear rules, simple implementation, and strong scalability. In scenarios where language expression is diverse and data volume is gradually accumulating in community group chats, they can quickly match common event types and trigger words. Therefore, they were selected as the initial event detection strategy.
[0073] The implementation process of this part includes: First, it is necessary to identify the common event types of the target system and extract common trigger words for these event types, and create initial trigger logic rules for each type; Second, initialize the sliding step size and window size to perform logical matching on the short text set within the window, assign a state [current state, final state] to each short text, and obtain the initial event recognition state of each short text by continuously updating it; Finally, establish a suitable logical rule trigger dictionary in actual application, test whether they can accurately capture events, and adjust and optimize them according to the recognition effect to improve the accuracy and coverage of detection.
[0074] Figure 2This paper demonstrates the process by which the present invention constructs an initial event bag from interactive short texts using triggering logic rules. A sliding window is initialized based on the complexity of the content. During the sliding process, adjacent interactive texts are merged, and event matching is performed on the text within the window. A temporary state is then assigned to each event, which effectively improves the efficiency of event recognition. For the case of recognizing multiple events using the sliding window, the contribution of trigger words in each phrase is calculated, thereby assigning a new event state to each short text. The current state is updated through the sliding window, ultimately assigning all short texts to the initial event bag. The specific pseudocode for this part is shown in Table 1.
[0075] Table 1
[0076]
[0077] The core objective of this algorithm is to assign event states to a set of short texts using a sliding window approach. Specifically, the algorithm first sets a window size T and a step size s. Starting from the beginning of the short text set, it slides the window sequentially, extracting short texts within each window. For each window, these short texts are first merged into a larger context to identify the event most likely to be discussed in the current window.
[0078] E k =Match(D j ,E)=max{|Tokens(D j )∩Triggers(E)∣>0}
[0079] Tokens(D j ) is D j The algorithm includes feature keywords, where Triggers(E) are the feature keywords involved in the event triggering rules. Next, the algorithm calculates the contribution score of each short text to the event recognition, and calculates the sentence's contribution to the event by accumulating the scores of the n related triggering keywords.
[0080]
[0081] In short text D j The k-th event E is triggered in the middle. k The frequency of the corresponding keywords. It is a weighting term used to measure event E. k The rarity of trigger words. High-frequency trigger words should have lower weight, while rare but crucial trigger words should have higher weight. N represents the total number of events. The number of events containing the trigger word is defined. If the contribution score of a short text exceeds a preset threshold, a temporary event state is assigned to it, and its state is continuously updated by sliding down the window. If the state of a short text changes, the algorithm further updates the global event state. By continuously sliding the window and repeating the above process, the algorithm eventually assigns a final event state to each short text, thus completing the entire event assignment task.
[0082] Furthermore, constructing sentence pairs using text information in the event bag includes: obtaining the occurrence time A of the current marker event based on the events in the event bag. t The occurrence time includes: the start time A of the current flag event. start and end time A stop and the time interval T; obtain the initial time t0 of the dynamic window, and calculate the marginal event density and event similarity at fixed timestamp intervals, if A t If -t0 > T, then the upper and lower boundaries of the dynamic window are updated by the change in event density and event similarity at the margin, and a termination condition is set. When the termination condition is met, the updating of the upper and lower boundaries stops. Sentences are constructed within the optimized dynamic window using text information in the event bag.
[0083] Furthermore, calculating marginal event density and event similarity includes:
[0084]
[0085] in, Marginal event density, This represents the similarity between the events.
[0086] Furthermore, a termination condition is set. When the termination condition is met, updating the upper and lower boundaries is stopped. This includes setting the termination condition as: ΔW > τ; if ΔW > τ, then update the upper and lower boundaries of the event window; otherwise, stop updating the boundaries; where ΔW is the update coefficient and τ is a fixed value.
[0087] Furthermore, obtaining the updated coefficients includes:
[0088]
[0089] Wherein, λ represents the importance of the balance between changes in event density and changes in event similarity.
[0090] Specifically: Feature extraction and model training:
[0091] To further expand the short texts in the event bag and fully utilize their information content, this invention considers using feature extraction and text representation techniques to capture semantic features within the short texts. While machine learning methods based on deep neural networks perform well in text classification, they rely on manual annotation, and with the increasing number of events, event classification suffers from the curse of dimensionality. To address this issue, this invention considers a sentence pair model, differing from traditional multi-class event tasks by transforming the task into supervising the probability that each pair of sentences discusses the same event. This design effectively utilizes the similarity between sentence pairs, reducing the need for labeled data and thus improving the ability to identify undetected events. However, for short texts, the hidden nature of information makes reasonable inference difficult solely from text content; therefore, the invention considers incorporating speaker features to assist in this task. The modeling of this invention is based on three assumptions:
[0092] (1) Texts sent consecutively by the same user may represent the same event;
[0093] (2) Text generated within a short time window may discuss the same event;
[0094] (3) The @ interaction is highly likely to discuss the same event;
[0095] Based on the above assumptions, this invention constructs a speaker feature identifier [speaker identifier, speaking time, whether there was interaction, interaction target], which is used as the second-dimensional feature input into the sentence pair model task. The core of this invention's model is a convolutional neural network (ICNN) (Interaction-based CNN) constructed with two data channels. By introducing an attention mechanism, it can dynamically adjust the importance of features and utilize convolutional layers for feature extraction and learning. In this way, the model can not only handle complex input data but also explain its decision-making process to a certain extent. Figure 3 The implementation process of ICNN is demonstrated: the features of two types of data are processed by convolution, pooling and attention weight layers and then concatenated. The concatenation is then expanded by the Flatten layer and input into the fully connected layer and softmax layer for classification output. The network parameters are updated by backpropagation to learn the features of sentence pairs.
[0096] Dynamic window expansion:
[0097] While the task transformation designed in this invention solves the problems of the curse of dimensionality in multi-class classification and data applicability, the sheer number of sentence pair combinations results in an exceptionally large number of training and prediction data sets. Furthermore, the large amount of information combined poses a challenge to the model's training and fitting capabilities. Simultaneously, constructing sentence pairs for all interactive short texts introduces large-class noise, thus affecting model performance. To optimize this issue, an effective approach is to reduce the construction window; however, a fixed window length may lead to significant errors. Based on this, this invention sets up a dynamic window that considers event density and event similarity to optimize the dataset construction interval. The specific process is as follows:
[0098] (1) For the events currently in the bag of events, record the occurrence time of the current flag event A as A. t The start and end times of the event are identified by the initial event trigger, and the event duration interval is T.
[0099] T = A stop -A start
[0100] (2) Record the initial time t0 within the window, and calculate the marginal event density at a fixed timestamp interval Δt. Similarity to events The specific calculation is shown in the formula. Let t be a text vector, where t i ∈[A t A t When ++Δt], δ(t) i ∈[A t A t +Δt])=1, otherwise it is 0.
[0101]
[0102] (3) If A t -t0<T, then T start =t0, otherwise the upper boundary is updated by calculating the change in event density and event similarity at the boundary. ΔW represents the updated coefficient. The parameter λ is used to balance the importance of the change in event density and the change in event similarity. The initial value of λ can be set to 0.5 empirically, and the impact on model efficiency and accuracy can be judged by changing this value in the experiment.
[0103]
[0104] (4) For the upper boundary, if ΔW>τ, then update the upper boundary AT of the event window. u With lower boundary AT u Repeat the above steps; otherwise, stop updating the boundary.
[0105] AT u =A start -ΔW u *Δt
[0106] AT l =T stop +ΔW l *Δt
[0107] Through the optimizations described above, the event detection model constructs sentence pairs only within a window, reducing the proportion of irrelevant sentence pairs and thus mitigating the risk of model complexity and decreased fitting ability. Dynamic windows allow predictions to focus on specific contexts, making it easier for the model to capture relevance and topic consistency without being distracted by a large number of irrelevant sentences. This approach helps improve the model's efficiency and accuracy.
[0108] Furthermore, obtaining the recognition result includes: processing the feature labels and sentences sequentially through convolutional layers, pooling layers, and attention weight layers, then further concatenating the features, expanding the concatenated result through a Flatten layer, and inputting it into a fully connected layer and a softmax layer for classification output to obtain the recognition result.
[0109] Furthermore, the event graph includes: first-level nodes, second-level nodes, and third-level nodes; first-level nodes include: event type, event content, event time and location, and event attitude; second-level nodes include: issue, need, time, location, event attitude words, and event sentiment score; third-level nodes include: first appearance timestamp, event duration timestamp, occurrence location, and related locations.
[0110] Specifically: Event perception based on event graphs:
[0111] Model evaluation and event recognition:
[0112] Model evaluation comprises two main parts: the first part involves initial event detection, primarily focusing on precision. During this process, the model must accurately detect all events; therefore, while some events may be missed (i.e., not recognized), accuracy must be guaranteed once an event is identified. This evaluation method ensures the model's reliability. The second part evaluates the performance of the Attention-based CNN-based sentence pair model and the final event recognition. Evaluation is conducted using four metrics: precision, recall, F1 score, and accuracy. The validated model is then used to predict all short texts, ultimately classifying all texts into event bags.
[0113] Construction of the Principle Graph:
[0114] This process mainly involves information extraction from the event bag. The aforementioned process has already merged short texts related to the same event, forming a virtual long text. However, to accurately decompose the event structure and extract event information, this invention will use the open-source QWEN2.5 large model, enhanced by the RAG knowledge base, to perform the information extraction task. The retrieved relevant information will be passed to the QWEN2.5 large model along with the original input text. The model can combine the retrieved information with the context to generate more accurate and context-relevant output. By writing a visualization program, the extracted content will be used to construct an event graph. The node content of the event graph to be constructed in this invention is shown in Table 2.
[0115] Table 2
[0116]
[0117] Empirical research:
[0118] 3.1 Collection and Preprocessing of Short Text Data from the Community:
[0119] The data used in this experiment comes from two community group chats, spanning from March 27, 2016 to May 7, 2024, and contains a total of 46,329 interactions. The data was anonymized to ensure privacy, retaining only features relevant to the research. The dataset focuses on the frequency of community members' posts, their identities, and the content of their interactions. These features provide important background information for analyzing communication patterns, event triggers, and management needs within the communities.
[0120] During the data preprocessing stage, several cleaning and standardization operations were performed to improve data quality. Meaningless characters (such as line breaks, spaces, links, etc.) and emoticons were removed to ensure the purity of the text data. At the same time, content reflecting member interactions, such as the @ symbol, was retained; this information is crucial for subsequent event identification and analysis. The processed data will be used to identify key events and needs within the community, thereby providing precise service recommendations and improvement plans for community management. This process not only provides data support for understanding community dynamics but also offers a real-world case study to explore how short text analysis can improve the effectiveness of community governance.
[0121] Table 3 presents the initial event identification logic library for community governance proposed in this invention, covering multiple categories such as environment, management, facility malfunction, public welfare activities, reports and complaints, and safety. Each primary category is further subdivided into secondary and tertiary event categories, specifically listing the relevant event types and management measures. To maintain the system's effectiveness and flexibility, the rule base will be updated promptly based on the actual needs and feedback of the community to ensure its adaptation to the ever-changing needs and challenges of community management. (Reference)
[0122] Table 3
[0123]
[0124]
[0125] Training of ICNN models based on dynamic windows:
[0126] Feature extraction and model training:
[0127] For short interactive texts from the community, 2008 data points were manually annotated by reading the interactive texts, covering approximately 60% of the events. Taking the annotated data as an example, after dividing the event into bags based on the initial event triggers, the window expansion interval for each event was calculated, and sentence pairs were constructed within this interval. During the training of ICNN, considering the large number of sentence pairs, the batch size was set to 32, 64, 128, 256, and 512, respectively. Cross-validation was performed on the training set, and the k value was set to 3 folds, 5 folds, and 10 folds in the experiments. Finally, this invention sets the batch training size to 256 and k to 5. After the dynamic expansion window adjustment of this invention, the sentence pair training set contains 365,298 data points. Figure 4 This demonstrates the changes in loss and accuracy during the training of ICNN.
[0128] Figure 5 This demonstrates the efficiency improvement of the model after incorporating dynamic windows in this invention (statistics show the improvement in model time consumption and accuracy during the first round of five-fold training). Compared to windowless sentence pair models, both fixed and dynamic windows show significant efficiency improvements. In terms of accuracy, both fixed and dynamic windows learn semantic information, and neither model shows a significant decrease. The comparison in the figures shows that the DW-ICNN, which considers semantic features, significantly improves efficiency while maintaining high accuracy. Therefore, it is suitable for rapid deployment in any event detection system without overly relying on the number of event labels.
[0129] Model evaluation:
[0130] In the task of identifying topics in interactive short texts within community group chats, model evaluation is crucial. To achieve accurate identification of different events in community group chats, the three-stage model evaluation process designed in this invention is shown in Table 4.
[0131] Table 4
[0132]
[0133] In the first task, Task 1, this invention employs an event-triggered logic-based retrieval method to achieve preliminary event detection. The main goal of this stage is to improve accuracy. Through precise triggering logic, this invention can identify the short texts most likely belonging to the target event. However, since the primary task of this step is to ensure that the identified events do indeed match the characteristics of the target event, accuracy is the core metric at this stage, while other metrics such as precision, recall, and F1 score have a relatively smaller impact. This process does not require identifying all relevant event texts, but rather ensuring that the identified texts are all target events. This strategy effectively reduces the interference of noisy data, providing a high-quality initial dataset for subsequent model training and event recognition.
[0134] The second task, Task 2, involves training a sentence pair model based on dynamic windows. In this stage, the invention is specifically trained for each event trigger to predict whether any two short sentences discuss the same event. The dynamic window mechanism plays a crucial role here, allowing the model to flexibly adjust the context window within the time frame of event discussion, thereby capturing more accurate event relationships. The model outputs the predicted probability that each sentence pair belongs to the same event, thus achieving consistency detection in event discussion. When evaluating this stage, the model focuses on the consistency prediction results of sentence pairs. The model performance in this stage directly affects the final event classification effect; ensuring accurate identification of each sentence pair helps construct a more complete and clear event chain.
[0135] The third task, Task 3, evaluates the overall accuracy of all event detections. To effectively analyze the performance of the event recognition model across different time intervals, this invention divides the dataset into four time windows, containing a total of 2000 short interactive texts. This time-segmented evaluation method reflects the stability and accuracy of the model in event recognition across different time periods. By observing the event detection performance within each time window, the model's adaptability in handling different time series can be further verified, and potential temporal dependencies in event detection can be identified.
[0136] The information utilization efficiency of the model constructed by this invention is as follows: Figure 6 The presentation showcases the semantic network formed by a short text within one of the windows. Figure 6 (a) The semantic network linked to the initial event detection rules is captured by the window of this invention and relevant content is identified in multiple short texts. The rose color represents the content of unrecognized nodes. Figure 6 (b) shows the semantic network obtained by expanding the flag event retrieval according to the present invention, but there is still a large amount of text information that is not utilized. Figure 6(c) is the full event recognition extension network after recognition by the DW-ICNN sentence pair model of this invention. As can be seen from the figure, most of the semantic information is incorporated into the semantic network.
[0137] Community service needs / demands / event perception based on event graphs:
[0138] To further extract information from events in the event bag, this invention employs the QWEN 2.5 model combined with RAG (Retrieval-Augmented Generation) enhancement technology for information extraction from interactive text event bags. The external knowledge base consists of an issue library, a needs lexicon, an attitude lexicon, and a location information library. The issue library provides common events relevant to the community, clarifying the event context for information extraction. The needs lexicon and attitude lexicon contain rich vocabulary; the former focuses on the specific needs of community members, while the latter covers emotional expressions, enabling the model to capture emotional tendencies. Furthermore, the location information library provides necessary geographical information for extracting specific discussion locations.
[0139] RAG augmentation technology enriches the model's contextual information by retrieving external knowledge relevant to the input text. When processing short texts from community group chats, the input text is first retrieved using an external knowledge base to obtain relevant topics and needs information. Subsequently, the QWEN2.5 model incorporates this information into the analysis through generative techniques, ensuring the accuracy and richness of the extracted results. Ultimately, this method not only improves the accuracy of information extraction but also enhances the model's adaptability in handling complex community dialogues, providing reliable data support for community governance and management.
[0140] Figure 7 and Figure 8This paper presents a temporal community event graph that occurred in two different time periods. To clearly illustrate the temporal relationships, the initial and end timestamps of each time node are aligned on the x-axis, and the events are displayed vertically to show their development sequence. A layout algorithm was also designed for the nodes. The graph clearly shows that community topics mainly focus on several key areas, particularly community governance, infrastructure construction, and resident safety. Discussions on these topics reflect residents' high level of concern for their living environment and their expectations for community services. The emotional values of different events vary, especially those with lower emotional values, which typically involve residents' daily annoyances and dissatisfactions. For example, for events with lower emotional values, such as "noise complaints" and "power outage feedback," residents' needs are mainly focused on improving their living environment and their expectations for property management services. These events often evoke negative emotions in residents, with attitudinal words frequently including "annoyance," "helplessness," and "suggest waiting," fully reflecting residents' negative feelings when facing these problems. This emotional expression is not only a direct reaction to the problems but also a silent appeal to community managers, hoping to attract attention and resolve them as soon as possible.
[0141] As can be seen from the constructed event graph, the method of this invention can effectively capture the complex relationships between multiple events in interactive short texts, not only accurately identifying the events themselves, but also revealing the logical and influence relationships between events. Taking community health management as an example (e.g.) Figure 9 As shown in the diagram, by analyzing the event graphs of four events—"community health," "vector control," "odor complaints," and "green space management"—the model clearly demonstrates the causal chains and correlation patterns between the events, revealing the dynamic evolution of residents' needs and the impact of the events. From the perspective of refined modeling of event relationships, the model can effectively distinguish between inclusion relationships, influence relationships (IMP), and correlation relationships (REL), and further characterize residents' reactions by extracting attitudinal words and emotional information. For example, "odor complaints" directly reflect residents' strong dissatisfaction with community health issues, while the implementation of "vector control" is a reactive measure to address these health problems. This relationship analysis helps community administrators accurately pinpoint the key points of the problem and take targeted measures. Furthermore, the event graph also reveals the potential role of "green space management" in alleviating environmental problems and improving residents' emotions, providing a constructive reference for community governance. The aforementioned event graph method can intuitively present the temporal and logical relationships of multiple events, and can be generated instantly and efficiently, providing a precise and visualized solution for complex social governance problems.
[0142] The above embodiments are merely descriptions of preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Various modifications and improvements made by those skilled in the art to the technical solutions of the present invention without departing from the spirit of the present invention should fall within the protection scope defined by the claims of the present invention.
Claims
1. An interactive short text topic recognition method based on DW-ICNN and event graph, characterized in that, include: Obtain interactive short text and preprocess the interactive short text; Set up a sliding window, and during the sliding process of the sliding window, merge the pre-processed interactive short texts, and then perform event matching on the text in the window. Based on the event matching results, all interactive short texts are assigned to event bags. The speaker's feature identifiers are obtained, including: speaker ID, speaking time, whether there was interaction, and the interaction target. The feature identifiers and text information from the event bag are input into the DW-ICNN model to obtain the recognition result of the interaction short text sentence pairs. The DW-ICNN model is trained using a training set, which includes: community short text data and its labels. Sentence pairs are constructed within a dynamic window in the DW-ICNN model using the text information from the event bag. The feature identifiers and the sentence pairs are input into the ICNN model to obtain the recognition result. The ICNN model dynamically adjusts the feature weights by introducing an attention mechanism. Constructing sentence pairs using the text information in the event bag includes: Based on the events in the event bag, obtain the occurrence time of the current flag event. The occurrence time includes: the start time of the current flag event. and end time and time interval ; Get the initial time of the dynamic window And calculate the marginal event density and event similarity at fixed timestamp intervals, if Then, the upper and lower boundaries of the dynamic window are updated by the marginal event density and the change in event similarity, and a termination condition is set. When the termination condition is met, the updating of the upper and lower boundaries stops. Within the optimized dynamic window, sentence pairs are constructed using the text information in the event bag; Calculating the marginal event density and the event similarity includes: in, Marginal event density, For marginal event similarity, and These correspond to timestamps as follows: A t and A t+i Short text vectors, To indicate the number of interactive short texts in a fixed window, the timestamp corresponding to the i-th interactive short text is used. hour, Otherwise, it is 0. Fixed timestamp interval; Based on the recognition results, short texts of the same event are merged to form a virtual long text. Relevant information related to the long text is retrieved. The long text and the relevant information are input into the QWEN2.5 large model to obtain the events and evolutionary relationships. Based on the events and evolutionary relationships, an event graph is constructed.
2. The interactive short text topic recognition method based on DW-ICNN and event graph as described in claim 1, characterized in that, Preprocessing the interactive short text includes: Multiple cleaning and standardization operations are performed on the interactive short text to remove meaningless characters and emojis, while retaining interactive information that reflects the interaction relationship between members. The meaningless characters include: newline characters, spaces, and links.
3. The interactive short text topic recognition method based on DW-ICNN and event graph as described in claim 1, characterized in that, Obtaining the event matching results includes: Identify common event types, extract common trigger words based on the common event types, and create initial trigger logic rules for each event type using the common trigger words; According to the triggering logic rules, the sliding step size and window size are initialized to perform logical matching on the interactive short text within the sliding window, and it is determined whether the interactive short text is a single event case. If the interactive short text is a single event case, a temporary state is assigned to the interactive short text, which includes a current state and a final state. The temporary state is updated, and the initial event identification state of the interactive short text is obtained. The initial event identification state is used as the event matching result. If the interactive short text is a multi-event case, the contribution of the common trigger words in the interactive short text is calculated, thereby assigning a new event state to the interactive short text. The current state is updated through the sliding window, and the initial event identification state of the interactive short text is obtained.
4. The interactive short text topic recognition method based on DW-ICNN and event graph as described in claim 1, characterized in that, Setting the termination condition, and stopping the updating of the upper boundary and the lower boundary when the termination condition is met, includes: Set the termination condition: ; like Then update the upper boundary of the event window. and lower boundary Otherwise, stop updating the boundary; in, To update the coefficients, It is a fixed value.
5. The interactive short text topic recognition method based on DW-ICNN and event graph as described in claim 1, characterized in that, Obtaining the update coefficients includes: in, To balance the importance of changes in event density with changes in event similarity.
6. The interactive short text topic recognition method based on DW-ICNN and event graph as described in claim 1, characterized in that, Obtaining the recognition result includes: The feature labels and sentence pairs are processed sequentially through convolutional layers, pooling layers, and attention weight layers, and then further concatenated. The concatenated result is expanded through a Flatten layer and then input into a fully connected layer and a softmax layer for classification output to obtain the recognition result.
7. The interactive short text topic recognition method based on DW-ICNN and event graph as described in claim 1, characterized in that, The event graph includes: first-level nodes, second-level nodes, and third-level nodes; The first-level nodes include: event type, event content, event time and location, and event attitude; The secondary nodes include: topic, need, time, location, event attitude words, and event sentiment score; The three-level nodes include: the first occurrence timestamp, the event duration timestamp, the occurrence location, and the associated location.