Travel graph construction method and device and related equipment
By extracting the events and relationships in the files to be analyzed, and building a rational map based on the predefined structure, the problem of event analysis in different fields is solved, and an efficient and reusable map construction method is realized.
Patent Information
- Application Number
- CN202311739009.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-15
- Publication Date
- 2025-06-17
AI Technical Summary
Currently, there is a lack of an effective method for building a matter-of-fact map, which is difficult to apply to event analysis and prediction in different fields.
Provide a method of constructing a matter-of-fact graph, by obtaining the files to be analyzed, extracting events and event relationships, adding nodes to the event layer based on the predefined graph structure, and establishing a mapping between events to build a completed matter-of-fact graph.
The construction of a matter-of-fact map suitable for scenarios in different fields is realized, the efficiency and accuracy of event analysis are improved, and the map structure is reusable and easy to implement.
Smart Images

Figure CN120163223A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular, to a method and apparatus for constructing an event logic graph and related devices. Background Art
[0002] Many activities in human society are often driven by individual events. An event logic graph is a knowledge base of event logic. The event logic graph describes the evolution laws and patterns between events and can be applied to various scenarios such as event prediction, decision-making assistance, and dialogue generation. Therefore, the event logic graph is a very important research direction in the industry. However, there is currently a lack of an effective method for constructing an event logic graph. Summary of the Invention
[0003] This application provides a method and apparatus for constructing an event logic graph and related devices, provides an ontology architecture of an event logic graph and a method for establishing an event logic graph based on the ontology architecture of the event logic graph, is applicable to the construction of event logic graphs in different field scenarios, and has the advantages of being reusable and easy to implement.
[0004] In a first aspect, this application provides a method for constructing a graph. The method includes: a computing device obtains a file to be analyzed, and extracts at least one event and the relationships between the at least one event from the file to be analyzed; then, according to the graph structure of a predefined event logic graph, adds nodes of the at least one event to the event layer of the graph structure, and establishes a mapping between the nodes of the at least one event and multiple categories defined in the classification layer of the graph structure according to the category information of each event in the retrieved at least one event; establishes a mapping between the at least one event according to the relationships between the at least one event, and further constructs an event logic graph.
[0005] This application provides a graph structure of an event logic graph applicable to different fields. After obtaining any file to be analyzed, it extracts multiple events included in the file to be analyzed and determines the relationships between the multiple events. Then, based on the relationships between the multiple events, it establishes a mapping between the events, adds each event to the event logic graph in the form of a node, and establishes a mapping between each event and the category nodes originally existing in the event logic graph according to relevant information such as the category information of the event, thereby completing the construction of the event logic graph based on the file to be analyzed and the predefined graph structure. The above method can be applied to the construction of event logic graphs of files to be analyzed in various fields or scenarios. The graph structure of the event logic graph has the advantages of being reusable and easy to implement.
[0006] In a possible implementation, the event layer includes abstract events and specific events, and the extracting at least one event from the file to be analyzed includes: detecting the abstract event from the file to be analyzed, determining whether the abstract event already exists in the event layer, and if not, adding the abstract event to the event layer; extracting event elements of the specific event from the file to be analyzed, and adding the specific event node to the event layer according to the extracted event elements of the specific event, and establishing a mapping between the specific event and the abstract event.
[0007] Dividing events into abstract events and concrete events, taking abstract events as one layer in the causal map and concrete events as another layer in the causal map, and establishing a mapping between concrete events and abstract events can make the relationship between events in the constructed causal map clearer and improve the efficiency of event analysis.
[0008] In a possible implementation, the method also includes: defining the above-mentioned graph structure, and the node types included in multiple categories of the classification layer of the above-mentioned graph structure; wherein the multiple categories of the above-mentioned classification layer include one or more of event class, event action, action amplitude, and event indicator, the node type included in the above-mentioned event class is used to indicate the type of event, the node type included in the above-mentioned event action is used to indicate the action included in the event, the node type included in the above-mentioned action amplitude is used to indicate the action amplitude of the event, and the node type included in the above-mentioned event indicator is used to indicate the indicator for analyzing the event.
[0009] In this application, the event graph defines an event from dimensions such as event class, event action, action amplitude, and event indicator, which can be applied to the description of events in different fields or scenarios, making the graph structure of the event graph more reusable.
[0010] In a possible implementation, the method further includes: filtering files in a database to obtain the files to be analyzed according to event categories included in the event classes defined in the graph structure.
[0011] Based on the categories of events defined in the event graph, files to be analyzed related to the defined event categories are obtained from the database, which can reduce the amount of data that needs to be processed when establishing the event graph and improve the efficiency of building the graph.
[0012] In a possible implementation, the event layer of the graph structure also includes abstract entity nodes and specific entity nodes; after extracting at least one event from the file to be analyzed, the method also includes: determining the abstract entity node associated with the abstract event, and establishing a mapping between the abstract event and the abstract entity node associated with the abstract event; determining the specific entity nodes and abstract entity nodes associated with the specific event, and establishing a mapping between the specific event and the abstract entity nodes associated with the specific event, as well as establishing a mapping between the specific event and the specific entity nodes associated with the specific event; wherein the abstract entity nodes include time nodes, location nodes, country nodes, city nodes, organization nodes, company nodes, and person nodes; the specific entity nodes include one or more specific time nodes, one or more specific location nodes, one or more specific country nodes, one or more specific city nodes, one or more specific organization nodes, one or more specific company nodes, and one or more specific person nodes.
[0013] In a possible implementation, after the mapping between the specific event and the abstract event is established, the method further includes:
[0014] Event elements of multiple specific events are extracted, and specific events are fused according to the event elements of the multiple specific events; the specific event fusion is used to fuse different descriptions of the same specific event into one event description; wherein the event elements of each specific event include one or more of a specific time, a specific place, a specific country, a specific city, a specific organization, a specific company or a specific person.
[0015] In a possible implementation, the method further includes: obtaining event elements of a first event; determining that the event elements of the first event include event elements of a subject event, and determining the results caused by the first event based on the event graph; wherein the event elements of the subject event include the event class of the subject event and the event arguments included in the subject event.
[0016] By constructing the above-mentioned event logic graph, in some application scenarios, a topic event is detected based on the event logic graph. When a newly-occurred event is detected to belong to the topic event, the impact of the newly-occurred event is speculated based on the event logic graph. If a specific event occurs, and the specific event includes information such as the event class and event arguments corresponding to the above-mentioned topic event, then the target abstract event corresponding to the specific event can be determined according to the event class and event action of the specific event, other abstract events that have a causal relationship with the target abstract event are determined, and based on other target abstract events that have a causal relationship with the target abstract event, the impact that the specific event will have on the enterprise can be analyzed and predicted, and then corresponding countermeasures can be formulated according to the predicted impact. Events occurring outside the enterprise often have an important impact on the production and operation of the enterprise. It is necessary to connect external events with internal enterprise knowledge. Through the event logic graph provided by this application, external events related to the enterprise can be perceived, and the impact of the external event on the enterprise can be analyzed based on the event logic graph, and then relevant countermeasures can be formulated according to the impact.
[0017] In a second aspect, the present application provides an event logic graph construction device, which includes: an acquisition module for acquiring a file to be analyzed; a processing module for extracting at least one event and the relationship between the at least one event from the file to be analyzed; adding nodes of the at least one event to an event layer of the graph structure according to a pre-defined graph structure of the event logic graph; establishing a mapping between the nodes of the at least one event and multiple categories defined in a classification layer of the graph structure according to the category information of each event in the at least one event retrieved; and establishing a mapping between the at least one event according to the relationship between the at least one event.
[0018] In a possible implementation manner, the processing module is specifically configured to: detect an abstract event from the file to be analyzed, determine whether the abstract event already exists in the event layer, and if not, add the abstract event to the event layer; extract event elements of a specific event from the file to be analyzed, add a node of the specific event to the event layer according to the extracted event elements of the specific event, and establish a mapping between the specific event and the abstract event.
[0019] In a possible implementation, the processing module is also used to: define the graph structure and the node types included in the multiple categories of the classification layer of the graph structure; wherein the multiple categories of the classification layer include one or more of event class, event action, action amplitude, and event indicator; the node type included in the event class is used to indicate the type of event, the node type included in the event action is used to indicate the action included in the event, the node type included in the action amplitude is used to indicate the action amplitude of the event, and the node type included in the event indicator is used to indicate the indicator for analyzing the event.
[0020] In a possible implementation, the processing module is further used to filter files in the database to obtain the files to be analyzed according to event categories included in the event classes defined in the graph structure.
[0021] In a possible implementation, the processing module is further used to: determine the abstract entity nodes associated with the abstract events, and establish a mapping between the abstract events and the abstract entity nodes associated with the abstract events; determine the specific entity nodes and abstract entity nodes associated with the specific events, and establish a mapping between the specific events and the abstract entity nodes associated with the specific events, as well as establish a mapping between the specific events and the specific entity nodes associated with the specific events; wherein the abstract entity nodes include time nodes, location nodes, country nodes, city nodes, organization nodes, company nodes, and character nodes; the specific entity nodes include one or more specific time nodes, one or more specific location nodes, one or more specific country nodes, one or more specific city nodes, one or more specific organization nodes, one or more specific company nodes, and one or more specific character nodes.
[0022] In a possible implementation, the processing module is also used to: extract event elements of multiple specific events, and perform specific event fusion based on the event elements of the multiple specific events; the specific event fusion is used to fuse different descriptions of the same specific event into one event description; wherein the event elements of each specific event include one or more of a specific time, a specific place, a specific country, a specific city, a specific organization, a specific company or a specific person.
[0023] In a possible implementation, the acquisition module is also used to acquire event elements of the first event; the processing module is also used to: determine that the event elements of the first event include event elements of the subject event, and determine the results caused by the first event based on the event graph; wherein the event elements of the subject event include the event class of the subject event and the event arguments included in the subject event.
[0024] In a third aspect, the present application provides a computing device comprising a processor and a memory, wherein the processor executes instructions stored in the memory to implement a method as described in the first aspect or any possible implementation of the first aspect.
[0025] In a fourth aspect, the present application provides a computing cluster, comprising multiple computing devices, wherein the computing devices include a processor and a memory, and the processor executes instructions stored in the memory to implement the method described in the first aspect or any possible implementation of the first aspect.
[0026] In a fifth aspect, the present application provides a computer-readable storage medium, characterized in that it includes computer program instructions. When the computer program instructions are executed by a computing device, the computing device executes the method described in the above-mentioned first aspect or any possible implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 This is a schematic diagram of a matter-and-principle graph ontology architecture provided by this application;
[0028] Figure 2 is a schematic diagram of a directed edge provided by the present application;
[0029] Figure 3 It is a flowchart of a method for establishing a matter-of-fact map provided by this application;
[0030] Figure 4 It is a schematic diagram of a matter-and-principle graph ontology provided by this application;
[0031] Figure 5 It is a schematic diagram of a kind of matter-and-principle map provided by this application;
[0032] Figure 6 It is a schematic diagram of a device for constructing a matter-of-fact graph provided in an embodiment of the present application;
[0033] Figure 7 is a schematic diagram of a computing device provided by the present application;
[0034] Figure 8 It is a schematic diagram of a computing device cluster provided by this application. DETAILED DESCRIPTION
[0035] The following first introduces the explanation of relevant terms involved in this application.
[0036] Entity: An object that exists independently in the real world. For example, a person that exists in reality is an entity, and a company that exists in reality is also an entity.
[0037] Entity type: An abstraction for a set of entities with the same properties.
[0038] Entity attribute: The common characteristics of all entities under an entity type. For example, if the entity type is a person, the specific entity attributes can be height, weight, age, occupation, etc.
[0039] Event: An event refers to something or phenomenon that occurs or exists within a period of time. An event is a concept of what happens in time and space, which can be concrete or abstract.
[0040] Ontology: A model representing the relationships between events and events, events and entity types, entity types, as well as the relationships between entity types, property types and their associations.
[0041] Abstract event: The abstraction of frequent and similar concrete events in the real world. For example, for "earthquake", specific earthquake events occurred in March, May, June, and September 2022. These similar concrete events are classified and abstracted, and are uniformly represented by the abstract event "earthquake".
[0042] Concrete event: A specific event that occurs in the real world. A concrete event is a detailed description of an event in the real world, which can answer all the questions of 5W2H, and can answer both what kind of event and which specific occurrence of the event.
[0043] Event description: A complete description of a concrete event. For example: During the morning rush hour on January 23, 2023, Beijing time, a traffic accident occurred on Road B in Area A of the city, resulting in 3 people being injured and causing a half-hour traffic jam.
[0044] Event name: A general event name generated based on the event description. For example: A traffic accident occurred during the morning rush hour in Area A of the city.
[0045] Event class: A coarse-grained domain event classification system, which is classified by domain from coarse to fine. For example, at the top level, events can be classified according to several domains such as politics, economy, culture, military, technology, and emergencies. Under the economic event class, the event class can be further refined according to trade economy, industrial economy, labor economy, etc.
[0046] Event subject: Refers to the key entity or object in an event. The event subject is the entity that triggers the occurrence of the event, which can be a person, a company, an item, a system, a device, etc. For example, when the corporate profit increases or the grain output increases, the company and the grain are the event subjects.
[0047] Event indicator: It is used to measure or evaluate the performance parameters or characteristics of the event subject. In data analysis, event indicators are important tools for assessing business performance or system operation status. For example, when the price of an item increases, the output of iron ore decreases, and the volume of grain exports increases, price, output, and export volume are event indicators of the event subject of the item, output is the event indicator of the event subject of iron ore, and export volume is the event indicator of the event subject of grain.
[0048] Event action: Event action refers to the behavior or operation triggered after an event occurs. For example, in the above cases where the price of an item increases, the output of iron ore decreases, and the volume of grain exports increases, both increase and decrease are event actions.
[0049] Argument role: The role played by an event argument in a specific event. For different event types, there will be corresponding argument roles. For example, for the event type of death, the argument roles include victim, tool, location; for the event type of earthquake, the argument roles include time, location, magnitude, etc. In this application, the argument roles frequently used in scenarios such as enterprise internal perception, analysis, and decision-making are selected, including date, location, company, organization, person, country, city, etc.
[0050] Event argument: It exists in a specific event and is the actual value of the argument role. For example, company is an argument role, and A Technology Co., Ltd. is an event argument.
[0051] An event logic graph is a knowledge base of event logic. The event logic graph describes the evolution laws and patterns between events. Structurally, the event logic graph is a directed graph including nodes and directed edges. The nodes represent concepts, entities, events, etc., and the directed edges represent the relationships between concepts, entities, and events. The event logic graph stores the association relationships between events and the argument information of the events themselves, and can connect concepts, entities, and events in form.
[0052] An event is something or a change in state that occurs at a specific time point or time period and within a specific geographical area, and consists of one or more actions participated by one or more roles. The elements that make up an event include: trigger word, event type, event argument, and argument role.
[0053] Exemplarily, in Region C, a tank fired at Hotel D, resulting in the death of a photographer. This sentence includes the following two event types, and the relevant trigger words, event arguments, and argument roles are shown in Table 1 below.
[0054] Table 1
[0055]
[0056] In this application, the relationship between events in the event map mainly includes logical relationships such as sequence, cause and effect, condition, and hierarchy. These four relationships are introduced below.
[0057] Sequential relationship: refers to the relationship between two events that occur one after another in time. For two events in a sequential relationship, it is only necessary to ensure that the preceding event a occurs before the succeeding event b, regardless of which event ends first. That is, as long as the starting time point of event a is earlier than the starting time point of event b, then there is a possibility that a sequential relationship will be formed between event a and event b, and the relative relationship between their ending time points can be arbitrary. In the event graph, there is a transition probability greater than 0 and less than or equal to 1 between two events with a sequential relationship, which indicates the confidence level of evolving from one event to the next event according to the sequential relationship.
[0058] For example, on June 15, a 6.8-magnitude earthquake occurred in Region A. As of 3 a.m. on June 16, the government had organized more than 10,000 rescue workers to rush to the disaster area. The above includes two events, event a and event b. Event a is the occurrence of an earthquake, and event b is the rescue workers rushing to the disaster area. There is a sequential relationship between event b and event a.
[0059] Causal relationship: refers to the relationship between two events, where the occurrence of the previous event (cause) leads to the occurrence of the subsequent event (result). Causal relationship satisfies the temporal relationship that the cause event comes first and the result event comes later. Therefore, in a certain sense, causal relationship can be considered a subset of sequential relationship. There is a causal strength value between 0 and 1 between two causally related event pairs, which indicates the confidence level of the causal relationship between the two events.
[0060] Conditional relationship: It means that the previous event is the condition for the next event to occur. Conditional relationship belongs to a certain subjective logical relationship, and causal relationship belongs to a certain understanding of objective facts. Conditional relationship can be understood as "reason", which is the internal connection between premise and conclusion, or argument and argument, while causal relationship can be understood as "cause", which is about facts. For example, the condition "If many people buy tickets, then the movie is good" is valid, while the causal relationship "Because many people buy tickets, the movie is good" is not valid.
[0061] Hierarchical relationship: There are two types of hierarchical relationship between events: nominal hierarchical relationship and verbal hierarchical relationship. For example, the events "food price increase" and "vegetable price increase" are in a nominal hierarchical relationship; the events "exercise" and "running" are in a verbal hierarchical relationship. It should be noted that the hierarchical relationship is deterministic knowledge, so there is no need to assign a constant between 0 and 1 to the hierarchical relationship to indicate the confidence between the hierarchical events.
[0062] This application provides a kind of thing map framework, such asFigure 1 As shown in Figure 1 is a schematic diagram of an ontology architecture of an event logic graph provided by this application. The circles in the figure represent nodes. This event logic graph architecture includes concept nodes, event nodes, and entity nodes. Among them, the concept nodes include event type nodes, event action nodes, action amplitude nodes, event metric nodes, and abstract entity nodes; the event nodes include abstract event nodes and specific event nodes; the entity nodes include specific entity nodes.
[0063] In a possible implementation, the event logic graph ontology can be divided into multiple layers, such as Figure 1 As shown in, this hierarchical architecture of the event logic graph ontology includes an event classification layer, an event knowledge layer, and an event instance layer. Among them, the event classification layer includes event type nodes, event action nodes, action amplitude nodes, and event metric nodes; the event knowledge layer includes abstract event nodes and abstract entity nodes; the event instance layer includes specific event nodes and specific entity nodes.
[0064] The tags, node types, and attributes of the nodes included in each layer of the above hierarchical architecture are introduced separately below. Among them, the tag is used to indicate the tag of a node in the event logic graph, and the tags include event type, event action, action amplitude, event metric, abstract entity, abstract event, specific entity, and specific event.
[0065] The event classification layer includes four types of concept nodes, namely event type nodes, event action nodes, action amplitude nodes, and event metric nodes. Among them, concept nodes refer to nodes that can have a hierarchical relationship, and there will be no instantiated nodes under concept nodes. For example, if the event logic graph includes an economic node, the economic node is a concept node of an event type, and nodes such as trade economy node, industrial economy node, and labor economy node are also concept nodes of event types. The economic node has a hierarchical relationship with the three nodes of trade economy node, industrial economy node, and labor economy node.
[0066] 1. Event type nodes
[0067] Event types are used for a coarse-grained domain event classification system. Event types are classified according to the domain to which the event belongs from coarse to fine. For example, at the top level, events can be classified according to several domains such as politics, economy, culture, sports, military, science and technology, and emergencies. Under the economic event type, the classification of event types can be further refined according to trade economy, industrial economy, labor economy, etc. That is, event type nodes can include political nodes, economic nodes, cultural nodes, sports nodes, military nodes, science and technology nodes, emergency nodes, etc. The information included in event type nodes is as follows:
[0068] Tag: Event type
[0069] Node type: Concept node
[0070] property:{
[0071] Event class name: enumeration (enum), for example: economy
[0072] Event class level: int, for example, if the event class level is 1, it means that the economic class node is the first level
[0073] }
[0074] Among them, the label is used to indicate a node. Enum indicates that the event class name is an enumeration type. The event class name is used to indicate the name of the event class node, such as economy, politics, culture, technology, trade economy, aerospace technology, etc. Int indicates that the event class level is an integer. The event class level is used to indicate the level of an event class node in the field to which it belongs. For example, if the label of a node in the event graph is event class, the event class name in the attribute is economy, and the event class level is 1, it means that the node is an economic class node, and the economic class node is a first-level event class node; if the label of a node in the event graph is event class, the event class name in the attribute is trade economy, and the event class level is 2, it means that the node is a trade economy class node, and the trade economy class node is a second-level event class node.
[0075] It should be understood that the above attributes include the event class name and event class level. The event class node may also include other attributes. Users can construct the attributes included in each type of node in the event graph according to actual needs, which will not be repeated here.
[0076] 2. Event action node
[0077] Event action is used to indicate the action of an event associated with an event class node. The event action node includes the following information:
[0078] Tags: event action
[0079] Node type: Concept node
[0080] property:{
[0081] Event action name: enum, for example: rise
[0082] Event action level: int, for example, if the event action level is 2, it means that "rising" is the second-level event action node
[0083] }
[0084] The event action name of an event action node is usually a general term for a type of action. For example, the event action name of an event action node is "rise", and "rise" can include increase, growth, raise, etc. Before establishing an event logic model based on the document to be analyzed, it is necessary to analyze the data in the document to be analyzed. In events such as the increase in corporate profits, the rise of the Shanghai Composite Index, and the growth of the national unemployment rate, increase, rise, growth, raise, etc. all belong to the "rise" action. Therefore, when annotating the data in the document to be analyzed to indicate this event action, words describing the event action such as growth, raise, increase, etc. are all annotated as "rise". In the event logic graph, events with event actions such as growth, raise, increase, etc. will be associated with the rise node, enabling an event action node to be associated with multiple events or reused in multiple scenarios. The event action hierarchy is used to indicate the hierarchy of an event action. For example, "rise" is under the category of "quantifier action", that is, the quantifier action node is a first-level event action node; the rise node is a second-level event action node.
[0085] It should be understood that the event action class node may also include other attributes, and users can establish the attributes of each type of node in the event logic graph according to actual needs, which will not be elaborated here.
[0086] 3. Action amplitude node
[0087] The action amplitude is used to indicate the amplitude of an event action, which can be divided into large, medium, and low levels. That is, the action amplitude node can include large nodes, medium nodes, low nodes, etc., and can also be divided more finely, such as ultra-high, high, medium, medium-low, low. Different division granularities can be used according to the actual situation. The information included in the event amplitude node is as follows:
[0088] Label: Action amplitude
[0089] Node type: Concept node
[0090] Attributes {
[0091] Amplitude name: enum, for example: large
[0092] }
[0093] It should be understood that the action amplitude class node may also include other attributes, and users can establish the attributes of each type of node in the event logic graph according to actual needs, which will not be elaborated here.
[0094] 4. Event indicator node
[0095] The information included in the event indicator node is as follows:
[0096] Label: Event indicator
[0097] Node type: Concept node
[0098] property{
[0099] Indicator name: enum, for example: grain production
[0100] Indicator level: integer (integer, int), for example: the indicator level is 2, which means that "grain production" is a level 2 event indicator.
[0101] }
[0102] Among them, the indicator names such as commodity price increase, iron ore output decrease, grain export volume increase, price, output, and export volume are event indicators. That is, the event indicator nodes can include price nodes, output nodes, export volume nodes, etc.
[0103] It should be understood that the event indicator node may also include other attributes. Users can establish the attributes of each type of node in the event graph according to actual needs, which will not be elaborated here.
[0104] The knowledge layer includes abstract event nodes and abstract entity nodes. In this application, the information included in the abstract event nodes and abstract entity nodes is as follows.
[0105] 1. Abstract event node
[0106] Abstract events refer to a type of event that is an abstraction of similar specific events that occur frequently in the real world. They usually do not involve specific time, location, or entity. The information included in the abstract event node is as follows:
[0107] Tags: Abstract Events
[0108] Node type: event node
[0109] property{
[0110] Abstract event name: string For example: A strong earthquake occurred in the city
[0111] Event class: enum, for example: earthquake disaster
[0112] Event body: string (string) For example: city
[0113] Event indicator: enum, for example: magnitude
[0114] Event action: enum, for example: earthquake
[0115] Movement range: enum For example: high
[0116] }
[0117] Node Constraints {
[0118] Movement amplitude: Operator (operator) For example: magnitude>=6
[0119] }
[0120] Among them, string represents the string type, operator represents the operator used to determine whether the action range of an event satisfies the constraint action range of the abstract event node, and node constraint means that a specific event can establish a relationship with the abstract event node only when it satisfies the constraint conditions corresponding to an abstract event node.
[0121] For example, there is an abstract event node in the event graph, and the abstract event name of the abstract event node is "a strong earthquake occurred in the city", and the constraint condition is that the action amplitude is greater than or equal to 6. When an event is "a 4.3-magnitude earthquake occurred in City A on September 10, 2023, causing damage to many houses and no casualties", the event is an earthquake in the city, but because the magnitude of the earthquake is less than 6, the event does not meet the constraint condition of the abstract event "a strong earthquake occurred in the city". When establishing the event graph, the node corresponding to the event will not establish a relationship with the abstract event node "a strong earthquake occurred in the city" through a directed edge.
[0122] It should be understood that the abstract event node may also include other attributes, and the user can establish the attributes of each type of node in the event graph according to actual needs. For example, the abstract event node will not be described in detail here.
[0123] 2. Abstract entity node
[0124] An abstract entity is an abstract representation of a class of things or concepts, and is a general term for a group of concrete entities with similar characteristics or attributes. For example, countries, cities, companies, foods, etc. are abstract entities, and Guangzhou, Shenzhen, etc. are concrete entities. In this application, abstract entities include argument roles, such as date, place, company, organization, person, country, city, etc., abstract entity nodes include date nodes, place nodes, company nodes, organization nodes, person nodes, country nodes, city nodes, etc., and abstract event nodes include the following information:
[0125] Tags: Abstract Entity
[0126] Node type: Concept node
[0127] property{
[0128] Abstract entity name: enum For example: city
[0129] }
[0130] The event instance layer includes specific event nodes and specific entity nodes. In this application, the specific event nodes and specific entity nodes include the following information.
[0131] 1. Specific event nodes
[0132] A specific event that occurred in the real world. A specific event is a detailed description of an event in the real world. The specific event node includes the following information:
[0133] Tags: specific events
[0134] Node type: event node
[0135] property{
[0136] Specific event name: string For example: On June 15, 2022 Beijing time, a magnitude 9 earthquake occurred in the J sea area
[0137] Event description: stringFor example: At 2:00 a.m. on June 15, 2022, Beijing time, a magnitude 9 earthquake occurred in the sea, which immediately triggered a tsunami and later caused a nuclear leak crisis at the nuclear power plant.
[0138] Event structuring: json format: {[date, event type, event subject, event indicator, event action, action amplitude, event status, involved region, involved country, involved city, involved person, involved company, involved organization]}
[0139] }
[0140] In this application, the argument roles frequently used in the enterprise event map are summarized as date, place, company, organization, person, region, country, city, etc. There is no need to reconstruct event arguments for different fields or scenarios.
[0141] 2. Specific entity nodes
[0142] A concrete entity is an instantiation of an abstract entity. For example, Guangzhou and Shenzhen are instances of the abstract entity "city", and apples and cookies are instances of food. The information included in a concrete entity node is as follows:
[0143] Tags: concrete entity
[0144] Node type: entity node
[0145] property{
[0146] Specific entity name: string For example: Shenzhen
[0147] }
[0148] In this application, in the event graph, specific entities carry the link and information transmission function from the event graph to the enterprise knowledge graph, and can transmit the impact of events perceived from the outside world in the event graph to the knowledge graph within the enterprise.
[0149] The following is the information about directed edges provided by this application. Directed edges are used to indicate the type of relationship between two nodes in a graph. Figure 2 As shown, Figure 2 Schematic diagram of a directed edge provided by the present application. A directed edge is used to connect two nodes, the two nodes are a head node and a tail node, wherein the arrow of the directed edge points to the tail node.
[0150] In this application, the information corresponding to a directed edge includes the type of edge, the labels of the head and tail nodes, the attributes of the edge, the semantic properties of the edge, and the relationship constraints of the edge. Exemplarily, the information corresponding to a directed edge can be expressed as:
[0151] {
[0152] Type: enum Example: event class
[0153] Labels of the head and tail nodes: {(head node label, tail node label)}
[0154] property{
[0155] Head node identification (identity, ID): int
[0156] Tail node ID: int
[0157] }
[0158] Semantic properties
[0159] Reflexivity: Boolean type (bool)
[0160] symmetry: bool
[0161] transitivity: bool
[0162] }
[0163] Relationship constraints{}
[0164] }
[0165] Among them, the type of directed edge indicates the type of relationship between two nodes. The type of directed edge or the type of relationship between two nodes in the event graph includes isHypernymOf type, event class (isEventClassOf), event action (isEventActionOf), action range (isActionRangeOf), event indicator (isEventIndicatorOf), causal relationship (isReasonOf), belongs to relationship (belongTo), succession relationship (isPreviousOf), event parameter (isEventArgumentOf), etc. Among them, isHypernymOf type includes sub-event class (isSubEventClassOf), sub-action class (isSubActionOf), sub-indicator class (isSubIndicatorOf), is (A) type, sub-event (isSubEventOf).
[0166] The labels of the head and tail nodes are used to indicate the labels of the head node and the tail node of the directed edge. The labels include event class, event action, action amplitude, event indicator, abstract event, abstract entity, concrete event, and concrete entity. If the head and tail node labels are: [(event class, event class)], it means that the head node and tail node of the directed edge of this type are connected to event class nodes, or if two event class nodes are connected by a directed edge, the type of the directed edge is a sub-event class.
[0167] In this application, the types of directed edges in the event graph are different, the labels of the head and tail nodes of the connection are different, or the type of the directed edge between two nodes is related to the two connected nodes. Among them, the type of the directed edge is a hypernymOf class, which is used to connect two nodes whose head and tail nodes are [event class, event class], [event action, event action], [event indicator, event indicator], [abstract event, abstract event] or [abstract entity, abstract entity].
[0168] The type of directed edge is sub-event class (isSubEventClassOf), which is used to connect two nodes whose head and tail nodes are [event class, event class], that is, it is used to connect two nodes whose labels are event classes, indicating the hierarchical relationship between the two event types. The event type represented by the head node is a sub-event of the event type represented by the tail node. For example, the event type represented by the head node is trade economy, and the event type represented by the tail node is economy.
[0169] The type of the directed edge is "isSubActionOf", which is used to connect two nodes whose head and tail nodes are [event action, event action], that is, to connect two nodes with the label of event action, indicating the hierarchical relationship between two event actions. The event action represented by the head node is a subset of the event action represented by the tail node.
[0170] The type of the directed edge is "isSubIndicatorOf", which is used to connect two nodes whose head and tail nodes are [event indicator, event indicator], that is, to connect two nodes with the label of event indicator, indicating the hierarchical relationship between two event indicators. The event indicator represented by the head node is a subset of the event indicator represented by the tail node.
[0171] The type of the directed edge is "isEventClassOf", which is used to connect two nodes whose head and tail nodes are [event class, abstract event] or [event class, concrete event], that is, to connect the head node with the label of event class and the tail node with the label of abstract event / concrete event, indicating the event class to which the abstract event or concrete event belongs.
[0172] The type of the directed edge is "isEventActionOf", which is used to connect two nodes whose head and tail nodes are [event action, abstract event], that is, to connect the head node with the label of event action and the tail node with the label of abstract event, indicating the event action corresponding to the abstract event.
[0173] The type of the directed edge is "isActionRangeOf", which is used to connect two nodes whose head and tail nodes are [action range, abstract event], that is, to connect the head node with the label of action range and the tail node with the label of abstract event, indicating the action range of the event action corresponding to the abstract event.
[0174] The type of the directed edge is "isEventIndicatorOf", which is used to connect two nodes whose head and tail nodes are [event indicator, abstract event] or [event indicator, event class], that is, to connect the head node with the label of event indicator and the tail node with the label of abstract event, indicating the event indicator involved in the abstract event; or to connect the head node with the label of event indicator and the tail node with the label of event class, indicating the event indicator involved in the event class.
[0175] The type of the directed edge is "isReasonOf", which is used to connect two nodes whose head and tail nodes are [abstract event, abstract event] or [concrete event, concrete event], that is, to connect two nodes with the label of abstract event or connect two nodes with the label of concrete event, indicating the causal relationship between two abstract events or the causal relationship between two concrete events.
[0176] The type of the directed edge is sub - event (isSubEventOf), which is used to connect two nodes whose head and tail nodes are [abstract event, abstract event], that is, to connect two nodes with the label of abstract event, indicating a hyponymy relationship between two abstract events.
[0177] The type of the directed edge is isA, which is used to connect two nodes whose head and tail nodes are [abstract entity, abstract entity], that is, to connect two nodes with the label of abstract entity, indicating a hyponymy relationship between two abstract entities.
[0178] The type of the directed edge is the belonging (belongTo) relationship, which is used to connect two nodes whose head and tail nodes are [specific event, abstract event] or [specific entity, abstract entity], that is, to connect the head node with the label of specific event and the tail node with the label of abstract event, or to connect the head node with the label of specific entity and the tail node with the label of abstract entity, indicating the instantiation relationship between two events, where the abstract event is instantiated to obtain the specific event, or the specific event represented by the head node belongs to the abstract event represented by the tail node; the abstract entity is instantiated to obtain the specific entity, or the specific entity represented by the head node belongs to the abstract entity represented by the tail node.
[0179] The type of the directed edge is the succession (isPreviousOf) relationship, which is used to connect two nodes whose head and tail nodes are [specific event, specific event], that is, to connect two nodes with the label of specific event, indicating the succession relationship between two specific events.
[0180] The type of the directed edge is event argument (isEventArgumentOf), which is used to connect two nodes whose head and tail nodes are [specific entity, specific event], [abstract entity, specific event] or [abstract entity, abstract event], that is, to connect the head node with the label of specific entity and the tail node with the label of specific event, indicating that the specific event represented by the specific event node involves the specific entity represented by the specific entity node; or to connect the head node with the label of abstract entity and the tail node with the label of specific event, indicating that the specific event represented by the specific event node involves the abstract entity represented by the abstract entity node; or to connect the head node with the label of abstract entity and the tail node with the label of abstract event, indicating that the abstract event represented by the abstract event node involves the abstract entity represented by the abstract entity node.
[0181] It should be noted that the type of a directed edge is related to the two nodes it connects. After the types of the two nodes are determined, the type of the directed edge connecting these two nodes is also determined. For example, when one node is a node representing a specific event and the other is a node representing an abstract event, after connecting these two nodes with a directed edge, the type of this directed edge is determined as the belonging (belongTo) relationship.
[0182] The attributes of a directed edge at least include the head node ID and the tail node ID. Among them, the head node ID indicates the head node of the directed edge, and the tail node ID indicates the tail node of the directed edge. The attributes of the edge can also include other information. For example, if the type of the directed edge is a causal relationship (isReasonOf), then the attributes of the directed edge also include a relationship confidence level, which represents the confidence level of the establishment of the causal relationship. The data type of the relationship confidence level is float, and the relationship confidence level is a number greater than or equal to 0 and less than or equal to 1. If the type of the directed edge is a sequential relationship (isPreviousOf), then the attributes of the directed edge also include a transition probability, which represents the confidence level of evolving from the event represented by the head node to the event represented by the tail node. The data type of the transition probability is float, and the transition probability is a number greater than or equal to 0 and less than or equal to 1.
[0183] The semantic properties of a directed edge are used to indicate the semantic properties that the directed edge has. The semantic properties include reflexivity, symmetry, transitivity, etc. When the value of the variable corresponding to a semantic property is true, it means that the directed edge has this semantic property. For example, the value of transitivity is 1, indicating that the relationship between the head node and the tail node has transitivity.
[0184] Exemplarily, if the head node of a directed edge a is node X and the tail node is node Y, and the value of the transitivity of the directed edge is 1; the head node of another directed edge b is node Y and the tail node is node Z, and the value of the transitivity of the directed edge is 1, then there is also the relationship between node X and node Z as that between node X and node Y. For example, if the type of the directed edge between node X and node Y is a sub - event type, indicating that the event type represented by node X is a subset of the event type represented by node Y, and the type of the directed edge between node Y and node Z is a sub - event type, indicating that the event type represented by node Y is a subset of the event type represented by node Z, then the event type represented by node X is also a subset of the event type represented by node Z.
[0185] The semantic properties of a directed edge can also be of the operator type. The type of the directed edge represents the relationship type between two nodes. There are various relationship types such as a causal relationship (isReasonOf), a sub - event (isSubEventOf) relationship, a belonging relationship (belongTo), a sequential relationship (isPreviousOf), etc. between the above - mentioned nodes. Then there may be some combined properties among the above - mentioned various relationship types, and these combined properties also belong to the semantic properties of the directed edge. For example, if there are two relationship types R1 and R2, and R1 and R2 are inverse relationships, then the semantic properties in the directed edge of type R1 can be as follows:
[0186] Semantic property {
[0187] Reflexivity: Boolean type (bool)
[0188] symmetry: bool
[0189] transitivity: bool
[0190] Inverse relation: operator R1 -1 =R2
[0191] }
[0192] Exemplarily, if the type of the directed edge or the type of relationship between two nodes in the event graph mentioned above also has a containment relationship, it is used to connect two nodes whose head and tail nodes are [abstract event, concrete event], that is, it is used to connect the head node whose label is abstract event and the tail node whose label is concrete event, indicating that the abstract event represented by the head node contains the concrete event represented by the tail node. The type of the directed edge is a belong to (belongTo) relationship, which is used to connect two nodes whose head and tail nodes are [concrete event, abstract event], that is, it is used to connect the head node whose label is concrete event and the tail node whose label is abstract event, indicating that the concrete event represented by the head node belongs to the abstract event represented by the tail node. Therefore, the belong to (belongTo) relationship and the containment (contain) relationship are a pair of inverse relationships.
[0193] In this application, the semantic properties of directed edges involving two or more types of relationships are referred to as cross-relation semantic properties, such as the above-mentioned inverse relation, which involves a belongTo relationship and a containment relationship. Therefore, the semantic properties of directed edges belonging to a (belongTo) relationship and directed edges containing a (contain) relationship include cross-relation semantic properties. The relationship between two nodes that are not directly related can be derived through cross-relation semantic properties.
[0194] Exemplarily, if a cross-relationship semantic property is defined as: (node A, node B) ∈ R3 and (node B, node C) ∈ R4, then (node A, node C) ∈ R4. That is, if the relationship type between node A and node B is R3, and the relationship type between node B and node C is R4, then the relationship between node A and node C is also R4. If node A is the node corresponding to event class A, node B is the node corresponding to abstract event B, node C is the node corresponding to concrete event C, R3 represents that the type of the directed edge is isEventClassOf, and R4 represents that the type of the directed edge is contain relationship, if (event class A, abstract event B) ∈ isEventClassOf, (abstract event B, concrete event C) ∈ contain, then it can be deduced that (event class A, concrete event C) ∈ contain.
[0195] Relationship constraint means that if the attributes of the event represented by the head node satisfy the conditions in the relationship constraint, the relationship type between the head node and the tail node connected by the directed edge can be established; or if the attributes of the event represented by the tail node satisfy the conditions in the relationship constraint, the relationship type between the head node and the tail node connected by the directed edge can be established; or if the attributes of the head node and the tail node satisfy the conditions in the relationship constraint, the relationship type between the head node and the tail node connected by the directed edge can be established.
[0196] Exemplarily, when the type of the directed edge is belongTo, the relationship constraint of this type of directed edge is:
[0197] {
[0198] Event class constraint: operator For example: head node.event class == tail node.event class
[0199] Event subject constraint: operator For example: head node.event subject == tail node.event subject
[0200] Event index constraint: operator For example: head node.event index == tail node.event index
[0201] Event action constraint: operator For example: head node.event action == tail node.event action
[0202] Action amplitude constraint: operator For example: head node.action amplitude == tail node.action amplitude
[0203] }
[0204] Taking the case where the head and tail nodes of the directed edge of the belongTo type are [concrete event, abstract event] as an example, the above constraint condition indicates that: if the event subject, event indicator, event action, and action range of the attributes of the concrete event represented by the head node and the abstract event represented by the tail node are the same, then there is a belongTo relationship between the concrete event and the abstract event. Optionally, the above relationship constraint may include part or all of the event class constraint, event subject constraint, event indicator constraint, event action constraint, or action range constraint.
[0205] For another example, when the type of a directed edge is a succession relationship (isPreviousOf), the relationship constraint of this type of directed edge is:
[0206] {
[0207] Event class constraints: operator For example: head node.date <= tail node.date
[0208] }
[0209] The head and tail nodes of the directed edge connected by the succession relationship are [specific event, specific event]. The above constraint condition indicates that a succession relationship exists between the specific event represented by the head node and the specific event represented by the tail node only when the date in the attribute of the specific event represented by the tail node is after the date in the attribute of the specific event represented by the head node.
[0210] It should be noted that the above is an example in which the ontology of the theory graph includes three layers: the event classification layer, the theory knowledge layer, and the event instance layer, to introduce the ontology architecture of the theory graph provided by this application and the information of the nodes included in the theory graph ontology. It should be understood that the theory graph ontology can also be a two-layer architecture. For example, the above-mentioned event classification layer is called the classification layer, and the above-mentioned theory knowledge layer and the event instance layer are called the event layer. The ontology architecture of the theory graph can also only include the event classification layer and the theory knowledge layer, or the ontology architecture of the theory graph only includes the event classification layer and the event instance layer. The above-mentioned event classification layer can also include one or more of event classes, event actions, action amplitudes, or event indicators. This application does not make specific restrictions. This application takes the theory graph ontology including three layers: the event classification layer, the theory knowledge layer, and the event instance layer, and the event classification layer includes event classes, event actions, action amplitudes, and event indicators as an example to introduce the method for establishing the theory graph provided by this application.
[0211] The above introduces the ontology architecture of the event graph provided by this application, as well as the types of nodes, node attributes, directed edge types and attributes, etc. included in the event graph provided by this application. The following introduces the method for establishing the event graph provided by this application, see Figure 3 , Figure 3 It is a flow chart of a method for establishing a matter-of-fact map provided in this application.
[0212] S301. Obtain the file to be analyzed.
[0213] In this application, the computing device obtains a file to be analyzed containing factual data, and the factual data includes multiple events, including abstract events and specific events. The file to be analyzed may include internal enterprise data or external enterprise data. Internal enterprise data includes internal review cases, research reports, etc., and external data includes external information, data from professional think tanks, etc. External information can be, for example, news information, information disclosed by other enterprises, etc., which is not specifically limited in this application.
[0214] The file to be analyzed may be multimodal data, for example, data in different formats such as text documents, webpage text, videos, pictures, etc., which is not specifically limited in this application. After obtaining the file to be analyzed, the computing device can convert data in various formats into text.
[0215] Optionally, the above-mentioned file to be analyzed is obtained by filtering the files in the database based on the graph structure of the predefined thing graph. Among them, the graph structure of the predefined thing graph is the above-mentioned thing graph ontology. Exemplarily, after acquiring the file in the database, the computing device performs data preprocessing on the file, and the data preprocessing includes removing invisible characters, removing garbled characters, desensitizing privacy data, formatting, filtering and deduplication, etc., which are not specifically limited in this application. Then the computing device extracts the content related to the event type from the above-mentioned file based on the different event types included in the event class in the above-mentioned thing graph ontology, and obtains the above-mentioned file to be analyzed. Alternatively, the computing device can also extract the content related to the event type and event action from the above-mentioned file based on the different event types included in the event class and the different event actions included in the event action in the above-mentioned thing graph ontology, and obtain the above-mentioned file to be analyzed.
[0216] S302. Extract multiple events from the file to be analyzed.
[0217] The ontology architecture of the event graph provided by this application is as follows Figure 1 As shown in , the transaction graph architecture provided by this application defines the labels of nodes in the transaction graph, node types and attributes of nodes with different labels, and defines the types of edges connecting two nodes in the transaction graph and the attributes of the edges, etc., which will not be repeated here.
[0218] After obtaining the file to be analyzed, the computing device extracts event-related information from the file to be analyzed according to the event logic graph ontology. For example, if the event classes in the event logic graph ontology include economic classes, when content related to the economy is detected in the file to be analyzed, this content related to the economic class is extracted as an event. For example, through keyword detection, if words such as "Federal Reserve", "finance", or "gross domestic product" are detected, the computing device can determine that the content related to these words is an event related to the economy, and extract the description related to the economy in the file to be analyzed as an event. Another example is that there is a specific entity in the instance graph ontology, such as a city name "Shenzhen". After the word "Shenzhen" is detected in the file to be analyzed, the content related to "Shenzhen" in the document is extracted as an event.
[0219] See Figure 4 , Figure 4 is a schematic diagram of an event logic graph ontology provided by this application. Figure 4 In the shown event logic graph, the event classes include node types such as economy, politics, culture, sports, military, and technology. Among the economic events, it involves trade economy and industrial economy, etc.; the event actions include first-level event action nodes such as quantifier action nodes, and second-level event action nodes such as rising nodes and falling nodes; the action amplitudes include large nodes, medium nodes, and low nodes. The event indicators include event indicator nodes such as price nodes, production nodes, export volume nodes, sales volume nodes, and magnitude nodes; the abstract entities include abstract entity nodes such as country nodes, city nodes, company nodes, organization nodes, person nodes, time, and location. Among them, country, city, company, organization, person, time, and location are also called argument roles; the specific entities include specific entity nodes such as specific country nodes, specific city nodes, specific company nodes, specific organization nodes, specific person nodes, specific time nodes, and specific location nodes. For example, a node A represents company A, a node B represents company B, and a node C represents a city C. Nodes A, B, and C are all specific entity nodes.
[0220] The computing device detects in each document of the file to be analyzed, obtains the content related to the events represented by the above various node types and extracts it as an event. The computing device can also extract events from the file to be analyzed according to the event actions, action amplitudes, event indicators, abstract entities, or specific entity information in the event logic graph ontology, and finally obtains multiple events. For example, the computing device can also obtain events from the file to be analyzed according to specific entity nodes. If a specific entity node represents a company A, the computing device detects in each document. If a description includes company A, then this description is extracted as an event.
[0221] It should be understood that multiple events in a document usually have a correlation relationship, such as a causal relationship or a sequential relationship, etc. Therefore, the computing device stores the events extracted from a document in the same document to facilitate the determination of the relationship type between multiple events.
[0222] It should be noted that the above method of extracting events from events according to the event logic graph ontology is only used as an example and should not be understood as a specific limitation. The present application can also extract events related to the event logic graph ontology from a document through other methods. For example, the data in the training set is labeled according to the event logic graph ontology, and an artificial intelligence model capable of extracting events is trained, and the events are extracted from the file to be analyzed through the trained artificial intelligence model capable of extracting events.
[0223] It should be noted that the above Figure 4 The event logic graph ontology is only a schematic illustration and should not be understood as a specific limitation. The event logic graph ontology can also include more or fewer nodes. For example, if the user only needs to focus on economic events and technology events, the event category can only include economic nodes and technology nodes. Another example is that if the user needs to focus on emergency events, an event category node at the first level of emergency event nodes can be added to the event category, and second-level event category nodes such as earthquake disaster nodes, flood disaster nodes, and tsunami disaster nodes can be added under the emergency event nodes.
[0224] S303. Add nodes corresponding to the above multiple events to the event logic graph.
[0225] After the computing device extracts the above at least one event from the file to be analyzed, the above at least one event is added to the event layer of the event logic graph in the form of nodes. The above event logic graph includes a classification layer and an event layer, where the classification layer is Figure 1 the event classification layer shown in Figure 1 the event logic knowledge layer and the event instance layer shown in
[0226] After the computing device obtains multiple events in the file to be analyzed, the computing device can also detect and identify the above multiple events and divide the above multiple events into two types: specific events and abstract events. For a description in the file to be analyzed, if the description includes information related to the event category and information related to the event action, it is determined that the description is an event. For example, a description includes "the Fed raises interest rates". "The Fed" can indicate that the description is an economic event in the event category, and the event action is "raises interest rates", so the description is an event. It should be understood that the above method of identifying whether a description is an event is only for example and should not be understood as a specific limitation.
[0227] After identifying a description as an event, the computing device identifies the above multiple events according to the event elements included in each event in the file to be analyzed, and divides the events in the file to be analyzed into two types: specific events and abstract events. For example, the computing device, based on the event elements included in the event, if it can confirm which event is a specific event, then confirms the event as a specific event, and if it cannot confirm which event is a specific event, then confirms the event as an abstract event. After the computing device determines whether an event is an abstract event or a specific event, each abstract event is added to the event knowledge layer in the form of a node, and each specific event is added to the event instance layer in the form of a node. Among them, the event elements include an event class, event action, action amplitude, event indicator, event subject, etc. of an event, wherein, for an abstract event, the event subject refers to an abstract entity, that is, an event role, including time, place, country, city, company, organization, person, etc.; for a specific event, the event subject refers to a specific entity, that is, an event argument, including a specific time, a specific place, a specific country, a specific city, a specific company, a specific organization, a specific person, etc.
[0228] Exemplarily, for an event, if the event only includes two types of information, event class and event action, the event is classified as an abstract event; or an event does not include event arguments, for example, the argument roles in the event graph ontology include country, city, company, organization, person, time, and place; but an event does not include any event arguments of a specific country, specific city, specific company, specific region, or specific person, then the event is determined to be an abstract event. If an event includes event arguments, but it is impossible to confirm which event it is, then the event is confirmed to be an abstract event. For example, for "Shenzhen City held a marathon", although the event argument of Shenzhen City is included, it is impossible to confirm which marathon it is, so the event is an abstract event. If an event includes a specific time, then the event is determined to be a specific event. For example, there is an event in the above-mentioned file to be analyzed, which is "As of October 2023, my country's exports in the first three quarters have achieved a significant increase." The event includes labels of six dimensions in the event graph ontology, including time, trade economy, increase, significant, export volume, and China. The event is identified as a specific event, but for the event "Federal Reserve interest rate hike", the labels corresponding to the event only include two labels (economy, increase), so the event is identified as an abstract event.
[0229] It should be understood that after determining that an event is an abstract event, when adding the abstract event to the logical knowledge layer, it is determined whether the abstract event already exists in the logical knowledge layer. If the abstract event already exists in the logical knowledge layer, the abstract event will no longer be added to the logical knowledge layer. If the abstract event does not exist in the logical knowledge layer, the abstract event will be added to the logical knowledge layer.
[0230] It should be noted that the above methods for identifying specific events and abstract events are only used as examples and should not be construed as specific limitations. The present application can also identify specific events and abstract events through other methods. For example, specific events and abstract events can be identified through a trained artificial intelligence model. The present application does not make specific limitations.
[0231] S304. Determine the relationships between different events among multiple events.
[0232] After the computing device identifies whether the multiple events in the file to be analyzed are specific events or abstract events, the computing device determines the relationships between different events. Among them, the relationships between events include the relationships between abstract events and abstract events, the relationships between specific events and abstract events, and the relationships between specific events and specific events. Among them, the relationship between one abstract event and another abstract event can be a causal relationship (isReasonOf) or a sub - event relationship (isSubEventOf); the relationship between one specific event and one abstract event can be a belonging relationship (belongTo); the relationship between one specific event and one specific event can be a causal relationship (isReasonOf) or a sequential relationship (isPreviousOf).
[0233] In the event - logic graph ontology provided by the present application, an event is described through dimensions such as event class, event action, action amplitude, event metrics, etc. When the computing device determines whether there is a belonging relationship (belongTo) between a specific event and an abstract event, the computing device can, according to the event - logic graph ontology, obtain the event elements of each specific event and the event elements of each abstract event, and then can determine whether a specific event belongs to an abstract event according to the event elements of the specific event and the event elements of the abstract event. If a specific event and an abstract event satisfy the following relationship constraints:
[0234] {
[0235] Event - class constraint: Specific event.event class == Tail - node.event class
[0236] Event - subject constraint: Specific event.event subject == Abstract.event subject
[0237] Event - metrics constraint: Specific event.event metrics == Abstract event.event metrics
[0238] Event - action constraint: Specific event.event action == Abstract event.event action
[0239] Action - amplitude constraint: Specific event.action amplitude == Abstract event.action amplitude
[0240] }
[0241] Then it is determined that there is a belongingTo relationship between the specific event and the abstract event. Among them, event elements include the event class, event action, action amplitude, event indicator, event subject, etc. of an event. Among them, the event subject refers to specific countries, specific cities, specific companies, specific persons, etc. in the above-mentioned event arguments. It should be understood that not all of the above constraints need to be satisfied. An abstract event may only include the event class and the event subject. Then, as long as the event class of the specific event is the same as the event class of the abstract event, and the event subject of the specific event is the same as the event subject of the abstract event, it is determined that there is a belongingTo relationship between the specific event and the abstract event.
[0242] The computing device can determine whether there is a causal relationship between two events by detecting causal words. Among them, causal words include "cause", "lead to", "prompt", "result in", "trigger", etc. If two events are connected by a causal word, the computing device can determine that there is a causal (isReasonOf) relationship between these two events. For example, a description is "Due to the continuous interest rate hikes by the Federal Reserve, the unemployment rate has risen". This description includes two abstract events, "the Federal Reserve's interest rate hikes" and "the rise in the unemployment rate". Since there is a "cause" between these two abstract events, there is a causal (isReasonOf) relationship between these two abstract events. The computing device can determine whether there is a sequential relationship between two events by detecting conjunctions. Among them, conjunctions include "then", "subsequently", "after this", etc. If two events are connected by a conjunction, the computing device can determine that there is a sequential (isPreviousOf) relationship between these two events.
[0243] It should be understood that usually, multiple events included in a document are events with associated relationships. Therefore, when determining the relationship between two events, the computing device usually takes a single document as the granularity to determine the relationships between multiple events included in each document.
[0244] It should be noted that the above method for determining the relationship between two events is only used as an example and should not be construed as a specific limitation. The present application can also determine the relationship between events through other methods. For example, a trained artificial intelligence model can be used to identify specific events and abstract events. The present application does not make specific limitations.
[0245] S305. Establish an event logic graph according to the determined relationships between different events.
[0246] The above classification layer defines nodes of multiple categories. Each category of nodes includes one or more node types, and each node corresponds to a name. Such as Figure 4As shown in , each category of nodes is used to represent event classes, event actions, action amplitudes, and event indicators. Event class nodes include different node types such as economic nodes, political nodes, technology nodes, and military nodes; event action nodes include different node types such as rising nodes and falling nodes; action amplitude nodes include large amplitude nodes and medium event amplitude nodes; event indicator nodes include event indicator nodes such as price nodes, output nodes, export volume nodes, sales volume nodes, and magnitude nodes; abstract entity nodes include national nodes, city nodes, company nodes, organization nodes, character nodes, time nodes, and location nodes; specific entities include specific national nodes, specific city nodes, specific company nodes, specific region nodes, and specific character nodes, wherein specific countries, specific cities, specific companies, specific regions, and specific characters are also referred to as event arguments. An event argument corresponds to a node. For example, Shenzhen, Guangzhou, and Wuhan are all specific cities. In the event graph ontology, Shenzhen corresponds to a node, Guangzhou corresponds to a node, and Wuhan corresponds to a node. In S303, it is determined whether each event in the file to be analyzed is a specific event or an abstract event. Each specific event corresponds to a node, and each abstract event also corresponds to a node. The computing device obtains the nodes included in the event graph corresponding to the above-mentioned file to be analyzed, and the nodes included in the event graph include the nodes in the event graph body, the nodes corresponding to each specific event, and the nodes corresponding to each abstract event.
[0247] In the above S304, the computing device determines the relationship between abstract events and abstract events, the relationship between abstract events and concrete events, and the relationship between concrete events and concrete events. Therefore, the computing device can connect two abstract events with a relationship through a directed edge, connect an abstract event with a concrete event with a relationship through a directed edge, and connect two concrete events with a relationship through a directed edge.
[0248] It should be noted that both abstract events and specific events can be mapped with the nodes of the above event classification layer. For example, after the above computing device extracts multiple events from the file to be analyzed, it extracts information related to the event class of each event, that is, extracts the category information of each event, and establishes a mapping relationship with the nodes included in the event class of the above event classification layer. For example, if one of the above multiple events is "On December 3, 2023, Shenzhen held a marathon", then the category information of the event is extracted as sports, and a mapping relationship is established between the node of the event and the sports node.
[0249] In this application, Figure 1In the ontology architecture of the event graph shown, there may be a relationship between two nodes connected by directed edges. For example, the abstract event node is connected to the event class node, event action node, action amplitude node, event indicator node, and abstract entity node through directed edges. Then, a node representing an abstract event may have a relationship with a node in the event class node, a node in the event action node, a node in the action amplitude node, a node in the event indicator node, or one or more nodes in the abstract entity node. Figure 1 The specific event nodes are connected to the abstract event nodes, abstract entity nodes, and specific entity nodes through directed edges, that is, a node representing a specific event may have a relationship with a node representing an abstract event, may have a relationship with a node representing an abstract entity, and may have a relationship with a node representing a specific entity. In the present application, the computing device is capable of extracting the event elements of each event. For abstract events, the event elements such as event class, event action, action amplitude, event index, abstract entity, etc. corresponding to the abstract event are extracted to determine which nodes of the event classification layer an abstract event is related to. For specific events, event elements such as abstract entities and specific entities corresponding to the specific event are extracted to determine the abstract entities and specific entities that have a relationship with a specific event.
[0250] Exemplarily, for the abstract event "A marathon race was held in Shenzhen", by extracting the event elements corresponding to this abstract event, it is determined that this abstract event includes event class elements belonging to the sports category based on "marathon race", and includes action class elements belonging to the "held" category based on "held"; based on "Shenzhen", it is determined that this abstract event includes an abstract entity, i.e., a city. If this abstract event corresponds to a node, then it is determined that this abstract event has an event class (isEventClassOf) relationship with the "Sports Node" in the event class nodes, an event action (isEventActionOf) relationship with the "Held Node" in the event action nodes, and an event argument (isEventArgumentOf) relationship with the "City Node" in the abstract entities. Then, the "Sports Node" is connected to the node corresponding to this abstract event by a directed edge, the "Held Node" is connected to the node corresponding to this abstract event by a directed edge, and the "Shenzhen Node" is connected to the node corresponding to this abstract event by a directed edge, and the tail node of the directed edge is the node corresponding to this abstract event. For another example, for a specific event, such as "On December 3, 2023, a marathon race was held in Shenzhen", the event elements corresponding to this specific event include specific time and specific city. Therefore, this specific event can have an event argument (isEventArgumentOf) relationship with the city node and time node in the abstract entity nodes, and an event argument (isEventArgumentOf) relationship with the Shenzhen node in the specific entity nodes.
[0251] Figure 1 Among the event class nodes, the event class nodes are connected by directed edges, indicating that there may be a relationship between one event class node and another event class node. For example, if one event class node is the Sports Node and another event class node is the Track and Field Event Node, then there is a sub - event class (isSubEventClassOf) relationship between these two nodes.
[0252] In this application, when the computing device constructs the event logic graph corresponding to the file to be analyzed, the computing device assigns node IDs to each node in the event logic graph, determines which nodes in the event logic graph are related to each other and the types of relationships, and then connects the two related nodes with a directed edge and assigns the type and attributes of the directed edge. Among them, the attributes of the directed edge include the head node ID and the tail node ID. The type of the directed edge indicates the type of relationship between the head node and the tail node. The types of the directed edge include sub - event class (isSubEventClassOf), sub - action class (isSubActionOf), sub - indicator class (isSubIndicatorOf), event class (isEventClassOf), event - action (isEventActionOf), action range (isActionRangeOf), event indicator (isEventIndicatorOf), causal relationship (isReasonOf), sub - event (isSubEventOf), isA, belong - to relationship, sequential relationship (isPreviousOf), event - parameter (isEventArgumentOf) relationship, etc. For the introduction of the types of the directed edge and the types of relationships between nodes, refer to the introduction in the above embodiments and will not be elaborated here.
[0253] It should be understood that when the computing device determines which nodes in the event logic graph are related to each other and the types of relationships, in S304, the relationships between an abstract event and another abstract event, between a specific event and an abstract event, and between a specific event and another specific event are determined. The relationships between two event - class nodes, between two event - action nodes, between two event indicators, and between two abstract entities can be determined according to the event - class hierarchy in the node labels and node attributes. For example, for event - class nodes, one node is an economic node, and the event - class hierarchy in the attribute information of this economic node is 1, and another node is a trade - economic node, and the event - class hierarchy in the attribute information of this trade - economic node is 2. Then, it can be determined that the relationship between the trade - economic node and the economic - class node is a sub - event class (isSubEventClassOf) relationship.
[0254] The event logic graph also includes the relationships between specific events and specific entities and between specific entities and abstract entities. An event argument in a specific entity is an instance of an argument role in an abstract entity, which is an inherent relationship. For example, in the abstract entity, there is a company node, and in the specific entity, there is a node corresponding to Company A. Then, the relationship between the node corresponding to Company A and the company node is a belong - to relationship.
[0255] After connecting the nodes with relationships in the event logic graph corresponding to the file to be analyzed through directed edges and configuring the type and attributes of the directed edges, the event logic graph corresponding to the file to be analyzed is obtained. Exemplarily, Figure 5 is a schematic diagram of an event logic graph provided by this application. There is a specific event in the above file to be analyzed: "As of October 2023, China's export volume in the first three quarters has increased significantly". After extracting the event elements of this specific event, the event category of this specific event belongs to the trade economy event under the economic event, the event action is "increase", the action amplitude is "significantly", the event indicator is "export volume", the argument role (abstract entity) is "country", and the event argument (specific entity) is "China". And the event logic graph includes the abstract event of "import and export trade". This specific event belongs to the abstract event of import and export trade, so the event elements of the specific event can be connected to the abstract event of "import and export trade". Then, based on the above information, a event logic graph as shown in Figure 5 can be constructed.
[0256] In a possible implementation, for a specific event, the computing device can generate an event title corresponding to the specific event according to the description of the specific event, and use this event title as the node name of the specific event in the event logic graph. As shown in Figure 5 , according to the specific event "As of October 2023, China's export volume in the first three quarters has increased significantly", the event title "The export volume in the first three quarters has increased significantly" is generated.
[0257] In a possible implementation, the computing device also needs to determine the confidence level of the relationship between events, including the confidence level between two abstract events with a causal relationship, the confidence level between two abstract events with a sub-event relationship, the confidence level between two specific events with a causal relationship, and the confidence level between two specific events with a sequential relationship. Then add the confidence level to the attributes of the directed edge between the two nodes. For example, there is a causal relationship between an abstract event X and an abstract event Y, and the confidence level of the causal relationship between the abstract event X and the abstract event Y is determined to be 0.6. Then add the confidence level 0.6 to the attributes of the directed edge connecting the abstract event X and the abstract event Y.
[0258] In one possible implementation, after determining the relationship between events in S304 above, and before establishing the event graph, the computing device performs a fusion and deduplication operation on the specific events based on the event elements of each specific event. Fusion and deduplication refers to fusing different event descriptions of the same specific event in the file to be analyzed, retaining only one specific description of the specific event after fusion in the file to be analyzed, and removing other event descriptions of the event in the file to be analyzed. Among them, the time elements of a specific event include specific time, specific place, specific person, specific country, specific city, specific company, specific organization, etc. For example, for a specific event of the same news information type, different media have different event descriptions when reporting on it. For example, for the event of the Federal Reserve's interest rate hike, the event description when reported by Media A was "On September 10, 2022, the Federal Reserve Chairman announced at a press conference that interest rates would be raised by 5% starting tomorrow", and the event description when reported by Media B was "At the press conference held yesterday, Federal Reserve Chairman Charles announced an interest rate hike by 5%". After performing fusion and deduplication, the description of the Federal Reserve's interest rate hike event can be "On September 10, 2022, Federal Reserve Chairman Charles announced at a press conference that interest rates would be raised by 5% starting tomorrow".
[0259] It should be noted that the relationship between specific events and specific events, and between specific events and abstract events has been determined in the above S304. Therefore, when multiple event descriptions corresponding to the same specific event are merged into one event description, the relationship established based on these multiple event descriptions will be retained. For example, there is a belonging relationship between specific event A1 and abstract event B, and there is a causal relationship between specific event A2 and specific event C. Specific event A1 and specific event A2 are essentially the same specific event. After the description of specific event A1 and the description of specific event A2 are merged into one event description, specific event A is obtained. Then, the relationship between specific event A1 and abstract event B is converted into the relationship between specific event A and abstract event B, and the relationship between specific event A2 and specific event C is converted into the relationship between specific event A and specific event C. Among them, specific event A, specific event A1 and specific event A2 are essentially the same specific event.
[0260] In a possible implementation, after the computing device in S303 above identifies the events in the file to be analyzed and obtains the specific events and abstract events in the file to be analyzed, the computing device mines new event classes, event actions, action amplitudes, event metrics, abstract entities, specific entities, etc. in the file to be analyzed to determine new abstract events, event classes, event actions, action amplitudes, event metrics, abstract entities, and specific entities, and adds the newly determined event classes, event actions, action amplitudes, event metrics, abstract entities, and specific entities to the ontology of the event logic graph. For example, in the file to be analyzed, there is a description "Beware of the outbreak of infectious diseases this winter". After the computing device identifies that this event is an abstract event and mines the abstract event "epidemic" from this event, a new event class can be obtained based on this abstract event, for example, it can be public health, and the event action is "outbreak". Then, "public health" is added to the event classes in the ontology of the event logic graph, and "outbreak" is added to the event actions.
[0261] In a possible implementation, after the computing device in S303 above identifies the events in the file to be analyzed and obtains the specific events and abstract events in the file to be analyzed, the computing device mines the abstract events in the file to be analyzed, determines new abstract events, and extracts the event classes and event actions corresponding to the new abstract events, and adds the new abstract events, event classes, and event actions to the event logic graph. For example, in the file to be analyzed, there is a description "Beware of the outbreak of infectious diseases this winter". After the computing device identifies that this event is an abstract event and mines the abstract event "epidemic" from this event, this event can belong to the category of unexpected events in the event classes, and the event action is "outbreak". Then, "epidemic" is added to the abstract events in the event logic graph, and "outbreak" is added to the event actions.
[0262] In a possible implementation, after determining the relationships between events in S304 above and before building the event logic graph, the computing device clusters the abstract events identified in S303 and the newly mined abstract events based on the event elements of the abstract events, unifies the event descriptions of the abstract events belonging to the same category after clustering, and updates the abstract events with the unified event descriptions to the event logic graph. It should be noted that the relationships between the specific events and abstract events, and between the abstract events have been determined in S303 above. After unifying the descriptions of multiple abstract events, the relationships established based on these multiple abstract events will be retained.
[0263] It should be noted that the data in the file to be analyzed is constantly updated. After the file to be analyzed is updated, or the computing device periodically mines the data in the file to be analyzed to obtain new event classes, new event actions, new event amplitudes, new abstract events, new abstract entities, new specific events, etc., and then supplements them to the event logic graph.
[0264] In this application, by constructing the above-mentioned event logic graph, in some application scenarios, a theme event is detected based on the event logic graph. When it is detected that a newly occurred event belongs to the theme event, the impact of this newly occurred event is inferred based on the event logic graph. Among them, the event information of the theme event can be reflected by the nodes in the event logic graph. For example, the theme event is described by an event class node, an event action node, and a specific entity node (i.e., an event argument). The event argument is an entity related to the enterprise, such as a customer of the enterprise. By detecting the event class, event action, and event argument corresponding to this theme event, if a specific event occurs, and the specific event includes the event class, event action, and event argument corresponding to the above theme event, then the target abstract event corresponding to the specific event can be determined according to the event class and event action of the specific event, and other abstract events that have a causal relationship with the target abstract event are determined. Based on other target abstract events that have a causal relationship with the target abstract event, the impact that the specific event will have on the enterprise can be analyzed and predicted, and then corresponding countermeasures can be formulated according to the predicted impact.
[0265] Exemplarily, for a main event, the event class corresponding to the theme event is regional conflict in the military category, the event action is attack, and the event argument is Region B. Among them, Region B is an important customer of the enterprise and is also a part of the industrial supply chain. If it is detected that a specific event includes "armed conflict occurred in Region B today", then based on the abstract event associated with the event class and event action of this event, and based on the causal relationship, succession relationship, etc. between this abstract event and other abstract events, other impacts that this specific event will cause are predicted. For example, it is predicted that this specific event will cause traffic obstruction in Region B, products cannot be transported to Region B for sale, and raw materials cannot be transported out of Region B. Then the enterprise can formulate the production plan for the next stage according to this impact, such as reducing the product output and increasing the procurement volume from other supply chains.
[0266] Events occurring outside the enterprise often have an important impact on the production and operation of the enterprise. It is necessary to connect external events with the internal knowledge of the enterprise. Through the event logic graph provided by this application, external events related to the enterprise can be perceived, and the impact of this external event on the enterprise can be analyzed based on the event logic graph, and then corresponding countermeasures can be formulated according to this impact.
[0267] For the above method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the present invention is not limited by the described action sequence. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily essential to this application. Other reasonable step combinations that those skilled in the art can think of based on the above description also fall within the protection scope of the present invention.
[0268] As described above in conjunction with Figures 1 to 5 the method for constructing a knowledge graph provided by this application is introduced in detail. Next, in further conjunction with Figures 6 - 8 the knowledge graph construction device and computing device provided by this application are introduced respectively.
[0269] This application also provides a knowledge graph construction for implementing the functions implemented by the above computing device. As Figure 6 shown, Figure 6 is a schematic diagram of a knowledge graph construction device provided by an embodiment of this application. The knowledge graph construction device 600 includes an acquisition module 610 and a processing module 620. Among them, the knowledge graph ontology provided by this application includes nodes with different names, and the nodes with different names are used to indicate the event class to which the event belongs, the event action corresponding to the event, the action amplitude, the event index, the abstract entity included in the event, or the specific entity included in the event.
[0270] The acquisition module 610 is used to acquire the file to be analyzed; the processing module 620 extracts at least one event and the relationship between the at least one event from the file to be analyzed; then adds nodes of the at least one event to the event layer of the graph structure according to the graph structure of the predefined knowledge graph; the processing module 620 is also used to establish a mapping between the nodes of the at least one event and multiple categories defined in the classification layer of the graph structure according to the category information of each event in the at least one event retrieved; the processing module 620 is also used to establish a mapping between the at least one event according to the relationship between the at least one event. The processing module 620 extracts at least one event from the file to be analyzed. Specifically, the processing module is used to: detect an abstract event from the file to be analyzed, determine whether the abstract event already exists in the event layer, and if not, add the abstract event to the event layer; extract the event elements of the specific event from the file to be analyzed, and add specific event nodes to the event layer according to the extracted event elements of the specific event, and establish a mapping between the specific event and the abstract event.
[0271] Among them, both the acquisition module 610 and the processing module 620 can be implemented by software, or can be implemented by hardware, or implemented by a combination of software and hardware. Exemplarily, next, taking the processing module 620 as an example, the implementation manner of the processing module 620 will be introduced. Similarly, the implementation manner of the acquisition module 610 can refer to the implementation manner of the processing module 620.
[0272] As an example of a software functional unit, the processing module 620 may include code running on a computing instance. Among them, the computing instance may include at least one of a physical host (computing device), a virtual machine, and a container. Further, the above computing instance may be one or more. For example, the processing module 620 may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers for running the code may be distributed in the same region, or may be distributed in different regions. Further, the multiple hosts / virtual machines / containers for running the code may be distributed in the same availability zone (AZ), or may be distributed in different AZs, and each AZ includes one data center or multiple geographically proximate data centers. Among them, generally one region may include multiple AZs.
[0273] Similarly, the multiple hosts / virtual machines / containers for running the code may be distributed in the same virtual private cloud (VPC), or may be distributed in multiple VPCs. Among them, generally one VPC is set within one region. For cross-region communication between two VPCs within the same region and between VPCs in different regions, a communication gateway needs to be set in each VPC, and the interconnection between VPCs is realized through the communication gateway.
[0274] As an example of a hardware functional unit, the processing module 620 may include at least one processor, such as a central processing unit, etc. Alternatively, the processing module 620 may also be a device implemented using an application-specific integrated circuit (ASIC), or a programmable logic device (PLD). Among them, the above PLD may be implemented by a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0275] It should be noted that the graph construction device 600 can be used to perform the above Figure 6 Any steps implemented by the computing device in the method of constructing the event graph shown will not be repeated here.
[0276] It should be understood that Figure 6 This is only an exemplary display of one division method of the atlas construction device 600. In actual applications, the atlas construction device 600 may also have other division methods, which are not specifically limited in this application.
[0277] The present application also provides a computing device, such as Figure 7 As shown, Figure 7 700 is a schematic diagram of a computing device provided by the present application. The computing device 700 includes a bus 702, a processor 704, a memory 706, and a communication interface 708. The processor 704, the memory 706, and the communication interface 708 communicate with each other via the bus 702. The computing device 700 may be a server or a terminal device. It should be understood that the present application does not limit the number of processors and memories in the computing device 700.
[0278] The bus 702 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, a unified bus (Ubus or UB), a compute express link (CXL), a cache coherent interconnect for accelerators (CCIX), etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 The bus 702 may include a path for transmitting information between various components of the computing device 700 (eg, the memory 706, the processor 704, and the communication interface 708).
[0279] The above-mentioned processor 704 may be a Central Processing Unit (CPU), or may include a CPU and other hardware chips. There can be various types of the above-mentioned hardware chips. For example, a coprocessing unit may include any one of chips such as a graphics processing unit (GPU), a tensor processing unit (TPU), a programmable logic device (PLD), a complex programmable logic device (CPLD), a field programmable gate array (FPGA), or a digital signal processor (DSP). The computing device 700 may include one or more hardware chips of any of the above types, or may include multiple types of the above hardware chips. The present application does not make specific limitations.
[0280] The memory 706 may include volatile memory, such as random access memory (RAM). The memory 706 may also include non-volatile memory, such as read-only memory (ROM), flash memory, a hard disk drive (HDD), or a solid state drive (SSD).
[0281] The memory 706 stores executable program code, and the processor 704 executes the executable program code to implement Figure 3 the method described in the corresponding method embodiment. That is to say, the memory 706 stores program code for the method of constructing an event logic graph, so as to implement Figure 3 the event logic graph construction method shown. The program code includes one or more software modules, and the above one or more software modules include Figure 6 the acquisition module 610 and the processing module 620 in the graph construction device 600 shown, etc. The processor 704 executes the executable program code to implement Figure 3 the corresponding process of the method, which will not be elaborated here.
[0282] The communication interface 708 can be a wired interface or a wireless interface for communicating with other modules or devices. The wired interface can be an Ethernet interface, a local interconnect network (LIN), etc., and the wireless interface can be a cellular network interface or use a wireless local area network interface, etc.
[0283] This application also provides a cluster of computing devices. The cluster of computing devices includes multiple computing devices 700. The computing device can be a server, such as a central server, an edge server, a local server in a local data center, or a server in a data center of a cloud environment, etc. In some embodiments, the computing device can also be a terminal device such as a desktop computer, a laptop computer, or a smart phone, etc.
[0284] As Figure 8 shown, Figure 8 is a schematic diagram of a cluster of computing devices provided by this application. In the memory 706 of the multiple computing devices 700 in the cluster of computing devices, there can be stored the same program code for implementing Figure 3 the event logic graph method in the embodiments shown.
[0285] In some possible implementation manners, in the memory 706 of the multiple computing devices 700 in the cluster of computing devices, there can also be stored respectively partial instructions for executing the above method, that is, the memories 706 in different computing devices 700 in the cluster of computing devices can store different instructions, respectively used for executing Figure 3 partial functions of the event logic graph construction method shown, and the combination of the multiple computing devices 700 can jointly implement Figure 3 the event logic graph construction method shown.
[0286] In some possible implementation manners, the multiple computing devices 700 in the cluster of computing devices can be connected through a network. Among them, the network can be a wide area network or a local area network, etc. For example, two computing devices are connected through a network. Specifically, they are connected to the network through the communication interfaces in each computing device.
[0287] This application also provides a computer program product containing instructions. The computer program product can be software or a program product containing instructions that can run on a computing device or be stored in any available medium. When the computer program product runs on at least one computing device, it enables at least one computing device to implement Figure 3 the event logic graph construction method shown.
[0288] The present application also provides a computer-readable storage medium. The computer-readable storage medium may be any available medium that can be stored by a computing device or a data storage device such as a data center that contains one or more available media. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium, or a semiconductor medium (e.g., a solid-state hard disk). The computer-readable storage medium includes instructions that instruct the computing device to implement Figure 3 The method of constructing the causal graph is shown.
[0289] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the protection scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for constructing an event logic graph, characterized in that ; Get the file to be analyzed; Extracting at least one event and a relationship between the at least one event from the file to be analyzed; Adding a node of the at least one event in the event layer of the graph structure according to the graph structure of the predefined event graph; According to the retrieved category information of each event in the at least one event, establishing a mapping between the nodes of the at least one event and a plurality of categories defined by the classification layer of the graph structure; A mapping between the at least one event is established according to the relationship between the at least one event.
2. The method according to claim 1, characterized in that The event layer includes abstract events and specific events, and extracting at least one event from the file to be analyzed includes: Detecting an abstract event from the file to be analyzed, determining whether the abstract event already exists in the event layer, and if not, adding the abstract event to the event layer; The event elements of the specific event are extracted from the file to be analyzed, and the specific event node is added to the event layer according to the extracted event elements of the specific event, and a mapping between the specific event and the abstract event is established.
3. The method according to claim 2, characterized in that The method further comprises: Define the graph structure and the node types included in multiple categories of the classification layer of the graph structure; wherein the multiple categories of the classification layer include one or more of event class, event action, action amplitude, and event indicator; the node type included in the event class is used to indicate the type of event, the node type included in the event action is used to indicate the action included in the event, the node type included in the action amplitude is used to indicate the action amplitude of the event, and the node type included in the event indicator is used to indicate the indicator for analyzing the event.
4. The method according to claim 3, characterized in that The method further comprises: According to the event categories included in the event class defined in the graph structure, the files in the database are filtered to obtain the files to be analyzed.
5. The method according to any one of claims 2-4, characterized in that The event layer of the graph structure also includes abstract entity nodes and specific entity nodes; after extracting at least one event from the file to be analyzed, the method further includes: Determine the abstract entity node associated with the abstract event, and establish a mapping between the abstract event and the abstract entity node associated with the abstract event; Determine the specific entity nodes and abstract entity nodes associated with the specific event, establish a mapping between the specific event and the abstract entity nodes associated with the specific event, and establish a mapping between the specific event and the specific entity nodes associated with the specific event; Among them, the abstract entity nodes include time nodes, location nodes, country nodes, city nodes, organization nodes, company nodes, and character nodes; the specific entity nodes include one or more specific time nodes, one or more specific location nodes, one or more specific country nodes, one or more specific city nodes, one or more specific organization nodes, one or more specific company nodes, and one or more specific character nodes.
6. The method according to any one of claims 2-5, characterized in that After the mapping between the specific event and the abstract event is established, the method further includes: Event elements of multiple specific events are extracted, and specific event fusion is performed according to the event elements of the multiple specific events; the specific event fusion is used to merge different descriptions of the same specific event into one event description; wherein the event element of each specific event includes one or more of a specific time, a specific place, a specific country, a specific city, a specific organization, a specific company or a specific person.
7. The method according to any one of claims 1-6, characterized in that The method further comprises: Get the event element of the first event; Determine that the event elements of the first event include the event elements of the subject event, and determine the result caused by the first event based on the event graph; wherein the event elements of the subject event include the event class of the subject event and the event arguments included in the subject event.
8. An apparatus for constructing an event logic graph, characterized in that The device comprises The acquisition module is used to obtain the file to be analyzed; A processing module, used for extracting at least one event and a relationship between the at least one event from the file to be analyzed; The processing module is further used to add a node of the at least one event in the event layer of the graph structure according to the graph structure of the predefined event graph; The processing module is further used to establish a mapping between the nodes of the at least one event and the multiple categories defined by the classification layer of the graph structure according to the category information of each event in the at least one event retrieved; The processing module is further configured to establish a mapping between the at least one event according to the relationship between the at least one event.
9. The apparatus according to claim 8, characterized in that The processing module is specifically used for: Detecting an abstract event from the file to be analyzed, determining whether the abstract event already exists in the event layer, and if not, adding the abstract event to the event layer; The event elements of the specific event are extracted from the file to be analyzed, and the specific event node is added to the event layer according to the extracted event elements of the specific event, and a mapping between the specific event and the abstract event is established.
10. The device according to claim 9, wherein The processing module is also used for: Define the graph structure and the node types included in multiple categories of the classification layer of the graph structure; wherein the multiple categories of the classification layer include one or more of event class, event action, action amplitude, and event indicator; the node type included in the event class is used to indicate the type of event, the node type included in the event action is used to indicate the action included in the event, the node type included in the action amplitude is used to indicate the action amplitude of the event, and the node type included in the event indicator is used to indicate the indicator for analyzing the event.
11. The device according to claim 10, wherein The processing module is also used for: According to the event categories included in the event class defined in the graph structure, the files in the database are filtered to obtain the files to be analyzed.
12. The device according to any one of claims 9-11, wherein The processing module is also used for: Determine the abstract entity node associated with the abstract event, and establish a mapping between the abstract event and the abstract entity node associated with the abstract event; Determine the specific entity nodes and abstract entity nodes associated with the specific event, establish a mapping between the specific event and the abstract entity nodes associated with the specific event, and establish a mapping between the specific event and the specific entity nodes associated with the specific event; Among them, the abstract entity nodes include time nodes, location nodes, country nodes, city nodes, organization nodes, company nodes, and person nodes; the specific entity nodes include one or more specific time nodes, one or more specific location nodes, one or more specific country nodes, one or more specific city nodes, one or more specific organization nodes, one or more specific company nodes, and one or more specific person nodes.
13. The device according to any one of claims 9-12, wherein The processing module is further configured to: extract the event elements of multiple specific events, and perform specific event fusion according to the event elements of the multiple specific events; the specific event fusion is used to fuse different descriptions of the same specific event into one event description; among them, the event elements of each specific event include one or more of specific time, specific location, specific country, specific city, specific organization, specific company, or specific person.
14. The device according to any one of claims 8-13, wherein The obtaining module is further configured to obtain the event elements of the first event. The processing module is further configured to: Determine that the event elements of the first event include the event elements of the theme event, and determine the result caused by the first event according to the event logic graph; among them, the event elements of the theme event include the event type of the theme event and the event arguments included in the theme event.
15. A computing device, wherein It includes a processor and a memory. Among them, instructions are stored in the memory, and the processor executes the instructions to implement the method according to any one of claims 1 to 7.
16. A computing cluster, wherein It includes multiple computing devices, the computing devices include a processor and a memory, and the processor executes the instructions to implement the method according to any one of claims 1 to 7.
17. A computer-readable storage medium, wherein It includes instructions that, when executed by a computing device, can implement the method according to any one of claims 1 to 7.