Public health safety event detection and event collection construction method and system
By constructing event sets, merging and updating, and using text similarity and entity similarity to detect public health and safety events in Internet news flow data, the problem of poor event detection timeliness in the existing technology is solved, and the detection of sudden public health and safety events is realized. efficient monitoring and analysis.
Patent Information
- Application Number
- CN202010226687.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-03-26
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2040-03-26
AI Technical Summary
Existing technology is difficult to detect online public opinion events in sudden public health and safety incidents in real time, resulting in poor timeliness of event detection.
By determining the subject information and target events corresponding to multiple text data, an event collection is constructed, and text data matching the event collection is obtained from Internet news flow data, and the attribution degree is calculated based on text similarity, entity similarity and semantic role similarity. , update the event collection to realize dynamic event detection and monitoring.
It improves the detection efficiency of Internet news flow data, forms relevant public opinion analysis data under specific topics, and ensures the timeliness and effectiveness of event detection.
Smart Images

Figure CN113449101B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of data processing, and in particular to a method and system for detecting public health and safety events and constructing event collections. Background Art
[0002] The goal of news event detection is to identify public opinion events within the vast sea of internet text data. Specifically, this involves detecting latent online public opinion events embedded within current news streams. In particular, timely detection and analysis of news events corresponding to sudden public health and safety incidents can provide guidance for monitoring and guiding online public opinion, predicting hot topics, analyzing online public opinion topics, and blocking and providing early warnings for sensitive events. This can be instrumental in the overall monitoring and prevention of sudden public health and safety incidents.
[0003] However, in existing related work, most of the work is carried out around static news data. The above solutions are difficult to process dynamic data such as real-time news data streams, and cannot detect new events in real time, resulting in poor timeliness of event detection. Summary of the Invention
[0004] In view of this, in order to solve the above-mentioned technical problems or part of the technical problems, an embodiment of the present invention provides a method and system for public health and safety event detection and event collection construction.
[0005] In a first aspect, an embodiment of the present invention provides a method for detecting public health and safety events and constructing an event set, comprising:
[0006] Determining a plurality of subject information corresponding to a plurality of first text data, and at least one first text data corresponding to each of the subject information;
[0007] Performing event detection on at least one of the first text data corresponding to each of the subject information to determine at least one target event corresponding to each of the subject information;
[0008] Taking all the subject information and at least one target event corresponding to each of the subject information as an event set;
[0009] Acquire second text data matching the subject information in the event set from Internet news stream data;
[0010] The event set is updated based on the attribution of the second text data to the target event in the event set.
[0011] In one possible implementation, obtaining second text data matching the subject information in the event set from Internet news stream data includes:
[0012] Determining corresponding keywords according to the subject information in the event set;
[0013] The second text data matching the subject information is filtered out from the Internet news stream data through keyword detection.
[0014] In a possible implementation, updating the event set based on the attribution of the second text data to the target event in the event set includes:
[0015] If the degree of attribution is greater than a first threshold, merging the second text data into the corresponding target event;
[0016] If the degree of belonging is less than or equal to a first threshold, a new event is created in the event set based on the second text data.
[0017] In a possible implementation, before updating the event set based on the attribution of the second text data to the target event in the event set, the method further includes:
[0018] Determining text similarity between the second text data and a target event in the event set;
[0019] Determining the similarity between the second text data and the entity set of the target event in the event set;
[0020] Determining entity semantic role similarity between the second text data and a target event in the event set;
[0021] The attribution of the second text data to the target event in the event set is determined based on the text similarity, the entity set similarity, and the entity semantic role similarity.
[0022] In one possible implementation, determining the text similarity between the second text data and the target event in the event set includes:
[0023] Performing word segmentation processing on the second text data, and determining a first TF-IDF vector of the second text after the word segmentation processing;
[0024] Determine a second TF-IDF vector of a main event in the target event;
[0025] The cosine similarity between the first TF-IDF vector and the second TF-IDF vector is used as the text similarity between the second text data and the target event.
[0026] In one possible implementation, determining the similarity between the second text data and the entity set of the target event in the event set includes:
[0027] Determining a corresponding first entity set from the second text data;
[0028] Determining a corresponding second entity set from the target event;
[0029] The similarity between the first entity set and the second entity set determined by using the JACCARD similarity algorithm is used as the entity set similarity between the second text data and the target event.
[0030] In one possible implementation, determining the corresponding first entity set from the second text data includes:
[0031] Determining a first entity and a second entity from the second text data, wherein the first entity is a non-temporal entity and the second entity is a temporal entity;
[0032] Determining a cosine similarity between a first entity in the second text data and a corresponding entity in the second entity set;
[0033] If the cosine similarity between the first entity and the corresponding entity in the second entity set is greater than a third threshold, adding the first entity to the first entity set;
[0034] If the difference between the second entity in the second text data and the corresponding entity in the second entity set is less than a fourth threshold, the second entity is added to the first entity set.
[0035] In one possible implementation, determining the entity semantic role similarity between the second text data and the target event in the event set includes:
[0036] Determining a first semantic role distribution vector corresponding to an entity in a first entity set in the second text data;
[0037] Determining a second semantic role distribution vector corresponding to an entity that intersects with the first entity set in a second entity set of the target event;
[0038] Using JS distance to measure the similarity between the first semantic role distribution vector and the second semantic role distribution vector;
[0039] The similarities are weighted averaged according to the frequencies of occurrence of the intersecting entities to obtain the entity semantic role similarity between the second text data and the target event.
[0040] In one possible implementation, determining the degree of attribution of the second text data to the target event in the event set based on the text similarity, the entity set similarity, and the entity semantic role similarity includes:
[0041] The arithmetic average of the text similarity, the entity set similarity, and the entity semantic role similarity is used as the attribution degree between the second text data and the target event in the event set.
[0042] In one possible implementation, the method further includes:
[0043] If the duration during which the target event in the event set has not been updated exceeds a second threshold, removing the target event from the event set;
[0044] If the target event in the event set is updated, the main event in the updated target event is recalculated.
[0045] In a second aspect, an embodiment of the present invention provides a public health and safety event detection and event collection construction system, including:
[0046] A static event detection module is configured to determine multiple topic information corresponding to multiple first text data, and at least one first text data corresponding to each of the topic information; perform event detection on the at least one first text data corresponding to each of the topic information to determine at least one target event corresponding to each of the topic information; and treat all of the topic information and the at least one target event corresponding to each of the topic information as an event set;
[0047] A dynamic event detection module, configured to obtain second text data matching the subject information in the event set from Internet news stream data;
[0048] An event updating module is configured to update the event set based on the attribution degree of the second text data and the target event in the event set.
[0049] In a third aspect, an embodiment of the present invention provides a computer device comprising: a processor and a memory, wherein the processor is used to execute a public health and safety event detection and event set construction program stored in the memory to implement the public health and safety event detection and event set construction method described in any one of the first aspects above.
[0050] In a fourth aspect, an embodiment of the present invention provides a storage medium storing one or more programs, which can be executed by one or more processors to implement the public health and safety event detection and event collection construction method described in any one of the first aspects above.
[0051] The public health and safety event detection and event set construction scheme provided by an embodiment of the present invention determines multiple topic information corresponding to multiple first text data, and at least one first text data corresponding to each of the topic information; performs event detection on at least one first text data corresponding to each of the topic information, and determines at least one target event corresponding to each of the topic information; takes all of the topic information and at least one target event corresponding to each of the topic information as an event set; obtains second text data matching the topic information in the event set from Internet news stream data; updates the event set based on the degree of attribution of the second text data to the target event in the event set. The event set constructed based on static text data can realize the detection of dynamic text data, thereby improving the detection efficiency of Internet news stream data and forming relevant public opinion analysis data under specific topics. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 A flowchart of a method for detecting public health and safety events and constructing event collections provided by an embodiment of the present invention;
[0053] Figure 2 A flowchart of another method for detecting public health and safety events and constructing event sets provided by an embodiment of the present invention;
[0054] Figure 3 A schematic diagram of the structure of a public health and safety event detection and event collection construction system provided by an embodiment of the present invention;
[0055] Figure 4 A schematic structural diagram of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0056] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0057] To facilitate understanding of the embodiments of the present invention, specific embodiments will be further explained below with reference to the accompanying drawings. The embodiments do not limit the embodiments of the present invention.
[0058] Figure 1 A flow chart of a method for detecting public health and safety events and constructing event sets provided by an embodiment of the present invention is shown as follows: Figure 1 As shown, the method specifically includes:
[0059] S11. Determine multiple topic information corresponding to multiple first text data, and at least one first text data corresponding to each topic information.
[0060] The public health and safety incident detection and event set construction method provided by the embodiment of the present invention is applied to the analysis, detection and processing of Internet news stream data. The Internet news stream data can specifically be public opinion related to public health and safety incidents. Public health and safety incidents can be sudden infectious diseases. This method can be mainly used for information monitoring and public opinion monitoring in infectious disease prevention and control.
[0061] Furthermore, an event set is constructed through static data (first text data), and then the event set is dynamically updated through dynamic data (second text data) to ensure the timeliness and effectiveness of the target events in the event set.
[0062] Furthermore, the preselected plurality of first text data may be news reports, ie reports on recent events. Theme detection and event detection are performed on the plurality of first text data in sequence according to the hierarchical relationship of theme and event.
[0063] Specifically, topic detection is performed on multiple first text data to determine multiple subject information corresponding to the multiple first text data. For example, referring to Table 1, the number of first text data is 100, and topic detection is performed on the 100 first text data to determine that the 100 first text data correspond to 10 topic information.
[0064]
[0065] Table 1
[0066] S12: Perform event detection on at least one of the first text data corresponding to each of the subject information to determine at least one target event corresponding to each of the subject information.
[0067] The text is clustered again based on the multiple topics corresponding to the multiple first text data, that is, event detection is performed on the multiple subject information in turn, and at least one first text data corresponding to each topic information is determined, and the first text data corresponding to each topic information is used as the target event under the topic.
[0068] For example, topic information A corresponds to 7 first text information; topic information B corresponds to 13 first text information; topic information C corresponds to 1 first text information; topic information D corresponds to 11 first text information; topic information F corresponds to 12 first text information; topic information G corresponds to 21 first text information; topic information H corresponds to 9 first text information; and topic information I corresponds to 9 first text information.
[0069] S13: Take all the subject information and at least one target event corresponding to each subject information as an event set.
[0070] All the subject information included in the plurality of first text data and at least one target event corresponding to each subject information are taken as an event set.
[0071] For example, the event set can be: 7 target events under topic information A, 13 target events under topic information B; 1 target event under topic information C; 11 target events under topic information D; 12 target events under topic information F; 21 target events under topic information G; 9 target events under topic information H; and 9 target events under topic information I.
[0072] S14: Acquire second text data that matches the subject information in the event set from Internet news stream data.
[0073] The second text data that matches the subject information in the event set is captured from the Internet news stream data through keyword detection. The keyword can correspond to the subject information in the event set, that is, the text containing the keyword in the Internet news stream data is used as the second text data.
[0074] For example, the theme information is the 2016 Rio Olympics, and the corresponding keywords may be: Rio and Olympics, and the second text data is a text containing Rio and Olympics.
[0075] S15: Update the event set based on the attribution degree of the second text data and the target event in the event set.
[0076] The degree of attribution of the acquired second text data is calculated. The degree of attribution can represent the probability that the second text data belongs to the target event. If the degree of attribution is greater than a certain value, it indicates that the second text highly belongs to the target event, so the second text data is added to the target event. Otherwise, a new target event containing the second text data is created in the event set, thereby completing the update of the event set.
[0077] The embodiment of the present invention provides a method for detecting public health and safety events and constructing an event set, which determines multiple topic information corresponding to multiple first text data, and at least one first text data corresponding to each of the topic information; performs event detection on at least one first text data corresponding to each of the topic information, and determines at least one target event corresponding to each of the topic information; takes all of the topic information and at least one target event corresponding to each of the topic information as an event set; obtains second text data matching the topic information in the event set from Internet news stream data; and updates the event set based on the degree of attribution of the second text data to the target event in the event set. The event set constructed based on static text data can realize the detection of dynamic text data, thereby improving the detection efficiency of Internet news stream data and forming relevant public opinion analysis data under a specific topic.
[0078] Figure 2 A flow chart of another method for detecting public health and safety events and constructing event sets provided by an embodiment of the present invention is shown as follows: Figure 2 As shown, the method specifically includes:
[0079] S21: Determine multiple subject information corresponding to multiple first text data, and at least one first text data corresponding to each subject information.
[0080] The plurality of pre-selected first text data may be news reports, ie reports on recent events. Theme detection and event detection are performed on the plurality of first text data in sequence according to the hierarchical relationship of theme and event.
[0081] Specifically, a document topic generation (Latent Dirichlet Allocation, LDA) model is used to perform topic detection on multiple first text data, so that the LDA model outputs a topic distribution vector corresponding to each first text data, and the DBSCAN clustering algorithm is used based on the topic distribution vector to cluster all the first text data, thereby obtaining all the main information and at least one first text data contained in each topic information.
[0082] For example, referring to Table 1, the number of first text data is 100, and the 100 first text data are input into the LDA model so that the LDA model outputs 100 topic distribution vectors corresponding to the 100 first text data, and then statistics are obtained to determine that the 100 first text data correspond to 10 topic distribution vectors.
[0083]
[0084] Table 2
[0085] S22: Perform event detection on at least one of the first text data corresponding to each of the subject information to determine at least one target event corresponding to each of the subject information.
[0086] According to the topic-event relationship, event detection is performed on at least one first text data corresponding to each topic information, word segmentation processing is performed on the at least one first text data, and the first text data after word segmentation processing is vectorized using the TF-IDF algorithm to obtain a TF-IDF vector of the first text data.
[0087] The first text data under the same topic information is clustered using the DBSCAN clustering algorithm according to the similarity between the TF-IDF vectors to obtain at least one target event corresponding to the topic information.
[0088] Furthermore, the TF-IDF calculation formula for calculating the TF-IDF vector can be:
[0089] TF-IDF(x)=TF(x)*IDF(x)
[0090]
[0091] Where TF(x) is the number of occurrences of word X in the first text data, IDF(x) is the inverse document frequency of word X in the first text data; N(x) is the number of documents in the corpus that contain word x; and N is the total number of documents in the corpus.
[0092] S23. Take all the topic distribution vectors and at least one target event corresponding to each of the topic distribution vectors as an event set.
[0093] S24: Determine corresponding keywords according to the subject information in the event set.
[0094] S25. Filter out second text data matching the subject information from the Internet news stream data through keyword detection.
[0095] A keyword is selected from the subject information in the event set, where the keyword can represent the corresponding subject information. Text is crawled from the Internet news stream data based on the keyword to obtain second text data containing the keyword in the Internet news stream data.
[0096] S26: Determine the text similarity between the second text data and the target event in the event set.
[0097] Specifically, word segmentation processing is performed on the second text data to determine a first TF-IDF vector of the second text after the word segmentation processing; a second TF-IDF vector of the main event in the target event is determined; and the cosine similarity between the first TF-IDF vector and the second TF-IDF vector is used as the text similarity between the second text data and the target event.
[0098] Furthermore, text similarity can be calculated using the following formula:
[0099]
[0100] Among them, vec news The first TF-IDF vector of the second text, vec event is the second TF-IDF vector of the main event in the target event.
[0101] S27: Determine the similarity between the second text data and the entity set of the target event in the event set.
[0102] The second text data contains multiple entities, and the multiple entities constitute an entity set. The entities can be: time, place, person, organization, institution, etc. In this embodiment, the first entity is set as a non-time entity and the second entity is set as a time entity, which facilitates the subsequent calculation of the intersection of the entity set in the second text data and the entity set in the target event.
[0103] Specifically, a first entity and a second entity are determined from the second text data, the first entity being a non-temporal entity and the second entity being a temporal entity; the cosine similarity between the first entity in the second text data and the corresponding entity in the second entity set is determined; if the cosine similarity between the first entity and the corresponding entity in the second entity set is greater than a third threshold, the first entity is added to the first entity set; if the difference between the second entity in the second text data and the corresponding entity in the second entity set is less than a fourth threshold, the second entity is added to the first entity set.
[0104] For example, the entity vector corresponding to each entity is determined by pre-trained word vectors, and the cosine similarity between the two entities is calculated by the two entity vectors (only applicable to the first entity). The third threshold can be 80%, that is, the cosine similarity between the first entity in the first entity set and the corresponding entity in the second entity set is greater than 80%, and the fourth threshold can be 80h, that is, the time difference between the second entity in the first entity set and the corresponding entity in the second entity set is less than 80h.
[0105] It should be noted that the third threshold and the fourth threshold of this embodiment can be set according to actual needs, and this embodiment does not specifically limit this.
[0106] Furthermore, a corresponding first entity set is determined from the second text data; a corresponding second entity set is determined from the target event; and the similarity between the first entity set and the second entity set determined using the JACCARD similarity algorithm is used as the entity set similarity between the second text data and the target event.
[0107] Specifically, the entity set similarity can be determined by the following formula:
[0108]
[0109] Among them, nodeset news For the first entity set, nodeset event is the second entity set, w i is the criticality score of the entity in the target event (the score is determined by the frequency of occurrence of the corresponding entity).
[0110] S28: Determine the entity semantic role similarity between the second text data and the target event in the event set.
[0111] Specifically, determine the first semantic role distribution vector corresponding to the entity in the first entity set in the second text data; determine the second semantic role distribution vector corresponding to the entity that intersects with the first entity set in the second entity set of the target event; use JS distance to measure the similarity between the first semantic role distribution vector and the second semantic role distribution vector; perform weighted average calculation on the similarity according to the frequency of occurrence of the intersecting entities to obtain the entity semantic role similarity between the second text data and the target event.
[0112] Furthermore, the pyltp tool is used to annotate the semantic roles of entities in the second text data and the target event respectively, and the semantic roles of each entity and the frequency of the semantic role appearing in the second text data and the target event are counted; in this embodiment, only 20 semantic roles such as agent, party, consul, feeling, object, guest, success, source, involved, comparison, and belonging are considered. According to the semantic roles of each entity and the frequency of their respective roles, a vector V with a length of 20 is constructed for each entity. The components of the vector v iRepresents the normalized frequency of the entity in the i-th semantic role. The first semantic role distribution vector corresponding to the entity in the first entity set can be V', and the second semantic role distribution vector corresponding to the entity in the second entity set that intersects with the first entity set can be V", and then the JS (Jensen-Shannon Divergence) distance is used to calculate the similarity between the first semantic role distribution vector and the second semantic role distribution vector. The similarity is weighted averaged according to the frequency of occurrence of the intersecting entities to obtain the entity semantic role similarity between the second text data and the target event.
[0113] Furthermore, the calculation formula of JS distance can be:
[0114]
[0115] Wherein, V represents the semantic role set, P is the semantic role distribution of the entity in the second text data, and Q is the semantic role distribution of the entity in the target event.
[0116] S29: Determine the degree of attribution between the second text data and the target event in the event set based on the text similarity, the entity set similarity, and the entity semantic role similarity.
[0117] Specifically, the arithmetic average of the text similarity, the entity set similarity, and the entity semantic role similarity is used as the attribution degree between the second text data and the target event in the event set.
[0118] For example, based on the kd-tree model, the event attribution degree is calculated for each news report in the Internet news stream data and the event code with the highest attribution degree is found.
[0119] S210: If the degree of attribution is greater than a first threshold, merge the second text data into the corresponding target event.
[0120] S211: If the degree of belonging is less than or equal to a first threshold, create a new event in the event set based on the second text data.
[0121] If the attribution degree output by the kd tree model is greater than 90%, it indicates that the second text highly belongs to the target event, so the second text data is added to the target event. Otherwise, a new target event containing the second text data is created in the event set.
[0122] S212: Update the event set.
[0123] Specifically, if the duration during which the target event in the event set is not updated exceeds a second threshold, the target event is removed from the event set; if the target event in the event set is updated, the main event in the updated target event is recalculated.
[0124] Furthermore, the target events in the event set are updated, and the updating method may be to remove the inactivated target events or to recalculate the main events in the target events.
[0125] For example, if the target event in the event set has not been updated for more than 7 days, it indicates that the target event has been inactivated, and the inactivated target event is removed from the event set.
[0126] For another example, if a new event (second text data) is added to the target event, the main event in the target event is adjusted. The adjustment method can be: calculate the text similarity between the news corresponding to the new event and all the news corresponding to the target event (the calculation method of the text similarity in S26 is similar), calculate the average value of the similarity between each event and other events, and determine the event with the largest average value as the new event main event.
[0127] Based on the event set determined by static data, dynamic data monitoring is performed on the Internet news stream data to update the event set.
[0128] The subject information in the event collection can be: Flu in Country M
[0129] Target events of influenza-related public opinion in Country M:
[0130] The deadliest flu outbreak in 40 years has hit the US
[0131] · The flu has killed 105 children in the United States this winter, the second highest death toll in the same period
[0132] Deadly flu outbreak in US country! 10,000 people have died and over 19 million have been infected
[0133] At least 34 million people in the United States were infected with influenza that season, and 20,000 died.
[0134] The embodiment of the present invention provides a method for detecting public health and safety events and constructing an event set, which determines multiple topic information corresponding to multiple first text data, and at least one first text data corresponding to each of the topic information; performs event detection on at least one first text data corresponding to each of the topic information, and determines at least one target event corresponding to each of the topic information; takes all of the topic information and at least one target event corresponding to each of the topic information as an event set; obtains second text data matching the topic information in the event set from Internet news stream data; and updates the event set based on the degree of attribution of the second text data to the target event in the event set. The event set constructed based on static text data can realize the detection of dynamic text data, thereby improving the detection efficiency of Internet news stream data and forming relevant public opinion analysis data under a specific topic.
[0135] Figure 3 A schematic diagram of a system for detecting public health and safety events and constructing event collections is provided in an embodiment of the present invention. Figure 3 As shown, the method specifically includes:
[0136] The static event detection module 301 is configured to determine multiple topic information corresponding to multiple first text data, and at least one first text data corresponding to each of the topic information; perform event detection on the at least one first text data corresponding to each of the topic information to determine at least one target event corresponding to each of the topic information; and treat all of the topic information and the at least one target event corresponding to each of the topic information as an event set;
[0137] A dynamic event detection module 302 is configured to obtain second text data matching the subject information in the event set from Internet news stream data;
[0138] The event updating module 303 is configured to update the event set based on the attribution degree of the second text data and the target event in the event set.
[0139] In a possible implementation, the dynamic event detection module 302 is specifically configured to determine corresponding keywords based on the subject information in the event set; and filter out second text data matching the subject information from Internet news stream data through keyword detection.
[0140] In one possible implementation, the event update module 303 is specifically used to merge the second text data into the corresponding target event if the degree of attribution is greater than a first threshold; if the degree of attribution is less than or equal to the first threshold, create a new event in the event set based on the second text data.
[0141] In one possible embodiment, the dynamic event detection module 302 is also used to determine the text similarity between the second text data and the target event in the event set; determine the entity set similarity between the second text data and the target event in the event set; determine the entity semantic role similarity between the second text data and the target event in the event set; and determine the degree of attribution of the second text data to the target event in the event set based on the text similarity, the entity set similarity, and the entity semantic role similarity.
[0142] In one possible implementation, the dynamic event detection module 302 is specifically configured to perform word segmentation processing on the second text data, determine a first TF-IDF vector of the second text after the word segmentation processing; determine a second TF-IDF vector of the main event in the target event; and use the cosine similarity between the first TF-IDF vector and the second TF-IDF vector as the text similarity between the second text data and the target event.
[0143] In one possible implementation, the dynamic event detection module 302 is specifically configured to determine a corresponding first entity set from the second text data; determine a corresponding second entity set from the target event; and use the similarity between the first entity set and the second entity set determined using the JACCARD similarity algorithm as the entity set similarity between the second text data and the target event.
[0144] In one possible embodiment, the dynamic event detection module 302 is specifically used to determine a first entity and a second entity from the second text data, where the first entity is a non-temporal entity and the second entity is a temporal entity; determine the cosine similarity between the first entity in the second text data and the corresponding entity in the second entity set; if the cosine similarity between the first entity and the corresponding entity in the second entity set is greater than a third threshold, add the first entity to the first entity set; if the difference between the second entity in the second text data and the corresponding entity in the second entity set is less than a fourth threshold, add the second entity to the first entity set.
[0145] In one possible embodiment, the dynamic event detection module 302 is specifically used to determine the first semantic role distribution vector corresponding to the entity in the first entity set in the second text data; determine the second semantic role distribution vector corresponding to the entity in the second entity set of the target event that intersects with the first entity set; use JS distance to measure the similarity between the first semantic role distribution vector and the second semantic role distribution vector; perform weighted average calculation on the similarity according to the frequency of occurrence of the intersecting entities to obtain the entity semantic role similarity between the second text data and the target event.
[0146] In a possible implementation, the dynamic event detection module 302 is specifically configured to use the arithmetic average of the text similarity, the entity set similarity, and the entity semantic role similarity as the degree of attribution between the second text data and the target event in the event set.
[0147] In one possible embodiment, the event update module 303 is also used to remove the target event from the event set if the duration during which the target event in the event set has not been updated exceeds a second threshold; if the target event in the event set is updated, recalculate the main event in the updated target event.
[0148] The public health safety event detection and event collection construction system provided in this embodiment can be as follows Figure 3 The public health security event detection and event collection construction system shown in can be executed as follows Figure 1-2 All steps of the public health security event detection and event set construction method in the Figure 1-2 For details on the technical effects of the public health security event detection and event set construction method shown in the figure, please refer to Figure 1-2 For the sake of brevity, the relevant description will not be repeated here.
[0149] Figure 4 A schematic diagram of the structure of a computer device provided in an embodiment of the present invention is provided. Figure 4 The computer device 400 shown includes: at least one processor 401, memory 402, at least one network interface 404 and other user interfaces 403. The various components in the computer device 400 are coupled together via a bus system 405. It is understood that the bus system 405 is used to achieve connection and communication between these components. In addition to including a data bus, the bus system 405 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, the bus system 405 is not described in detail. Figure 4 Various buses are labeled as bus system 405 .
[0150] The user interface 403 may include a display, a keyboard, or a pointing device (eg, a mouse, a trackball, a touchpad, or a touch screen).
[0151] It is understood that the memory 402 in the embodiment of the present invention can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate synchronous DRAM (DDRSDRAM), enhanced synchronous DRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus random access memory (DRRAM). The memory 402 described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0152] In some embodiments, the memory 402 stores the following elements, executable units or data structures, or a subset thereof, or an extended set thereof: an operating system 4021 and application programs 4022 .
[0153] The operating system 4021 includes various system programs, such as a framework layer, a core library layer, and a driver layer, for implementing various basic services and handling hardware-based tasks. Application programs 4022 include various application programs, such as a media player and a browser, for implementing various application services. Programs implementing the methods of the embodiments of the present invention may be included in application programs 4022.
[0154] In an embodiment of the present invention, by calling a program or instruction stored in the memory 402, specifically, a program or instruction stored in the application 4022, the processor 401 is configured to execute the method steps provided in each method embodiment, for example, including:
[0155] Determine multiple topic information corresponding to multiple first text data, and at least one first text data corresponding to each of the topic information; perform event detection on the at least one first text data corresponding to each of the topic information, and determine at least one target event corresponding to each of the topic information; take all of the topic information and at least one target event corresponding to each of the topic information as an event set; obtain second text data that matches the topic information in the event set from Internet news stream data; and update the event set based on the degree of attribution of the second text data to the target event in the event set.
[0156] In a possible implementation, corresponding keywords are determined based on the subject information in the event set; and second text data matching the subject information is filtered out from Internet news stream data through keyword detection.
[0157] In one possible implementation, if the degree of attribution is greater than a first threshold, the second text data is merged into the corresponding target event; if the degree of attribution is less than or equal to the first threshold, a new event is created in the event set based on the second text data.
[0158] In one possible implementation, the text similarity between the second text data and the target event in the event set is determined; the entity set similarity between the second text data and the target event in the event set is determined; the entity semantic role similarity between the second text data and the target event in the event set is determined; and the degree of attribution of the second text data to the target event in the event set is determined based on the text similarity, the entity set similarity, and the entity semantic role similarity.
[0159] In one possible implementation, word segmentation is performed on the second text data to determine a first TF-IDF vector of the second text after the word segmentation; a second TF-IDF vector of the main event in the target event is determined; and the cosine similarity between the first TF-IDF vector and the second TF-IDF vector is used as the text similarity between the second text data and the target event.
[0160] In one possible implementation, a corresponding first entity set is determined from the second text data; a corresponding second entity set is determined from the target event; and the similarity between the first entity set and the second entity set determined using the JACCARD similarity algorithm is used as the entity set similarity between the second text data and the target event.
[0161] In one possible embodiment, a first entity and a second entity are determined from the second text data, the first entity being a non-temporal entity and the second entity being a temporal entity; the cosine similarity between the first entity in the second text data and the corresponding entity in the second entity set is determined; if the cosine similarity between the first entity and the corresponding entity in the second entity set is greater than a third threshold, the first entity is added to the first entity set; if the difference between the second entity in the second text data and the corresponding entity in the second entity set is less than a fourth threshold, the second entity is added to the first entity set.
[0162] In one possible implementation, a first semantic role distribution vector corresponding to an entity in a first entity set in the second text data is determined; a second semantic role distribution vector corresponding to an entity that intersects with the first entity set in a second entity set of the target event is determined; the similarity between the first semantic role distribution vector and the second semantic role distribution vector is measured using JS distance; and a weighted average calculation is performed on the similarity according to the frequency of occurrence of the intersecting entities to obtain the entity semantic role similarity between the second text data and the target event.
[0163] In a possible implementation, the arithmetic average of the text similarity, the entity set similarity, and the entity semantic role similarity is used as the attribution between the second text data and the target event in the event set.
[0164] In one possible implementation, if the duration during which the target event in the event set has not been updated exceeds a second threshold, the target event is removed from the event set; if the target event in the event set is updated, the main event in the updated target event is recalculated.
[0165] The methods disclosed in the above embodiments of the present invention can be applied to or implemented by processor 401. Processor 401 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by hardware integrated logic circuits in processor 401 or by software instructions. The above processor 401 may be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The methods, steps, and logic block diagrams disclosed in the embodiments of the present invention can be implemented or executed. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in conjunction with the embodiments of the present invention can be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software units in the decoding processor. The software units can be located in storage media well-known in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in the memory 402 , and the processor 401 reads the information in the memory 402 and completes the steps of the above method in combination with its hardware.
[0166] It is understood that the embodiments described herein may be implemented using hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit may be implemented in one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described herein, or a combination thereof.
[0167] For software implementation, the technology described herein can be implemented by a unit that performs the functions described herein. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.
[0168] The computer device provided in this embodiment may be Figure 4 The computer device shown in , can execute Figure 1-2 All steps of the public health security event detection and event set construction method in the Figure 1-2 For details on the technical effects of the public health security event detection and event set construction method shown in the figure, please refer to Figure 1-2 For the sake of brevity, the relevant description will not be repeated here.
[0169] An embodiment of the present invention further provides a storage medium (computer-readable storage medium). The storage medium stores one or more programs. The storage medium may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as read-only memory, flash memory, hard disk, or solid-state drive; and the memory may also include a combination of the aforementioned types of memory.
[0170] When one or more programs in the storage medium can be executed by one or more processors to implement the above-mentioned public health and safety event detection and event set construction method executed on the public health and safety event detection and event set construction device side.
[0171] The processor is used to execute the public health and safety event detection and event set construction program stored in the memory to implement the following steps of the public health and safety event detection and event set construction method executed on the public health and safety event detection and event set construction device side:
[0172] Determine multiple topic information corresponding to multiple first text data, and at least one first text data corresponding to each of the topic information; perform event detection on the at least one first text data corresponding to each of the topic information, and determine at least one target event corresponding to each of the topic information; take all of the topic information and at least one target event corresponding to each of the topic information as an event set; obtain second text data that matches the topic information in the event set from Internet news stream data; and update the event set based on the degree of attribution of the second text data to the target event in the event set.
[0173] In a possible implementation, corresponding keywords are determined based on the subject information in the event set; and second text data matching the subject information is filtered out from Internet news stream data through keyword detection.
[0174] In one possible implementation, if the degree of attribution is greater than a first threshold, the second text data is merged into the corresponding target event; if the degree of attribution is less than or equal to the first threshold, a new event is created in the event set based on the second text data.
[0175] In one possible implementation, the text similarity between the second text data and the target event in the event set is determined; the entity set similarity between the second text data and the target event in the event set is determined; the entity semantic role similarity between the second text data and the target event in the event set is determined; and the degree of attribution of the second text data to the target event in the event set is determined based on the text similarity, the entity set similarity, and the entity semantic role similarity.
[0176] In one possible implementation, word segmentation is performed on the second text data to determine a first TF-IDF vector of the second text after the word segmentation; a second TF-IDF vector of the main event in the target event is determined; and the cosine similarity between the first TF-IDF vector and the second TF-IDF vector is used as the text similarity between the second text data and the target event.
[0177] In one possible implementation, a corresponding first entity set is determined from the second text data; a corresponding second entity set is determined from the target event; and the similarity between the first entity set and the second entity set determined using the JACCARD similarity algorithm is used as the entity set similarity between the second text data and the target event.
[0178] In one possible embodiment, a first entity and a second entity are determined from the second text data, the first entity being a non-temporal entity and the second entity being a temporal entity; the cosine similarity between the first entity in the second text data and the corresponding entity in the second entity set is determined; if the cosine similarity between the first entity and the corresponding entity in the second entity set is greater than a third threshold, the first entity is added to the first entity set; if the difference between the second entity in the second text data and the corresponding entity in the second entity set is less than a fourth threshold, the second entity is added to the first entity set.
[0179] In one possible implementation, a first semantic role distribution vector corresponding to an entity in a first entity set in the second text data is determined; a second semantic role distribution vector corresponding to an entity that intersects with the first entity set in a second entity set of the target event is determined; the similarity between the first semantic role distribution vector and the second semantic role distribution vector is measured using JS distance; and a weighted average calculation is performed on the similarity according to the frequency of occurrence of the intersecting entities to obtain the entity semantic role similarity between the second text data and the target event.
[0180] In a possible implementation, the arithmetic average of the text similarity, the entity set similarity, and the entity semantic role similarity is used as the attribution between the second text data and the target event in the event set.
[0181] In one possible implementation, if the duration during which the target event in the event set has not been updated exceeds a second threshold, the target event is removed from the event set; if the target event in the event set is updated, the main event in the updated target event is recalculated.
[0182] Professionals should also be further aware that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0183] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein may be implemented using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0184] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for detecting public health safety events and constructing event sets, characterized in that: include: Determine a plurality of subject information corresponding to a plurality of first text data, and at least one first text data corresponding to each of the subject information, wherein the first text data includes a news report; Performing event detection on at least one of the first text data corresponding to each of the subject information to determine at least one target event corresponding to each of the subject information; Taking all the subject information and at least one target event corresponding to each of the subject information as an event set; Acquire second text data matching the subject information in the event set from Internet news stream data; Determining the degree of attribution between the second text data and the target event in the event set based on the text similarity, entity set similarity, and entity semantic role similarity between the second text data and the target event in the event set; updating the event set based on the attribution degree of the second text data to the target event in the event set; The updating of the event set based on the attribution degree of the second text data to the target event in the event set includes: If the degree of attribution is greater than a first threshold, merging the second text data into the corresponding target event; If the degree of belonging is less than or equal to a first threshold, a new event is created in the event set based on the second text data.
2. The method according to claim 1, characterized in that The step of acquiring second text data matching the subject information in the event set from the Internet news stream data includes: Determine corresponding keywords according to the subject information in the event set; The second text data matching the subject information is filtered out from the Internet news stream data through keyword detection.
3. The method according to claim 2, characterized in that Before updating the event set based on the attribution degree of the second text data to the target event in the event set, the method further includes: Determining the text similarity between the second text data and the target event in the event set; Determine the similarity between the second text data and the entity set of the target event in the event set; Determining entity semantic role similarity between the second text data and a target event in the event set; The attribution of the second text data to the target event in the event set is determined based on the text similarity, the entity set similarity, and the entity semantic role similarity.
4. The method according to claim 3, characterized in that: The determining of the text similarity between the second text data and the target event in the event set includes: Performing word segmentation processing on the second text data, and determining a first TF-IDF vector of the second text after the word segmentation processing; Determine a second TF-IDF vector of a main event in the target event; The cosine similarity between the first TF-IDF vector and the second TF-IDF vector is used as the text similarity between the second text data and the target event.
5. The method according to claim 3, characterized in that: The determining the similarity between the second text data and the entity set of the target event in the event set includes: Determine a corresponding first entity set from the second text data; Determining a corresponding second entity set from the target event; The similarity between the first entity set and the second entity set determined by using the JACCARD similarity algorithm is used as the entity set similarity between the second text data and the target event.
6. The method according to claim 5, characterized in that The determining the corresponding first entity set from the second text data includes: Determine a first entity and a second entity from the second text data, wherein the first entity is a non-temporal entity and the second entity is a temporal entity; Determining a cosine similarity between a first entity in the second text data and a corresponding entity in the second entity set; If the cosine similarity between the first entity and the corresponding entity in the second entity set is greater than a third threshold, adding the first entity to the first entity set; If the difference between the second entity in the second text data and the corresponding entity in the second entity set is less than a fourth threshold, the second entity is added to the first entity set.
7. The method according to claim 6, characterized in that The determining of the entity semantic role similarity between the second text data and the target event in the event set includes: Determine a first semantic role distribution vector corresponding to an entity in a first entity set in the second text data; Determine a second semantic role distribution vector corresponding to an entity that intersects the first entity set in a second entity set of the target event; Using JS distance to measure the similarity between the first semantic role distribution vector and the second semantic role distribution vector; The similarity is weighted averaged according to the frequency of occurrence of the intersecting entities to obtain the entity semantic role similarity between the second text data and the target event.
8. The method according to any one of claims 4 to 7, characterized in that: The determining the attribution of the second text data to the target event in the event set based on the text similarity, the entity set similarity, and the entity semantic role similarity includes: The arithmetic average of the text similarity, the entity set similarity and the entity semantic role similarity is taken as the attribution degree between the second text data and the target event in the event set.
9. The method according to claim 1, characterized in that: The method further comprises: If the duration during which the target event in the event set has not been updated exceeds a second threshold, removing the target event from the event set; If the target event in the event set is updated, the main event in the updated target event is recalculated.
10. A public health safety event detection and event collection construction system, characterized in that: include: A static event detection module, configured to determine a plurality of subject information corresponding to a plurality of first text data, wherein the first text data includes news reports and at least one of the first text data corresponding to each of the subject information; perform event detection on the at least one of the first text data corresponding to each of the subject information to determine at least one target event corresponding to each of the subject information; Taking all the subject information and at least one target event corresponding to each of the subject information as an event set; A dynamic event detection module, used for acquiring second text data matching the subject information in the event set from Internet news stream data; Determining the degree of attribution between the second text data and the target event in the event set based on the text similarity, entity set similarity, and entity semantic role similarity between the second text data and the target event in the event set; An event updating module, configured to update the event set based on the attribution degree of the second text data and the target event in the event set; The updating of the event set based on the attribution degree of the second text data to the target event in the event set includes: If the degree of attribution is greater than a first threshold, merging the second text data into the corresponding target event; If the degree of belonging is less than or equal to a first threshold, a new event is created in the event set based on the second text data.
11. A computer device, characterized in that: include: A processor and a memory, wherein the processor is used to execute a public health and safety event detection and event set construction program stored in the memory to implement the public health and safety event detection and event set construction method described in any one of claims 1 to 9.
12. A storage medium, characterized in that: The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the public health and safety event detection and event set construction method described in any one of claims 1 to 9.
