A method, device, equipment and medium for detecting an emergency

By constructing the timing signals and undirected graphs of event text, using multi-attribute spectrum clustering algorithm to identify emergencies, solving the shortcomings of sudden hot spot events in the existing technology, and achieving comprehensive acquisition of hot spot events in different fields and Quick identification.

CN113761115BActive Publication Date: 2025-02-25BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110380123.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-08
Publication Date
2025-02-25
Estimated Expiration
2041-04-08

AI Technical Summary

Technical Problem

The existing technology is difficult to automatically identify sudden hot events, and it is impossible to fully obtain hot events information in different fields. It has low real-time and lacks scalability.

Method used

By obtaining multiple event texts within a preset time period, extracting words, building timing signals, calculating word similarity, establishing an undirected graph, and using a multi-attribution spectrum clustering algorithm to divide a molecular network to detect the change increment of the sub-network to identify Emergency.

Benefits of technology

It realizes automatic identification and rapid acquisition of sudden hotspot events, can effectively process massive social network data, improves the accuracy and real-time identification, and is scalable.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113761115B_ABST
    Figure CN113761115B_ABST
Patent Text Reader

Abstract

The present disclosure provides a method for detecting sudden events, including: obtaining multiple event texts within a preset time period, extracting multiple words included in the multiple event texts; constructing a time series signal of each word within the preset time period, and calculating the similarity between each word based on the time series signal; establishing an undirected graph with each word as a node and the similarity between each word as an edge, and dividing the undirected graph into sub-networks based on a multi-attribution spectral clustering algorithm, wherein each sub-network represents an event, and each word belongs to at least one sub-network in the process of sub-network division; detecting the change increment of the sub-network in different time periods, and identifying the event corresponding to the increment as a sudden event.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and more specifically, to an emergency event detection method, device, equipment and medium. Background Art

[0002] In the field of e-commerce, by combining hot events with their own products for product marketing or promotion, and relying on the public's attention to hot events, it is possible to increase product exposure at a low cost and quickly, and ultimately achieve the goal of attracting users or increasing product sales. Real-time mining of hot event information related to products from social network data will bring great benefits to e-commerce companies. However, sudden hot events are difficult to predict. How to automatically identify sudden hot events and quickly and effectively obtain sudden hot event information is a very concerning issue for every e-commerce company.

[0003] In the process of realizing the concept of the present disclosure, the inventors found that the existing commodity marketing technology for mining sudden hot events has at least the following problems: First, it can only extract commodities corresponding to sudden hot events based on changes in the search and click behavior of user groups in the recent period, and can only identify some hot events in the current field, such as the release of iPhone 12, the launch of mate 40 and other hot events strongly related to 3C digital, and cannot fully obtain hot event information in different fields (for example: entertainment, humanities and social sciences); Second, the current event recognition technology requires manual specification of the number of events, is not scalable, and has low real-time performance. Summary of the invention

[0004] In view of this, the present disclosure provides a method, apparatus, device and medium for detecting an emergency.

[0005] The present disclosure provides a method for detecting sudden events, including: obtaining multiple event texts within a preset time period, extracting multiple words included in the multiple event texts; constructing a time series signal of each of the words within the preset time period, and calculating the similarity between each of the words based on the time series signal; establishing an undirected graph with each of the words as a node and the similarity between the words as an edge, and dividing the undirected graph into subnetworks based on a multi-attribution spectral clustering algorithm, wherein each of the subnetworks represents an event, and each of the words belongs to at least one of the subnetworks during the subnetwork division process; detecting the change increment of the subnetwork in different time periods, and identifying the event corresponding to the increment as a sudden event.

[0006] According to an embodiment of the present disclosure, the obtaining of multiple event texts within a preset time period and the extraction of multiple words included in the multiple event texts include: performing preprocessing on the multiple event texts including junk text filtering, named entity recognition, word segmentation, and stop word processing to obtain all key words included in the multiple event texts.

[0007] According to an embodiment of the present disclosure, wherein the constructing of a timing signal of each of the words within the preset time period and calculating the similarity between each of the words based on the timing signal comprises: dividing the preset time period into a plurality of sub-time windows, counting the number of occurrences of each of the words in each of the plurality of sub-time windows; constructing a corresponding time series for each of the words based on the number of occurrences of each of the words in each of the plurality of sub-time windows; and calculating a timing signal representing the importance of each of the words in each sub-time window based on the time series.

[0008] According to an embodiment of the present disclosure, the calculating the similarity between each of the words based on the time series signal includes: performing a discrete wavelet transform on the time series signal to obtain a feature matrix of each of the words; and calculating the similarity between each of the words based on the feature matrix of each of the words by a normalized cross-correlation algorithm.

[0009] According to an embodiment of the present disclosure, the method of establishing an undirected graph with each of the words as a node and the similarities between the words as an edge, and dividing the undirected graph into subnetworks based on a multi-attribution spectral clustering algorithm includes: establishing an undirected graph with each of the words as a node and the similarities between the words as an edge; obtaining a degree matrix and an adjacency matrix of the undirected graph, wherein the degree matrix is ​​a matrix representing the number of edges connected to each of the nodes, and the adjacency matrix is ​​a similarity matrix composed of the similarities between the words; establishing an objective function based on the degree matrix, the adjacency matrix, and the degree of attribution matrix representing the degree of attribution of each of the words relative to each of the subnetworks; optimizing the objective function to obtain the number of subnetworks that makes the objective function value meet a preset target; and dividing the undirected graph into subnetworks according to the number of subnetworks.

[0010] According to an embodiment of the present disclosure, optimizing the objective function to obtain the number of subnetworks that makes the objective function value meet a preset target includes: obtaining a loss function of the attribution matrix based on the objective function; optimizing the loss function to obtain the number of subnetworks that minimize the value of the loss function.

[0011] According to an embodiment of the present disclosure, dividing the undirected graph into subnetworks according to the number of subnetworks includes: clustering the words included in the undirected graph based on the number of subnetworks to obtain the subnetworks.

[0012] The present disclosure also provides an emergency detection device, including: an event acquisition module, used to acquire multiple event texts within a preset time period, and extract multiple words included in the multiple event texts; a word similarity calculation module, used to construct a time series signal of each of the words within the preset time period, and calculate the similarity between each of the words based on the time series signal; a network division module, used to establish an undirected graph with each of the words as nodes and the similarities between the words as edges, and divide the undirected graph into sub-networks based on a multi-attribution spectral clustering algorithm, wherein each of the sub-networks represents an event, and each of the words belongs to at least one of the sub-networks during the sub-network division process; an emergency identification module, used to detect the change increment of the sub-network in different time periods, and identify the event corresponding to the increment as an emergency.

[0013] The present disclosure also provides a computer system, comprising: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement any one of the methods described in the first aspect.

[0014] The present disclosure also provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, enables the processor to implement any one of the methods in the first aspect.

[0015] According to an embodiment of the present disclosure, a sudden event detection scheme is provided. The scheme is based on massive social network data, applies discrete wavelet transform to generate event word granularity time signal sequence, mines the implicit features of the time signal sequence, and at the same time, improves the traditional spectral clustering method, uses a heuristic approximation method to calculate the optimal number of spectral clusters, and improves the spectral clustering effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The above and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:

[0017] Figure 1 An exemplary system architecture to which the emergency event detection method and apparatus of the present disclosure can be applied is schematically shown;

[0018] Figure 2 A flowchart of an emergency event detection method according to an embodiment of the present disclosure is schematically shown;

[0019] Figure 3 A partial flow chart of operation S220 according to an embodiment of the present disclosure is schematically shown;

[0020] Figure 4Another partial flow chart of operation S220 according to an embodiment of the present disclosure is schematically shown;

[0021] Figure 5 The flowchart of operation S230 according to an embodiment of the present disclosure is schematically shown;

[0022] Figure 6 A block diagram based on emergency event detection according to an embodiment of the present disclosure is schematically shown; and

[0023] Figure 7 A block diagram of a computer system 700 suitable for implementing an emergency event detection method according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION

[0024] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.

[0025] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.

[0026] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification, and should not be interpreted in an idealized or overly rigid manner.

[0027] In the case of using expressions such as "at least one of A, B, and C, etc.", it should generally be interpreted in accordance with the meaning of the expression generally understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.). In the case of using expressions such as "at least one of A, B, or C, etc.", it should generally be interpreted in accordance with the meaning of the expression generally understood by those skilled in the art (for example, "a system having at least one of A, B, or C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).

[0028] Glossary:

[0029] Wavelet Transform: Derived from Fourier Transform, it is decomposed by translation and scaling. Translation is to obtain the time characteristics of the original function, and scaling is to obtain the frequency characteristics of the original function.

[0030] Spectral Clustering: Spectral clustering is an algorithm evolved from graph theory and has been widely used in clustering. Its main idea is to regard all data as points in space, which can be connected by edges. The edge weight between two points that are far away is low, while the edge weight between two points that are close is high. By cutting the graph composed of all data points, the sum of the edge weights between different subgraphs after cutting is as low as possible, while the sum of the edge weights within the subgraph is as high as possible, so as to achieve the purpose of clustering.

[0031] The embodiments of the present disclosure provide a method for detecting sudden events, which constructs a time series signal of words in an event text, mines high-order features of the time series signal through discrete wavelet transformation, and can effectively distinguish the randomness, periodicity and suddenness of the time series signal; improves the traditional spectral clustering algorithm, automatically calculates the optimal number of clusters according to the implicit information of the spectral clustering features, optimizes the spectral clustering effect, is conducive to streaming data processing, and realizes the automation and rapid identification of sudden hot events.

[0032] Figure 1 The exemplary system architecture 100 to which the method and device for detecting an emergency event according to an embodiment of the present disclosure can be applied is schematically shown. It should be noted that: Figure 1 What is shown is merely an example of a system architecture to which the embodiments of the present disclosure can be applied, in order to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that the embodiments of the present disclosure cannot be used in other devices, systems, environments or scenarios.

[0033] like Figure 1 As shown, the system architecture 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired and / or wireless communication links, etc.

[0034] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients and / or social platform software, etc. (only as examples).

[0035] The terminal devices 101 , 102 , and 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.

[0036] The server 105 may be a server that provides various services, such as a background management server (only an example) that provides support for websites browsed by users using the terminal devices 101, 102, and 103. The background management server may analyze and process the received data such as user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.

[0037] It should be noted that the emergency event detection method provided in the embodiment of the present disclosure can generally be executed by the server 105. Accordingly, the emergency event detection device provided in the embodiment of the present disclosure can generally be arranged in the server 105. The emergency event detection method provided in the embodiment of the present disclosure can also be executed by a server or server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105. Correspondingly, the emergency event detection device provided in the embodiment of the present disclosure can also be arranged in a server or server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105. Alternatively, the emergency event detection method provided in the embodiment of the present disclosure can also be executed by the terminal devices 101, 102, or 103, or can also be executed by other terminal devices different from the terminal devices 101, 102, or 103. Correspondingly, the emergency event detection device provided in the embodiment of the present disclosure may also be arranged in the terminal device 101 , 102 , or 103 , or in other terminal devices different from the terminal device 101 , 102 , or 103 .

[0038] For example, the event text may be originally stored in any one of the terminal devices 101, 102, or 103 (for example, the terminal device 101, but not limited thereto), or stored in an external storage device and may be imported into the terminal device 101. Then, the terminal device 101 may locally execute the emergency event detection method provided by the embodiment of the present disclosure, or send the event text to other terminal devices, servers, or server clusters, and the other terminal devices, servers, or server clusters that receive the event text may execute the emergency event detection method provided by the embodiment of the present disclosure.

[0039] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0040] Figure 2 The flowchart of the emergency event detection method according to the embodiment of the present disclosure is schematically shown.

[0041] like Figure 2 As shown, the method includes operations S210 to S240.

[0042] In operation S210, a plurality of event texts within a preset time period are acquired, and a plurality of words included in the plurality of event texts are extracted.

[0043] According to the embodiments of the present disclosure, it is impossible to obtain text information related to hot events in a timely manner based on a single website, and text data such as posts, forwardings, and comments by users based on their own interests can be obtained from various news websites and social networking websites. These data can truly and quickly reflect the relevant information of sudden hot events. At present, data can be collected in real time by simulating user login through web crawlers or social network open platform API interfaces, and a streaming text data stream can be obtained, from which text related to the event can be screened.

[0044] After obtaining the event texts, preprocessing the event texts may include: performing junk text filtering, named entity recognition, word segmentation, stop word processing, etc. on the multiple event texts to obtain all key words included in the multiple event texts.

[0045] In operation S220, a time sequence signal of each of the words within the preset time period is constructed, and similarities between the words are calculated based on the time sequence signal.

[0046] Traditional event recognition methods construct time series signals based on word frequency or word embedding methods, but do not effectively mine the implicit changes in time series at the feature level.

[0047] According to the embodiments of the present disclosure, by constructing a time series signal of words, the high-order features of the time series signal can be mined, and the randomness, periodicity and suddenness of the time series features can be effectively distinguished. The similarity between words is calculated based on the time series signal, which can improve the accuracy of identifying sudden events. The method of performing feature mining based on the time series signal is described in detail below.

[0048] In operation S230, an undirected graph is established with each of the words as a node and the similarities between the words as an edge, and the undirected graph is divided into sub-networks based on a multi-attribution spectral clustering algorithm, wherein each of the sub-networks represents an event, and each of the words belongs to at least one of the sub-networks during the sub-network division process.

[0049] According to an embodiment of the present disclosure, a multi-attribution spectral clustering algorithm is provided. The algorithm improves the traditional spectral clustering method and uses a heuristic approximation method to calculate the optimal number of spectral clusters. Compared with the traditional clustering algorithm, the number of clusters is not fixed and can change accordingly with the change of the number of events, thereby improving the spectral clustering effect. When the words are divided into networks, the same word can belong to different sub-networks at the same time, indicating that the same word can be included in different event texts. Compared with the traditional clustering algorithm, a sub-network element can only belong to one sub-network. The network division method of the present disclosure is more accurate.

[0050] In operation S240, the change increments of the sub-network in different time periods are detected, and events corresponding to the increments are identified as emergent events.

[0051] According to the embodiments of the present disclosure, the similarity between the time series signals of the words contained in the same event text is higher, and the sub-networks divided thereby can each represent an event. When an emergency occurs, a large amount of text related to the emergency will be generated in a short period of time. The event keywords will show high suddenness and appear in the word set for constructing the relationship graph, which is manifested as a part of the words showing suddenness and appearing in the new relationship graph of the words. Therefore, the emergency can be identified based on the changes in the words in the relationship graph.

[0052] Reference below Figure 3 to Figure 5 , combined with specific embodiments Figure 2 The method shown is further explained.

[0053] Figure 3 A partial flow chart of operation S220 according to an embodiment of the present disclosure is schematically shown.

[0054] like Figure 3 As shown, in operation S220, a time sequence signal of each of the words within the preset time period is constructed, and the similarity between the words is calculated based on the time sequence signal, which may specifically include operations S310 to S330.

[0055] In operation S310, the preset time period is divided into a plurality of sub-time windows, and the number of occurrences of each of the words in each of the plurality of sub-time windows is counted.

[0056] According to an embodiment of the present disclosure, dividing the preset time period into a plurality of sub-event windows may be performed by dividing the data using a fixed time interval (the time interval may be 1 second, 1 minute, 2 minutes, etc.). Assume that T c is the current sampling, with a fixed time interval of β, and has p split time windows. The p time windows are expressed as follows, where t k-1 is the time from the current time T c The most recent sampling time point.

[0057] (t k-p+1 -β,t k-p+1 ],...,(t k-1 -β,t k-1 ],(t k -β,t k ].

[0058] For example, the preset time period is from 2021-01-21-13:00 to 2021-01-21-14:00, and the fixed time interval is 20 minutes. The time period can be divided into three sub-time windows. The first sub-time window is from 2021-01-21-13:00 to 2021-01-21-13:20, the second sub-time window is from 2021-01-21-13:21 to 2021-01-21-13:40, and the third sub-time window is from 2021-01-21-13:41 to 2021-01-21-13:59. The number of times each word appears in these three word event windows is counted respectively. The importance of a word increases in direct proportion to the number of times it appears in the text, but at the same time it decreases in inverse proportion to the frequency of its appearance in the text.

[0059] In operation S320, a time series corresponding to each of the words is constructed based on the number of occurrences of each of the words in each of the plurality of sub-time windows.

[0060] For example, the text "It's snowing in Beijing" includes the words "Beijing" and "snowing". In the three sub-time windows within the preset time period, the number of occurrences of "Beijing" is 35697, 45456, and 43546 times, and the number of occurrences of "snowing" is 9435, 23456, and 34365 times, respectively. Then the time series of "Beijing" is [35697, 45456, 43546], and the time series of "snowing" is [9435, 23456, 34365].

[0061] In operation S330, based on the time series, a time series signal representing the importance of each of the words in each sub-time window is calculated.

[0062] According to the embodiments of the present disclosure, based on the event sequence, the importance of each word to the event text can be evaluated by algorithms such as TF-IDF to generate a corresponding time series signal. This method is a commonly used technical means in the field and will not be described in detail here.

[0063] Figure 4 Another partial flow chart of operation S220 according to an embodiment of the present disclosure is schematically shown.

[0064] like Figure 4 As shown, in operation S220, the calculating the similarity between the words based on the time series signal includes operations S410 to S420.

[0065] In operation S410, the time series signal is subjected to discrete wavelet transform to obtain a feature matrix of each of the words.

[0066] Wavelet transform is divided into discrete wavelet transform and continuous wavelet transform. Continuous wavelet transform has arbitrary translation coefficients and scale factors, and has the disadvantage of large amount of calculation. It is often not practical in the actual processing of signals. Discrete wavelet transform is generally used. The wavelet basis function of discrete wavelet transform is shown in the formula:

[0067]

[0068] Where n = 2 j +i, j means satisfying 2 j ≤n is the largest positive integer, j represents the discrete scaling factor, which affects the frequency, and i represents the discrete scale factor. In discrete wavelet transform, the signal is divided into high-frequency and low-frequency parts. The low-frequency part is called the approximate part, and the high-frequency part is called the detail part. The low-frequency part can be further subdivided into high-frequency and low-frequency parts. The lowest frequency part is the lowest-order information. Through discrete wavelet transform, the characteristic matrix can be obtained, using the coefficients represents the jth translation coefficient of word w under the condition of the i-th scale factor, as shown in the above formula, using represents the translation vector of word w under the i-th scale factor condition, then:

[0069]

[0070] Since low-frequency information will affect the similarity measurement between different word pairs, the first few need to be removed, which depends on the order of the offline wavelet transform. For example, if the order of the discrete wavelet transform is too small, the first order is removed. If the order of the discrete wavelet transform is relatively large, the second-order low-scale coefficients are removed. The coefficient matrix obtained by the discrete wavelet transform of the word w signal is s w , that is, the feature matrix, is defined as follows:

[0071]

[0072] In operation S420, the similarities between the words are calculated based on the feature matrix of each word by using a normalized cross-correlation algorithm.

[0073] According to an embodiment of the present disclosure, the word w i With the word w j The similarity between them is calculated using the normalized cross similarity algorithm. The dimension of the similarity matrix is ​​n×n, where n represents the number of words. The value of the i-th row and j-th column of the similarity matrix represents the word w. i With the word w j The similarity.

[0074] Figure 5 The flowchart of operation S230 according to an embodiment of the present disclosure is schematically shown.

[0075] like Figure 5 As shown, operation S230 includes operations S510 to S550.

[0076] S510: Establish an undirected graph with the words as nodes and the similarities between the words as edges.

[0077] S520, obtaining a degree matrix and an adjacency matrix of the undirected graph, wherein the degree matrix is ​​a matrix representing the number of edges connected to each of the nodes, and the adjacency matrix is ​​a similarity matrix formed by the similarities between each of the words.

[0078] S530: Establish an objective function based on the degree matrix, the adjacency matrix, and the degree of attribution matrix representing the degree of attribution of each of the words relative to each of the sub-networks.

[0079] According to an embodiment of the present disclosure, a subgraph attribution vector is used in spectral clustering to represent the degree of attribution of all words to a partitioned subgraph, and each subgraph is a set of event keywords. A normalized cut is used to establish an objective function for the word relationship graph, and the objective function P generated by the normalized cut is shown below.

[0080] u r =[u 1,r ,u2,r ,…,u L,r ];

[0081]

[0082] Among them, the degree vector u of the i-th subgraph is i,r Not only does it express the word w i The probability of belonging to the rth subgraph is also the probability of representing word w i The degree of belonging to the rth event, this probability is a variable in the algorithm optimization, which is obtained by optimizing the objective function. W represents the adjacency matrix of the undirected graph of words. Here, the adjacency matrix is ​​the similarity matrix of L words, and D is used to represent the degree matrix of L words.

[0083] S540, optimizing the objective function to obtain the number of sub-networks that makes the objective function value meet a preset target.

[0084] Specifically, operation S540 may include operations S541 to S542.

[0085] S541, obtaining a loss function of the attribution degree matrix based on the objective function.

[0086] S542, optimizing the loss function, and obtaining the number of sub-networks that minimize the value of the loss function.

[0087] Use U to represent the degree matrix of all subgraphs, which is defined as follows. The minimization of the objective function P can be converted into the Laplace matrix D 1 / 2 ·W·D -1 / 2 The maximization of the eigenvalue is defined as follows, where The loss function is optimized by approximately solving the Frobenius norm.

[0088] U=[u1,u2,…,u M ];

[0089]

[0090] When using spectral clustering to divide the word relationship network graph, it is necessary to know the exact value of the number of clusters. Only when the number of clusters is determined, the approximate method can be used to optimize and obtain the accurate approximate matrix value. The present invention discloses a loss function optimization method based on the attribution matrix to determine the number of clusters in spectral clustering. The method converts the optimized number of clusters into the optimized loss function value, and the loss function is:

[0091]

[0092] J represents the loss function, M opt represents the loss function, Indicates the variable number of sub-networks, U i,j Indicates the degree of belonging of the i-th word to the j-th sub-network, U max Indicates U i,j The maximum value in .

[0093] S550, dividing the undirected graph into sub-networks according to the number of sub-networks.

[0094] After obtaining the number of subnetworks, the words are clustered based on the number of subnetworks to obtain the subnetworks.

[0095] According to the embodiment of the present disclosure, after using the spectral clustering algorithm, a set of events consisting of several burst words is obtained. The word features are constructed using the sliding time window and discrete wavelet transform method. The word relationship graph corresponds to the current sliding time window. When the time position of the sliding time window changes, the feature trajectory of the word will change, and the word relationship graph structure will also change. The event set will also change with the sliding of the time window position, generating some new events, and the existing events will gradually disappear.

[0096] Emergency events can be identified based on the changes in the structure of the word relationship graph. When an event occurs, a large amount of text related to the emergency will be generated in a short period of time. The event keywords will show high emergency and appear in the word set for constructing the relationship graph, which is manifested as a part of the words showing emergency and appearing in the new relationship graph of the words. Therefore, emergency events can be identified based on the changes in the words in the relationship graph. According to the discrete wavelet analysis results of the words, the emergency and the high frequency of the wavelet transform analysis results are positively correlated. The energy of the high-order signal of the wavelet transform results of the words can be calculated to obtain the emergency value of the words. If the emergency value reaches a certain threshold, the word is considered to be an emergency word.

[0097] The pseudo code of the algorithm for emergency event determination is shown in the following table. The input of this method is the word relationship graph after the time window slides and the graph partitioning result of the corresponding relationship graph, and the output is the word set corresponding to the emergency event. This method determines whether a new event has occurred by judging the change of words in the subgraphs at adjacent moments, and identifies the new event as an emergency event.

[0098]

[0099] According to the sudden event detection method provided by the embodiment of the present disclosure, it can be applied to the association of sudden hot events with commodities. From the text set of sudden events, a keyword set of sudden hot events can be obtained. These keywords can more accurately represent the effective information of sudden hot events. The Title of the commodity can represent most of the information of the commodity. Some commodities have similar characteristics to sudden hot events. These similar characteristics can be used as selling points of commodities. Among the massive commodities, only some commodities have similar characteristics to these sudden hot events. Therefore, we need to extract the keyword set of the event from the text of the hot event, calculate the similarity between the event keyword set and the commodity by Word-Embedding, and obtain a commodity set with similar characteristics to the hot event.

[0100] Figure 6 The block diagram of the emergency event detection device according to the embodiment of the present disclosure is schematically shown.

[0101] like Figure 6 As shown, the emergency event detection device 600 includes an event acquisition module 610 , a word similarity calculation module 620 , a network division module 630 , and an emergency event identification module 640 .

[0102] The event acquisition module 610 is used to acquire multiple event texts within a preset time period and extract multiple words included in the multiple event texts.

[0103] The word similarity calculation module 620 is used to construct a time sequence signal of each of the words within the preset time period, and calculate the similarity between each of the words based on the time sequence signal.

[0104] The network partitioning module 630 is used to establish an undirected graph with each of the words as nodes and the similarities between the words as edges, and to partition the undirected graph into sub-networks based on a multi-attribution spectral clustering algorithm, wherein each of the sub-networks represents an event, and each of the words belongs to at least one of the sub-networks during the sub-network partitioning process.

[0105] The emergency event identification module 640 is used to detect the change increment of the sub-network in different time periods, and identify the event corresponding to the increment as an emergency event.

[0106] According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits, or at least part of the functions of any one of them can be implemented in one module. According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits can be split into multiple modules for implementation. According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits can be at least partially implemented as hardware circuits, such as field programmable gate arrays (FPGAs), programmable logic arrays (PLAs), systems on chips, systems on substrates, systems on packages, application specific integrated circuits (ASICs), or can be implemented by hardware or firmware in any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware, and firmware, or in any appropriate combination of any of them. Alternatively, according to the embodiments of the present invention, one or more of the modules, submodules, units, and subunits can be at least partially implemented as computer program modules, and when the computer program modules are run, the corresponding functions can be performed.

[0107] For example, any of the event acquisition module 610, the word similarity calculation module 620, the network partition module 630, and the emergency event identification module 640 can be combined in one module / unit / subunit for implementation, or any of the modules / units / subunits can be split into multiple modules / units / subunits. Alternatively, at least part of the functions of one or more of these modules / units / subunits can be combined with at least part of the functions of other modules / units / subunits and implemented in one module / unit / subunit. According to an embodiment of the present disclosure, at least one of the event acquisition module 610, the word similarity calculation module 620, the network partition module 630, and the emergency event identification module 640 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or by any one of the three implementation methods of software, hardware, and firmware or by a suitable combination of any of them. Alternatively, at least one of the event acquisition module 610, the word similarity calculation module 620, the network division module 630, and the emergency event identification module 640 can be at least partially implemented as a computer program module, and when the computer program module is executed, the corresponding function can be performed.

[0108] It should be noted that the emergency event detection device part in the embodiment of the present disclosure corresponds to the emergency event detection method part in the embodiment of the present disclosure. The description of the emergency event detection device part specifically refers to the emergency event detection method part, which will not be repeated here.

[0109] Figure 7 A block diagram of a computer system suitable for implementing the method described above according to an embodiment of the present disclosure is schematically shown. Figure 7 The computer system shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0110] like Figure 7 As shown, the computer system 700 according to the embodiment of the present disclosure includes a processor 701, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 702 or the program loaded from the storage part 708 to the random access memory (RAM) 703. The processor 701 may include, for example, a general-purpose microprocessor (such as a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (for example, an application-specific integrated circuit (ASIC)), etc. The processor 701 may also include an onboard memory for caching purposes. The processor 701 may include a single processing unit or multiple processing units for performing different actions of the method flow according to the embodiment of the present disclosure.

[0111] In RAM 703, various programs and data required for the operation of system 700 are stored. Processor 701, ROM 702 and RAM 703 are connected to each other through bus 704. Processor 701 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 702 and / or RAM 703. It should be noted that the program can also be stored in one or more memories other than ROM 702 and RAM 703. Processor 701 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in the one or more memories.

[0112] According to an embodiment of the present disclosure, the system 700 may further include an input / output (I / O) interface 705, which is also connected to the bus 704. The system 700 may further include one or more of the following components connected to the I / O interface 705: an input section 706 including a keyboard, a mouse, etc.; an output section 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, a modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed, so that a computer program read therefrom is installed into the storage section 708 as needed.

[0113] According to an embodiment of the present disclosure, the method flow according to an embodiment of the present disclosure can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable storage medium, and the computer program contains a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 709, and / or installed from the removable medium 711. When the computer program is executed by the processor 701, the above-mentioned functions defined in the system of the embodiment of the present disclosure are executed. According to an embodiment of the present disclosure, the system, equipment, device, module, unit, etc. described above can be implemented by a computer program module.

[0114] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.

[0115] According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium. For example, it may include, but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, apparatus, or device.

[0116] For example, according to an embodiment of the present disclosure, the computer-readable storage medium may include the ROM 702 and / or the RAM 703 described above and / or one or more memories other than the ROM 702 and the RAM 703 .

[0117] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0118] It will be appreciated by those skilled in the art that the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways, even if such combinations and / or combinations are not explicitly described in the present disclosure. In particular, the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways without departing from the spirit and teachings of the present disclosure. All of these combinations and / or combinations fall within the scope of the present disclosure.

[0119] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. The scope of the present disclosure is defined by the attached claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.

Claims

1. A method for detecting an emergency, comprising: Acquire multiple event texts within a preset time period, and extract multiple words included in the multiple event texts; Constructing a time sequence signal of each of the words within the preset time period, and calculating the similarity between the words based on the time sequence signal; Establishing an undirected graph with each of the words as nodes and the similarities between the words as edges, and dividing the undirected graph into subnetworks based on a multi-attribution spectral clustering algorithm, wherein each of the subnetworks represents an event, and each of the words belongs to at least one of the subnetworks during the subnetwork division process; Detecting the change increments of the subnetwork in different time periods, and identifying events corresponding to the increments as emergencies; The step of establishing an undirected graph with the words as nodes and the similarities between the words as edges, and dividing the undirected graph into sub-networks based on a multi-attribution spectral clustering algorithm includes: Establishing an undirected graph with each of the words as a node and the similarities between the words as an edge; Obtaining a degree matrix and an adjacency matrix of the undirected graph, wherein the degree matrix is ​​a matrix representing the number of edges connected to each of the nodes, and the adjacency matrix is ​​a similarity matrix formed by the similarities between each of the words; Establishing an objective function based on the degree matrix, the adjacency matrix, and the degree of attribution matrix representing the degree of attribution of each of the words relative to each of the sub-networks; Optimizing the objective function to obtain the number of subnetworks that makes the objective function value meet a preset target; The undirected graph is divided into sub-networks according to the number of sub-networks.

2. According to the method of claim 1, the step of obtaining a plurality of event texts within a preset time period and extracting a plurality of words included in the plurality of event texts comprises: The multiple event texts are preprocessed including junk text filtering, named entity recognition, word segmentation, and stop word processing to obtain all key words included in the multiple event texts.

3. The method according to claim 1, wherein: The constructing a time sequence signal of each of the words within the preset time period, and calculating the similarity between the words based on the time sequence signal comprises: Divide the preset time period into multiple sub-time windows, and count the number of occurrences of each of the words in each of the multiple sub-time windows; Based on the number of occurrences of each of the words in each of the plurality of sub-time windows, construct a time series corresponding to each of the words; Based on the time series, a time series signal representing the importance of each of the words in each sub-time window is calculated.

4. The method according to claim 1, wherein: The calculating the similarity between the words based on the time series signal comprises: Performing discrete wavelet transform on the time series signal to obtain a feature matrix of each of the words; Based on the feature matrix of each of the words, the similarity between the words is calculated by a normalized cross-correlation algorithm.

5. According to the method of claim 1, the step of optimizing the objective function to obtain the number of subnetworks that makes the objective function value meet a preset target comprises: Obtaining a loss function of the attribution degree matrix based on the objective function; The loss function is optimized to obtain the number of sub-networks that minimize the value of the loss function.

6. According to the method of claim 1, the dividing of the undirected graph into subnetworks according to the number of subnetworks comprises: The words included in the undirected graph are clustered based on the number of the sub-networks to obtain the sub-networks.

7. An emergency detection device, comprising: An event acquisition module, used to acquire multiple event texts within a preset time period, and extract multiple words included in the multiple event texts; A word similarity calculation module, used to construct a time sequence signal of each of the words within the preset time period, and calculate the similarity between the words based on the time sequence signal; A network partitioning module is used to establish an undirected graph with each of the words as nodes and the similarities between the words as edges, and to partition the undirected graph into subnetworks based on a multi-attribution spectral clustering algorithm, wherein each of the subnetworks represents an event, and each of the words belongs to at least one of the subnetworks during the subnetwork partitioning process; An emergency event identification module, used to detect the change increment of the sub-network in different time periods, and identify the event corresponding to the increment as an emergency event; Wherein, the network division module is specifically used for: Establishing an undirected graph with each of the words as a node and the similarities between the words as an edge; Obtaining a degree matrix and an adjacency matrix of the undirected graph, wherein the degree matrix is ​​a matrix representing the number of edges connected to each of the nodes, and the adjacency matrix is ​​a similarity matrix formed by the similarities between each of the words; Establishing an objective function based on the degree matrix, the adjacency matrix, and the degree of attribution matrix representing the degree of attribution of each of the words relative to each of the sub-networks; Optimizing the objective function to obtain the number of subnetworks that makes the objective function value meet a preset target; The undirected graph is divided into sub-networks according to the number of sub-networks.

8. A computer system comprising: one or more processors; a memory for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 6.

9. A computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, enables the processor to implement the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Topic discovery method and system and electronic equipment

    CN111125484A