A graph stream based social media linear event detection method
Through a graph stream-based social media linear event detection method, the longest incremental subsequence and linear algorithm are used to detect event subgraphs in social media, which solves the problem of noise misidentification in existing technologies and achieves efficient and accurate event detection.
Patent Information
- Application Number
- CN202310148706.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-22
- Publication Date
- 2025-10-14
- Estimated Expiration
- 2043-02-22
AI Technical Summary
Existing social media event detection methods have difficulty in effectively updating expired information, and text stream-based methods are prone to misidentifying noise as sudden events and lack robustness to sudden changes in keyword co-occurrence frequency.
A graph-based social media linear event detection method is adopted. By defining the time window and time series graph, the edge weight of the longest incremental subsequence is calculated, the relative increase amplitude of LIS is used to define the edge weight, and a linear algorithm is used to detect event subgraphs to eliminate noise interference.
It improves the robustness to noise, has linear time and space complexity, can effectively detect sudden events, reduces noise interference, and improves the accuracy and applicability of event detection.
Smart Images

Figure CN116226463B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of real-time event detection, and in particular to a social media linear event detection method based on graph streams. Background Art
[0002] With the unprecedented popularity of social media, the way people obtain and express information has undergone tremendous changes. They post what they see and hear on social media, and when the corresponding posts are forwarded by a large number of users, the information may also spread everywhere.
[0003] Event detection is one of the fundamental problems in social media, which can help us collect information in real time and respond faster to public events such as natural disasters, fires, traffic accidents, etc.
[0004] Existing time detection methods for social media are mostly implemented based on clustering methods, which usually have difficulty in effectively updating expired information (posts related to expired events), and text stream-based methods regard "bursts" (i.e., sudden changes in frequency) as a hint of sudden events, because when an event occurs, some keywords tend to co-occur more frequently, resulting in a burst of co-occurrence frequency. These solutions can be efficiently calculated and updated. Although this simple assumption is reasonable, some bursts are caused by noise rather than events, such as distorted waves, which are more likely to be noise than events. Summary of the Invention
[0005] The purpose of this invention is to address the defects in the prior art and propose a social media linear event detection method based on graph stream.
[0006] In order to achieve the above object, the present invention adopts the following technical solutions:
[0007] A method for detecting linear events in social media based on graph streams includes the following steps:
[0008] S1: Modeling social media time using graph streams, defining both time windows and time series graphs;
[0009] S2: Use the stream computing model based on the time window W to calculate the edge weight w based on the longest incremental subsequence;
[0010] S3: Add the relative increase based on LIS to define the edge weight, that is, the ratio of the total increase value to the first value of the sequence;
[0011] S4: Design an algorithm with time complexity of O(|W|) to maintain the LIS of each edge;
[0012] S5: Mining event subgraphs in dynamic keyword graphs, where the time involves at least two keywords and the subgraph induced by several keywords is regarded as an event subgraph, and a linear algorithm (O(|E|)) is used to detect event subgraphs when G changes dynamically;
[0013] S6: Detecting Event Subgraphs from Social Media: Given a time graph G with a time window W W The event goal is to detect all rising subgraphs R(G W ), where G(w) is continuously updated.
[0014] Furthermore, the specific setting process in step S2 is as follows: suppose the time window W is composed of |W| intervals, and set an edge connecting two keywords as e, where:
[0015] The starting time of W is t b , the end time is recorded as t e ;
[0016] Let α(e, W) represent the co-occurrence frequency sequence of keywords in the current time window W, where the increasing subsequence s of α(e, W) is a subsequence whose elements are arranged in ascending order, where:
[0017] The time graph of time window W is defined as G W =(V,E), where V represents all keywords, E represents the co-occurrence of all keywords in the time window W, and each edge e∈E has a frequency sequence α(e,W)={F(e,T s ), F(e,T s+1 ),…F(e,T s+|W|-1}.
[0018] Furthermore, the edge weights in step S2 are defined as follows:
[0019] Given a time window W, the time graph G W The edge e in , the edge weight w(e,W) is defined as follows:
[0020]
[0021] in:
[0022] 1) LIS(α(e,W)) is the set of LIS of α(e,t);
[0023] 2) For s∈LIS(α(e,W)), and represent the head and tail frequencies of LISs, respectively;
[0024] 3) |s| and |W| are the length of LIS and the length of the time window respectively;
[0025] 4)ε is an adjustable parameter slightly greater than zero.
[0026] 4. According to the graph stream-based social media linear event detection method, it is characterized in that in step S3, when defining edge weights, the tasks of calculating and maintaining LIS-based edge weights and mining subgraphs corresponding to events are added respectively.
[0027] Furthermore, in step S5, the specific steps of defining an event subgraph are:
[0028] Given a subgraph g of G, for any two keywords u,v∈g, there exists a path between u and v in g with a path capacity of at least θ, where g is an event subgraph, the path capacity is the weight of the minimum-weight edge along the path, and θ is a user-specified parameter.
[0029] Furthermore, in step S6, the event subgraph is defined as follows:
[0030] Given a time graph G on a time window W W , graph G is valid if and only if the following conditions are met: W The connected subgraph H in is called an ascending subgraph:
[0031] (1) The weight of each edge e in H is w(e,W)≥θ, where θ is a user-specified threshold;
[0032] (2) There is no other connected subgraph H', where H is a subgraph of H' and H' also satisfies the first condition;
[0033] Among them, when given a time graph G W When there are multiple sets of ascending subgraphs, denoted as R(G W ).
[0034] Furthermore, the event subgraph is identified as follows:
[0035] Given a time graph G W For an edge e in , if the edge weight w(e,W)≥θ, then e is an ascending edge, where θ is an adjustable parameter.
[0036] It should be noted that:
[0037] LIS is the longest incremental subsequence, and LIS (Longest Increasing Subsequence LIS) is defined as: given a sequence α={a1,a2,…,a n}, the increasing subsequence s of α is a subsequence whose elements are sorted in order from low to high, and the head and tail of s are respectively denoted as s h and s t|s| denotes the length of s. An increasing subsequence s of a is called a longest increasing subsequence (LIS) if and only if there does not exist any increasing subsequence s' of a with |s| < |s'|. A sequence a can contain multiple LISs. The set of all LISs of a is denoted by LIS(a).
[0038] Compared with the prior art, the present application has the beneficial effects that:
[0039] Robust to noise, considering the inherent correlation between keywords, and only relying on the text stream with timestamp, making the method highly applicable;
[0040] Having linear worst-case time and space complexity, having high applicability and parallelism, and being able to provide the worst performance guarantee for general graph stream-based event detection;
[0041] Based on the burst event detection of keywords and their co-occurrence behavior, the negative impact of these "monsters" can be reduced. BRIEF DESCRIPTION OF DRAWINGS
[0042] The accompanying drawings are included to provide a further understanding of the present application, and constitute a part of the specification, which together with the embodiments of the present application, serve to explain the present application, and do not constitute a limitation on the present application.
[0043] Figure 1 An example graph of the edge frequency sequence in the embodiment of the present application;
[0044] Figure 2 An example graph of the rising subgraph in the embodiment of the present application. DETAILED DESCRIPTION
[0045] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all the embodiments.
[0046] In the present application, LIS is the longest increasing subsequence, and the definition of LIS (Longest Increasing Subsequence LIS) is as follows: given a sequence a = {a1, a2, …, a n An increasing subsequence s of a is a subsequence whose elements are sorted in ascending order. The head and tail of s are denoted by s h and s t respectively. |s| denotes the length of s. An increasing subsequence s of a is called a longest increasing subsequence (LIS) if and only if there does not exist any increasing subsequence s' of a with |s| < |s'|. A sequence a can contain multiple LISs. The set of all LISs of a is denoted by LIS(a);
[0047] The "event subgraph" is the "rising subgraph".
[0048] In this application, two example graphs are provided to better illustrate and understand the solution of this application, which are Figure 1 : example of edge frequency sequence and Figure 2 : example of rising subgraph.
[0049] As Figure 1 shown in the example of edge frequency sequence: shows the frequency of keywords appearing at different time points.
[0050] Among them, e1 edge connecting "travel" and "flight" two keywords. At t3 time point, there is a freak wave, obviously, freak wave is more likely to be noise rather than event, because they do not show stable rising trend in a certain time; On the contrary, it is a significant decline after a sharp increase, therefore, the burst-based edge weight cannot resist noise.
[0051] In addition, Figure 1 Three edge frequency sequences and their corresponding LIS are plotted, as mentioned before, "freak wave" in frequency sequence is more likely to come from noise rather than event, LIS can easily filter out these freak waves, because LIS prefers to choose increasing subsequence with longer rising duration, rather than sharp increase in short time.
[0052] Referring to Figures 1-2 , the linear event detection method of social media based on graph stream includes the following steps:
[0053] S1: use graph stream to model social media time, define time window and time series graph at the same time;
[0054] S2: use stream computing model based on time window W to calculate edge weight w based on longest increasing subsequence;
[0055] S3: join the relative rising amplitude based on LIS to define edge weight, that is, the ratio of total increase value to the first value of the sequence;
[0056] S4: design an algorithm with time complexity of O(|W|) to maintain LIS of each edge;
[0057] S5: mine event subgraph in dynamic keyword graph, where time involves at least two keywords, and subgraph induced by several keywords is an event subgraph, and linear algorithm (O(|E|)) is used to detect event subgraph when G changes dynamically;
[0058] S6: detect event subgraph from social media: given a time graph G WThe event goal is to detect all rising subgraphs R(G W ), where G(w) is continuously updated.
[0059] In a specific embodiment of the present application, the specific setting process in step S2 is as follows: the time window W is composed of |W| intervals, and an edge connecting two keywords is set as e, where:
[0060] The starting time of W is t b , the end time is recorded as t e ,|W| is the number of intervals in the time window, which is a user-specified tuning parameter with a default value between 10 and 100;
[0061] Let α(e, W) represent the co-occurrence frequency sequence of keywords in the current time window W, where the increasing subsequence s of α(e, W) is a subsequence whose elements are arranged in ascending order, where:
[0062] The time graph of time window W is defined as G W =(V,E), where V represents all keywords, E represents the co-occurrence of all keywords in the time window W, and each edge e∈E has a frequency sequence α(e,W)={F(e,T s ), F(e,T s+1 ),…F(e,T s+|W|-1},in:
[0063] The definition method of the edge weight in step S2 is:
[0064] Given a time window W, the time graph G W The edge e in , the edge weight w(e,W) is defined as follows:
[0065]
[0066] in:
[0067] 1) LIS(α(e,W)) is the set of LIS of α(e,t);
[0068] 2) For s∈LIS(α(e,W)), and represent the head and tail frequencies of LISs, respectively;
[0069] 3) |s| and |W| are the length of LIS and the length of the time window respectively;
[0070] 4)ε is an adjustable parameter slightly greater than zero.
[0071] It should be noted that since there are |E| edges in the keyword graph, this means that in the worst case, we need O(|E|) time to update all edge weights. However, within a time window, the number of edges that need to update weights is much less than |E|.
[0072] It should be further explained that, given a sequence α={a1,a2,…,a n}, an increasing subsequence s of α is a subsequence whose elements are sorted in order from low to high. The head and tail of s are denoted as s h and s t |s| represents the length of s. An increasing subsequence s of α is called a longest increasing subsequence (LIS) if and only if there does not exist any increasing subsequence s' such that |s| < |s'|. A sequence α can contain multiple LISs. Their set is denoted as LIS(α).
[0073] The LIS of α(e1), α(e2) and α(e3) are Figure 1 The edge weight is clearly defined in
[15] and consists of two parts: L(s) and A(s). Obviously, if a keyword co-occurs with an event, the keyword should show a clear upward trend, i.e., L(s) above. A short-term burst in frequency is likely noise. The greater the increase, the more important the event, i.e., A(s) above.
[0074] In a specific embodiment of the present application, in step S3, when defining edge weights, the tasks of calculating and maintaining LIS-based edge weights and mining subgraphs corresponding to events are added.
[0075] In a specific embodiment of the present application, in step S5, the specific steps of defining an event subgraph are:
[0076] Given a subgraph g of G, for any two keywords u,v∈g, there exists a path between u and v in g with a path capacity of at least θ, where g is an event subgraph, the path capacity is the weight of the minimum-weight edge along the path, and θ is a user-specified parameter.
[0077] like Figure 2 As shown, it needs to be further explained that each keyword pair (if they correspond to a certain event) should often co-exist or indirectly co-exist. Figure 2In this case, the edge weights of {e2, e4, e5, e6, e7} are greater than θ (denoted as bold edges), while the edge weights of {e1, e3} are not greater than θ. Any two keywords in {plane, miss, flight, Malaysia} are connected by at least one path with a capacity greater than θ. Therefore, the subgraph (graph G) induced by these four keywords is an event subgraph. More importantly, we use a linear algorithm (O(|E|)) to detect the event subgraph when G changes dynamically.
[0078] In the specific embodiments of the present application, in step S6, the definition method of the event subgraph is:
[0079] Given a time graph G W , a connected subgraph H W in G W is called an ascending subgraph if and only if the following conditions are satisfied:
[0080] (1) The weight w(e, W) of each edge e in H is greater than or equal to θ, where θ is a user-specified threshold;
[0081] (2) There is no other connected subgraph H' such that H is a subgraph of H' and H' also satisfies the first condition;
[0082] where, when a time graph G W is given, there are multiple sets of ascending subgraphs, denoted as R(G W ).
[0083] The identification method of the event subgraph is:
[0084] Given an edge e in a time graph G W , if the edge weight w(e, W) is greater than or equal to θ, then e is an ascending edge, where θ is an adjustable parameter.
[0085] The above is only the preferred specific embodiments of the present application, but the protection scope of the present application is not limited to this. Any person skilled in the art, according to the technical solution and the inventive concept of the present application, can make equivalent substitutions or changes within the technical range disclosed by the present application, which should be covered within the protection scope of the present application.
Claims
1. A method for detecting linear events in social media based on graph streams, characterized in that: The following steps are involved: S1: Modeling social media time using graph streams, defining both time windows and time series graphs; S2: Use the stream computing model based on the time window W to calculate the edge weight w based on the longest incremental subsequence; S3: Add the relative increase based on LIS to define the edge weight, that is, the ratio of the total increase value to the first value of the sequence; S4: Design an algorithm with time complexity of O(|W|) to maintain the LIS of each edge; S5: Mining event subgraphs in dynamic keyword graphs, where the time involves at least two keywords and the subgraph induced by several keywords is regarded as an event subgraph, and a linear algorithm (O(|E|)) is used to detect event subgraphs when G changes dynamically; S6: Detecting Event Subgraphs from Social Media: Given a time graph G with a time window W W The event goal is to detect all rising subgraphs R(G W ), where G(w) is continuously updated; In step S2, LIS is the longest incremental subsequence, and LIS is defined as: given a sequence α={a1,a2,…,a n }, the increasing subsequence s of α is a subsequence whose elements are sorted in order from low to high, and the head and tail of s are respectively denoted as s h and s t , |s| represents the length of s; Among them, an increasing subsequence s of α is called the longest increasing subsequence LIS if and only if there is no increasing subsequence s', where |s| < |s'|. A sequence α can contain multiple LISs, and their set is denoted as LIS(α); The specific setting process in step S2 is as follows: suppose the time window W consists of |W| intervals, and set an edge connecting two keywords as e, where: The starting time of W is t b , the end time is recorded as t e ; Let α(e, W) represent the co-occurrence frequency sequence of keywords in the current time window W, where the increasing subsequence s of α(e, W) is a subsequence whose elements are arranged in ascending order, where: The time graph of time window W is defined as G W =(V,E), where V represents all keywords, E represents the co-occurrence of all keywords in the time window W, and each edge e∈E has a frequency sequence α(e,W)={F(e,T s ), F(e,T s+1 ),…F(e,T s+|W|-1 }.
2. The method for detecting linear events in social media based on graph stream according to claim 1, characterized in that: The definition method of the edge weight in step S2 is: Given a time window W, the time graph G W The edge e in , the edge weight w(e,W) is defined as follows: in: 1) LIS(α(e,W)) is the set of LIS of α(e,t); 2) For s∈LIS(α(e,W)), and represent the head and tail frequencies of LISs, respectively; 3) |s| and |W| are the length of LIS and the length of the time window respectively; 4)ε is an adjustable parameter slightly greater than zero.
3. The method for detecting linear events in social media based on graph stream according to claim 2, characterized in that: In step S3, when defining edge weights, the tasks of calculating and maintaining LIS-based edge weights and mining subgraphs corresponding to events are added.
4. The method for detecting linear events in social media based on graph stream according to claim 3, characterized in that: In step S5, the specific steps of defining an event subgraph are: Given a subgraph g of G, for any two keywords u,v∈g, there exists a path between u and v in g with a path capacity of at least θ, where g is an event subgraph, the path capacity is the weight of the minimum-weight edge along the path, and θ is a user-specified parameter.
5. The method for detecting linear events in social media based on graph stream according to claim 4, characterized in that: In step S6, the event subgraph is defined as follows: Given a time graph G on a time window W W , graph G is valid if and only if the following conditions are met: W The connected subgraph H in is called an ascending subgraph: (1) The weight of each edge e in H is w(e,W)≥θ, where θ is a user-specified threshold; (2) There is no other connected subgraph H', where H is a subgraph of H' and H' also satisfies the first condition; Among them, when given a time graph G W When there are multiple sets of ascending subgraphs, denoted as R(G W ).
6. The method for detecting linear events in social media based on graph stream according to claim 5, characterized in that: The event subgraph is identified as follows: Given a time graph G W For an edge e in , if the edge weight w(e,W)≥θ, then e is an ascending edge, where θ is an adjustable parameter.
Citation Information
Patent Citations
Visual analysis method and system for dynamic event evolution of social media
CN108255933A
Emergency detection method based on keyword clustering
CN112527960A