Event context diagram construction method and device, equipment, medium and product
By acquiring event datasets and extracting event labels using natural language processing models, calculating support and generating rule label pairs, the problem of incomplete event context map construction in existing technologies is solved, achieving clearer associations between event labels and improved accuracy of event context maps.
Patent Information
- Application Number
- CN202510942477.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-09
- Publication Date
- 2025-10-28
AI Technical Summary
Existing event context diagram construction methods cannot clearly define the relationship between multiple tags, resulting in poor comprehensiveness and accuracy of the constructed event context diagram.
By obtaining the event dataset of the target event, the natural language processing model is used to extract the event label set of the event data, the support of each event label is calculated, the frequent label set is generated, and the event context diagram is constructed based on the rule label pairs.
It clarifies the relationships between event tags, improves the comprehensiveness and accuracy of event timelines, and helps users fully understand the development process and dynamics of events.
Smart Images

Figure CN120849588A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of big data, and in particular to a method, apparatus, device, medium, and product for constructing an event network diagram. Background Art
[0002] In today's world of rapid information dissemination, public opinion analysis has become a crucial tool for understanding public sentiment and grasping the development of events. Currently, mainstream public opinion analysis methods primarily revolve around social media data, processing data through basic statistics and sentiment analysis to analyze public opinion trends and emotional fluctuations. Common public opinion event analysis techniques include keyword-based text classification and sentiment analysis, topic mining based on topic models, and social network-based dissemination path analysis.
[0003] However, these existing technical solutions have significant drawbacks. First, most are limited to single-dimensional analysis, focusing only on the sentiment and trends of individual tags or events. They rely excessively on single-tag analysis models, severely neglecting the interaction and connections between multiple tags. This makes it difficult to comprehensively and accurately reflect the dissemination trajectory of an event, resulting in an inability to deeply understand the overall picture and development process of the event. Second, they lack hierarchical tag analysis capabilities. Existing methods fail to delve into the hierarchical relationships between tags, and cannot clearly reveal complex correlation patterns such as inclusion and parallel relationships between tags. This makes it difficult to grasp the complex relationships between multiple tags in an event when analyzing public opinion events, especially the changes and evolution of tags over different time periods, thus failing to achieve a systematic and comprehensive analysis of public opinion events.
[0004] In summary, existing methods for constructing event network diagrams suffer from the inability to clearly define the relationships between multiple labels, resulting in poor comprehensiveness and accuracy of the constructed event network diagrams. Summary of the Invention
[0005] This invention provides a method, apparatus, device, medium, and product for constructing an event context map, which can solve the problem that existing event context map construction methods have poor comprehensiveness and accuracy due to the inability to clearly define the relationship between multiple labels.
[0006] In a first aspect, embodiments of the present invention provide a method for constructing an event timeline, the method comprising:
[0007] Obtain the event dataset of the target event, and extract the event label set of each event data in the event dataset using a natural language processing model;
[0008] Obtain the support of each event label in each event label set, and obtain at least one frequent label set that matches the event dataset based on the support of each event label;
[0009] Based on the support of each event label in each frequent label set, at least one rule label pair matching each frequent label set is obtained;
[0010] An event context diagram matching the target event is generated based on each rule label.
[0011] Secondly, embodiments of the present invention provide an event context diagram construction apparatus, the apparatus comprising:
[0012] The event tag extraction module is used to obtain the event dataset of the target event and extract the event tag set of each event data in the event dataset through a natural language processing model.
[0013] The support acquisition module is used to acquire the support of each event label in each event label set, and to obtain at least one frequent label set that matches the event dataset based on the support of each event label.
[0014] The tag pair generation module is used to obtain at least one rule tag pair that matches each frequent tag set based on the support of each event tag in each frequent tag set.
[0015] The context map generation module is used to generate an event context map that matches the target event based on each rule label.
[0016] Thirdly, embodiments of the present invention provide an electronic device, the electronic device comprising:
[0017] At least one processor; and
[0018] A memory communicatively connected to the at least one processor; wherein,
[0019] The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform an event network diagram construction method according to any embodiment of the present invention.
[0020] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing computer instructions, which are used to cause a processor to execute an event network diagram construction method as described in any embodiment of the present invention.
[0021] Fifthly, embodiments of the present invention provide a computer program product, the computer program product including a computer program, which, when executed by a processor, implements an event network diagram construction method as described in any embodiment of the present invention.
[0022] The technical solution of this invention involves acquiring an event dataset of a target event, extracting event label sets for each event data in the event dataset using a natural language processing model, obtaining the support of each event label in each event label set, and obtaining at least one frequent label set matching the event dataset based on the support of each event label. Then, based on the support of each event label in each frequent label set, at least one rule label pair matching each frequent label set is obtained. Finally, an event context map matching the target event is generated based on each rule label pair. This solves the problem of poor comprehensiveness and accuracy of existing event context map construction methods due to the inability to clearly define the relationships between multiple labels. It achieves the construction of an event context map based on event labels, clarifies the relationships between event labels, and improves the comprehensiveness and accuracy of the event context map.
[0023] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0024] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0025] Figure 1 This is a flowchart of an event context diagram construction method provided in Embodiment 1 of the present invention;
[0026] Figure 2 This is a flowchart of an event context diagram construction method provided in Embodiment 2 of the present invention;
[0027] Figure 3 This is a schematic diagram of an event context diagram construction device according to Embodiment 3 of the present invention;
[0028] Figure 4 This is a schematic diagram of the structure of an electronic device that implements an event context diagram construction method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0029] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0030] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, any variations of the terms "comprising" and "having" are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0031] Example 1
[0032] Figure 1 This is a flowchart of an event context diagram construction method provided in Embodiment 1 of the present invention. This embodiment is applicable to the case of constructing an event context diagram based on event tags. The method can be executed by an event context diagram construction device, which can be implemented in hardware and / or software. The event context diagram construction device can be configured in a terminal or server with event context diagram construction function.
[0033] like Figure 1 As shown, the method includes:
[0034] S110. Obtain the event dataset of the target event, and extract the event label set of each event data in the event dataset using a natural language processing model.
[0035] The event dataset refers to a collection of various data related to the target event collected from social media platforms. Data collection methods include: using the open application programming interfaces (APIs) of social media platforms or web scraping tools to collect social media data posted by users containing specific keywords. The collected content includes text content, hashtags, timestamps, and user information. This information is collected when it helps analyze the public opinion behavior of a specific group. Furthermore, the text content can be posts, comments, or reposts published by users; the hashtags are the #Hashtags used by users in posts to identify the discussion topic of the post; the timestamps are the posting time of each message; and the user information includes basic user information such as account type and number of followers. Finally, the event data is a collection of collected text content and its matching hashtags, timestamps, and user information.
[0036] Furthermore, event tag sets for each event in the event dataset are extracted using natural language processing models. The specific implementation process is as follows: First, topic tag merging and cleaning are performed. For text content in the event data that does not use standardized tags, natural language processing techniques are used to categorize the text content by topic, thus merging it into the most relevant tags. In this process, word vector models and deep learning models are used to obtain the semantic similarity between each piece of text and existing tags; the semantic similarity refers to the degree of similarity between texts at the semantic level. Next, clustering methods are used to merge texts with high similarity into their corresponding tags. Finally, tag cleaning is performed to remove irrelevant and redundant tags, and typos and non-standard tags are uniformly processed, such as standardizing capitalization and removing redundant symbols. The final output is that each piece of text is assigned one or more tags, ensuring that all text content is associated with at least one tag. These tags together constitute the event tag set of the current event data.
[0037] S120. Obtain the support of each event label in each event label set, and obtain at least one frequent label set that matches the event dataset based on the support of each event label.
[0038] The process of obtaining the support of each event tag in each event tag set includes: counting the total number of event tags contained in each event tag set in the event dataset; obtaining a target tag set in each event tag set and obtaining a target tag in the target tag set; counting the occurrence frequency of the target tag in the event dataset; obtaining the support of the target tag based on the support calculation formula, the total number of event tags, and the occurrence frequency of the target tag, wherein the support calculation formula is: Supp(X) = N / D, where D is the total number of event tags contained in each event tag set, N is the occurrence frequency of the target tag, and Supp(X) is the support of the target tag X; returning to execute the operation of obtaining the target tag in the target tag set until all event tags in the target tag set have been traversed; returning to execute the operation of obtaining the target tag set in each event tag set until all event tag sets in the event dataset have been traversed.
[0039] In a specific implementation scenario of this embodiment, the specific steps for obtaining the support of each event tag in each event tag set are as follows: 1) Count the total number D of event tags contained in each event tag set in the event dataset. Assuming there are 100 social media data entries in the event dataset, and each data entry has several event tags, the total number D is obtained by adding up the number of all these tags. 2) Obtain the target tag set in each event tag set. The target tag set is a specific set of tags selected from all event tag sets. Then, obtain the target tag X in the target tag set. The target tag X is a specific tag in the target tag set. For example, if the specific content of the current target tag set is: (stock market dynamics; stock price fluctuations; price-to-earnings ratio; trading volume), then stock market dynamics, stock price fluctuations, price-to-earnings ratio, or trading volume can all be selected as target tag X. 3) Count the number of times N of target tag X appears in the event dataset, that is, check how many times this specific target tag X appears in the entire event dataset. For example, if the tag "stock price fluctuation" appears 20 times in all collected social media data, then N is 20. 4) Based on the formula Supp(X) = N / D, the support of the target tag, where Supp(X) is the support of the target tag X. By dividing the number of occurrences of the target tag X by the total number of event tags, the support of that tag in the entire dataset can be obtained. For example, if N is 20 and D is 100, then the support of the "stock price fluctuation" tag Supp(X) = 20 ÷ 100 = 0.2. 5) Return to the operation of obtaining the target tag in the target tag set until all event tags in the target tag set have been traversed, that is, obtain the support of each tag in the target tag set according to the above steps. 6) Return to the operation of obtaining the target tag set in each event tag set until all event tag sets in the event dataset have been traversed, that is, perform the above support acquisition operation on all event tag sets in the event dataset to obtain the support of all event tags in each event tag set.
[0040] Further, obtaining at least one frequent tag set matching the event dataset based on the support of each event tag includes: extracting event tags with support greater than a preset support threshold from each event tag set as frequent tags matching each event tag set, and generating a set of tags to be filtered that matches each event tag set based on each frequent tag; obtaining the total number of frequent tags in each set of tags to be filtered, and obtaining the set support of each set of tags to be filtered based on the set support calculation formula, wherein the set support calculation formula is S(Y) = C / D, C is the total number of frequent tags in each set of tags to be filtered, D is the total number of event tags contained in each event tag set, and S(Y) is the set support; and extracting a set of tags to be filtered with a set support greater than a preset set support threshold from each set of tags to be filtered as a frequent tag set.
[0041] The preset support threshold is a pre-defined metric used to determine the frequency of tags. For example, if it is set to 0.1, then tags with a support greater than 0.1 are considered frequent tags. It should be noted that in this embodiment, the support threshold and the set support threshold can be set by the user according to actual accuracy requirements; this embodiment does not impose any restrictions on this.
[0042] S130. Based on the support of each event label in each frequent label set, obtain at least one rule label pair that matches each frequent label set.
[0043] S140. Generate an event context diagram that matches the target event based on each rule label pair.
[0044] The event timeline diagram is a chart that visually presents the development process, internal logical relationships, and connections between relevant elements of a target event, helping people to understand the overall picture and evolution of the event more clearly and intuitively.
[0045] Optionally, the event timeline can be displayed via computer devices for users to monitor and analyze public opinion regarding a target event. For example, when a trending event sparks widespread discussion on social media, the method described in this embodiment generates an event timeline matching the trending event through the steps outlined above. The computer then integrates this information into an event timeline using a visual interface and presents it to relevant departments and company staff. This helps them to grasp public opinion dynamics promptly and comprehensively, and to formulate targeted response strategies based on the key information displayed in the event timeline.
[0046] Furthermore, each rule tag pair consists of two related rule tags; this relationship can be parent-child or parallel; more specifically, the parent-child relationship represents a hierarchical association, where the parent tag provides a general description of a type of event information, and the child tag provides a more specific and detailed explanation of the parent tag's content. The child tag is subordinate to the parent tag, and the parent tag contains the relevant content of the child tag. For example, when analyzing the target event of "corporate financial report release," "corporate financial report" can be used as the parent tag, while "revenue data," "profit indicators," and "cost composition" are child tags that form a parent-child relationship with "corporate financial report," providing more specific details about the content contained in the corporate financial report. Based on these rule tag pairs with various relationships such as parent-child, different rule tag pairs are rationally arranged and connected according to the inherent logic and information association of the event, thereby drawing a complete event context diagram that matches the target event. This makes the relationships between the various elements in the target event clear at a glance, providing strong support for subsequent analysis and decision-making.
[0047] Optionally, an event timeline is drawn based on these rule tags with various relationships, such as parent-child relationships. Specifically, this includes: First, determining the layout of the event timeline based on the user's selection operation. The layout method can be a tree layout, a flowchart layout, etc. Then, connecting each rule tag. When connecting rule tag pairs, for rule tag pairs with parent-child relationships, a directed edge is used, with the arrow pointing from the parent tag to the child tag, thus clarifying the hierarchical relationship. For rule tag pairs with parallel relationships, such as "Features of Product A" and "Features of Product B" in the "Comparison of Bank Wealth Management Products" event, an undirected edge or a parallel arrangement is used to display them.
[0048] The technical solution of this invention involves acquiring an event dataset of a target event, extracting event label sets for each event data in the event dataset using a natural language processing model, obtaining the support of each event label in each event label set, and obtaining at least one frequent label set matching the event dataset based on the support of each event label. Then, based on the support of each event label in each frequent label set, at least one rule label pair matching each frequent label set is obtained. Finally, an event context map matching the target event is generated based on each rule label pair. This solves the problem of poor comprehensiveness and accuracy of existing event context map construction methods due to the inability to clearly define the relationships between multiple labels. It achieves the construction of an event context map based on event labels, clarifies the relationships between event labels, and improves the comprehensiveness and accuracy of the event context map.
[0049] Example 2
[0050] Figure 2This is a flowchart of an event context diagram construction method provided in Embodiment 2 of the present invention. This embodiment is a refinement based on the above embodiment. In this embodiment, the method of obtaining at least one rule label pair that matches each frequent label set according to the support of each event label in each frequent label set is specifically refined.
[0051] like Figure 2 As shown, the method includes:
[0052] S210. Obtain the event dataset of the target event, and extract the event label set of each event data in the event dataset using a natural language processing model.
[0053] S220. Obtain the support of each event label in each event label set, and obtain at least one frequent label set that matches the event dataset based on the support of each event label.
[0054] S230. Select any two event tags from the frequent tag set to form at least one tag pair to be grouped, and obtain the rule confidence of each tag pair to be grouped based on the support of each event tag in each tag pair to be grouped.
[0055] Specifically, the rule confidence of each tag pair to be grouped is obtained based on the support of each event tag in each tag pair to be grouped, including: obtaining the support of the first event tag and the second event tag in the tag pair to be grouped; and obtaining the rule confidence of the tag pair to be grouped based on the rule confidence calculation formula and the support of the first event tag and the second event tag in the tag pair to be grouped.
[0056] Wherein, the first event tag is the event tag that is first in the tag pair to be grouped, and the second event tag is the event tag that is second in the tag pair to be grouped.
[0057] Furthermore, the rule confidence calculation formula is Conf(X1→X2)=Supp(X2) / Supp(X1), where Supp(X1) is the support of the first event label, Supp(X2) is the support of the second event label, and Conf(X1→X2) is the rule confidence of the label pair to be grouped.
[0058] Specifically, rule confidence is used to measure the probability that one event label will appear in a pair of labels to be grouped, given that one event label appears. It reflects the strength of the association between the two labels. The specific process for obtaining rule confidence is as follows: First, obtain the support Supp(X1) and Supp(X2) of the first event label and the second event labels X1 and X2 in the pair of labels to be grouped. Then, based on the rule confidence calculation formula Conf(X1→X2)=Supp(X2) / Supp(X1), obtain the rule confidence Conf(X1→X2) of the pair of labels to be grouped. This formula represents the probability that the second event label X2 will appear given that the first event label X1 is a given condition. Taking the aforementioned label pair "Stock Price Change" and "Trading Volume" as an example, if we set Supp(X1) = 0.15 and Supp(X2) = 0.1, substituting the above data into the formula yields Conf(X1→X2) = 0.1 ÷ 0.15 ≈ 0.67. This means that when the label "Stock Price Change" appears, the probability of the label "Trading Volume" appearing is approximately 67%. This method allows us to obtain the corresponding rule confidence for each label pair, thereby helping to analyze the inherent correlation between the labels and providing strong support for further uncovering the patterns and knowledge behind the data.
[0059] S240. Extract the tag pairs to be grouped from each tag pair to be grouped, where the rule confidence is greater than the preset rule confidence threshold, as each valid tag pair to be matched with the frequent tag set.
[0060] Specifically, the tag pair to be formed is a combination of a first event tag and a second event tag selected from the frequent tag set. For example, in the frequent tag set of financial market analysis, "central bank interest rate cut" and "bond price increase" form a tag pair to be formed. The rule confidence score of this tag pair is obtained through previous calculations and is used to measure the probability that "bond price increase" will occur when "central bank interest rate cut" occurs. Furthermore, the preset rule confidence score threshold is a pre-set standard used to filter out tag pairs with a strong correlation probability. For example, if the threshold is set to 0.7, and the rule confidence score of a tag pair to be formed is 0.8, which is greater than 0.7, then this tag pair to be formed will be extracted and become a valid tag pair. A valid tag pair means that there is a relatively reliable correlation between the first event tag and the second event tag.
[0061] S250. Based on the support of each event label in each valid label pair and the rule confidence of each valid label pair, the rule lift of each valid label pair is obtained.
[0062] Specifically, the rule lift of each valid label pair is obtained based on the support of each event label in each valid label pair and the rule confidence of each valid label pair. This includes: obtaining the support of the second event label in the valid label pair and the rule confidence of the valid label pair; and obtaining the rule lift of the valid label pair according to the rule lift calculation formula. The rule lift calculation formula is Lift(X1→X2)=Conf(X1→X2) / Supp(X2), where Conf(X1→X2) is the rule confidence of the valid label pair, Supp(X2) is the support of the second event label, and Lift(X1→X2) is the rule lift of the valid label pair.
[0063] S260. Extract effective labels with a rule lift greater than a preset rule lift threshold from each label pair to be grouped as effective association pairs that match the frequent label set.
[0064] S270. Based on the rule confidence and rule lifting of each valid association pair, confirm the parent-child relationship between the first event label and the second event label in each valid association pair.
[0065] Specifically, based on the rule confidence and rule lift of each valid association pair, the parent-child relationship between the first event tag and the second event tag in each valid association pair is confirmed, including: obtaining the support of the first event tag and the second event tag in the valid association pair, the rule confidence and rule lift of the valid association pair; determining whether the rule confidence is greater than a preset first judgment threshold; after determining that the rule confidence is greater than the preset first judgment threshold, determining whether the rule lift is greater than a preset second judgment threshold; if it is greater than the preset second judgment threshold, then obtaining the reciprocal of the association pair matching the valid association pair according to the reciprocal calculation formula; if the reciprocal of the association pair is less than a preset third judgment threshold, then confirming that the parent-child relationship of the valid association pair is that the first event tag is the parent node of the second event tag.
[0066] Optionally, based on the above steps, if it is determined whether the rule confidence Conf(X1→X2) is not greater than a preset first judgment threshold, then it is determined whether the first event label and the second event label are parallel; further, the method for determining the parallel relationship is: calculate |Conf(X1→X2)|.
[0067] If X2)-Conf(X2→X1)| is less than the preset deviation threshold, then the first event label and the second event label are determined to be parallel; if not less than, then the first event label and the second event label are determined to be unrelated, and the valid association pairs matching the first event label and the second event label are deleted.
[0068] Furthermore, if it is determined that the rule confidence Conf(X1→X2) is greater than the preset first determination threshold, and the rule lift Lift(X1→X2) is not greater than the preset second determination threshold, then it is further determined whether the first event label and the second event label are parallel, using the same method as before.
[0069] Furthermore, if it is determined that the rule lift degree Lift(X1→X2) is greater than the preset second judgment threshold, and the reciprocal of the association pair is not less than the preset third judgment threshold, then it is further determined whether the first event label and the second event label are parallel, in the same way as before.
[0070] S280. Apply each parent-child relationship to each valid association pair to obtain each rule label pair that matches the frequent label set.
[0071] S290. Generate an event context diagram that matches the target event based on each rule label pair.
[0072] The technical solution of this invention involves acquiring an event dataset of a target event, extracting event label sets for each event data in the event dataset using a natural language processing model, obtaining the support of each event label in each event label set, and obtaining at least one frequent label set matching the event dataset based on the support of each event label. Then, two event labels are randomly selected from the frequent label sets to form at least one pair of labels to be grouped. Based on the support of each event label in each pair of labels to be grouped, the rule confidence of each pair of labels to be grouped is obtained. Next, the pair of labels to be grouped with a rule confidence greater than a preset rule confidence threshold is extracted from each pair of labels to be grouped as valid label pairs matching the frequent label sets. Finally, based on the support of each event label in each valid label pair and the rule confidence of each valid label pair, the rule suggestions for each valid label pair are obtained. The process involves first determining the lift of the rules, then extracting valid labels with a lift greater than a preset threshold from each pair of labels to be grouped, as valid association pairs matching the frequent label set. Based on the rule confidence and lift of each valid association pair, the parent-child relationship between the first and second event labels in each valid association pair is confirmed. This parent-child relationship is then applied to each valid association pair to obtain rule label pairs matching the frequent label set. Finally, an event context map matching the target event is generated based on each rule label pair. This solves the problem of poor comprehensiveness and accuracy in existing event context map construction methods due to the inability to clearly define the relationships between multiple labels. It achieves the construction of event context maps based on event labels, clarifies the relationships between event labels, and improves the comprehensiveness and accuracy of the event context map.
[0073] Example 3
[0074] Figure 3 This is a schematic diagram of an event context diagram construction device provided in Embodiment 3 of the present invention.
[0075] like Figure 3 As shown, the device includes:
[0076] The event tag extraction module 310 is used to obtain the event dataset of the target event and extract the event tag set of each event data in the event dataset through a natural language processing model.
[0077] The support acquisition module 320 is used to acquire the support of each event label in each event label set, and obtain at least one frequent label set that matches the event dataset based on the support of each event label.
[0078] The tag pair generation module 330 is used to obtain at least one rule tag pair that matches each frequent tag set based on the support of each event tag in each frequent tag set.
[0079] The context map generation module 340 is used to generate an event context map that matches the target event based on each rule label pair.
[0080] The technical solution of this invention involves acquiring an event dataset of a target event, extracting event label sets for each event data in the event dataset using a natural language processing model, obtaining the support of each event label in each event label set, and obtaining at least one frequent label set matching the event dataset based on the support of each event label. Then, based on the support of each event label in each frequent label set, at least one rule label pair matching each frequent label set is obtained. Finally, an event context map matching the target event is generated based on each rule label pair. This solves the problem of poor comprehensiveness and accuracy of existing event context map construction methods due to the inability to clearly define the relationships between multiple labels. It achieves the construction of an event context map based on event labels, clarifies the relationships between event labels, and improves the comprehensiveness and accuracy of the event context map.
[0081] Based on the above embodiments, the support acquisition module 320 includes:
[0082] The first statistical unit is used to count the total number of event tags contained in each event tag set in the event dataset;
[0083] The target tag acquisition unit is used to acquire a target tag set from each event tag set and acquire a target tag from the target tag set;
[0084] The second statistical unit is used to count the number of times the target label appears in the event dataset;
[0085] The tag support acquisition unit is used to obtain the support of the target tag based on the support calculation formula, the total number of event tags, and the number of times the target tag appears;
[0086] The first traversal unit is used to return the operation of obtaining the target tag in the target tag set until all event tags in the target tag set have been traversed;
[0087] The second traversal unit is used to return the operation of obtaining the target label set in each event label set, until all event label sets in the event dataset have been traversed.
[0088] In the above embodiment, the support acquisition module 320 includes:
[0089] The first extraction tag is used to extract event tags with a support greater than a preset support threshold from each event tag set as frequent tags that match each event tag set respectively, and generate a set of tags to be filtered that match each event tag set based on each frequent tag.
[0090] The set support acquisition unit is used to obtain the total number of frequent tags in each set of tags to be filtered, and to obtain the set support of each set of tags to be filtered based on the set support calculation formula and the total number of frequent tags.
[0091] The second extraction unit is used to extract the set of tags with a set support greater than a preset set support threshold from each set of tags to be filtered as the frequent tag set.
[0092] Based on the above embodiments, the tag pair generation module 330 includes:
[0093] The rule confidence acquisition unit is used to select any two event tags in the frequent tag set to form at least one tag pair to be grouped, and to obtain the rule confidence of each tag pair to be grouped according to the support of each event tag in each tag pair to be grouped.
[0094] The third extraction unit is used to extract the tag pairs to be grouped from each tag pair to be grouped, where the rule confidence is greater than a preset rule confidence threshold, as each effective tag pair to be matched with the frequent tag set.
[0095] The rule lifting degree acquisition unit is used to obtain the rule lifting degree of each valid label pair based on the support degree of each event label in each valid label pair and the rule confidence degree of each valid label pair.
[0096] The fourth extraction unit is used to extract effective labels with a rule lift greater than a preset rule lift threshold from each label pair to be grouped as effective association pairs that match the frequent label set.
[0097] The parent-child relationship confirmation unit is used to confirm the parent-child relationship between the first event label and the second event label in each valid association pair based on the rule confidence and rule lifting of each valid association pair.
[0098] The relationship application unit is used to apply each parent-child relationship to each valid association pair to obtain each rule label pair that matches the frequent label set.
[0099] Based on the above embodiments, the rule confidence acquisition unit further includes:
[0100] The first support acquisition unit is used to acquire the support of the first event label and the second event label in the label pair to be grouped, respectively.
[0101] The confidence acquisition unit is used to obtain the rule confidence of the tag pair to be grouped based on the rule confidence calculation formula and the support of the two event tags in the tag pair to be grouped.
[0102] Based on the above embodiments, the rule lifting degree acquisition unit further includes:
[0103] The second support acquisition unit is used to acquire the support of the second event label in the effective label pair and the rule confidence of the effective label pair;
[0104] The lift degree acquisition unit is used to obtain the rule lift degree of the effective label pair according to the rule lift degree calculation formula.
[0105] Based on the above embodiments, the parent-child relationship confirmation unit further includes:
[0106] The information acquisition unit is used to acquire the support of the first event label and the second event label in the effective association pair, the rule confidence of the effective association pair, and the rule boosting degree.
[0107] The first judgment unit is used to determine whether the confidence level of the rule is greater than a preset first judgment threshold.
[0108] The second judgment unit is used to determine whether the rule lift is greater than a preset second judgment threshold after determining that the rule confidence is greater than a preset first judgment threshold.
[0109] The reciprocal acquisition unit is used to obtain the reciprocal of the association pair that matches the effective association pair according to the reciprocal calculation formula if the reciprocal is greater than a preset second judgment threshold.
[0110] The third judgment unit is used to confirm that the parent-child relationship of the valid association pair is that the first event tag is the parent node of the second event tag if the reciprocal of the association pair is less than a preset third judgment threshold.
[0111] The event context diagram construction device provided in this embodiment of the invention can execute the event context diagram construction method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0112] Example 4
[0113] Figure 4 A schematic diagram of an electronic device 10 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0114] like Figure 4 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0115] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0116] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as an event context graph construction method.
[0117] Accordingly, the method includes:
[0118] Obtain the event dataset of the target event, and extract the event label set of each event data in the event dataset using a natural language processing model;
[0119] Obtain the support of each event label in each event label set, and obtain at least one frequent label set that matches the event dataset based on the support of each event label;
[0120] Based on the support of each event label in each frequent label set, at least one rule label pair matching each frequent label set is obtained;
[0121] An event context diagram matching the target event is generated based on each rule label.
[0122] In some embodiments, an event map construction method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the event map construction method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform an event map construction method by any other suitable means (e.g., by means of firmware).
[0123] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0124] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0125] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0126] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0127] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0128] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0129] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
Claims
1. A method for constructing an event timeline, characterized in that, include: Obtain the event dataset of the target event, and extract the event label set of each event data in the event dataset using a natural language processing model; Obtain the support of each event label in each event label set, and obtain at least one frequent label set that matches the event dataset based on the support of each event label; Based on the support of each event label in each frequent label set, at least one rule label pair matching each frequent label set is obtained; An event context diagram matching the target event is generated based on each rule label.
2. The method according to claim 1, characterized in that, Obtain the support level of each event tag in each event tag set, including: Count the total number of event tags contained in each event tag set in the event dataset; Obtain the target tag set from each event tag set, and obtain the target tag from the target tag set; The occurrence count of the target label is counted in the event dataset; The support of the target label is obtained based on the support calculation formula, the total number of event labels, and the number of times the target label appears; Return to the operation of retrieving the target tag from the target tag set, until all event tags in the target tag set have been traversed; Returns to the operation of retrieving the target label set in each event label set, until all event label sets in the event dataset have been traversed.
3. The method according to any one of claims 1-2, characterized in that, Based on the support of each event label, at least one frequent label set matching the event dataset is obtained, including: In each event tag set, event tags with a support greater than a preset support threshold are extracted as frequent tags that match each event tag set. Based on each frequent tag, a set of tags to be filtered that matches each event tag set is generated. Obtain the total number of frequent tags in each tag set to be filtered, and obtain the set support of each tag set to be filtered based on the set support calculation formula and the total number of frequent tags. Extract the sets of tags whose set support is greater than the preset set support threshold from each set of tags to be filtered as frequent sets.
4. The method according to claim 1, characterized in that, Based on the support of each event label in each frequent label set, at least one rule label pair matching each frequent label set is obtained, including: In the frequent label set, any two event labels are randomly selected to form at least one label pair to be grouped, and the rule confidence of each label pair to be grouped is obtained according to the support of each event label in each label pair to be grouped. In each pair of tags to be grouped, the tag pairs with a rule confidence score greater than a preset rule confidence threshold are extracted as valid tag pairs that match the frequent tag set. Based on the support of each event label in each valid label pair and the rule confidence of each valid label pair, the rule lift of each valid label pair is obtained. In each pair of tags to be grouped, extract the valid tags whose rule lift is greater than the preset rule lift threshold as valid association pairs that match the frequent tag set; Based on the rule confidence and rule lifting of each valid association pair, the parent-child relationship between the first event label and the second event label in each valid association pair is confirmed. Each parent-child relationship is applied to each valid association pair to obtain each rule label pair that matches the frequent label set.
5. The method according to claim 4, characterized in that, Based on the support of each event label in each label pair to be grouped, the rule confidence of each label pair to be grouped is obtained, including: The support scores of the first event tag and the second event tag in the tag pair to be grouped are obtained respectively; wherein, the first event tag is the event tag that is first in the tag pair to be grouped, and the second event tag is the event tag that is second in the tag pair to be grouped. The rule confidence of the tag pair to be grouped is obtained based on the rule confidence calculation formula and the support of the first event tag and the second event tag in the tag pair to be grouped.
6. The method according to claim 4, characterized in that, Based on the support of each event label in each valid label pair and the rule confidence of each valid label pair, the rule lifting degree of each valid label pair is obtained, including: Obtain the support of the second event tag in the valid tag pair and the rule confidence of the valid tag pair; The rule lift of the effective label pair is obtained according to the rule lift calculation formula.
7. The method according to claim 4, characterized in that, Based on the rule confidence and rule lifting of each valid association pair, the parent-child relationship between the first event label and the second event label in each valid association pair is confirmed, including: Obtain the support of the first event label and the second event label in the effective association pair, the rule confidence of the effective association pair, and the rule lifting degree; Determine whether the confidence level of the rule is greater than a preset first judgment threshold; After determining that the confidence level of the rule is greater than a preset first determination threshold, it is determined whether the lift of the rule is greater than a preset second determination threshold. If it is greater than the preset second judgment threshold, then the reciprocal of the association pair that matches the effective association pair is obtained according to the reciprocal calculation formula; If the reciprocal of the association pair is less than a preset third judgment threshold, then the parent-child relationship of the valid association pair is confirmed as the first event tag being the parent node of the second event tag.
8. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform an event network diagram construction method according to any one of claims 1-7.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute an event network diagram construction method according to any one of claims 1-7.
10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements an event network diagram construction method according to any one of claims 1-7.