Method, device and related equipment for constructing causal reasoning graph

By acquiring and parsing financial market text, separating short-term and long-term events, and constructing a cause-and-effect graph, it solves the problem of insufficient event differentiation in existing technologies and improves the accuracy of graph construction and the ability to judge financial market changes.

CN113590824BActive Publication Date: 2024-09-10PING AN TECH (SHENZHEN) CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202110875362.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-30
Publication Date
2024-09-10
Estimated Expiration
2041-07-30

AI Technical Summary

Technical Problem

When constructing a financial market event graph, the existing technology fails to effectively differentiate between short-term events and long-term events, resulting in poor accuracy in constructing the event graph.

Method used

By acquiring and parsing the target text, we separate the short-term event text set and the long-term event text set, determine the event relationship, preprocess the causal event pairs, construct the causal event graph, use dependency syntax analysis and semantic similarity calculation to distinguish short-term and long-term events, and generate accurate Cause and effect diagram.

Benefits of technology

It improves the accuracy of constructing causality maps, avoids the shortcomings of researchers relying on experience to distinguish short-term and long-term events, and enhances the ability to judge changes in financial markets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113590824B
    Figure CN113590824B
Patent Text Reader

Abstract

The present application relates to data processing technology, and provides a method, device, computer equipment and storage medium for constructing a causal event map, including: obtaining a target text pre-stored in a database; parsing the target text to obtain a short-term event text set and a long-term event text set; determining the event relationship between the short-term event text set and the long-term event text set to obtain an initial causal event pair; pre-processing the initial causal event pair to obtain a target causal event pair; and constructing a causal event map based on the target causal event pair. The present application can improve the accuracy of the construction of a causal event map, and can be used in various functional modules of a smart city to promote the rapid development of a smart city.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a method, device, computer equipment and medium for constructing a causal graph. Background Art

[0002] The financial system is one of the important pillars of modern economic development. With the rapid development of networking and informatization, social events, national policies and information from all aspects spread rapidly, and these events often have a very important impact on changes in the financial market. At present, event tracking is mainly achieved by building event maps, thereby assisting researchers in judging changes in the financial market.

[0003] In the process of realizing this application, the inventor found that the prior art has the following technical problems: the prior art does not distinguish between short-term events and long-term events in the process of extracting relevant events in the financial market, and the degree of influence of short-term events and long-term events on a certain result is different. If researchers distinguish between short-term events and long-term events in the event map based on their own experience, the accuracy of the event map construction will be poor.

[0004] Therefore, it is necessary to provide a method for constructing a causal graph that can improve the accuracy of the causal graph construction. Summary of the invention

[0005] In view of the above content, it is necessary to propose a method for constructing a causal graph, a device for constructing a causal graph, a computer device and a medium, which can improve the accuracy of the construction of the causal graph.

[0006] The first aspect of the embodiment of the present application provides a method for constructing a causal relationship graph, and the method for constructing a causal relationship graph includes:

[0007] Obtaining the target text pre-stored in the database;

[0008] Parsing the target text to obtain a short-term event text set and a long-term event text set;

[0009] Determine the event relationship between the short-term event text set and the long-term event text set to obtain an initial causal event pair;

[0010] Preprocessing the initial causal event pair to obtain a target causal event pair;

[0011] A causal event graph is constructed based on the target causal event pair.

[0012] Furthermore, in the method for constructing the causal reasoning graph provided in the embodiment of the present application, the step of obtaining the target text pre-stored in the database includes:

[0013] Obtaining the initial text pre-stored in the database;

[0014] Process the initial text by sentence division to obtain a sentence division result;

[0015] Using a joint word segmentation and part-of-speech tagging model constructed by integrating external knowledge to perform word segmentation processing and part-of-speech tagging on the sentence processing result, to obtain a word segmentation result with part-of-speech tagging;

[0016] Performing syntactic analysis on the word segmentation result based on a dependency syntactic analysis method to obtain grammatical components and dependency relationships between the grammatical components;

[0017] The word segmentation results are stored in a preset data format according to the dependency relationship to obtain a target text.

[0018] Furthermore, in the method for constructing the causal event graph provided in the embodiment of the present application, the parsing of the target text to obtain the short-term event text set and the long-term event text set includes:

[0019] Parsing the target text to obtain a cause event and a result event corresponding to the cause event;

[0020] Obtaining a set of several cause events corresponding to each of the result events;

[0021] Calling a pre-trained impact duration calculation model to process the plurality of cause event sets to obtain the impact duration of each cause event in the plurality of cause event sets;

[0022] The first cause event and the corresponding result event whose impact duration does not exceed the preset duration threshold are selected as the short-term event text set, and the second cause event and the corresponding result event whose impact duration exceeds the preset duration threshold are selected as the long-term event text set.

[0023] Furthermore, in the method for constructing the causal event graph provided in the embodiment of the present application, the parsing of the target text to obtain the cause event and the result event corresponding to the cause event includes:

[0024] Parsing the target text to obtain event trigger words in the target text;

[0025] Obtaining a sentence containing the event trigger word as a target causal sentence;

[0026] Determine the cause sentence and the result sentence in the target causal sentence according to the event trigger word;

[0027] Event extraction is performed on the cause sentence and the result sentence respectively to obtain a cause event and a result event corresponding to the cause event.

[0028] Furthermore, in the method for constructing the causal event graph provided in the embodiment of the present application, determining the event relationship between the short-term event text set and the long-term event text set to obtain the initial causal event pair includes:

[0029] Acquire a first result event set in the short-term event text set and a second result event set in the long-term event text set;

[0030] matching the first result event set with the second result event set;

[0031] Selecting a target result event set that is the same as the first result event set and the second result event set, and obtaining a first cause event set and a second cause event set corresponding to the target result event set;

[0032] The first cause event set, the second cause event set and the target result event set are combined according to a predetermined data format to obtain an initial cause-effect event pair.

[0033] Furthermore, in the method for constructing the causal event graph provided in the embodiment of the present application, the preprocessing of the initial causal event pair to obtain the target causal event pair includes:

[0034] Obtaining target element information in the initial causal event pair;

[0035] Detecting whether the target element information conforms to a preset element form;

[0036] When the detection result is that the target element information does not conform to the preset element form, correcting the target element information to conform to the preset element form;

[0037] Vectorizing the initial causal event pairs, and calculating the similarity between any two causal event pairs in the initial causal event pairs;

[0038] Detecting whether the similarity between any two causal event pairs in the initial causal event pairs exceeds a preset similarity threshold;

[0039] When the detection result shows that the similarity between any two causal event pairs in the initial causal event pairs exceeds a preset similarity threshold, one of the causal event pairs is deleted to obtain a target causal event pair.

[0040] Furthermore, in the method for constructing the causal event graph provided in the embodiment of the present application, constructing the causal event graph according to the target causal event pair includes:

[0041] Setting an event node according to the events included in the target causal event;

[0042] Obtaining correlation relationships between events in the target causal event pair;

[0043] Determining a transition probability according to the occurrence probability of an event in the target causal event pair;

[0044] The edges between the event nodes are determined according to the association relationship and the transition probability, and a causal graph is generated.

[0045] The second aspect of the embodiment of the present application further provides a device for constructing a causal relationship graph, the device for constructing a causal relationship graph comprising:

[0046] A text acquisition module is used to acquire the target text pre-stored in the database;

[0047] A text parsing module, used for parsing the target text to obtain a short-term event text set and a long-term event text set;

[0048] A relationship determination module, used to determine the relationship between the events in the short-term event text set and the long-term event text set to obtain an initial causal event pair;

[0049] An event pair acquisition module, used for preprocessing the initial causal event pair to obtain a target causal event pair;

[0050] A graph construction module is used to construct a causal event graph based on the target causal event pair.

[0051] A third aspect of an embodiment of the present application further provides a computer device, the computer device comprising a processor, the processor being used to implement a method for constructing a causal graph as described in any one of the above items when executing a computer program stored in a memory.

[0052] The fourth aspect of the embodiments of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method for constructing a causal graph described in any one of the above items is implemented.

[0053] The construction method of the above-mentioned causal reason map provided by the embodiment of the present application, the construction device of the causal reason map, the computer equipment and the computer-readable storage medium, divide the generation of a result into the common driving of random events in the short term and major events in the long term, obtain the short-term event text set and the long-term event text set by parsing the target financial text, and determine the causal event pair according to the short-term event text set and the long-term event text set, and then construct the causal reason map, which can avoid distinguishing short-term events from long-term events through the researcher's own experience, and improve the accuracy of the construction of the causal reason map; In addition, the present application obtains the target causal event pair by pre-processing the initial causal event pair, and constructs the causal reason map according to the target causal event pair, which can avoid the influence of incomplete event pairs or repeated event pairs on the causal reason map, and improves the accuracy of the construction of the causal reason map. The present application can be applied to various functional modules of smart cities such as smart government affairs and smart transportation, such as the construction module of the causal reason map of smart government affairs or smart transportation, which can promote the rapid development of smart cities. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Figure 1 It is a flow chart of the method for constructing a causal relationship diagram provided in Example 1 of the present application.

[0055] Figure 2 It is a structural diagram of the device for constructing a cause-effect graph provided in Example 2 of the present application.

[0056] Figure 3 It is a structural diagram of the computer device provided in Example 3 of the present application.

[0057] The following specific implementation methods will further illustrate the present application in conjunction with the above-mentioned drawings. DETAILED DESCRIPTION

[0058] In order to more clearly understand the above-mentioned purposes, features and advantages of the present application, the present application is described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.

[0059] In the following description, many specific details are set forth to facilitate a full understanding of the present application. The embodiments described are part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present application.

[0060] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application.

[0061] The method for constructing a causal graph provided by an embodiment of the present invention is executed by a computer device, and accordingly, the device for constructing a causal graph runs in the computer device.

[0062] Figure 1 This is a flow chart of the method for constructing a causal relationship graph according to the first embodiment of the present application. Figure 1 As shown, the method for constructing the causal relationship diagram may include the following steps. According to different requirements, the order of the steps in the flowchart can be changed, and some can be omitted.

[0063] S11, obtaining a target text pre-stored in a database.

[0064] In at least one embodiment of the present application, the target text may be a descriptive statement containing a preset logical relationship, for example, the target text may be a descriptive statement containing a causal relationship between events. In one embodiment, the target text may be a financial text, which refers to an explanatory document related to a financial professional field (for example, financial fields such as finance, securities, industry, exchanges, etc.), for example, the financial text may be a prospectus of a listed company, an annual report of a listed company, other announcements of a listed company, a research report of a securities company, a research report of a securities industry, and financial news, etc. In other embodiments, the target text may also be a news text, which refers to an explanatory document related to the news field, for example, the news text may be a report on the relevant impact of a disaster, etc., which is not limited here. The target text is pre-stored in a database, and considering the privacy and confidentiality of the data, the database may be a target node in a blockchain.

[0065] The target text refers to the text data after the initial text is processed by natural language processing technology, and a training sentence group is composed of several target texts. The number of training sentence groups finally extracted can be determined by the system personnel according to the data accuracy requirements of the application scenario. For example, 10,000 training sentence groups can be extracted for model training, and another 2,000 training sentence groups can be extracted for model testing.

[0066] Optionally, the acquiring of the target text pre-stored in the database includes:

[0067] Obtaining the initial text pre-stored in the database;

[0068] Process the initial text by sentence division to obtain a sentence division result;

[0069] Using a joint word segmentation and part-of-speech tagging model constructed by integrating external knowledge to perform word segmentation processing and part-of-speech tagging on the sentence processing result, to obtain a word segmentation result with part-of-speech tagging;

[0070] Performing syntactic analysis on the word segmentation result based on a dependency syntactic analysis method to obtain grammatical components and dependency relationships between the grammatical components;

[0071] The word segmentation results are stored in a preset data format according to the dependency relationship to obtain a target text.

[0072] Wherein, when performing sentence processing, the initial text is sentence processed with punctuation marks based on the Jieba library, and the punctuation marks include commas, semicolons, periods, exclamation marks and / or question marks. Dependency syntactic analysis identifies the grammatical components of "subject, predicate, object", "attributive, adverbial, complement" in the sentence, and analyzes the dependency relationship between the components. Generally, a syntactic analysis tool is used to sentence a text, and segmentation (Segmentor), part-of-speech tagging (Postagger), and syntactic analysis (Parser) are performed in turn to obtain the target text. In one embodiment, the target text can be a phrase of a verb-object relationship, such as an event representing a change in yield, for example: "US soybean production increased by xx million tons to xx million tons"). In addition, the target text may also include time attributes (such as past, present, future, etc. time intervals).

[0073] S12, parsing the target text to obtain a short-term event text set and a long-term event text set.

[0074] In at least one embodiment of the present application, the generation of a result may be completed by a random event in the short term, or by a major event in the long term, or may be driven by both a random event in the short term and a major event in the long term. Taking the financial professional field as an example, the price of bulk commodities (futures or spot) is generally accompanied by small fluctuations caused by random events in the short term and large fluctuations driven by major events in the long term. These events include the release of macroeconomic policies, changes in supply, changes in demand, changes in inventory, etc. For example, with the development climax of artificial intelligence and "my country has listed artificial intelligence as a national development strategy", the stock prices of artificial intelligence companies such as iFlytek have ushered in a surge. For another example, mining "grain production reduction" from the target text leads to "increase in agricultural product prices", which in turn leads to "inflation", and then leads to "stock market decline" and other long-distance event dependencies.

[0075] In one embodiment, the target text is a descriptive statement containing the causal relationship of events, and the target text may contain short-term events, long-term events, or a combination of short-term events and long-term events. Among them, the "short-term" and "long-term" mentioned in this application refer to the division according to a pre-selected appropriate time scale (or time interval), and the time scale can be in units of days, weeks, months, etc. Exemplarily, the short-term events may include but are not limited to food production reduction, inventory changes, Chilean earthquakes, etc., and the long-term events may include but are not limited to the release of macroeconomic policies, etc.

[0076] In one embodiment, the short-term event and the long-term event can be determined by calculating the duration of the impact of historical events recorded in the target text on the financial market (for example, commodity prices). For events where the duration of the impact of historical events on commodity prices exceeds a preset duration threshold, the event is determined to be a long-term event; for events where the duration of the impact of historical events on commodity prices does not exceed the preset duration threshold, the event is determined to be a short-term event. The preset duration threshold is a pre-set time value, for example, the preset duration threshold is 1 month. Optionally, the calculation of the duration of the impact of historical events recorded in the target text on the market can be performed by training an impact duration calculation model, which can be a deep learning network model. The model training method is a prior art and will not be described in detail here.

[0077] Optionally, parsing the target text to obtain a short-term event text set and a long-term event text set includes:

[0078] Parsing the target text to obtain a cause event and a result event corresponding to the cause event;

[0079] Obtaining a set of several cause events corresponding to each of the result events;

[0080] Calling a pre-trained impact duration calculation model to process the plurality of cause event sets to obtain the impact duration of each cause event in the plurality of cause event sets;

[0081] The first cause event and the corresponding result event whose impact duration does not exceed the preset duration threshold are selected as the short-term event text set, and the second cause event and the corresponding result event whose impact duration exceeds the preset duration threshold are selected as the long-term event text set.

[0082] Among them, the short-term event text set includes several first cause events whose impact duration does not exceed the preset duration threshold and first result events corresponding to the first cause events, and the long-term event text set includes several second cause events whose impact duration exceeds the preset duration threshold and second result events corresponding to the second cause events.

[0083] In one embodiment, the cause event and the result event corresponding to the cause event can be determined by determining an event trigger word (Trigger, for example, "cause", "trigger", "bring", etc.), the event trigger word is a core word indicating the occurrence of an event, used to identify the event type, and the event trigger word is mostly a verb. For example, when the target text is a news text, by parsing the news text, it is obtained that the theme of the news text is "Chilean Earthquake", and it can be known that "Chilean Earthquake" is the cause event. By traversing the news text, several event trigger words "trigger" and "lead to" are obtained. For example, "Chilean Earthquake" triggers a panic in the copper market supply, resulting in a short-term shortage of copper in the market, and a rise in copper prices. From the event trigger words "trigger" and "lead to", it can be seen that "copper market supply panic", "short-term shortage of copper in the market" and "rise in copper prices" are all result events corresponding to the cause event "Chilean Earthquake".

[0084] Optionally, parsing the target text to obtain a cause event and a result event corresponding to the cause event includes:

[0085] Parsing the target text to obtain event trigger words in the target text;

[0086] Obtaining a sentence containing the event trigger word as a target causal sentence;

[0087] Determine the cause sentence and the result sentence in the target causal sentence according to the event trigger word;

[0088] Event extraction is performed on the cause sentence and the result sentence respectively to obtain a cause event and a result event corresponding to the cause event.

[0089] The target text may contain multiple event trigger words. By extracting the sentences containing the event trigger words in the target text, a target causal sentence can be obtained. The target causal sentence also includes a sentence of a cause event, an event trigger word, and a result event. The number of the target causal sentences contained in the target text may be one or more, which is not limited here.

[0090] S13, determining the event relationship between the short-term event text set and the long-term event text set to obtain an initial causal event pair.

[0091] In at least one embodiment of the present application, for several events with causal relationships, they can be stored in the form of event pairs, and the data format of the event pairs is, for example: (long-term losses, resulting in stock ST), (major shareholder reduction, triggering, stock short selling), etc. The initial causal event pair includes the short-term event text set, the long-term event text set, or a combination of the short-term event text set and the long-term event text set. The short-term event text set and the long-term event text set can be distinguished by adding a preset mark, and the preset mark can be a color mark, a letter mark, or a digital mark, etc., which is not limited here. Since short-term events and long-term events have different degrees of influence on the results (for example, the time limit of the influence on the results), the present application can distinguish short-term events from long-term events when constructing a causal event map by adding preset marks to the long-term event text set and the short-term event text set in the initial causal event pair to distinguish them, thereby more accurately assisting researchers in forming judgments on the future trends of major asset classes.

[0092] Optionally, determining the event relationship between the short-term event text set and the long-term event text set to obtain an initial causal event pair includes:

[0093] Acquire a first result event set in the short-term event text set and a second result event set in the long-term event text set;

[0094] matching the first result event set with the second result event set;

[0095] Selecting a target result event set that is the same as the first result event set and the second result event set, and obtaining a first cause event set and a second cause event set corresponding to the target result event set;

[0096] The first cause event set, the second cause event set and the target result event set are combined according to a predetermined data format to obtain an initial cause-effect event pair.

[0097] The short-term event text set includes a first result event set and a first cause event set, and the long-term event text set includes a second result event set and a second cause event set, and the first result event set and the second result event set can be the same. By selecting the same target result event set in the first result event set and the second result event set, and obtaining the first cause event set and the second cause event set corresponding to the target result event set, a short-term cause event and a long-term cause event corresponding to a result event can be obtained, and the short-term cause event, the long-term cause event and the result event can form an initial causal event pair.

[0098] S14, preprocessing the initial causal event pair to obtain a target causal event pair.

[0099] In at least one embodiment of the present application, due to the uniqueness of the target text expression, the extracted events may have incomplete and non-standardized information on elements such as time and place, but the performance of temporal relationship and spatial relationship extraction is closely related to the quality of these two elements. Therefore, the contextual event time or news report time existing in the structured event is used to supplement and correct the time of the event, and uniformly convert it into a form such as "20200303". At the same time, the cpca module in Python is used as external knowledge to correct spatial information, such as different place name information such as provinces, cities, and districts. In addition, since different descriptions of the same event will result in a large number of co-referencing events in the text, and will cause redundancy or conflict in the event graph, semantic similarity calculation is used to align the events.

[0100] In one embodiment, word2vec training word vectors are used to represent event elements as text space vectors, and similarity calculations are simplified to vector calculations in vector space, and the semantic similarity of two events is measured by the angle cosine distance of the vectors. For example, if a1i=(x11,x12,…,x1n), a2i=(x21,x22,…,x2n) represent event elements of event event1 and event event2 respectively, the cosine similarity calculation and normalization of the event elements are as follows:

[0101] In the process of describing an event, the key event elements that indicate the occurrence of an event cannot be empty after filtering and completion. Therefore, in the process of calculating the similarity between event 1 and event 2, only the event elements that are not empty between the two events are selected to measure the semantic similarity between the two events. The calculation is as follows:

[0102] The closer the similarity between events is to 1, the higher the similarity between the two events, and the more likely the two events are co-referencing events. Therefore, if the semantic similarity of the events is greater than the set threshold μ, the two events are considered to be co-referencing, and the events with fewer event elements are filtered out.

[0103] Optionally, the preprocessing the initial causal event pair to obtain a target causal event pair includes:

[0104] Obtaining target element information in the initial causal event pair;

[0105] Detecting whether the target element information conforms to a preset element form;

[0106] When the detection result is that the target element information does not conform to the preset element form, correcting the target element information to conform to the preset element form;

[0107] Vectorizing the initial causal event pairs, and calculating the similarity between any two causal event pairs in the initial causal event pairs;

[0108] Detecting whether the similarity between any two causal event pairs in the initial causal event pairs exceeds a preset similarity threshold;

[0109] When the detection result shows that the similarity between any two causal event pairs in the initial causal event pairs exceeds a preset similarity threshold, one of the causal event pairs is deleted to obtain a target causal event pair.

[0110] The target element information may include a time element and a location element, and the preset element form refers to a preset data format for storing the target element information preset by the system personnel. Preset marks are added to distinguish the long-term events and short-term events in the causal relationship, which can distinguish short-term events from long-term events when constructing a causal relationship map, thereby more accurately assisting researchers in forming judgments on the future trends of major asset classes.

[0111] S15, constructing a causal event graph based on the target causal event pair.

[0112] In at least one embodiment of the present application, in terms of graph structure, the causal event graph is a directed cyclic graph, in which nodes represent events and directed edges represent the evolutionary relationship between events. The causal event graph can reflect the complexity of the evolutionary laws of events in the real world. In essence, the causal event graph is a logical knowledge base of events, which describes the evolutionary laws and patterns between events and improves the logic and integrity of the presented information.

[0113] The causal relationship diagram refers to a relationship diagram between events with a causal relationship. A causal relationship refers to the relationship between two events where the occurrence of a prior event (cause) leads to the occurrence of a subsequent event (result).

[0114] In one embodiment, the causal event graph is updated at a preset time interval to ensure that the knowledge in the event graph is as up-to-date as possible. The preset time interval is a time value preset by the system personnel. The update of the data source is the basis for knowledge update. On the one hand, the data on the financial website is regularly synchronized by web crawlers or direct downloads. On the other hand, the popular events related to the target text on social media websites and the popular words of major search engines are used as candidate events.

[0115] Optionally, constructing a causal event graph according to the target causal event pair includes:

[0116] Setting an event node according to the events included in the target causal event;

[0117] Obtaining correlation relationships between events in the target causal event pair;

[0118] Determining a transition probability according to the occurrence probability of an event in the target causal event pair;

[0119] The edges between the event nodes are determined according to the association relationship and the transition probability, and a causal graph is generated. Among them, the transition probability between event A and event B is calculated, and the probability of event A occurring in the target causal event pair is Pa = (the number of times event A occurs / the total number of events), and the probability of event A and event B occurring in the target causal event pair is Pab = (the number of times event A and event B occur at the same time / the total number of events), then the transition probability between event A and event B is Pab / Pa. That is, the transition probability between event A and event B is (the number of times event A and event B occur at the same time / the number of times event A occurs). The edges in the causal graph thus formed represent the probability of the occurrence of the subsequent event B after the previous event A occurs. In addition, the causal graph also contains preset marks to distinguish long-term events from short-term events, which more accurately assists researchers in forming judgments on the future trends of major asset classes.

[0120] For example, when an event A is acquired for a certain enterprise, the probability of a risk event (such as delisting, debt default, bankruptcy liquidation, etc.) occurring after event A occurs in the enterprise is calculated based on the causal reasoning map. If the calculated probability of a risk event is greater than the risk threshold, a risk event warning is issued.

[0121] The construction method of the above-mentioned causal reason map provided by the embodiment of the present application divides the generation of a result into being driven by random events in the short term and major events in the long term, obtains a short-term event text set and a long-term event text set by parsing the target financial text, and determines the causal event pair according to the short-term event text set and the long-term event text set, and then constructs a causal reason map, which can avoid distinguishing short-term events from long-term events through the researcher's own experience, and improves the accuracy of the construction of the causal reason map; In addition, the present application obtains the target causal event pair by pre-processing the initial causal event pair, and constructs the causal reason map according to the target causal event pair, which can avoid the influence of incomplete event pairs or repeated event pairs on the causal reason map, and improves the accuracy of the construction of the causal reason map. The present application can be applied to various functional modules of smart cities such as smart government affairs and smart transportation, such as the construction module of the causal reason map of smart government affairs, which can promote the rapid development of smart cities.

[0122] Figure 2 It is a structural diagram of the device for constructing a cause-effect graph provided in Example 2 of the present application.

[0123] In some embodiments, the causal graph construction device 20 may include multiple functional modules composed of computer program segments. The computer programs of each program segment in the causal graph construction device 20 may be stored in the memory of a computer device and executed by at least one processor to perform (see Figure 1 Description) Functionality for wheelchair rental processing.

[0124] In this embodiment, the causal graph construction device 20 can be divided into multiple functional modules according to the functions it performs. The functional modules may include: a text acquisition module 201, a text parsing module 202, a relationship determination module 203, an event pair acquisition module 204, and a graph construction module 205. The module referred to in this application refers to a series of computer program segments that can be executed by at least one processor and can complete fixed functions, which are stored in a memory. In this embodiment, the functions of each module will be described in detail in subsequent embodiments.

[0125] The text acquisition module 201 is used to acquire the target text pre-stored in the database.

[0126] In at least one embodiment of the present application, the target text may be a descriptive statement containing a preset logical relationship, for example, the target text may be a descriptive statement containing a causal relationship between events. In one embodiment, the target text may be a financial text, which refers to an explanatory document related to a financial professional field (for example, financial fields such as finance, securities, industry, exchanges, etc.), for example, the financial text may be a prospectus of a listed company, an annual report of a listed company, other announcements of a listed company, a research report of a securities company, a research report of a securities industry, and financial news, etc. In other embodiments, the target text may also be a news text, which refers to an explanatory document related to the news field, for example, the news text may be a report on the relevant impact of a disaster, etc., which is not limited here. The financial text is pre-stored in a database, and considering the privacy and confidentiality of the data, the database may be a target node in the blockchain.

[0127] The target text refers to the text data after the initial text is processed by natural language processing technology, and a training sentence group is composed of several target texts. The number of training sentence groups finally extracted can be determined by the system personnel according to the data accuracy requirements of the application scenario. For example, 10,000 training sentence groups can be extracted for model training, and another 2,000 training sentence groups can be extracted for model testing.

[0128] Optionally, the acquiring of the target text pre-stored in the database includes:

[0129] Obtaining the initial text pre-stored in the database;

[0130] Process the initial text by sentence division to obtain a sentence division result;

[0131] Using a joint word segmentation and part-of-speech tagging model constructed by integrating external knowledge to perform word segmentation processing and part-of-speech tagging on the sentence processing result, to obtain a word segmentation result with part-of-speech tagging;

[0132] Performing syntactic analysis on the word segmentation result based on a dependency syntactic analysis method to obtain grammatical components and dependency relationships between the grammatical components;

[0133] The word segmentation results are stored in a preset data format according to the dependency relationship to obtain a target text.

[0134] Wherein, when performing sentence processing, the initial text is sentence processed with punctuation marks based on the Jieba library, and the punctuation marks include commas, semicolons, periods, exclamation marks and / or question marks. Dependency syntactic analysis identifies the grammatical components of "subject, predicate, object", "attributive, adverbial, complement" in the sentence, and analyzes the dependency relationship between the components. Generally, a syntactic analysis tool is used to sentence a text, and segmentation (Segmentor), part-of-speech tagging (Postagger), and syntactic analysis (Parser) are performed in turn to obtain the target text. In one embodiment, the target text can be a phrase of a verb-object relationship, such as an event representing a change in yield, for example: "US soybean production increased by xx million tons to xx million tons"). In addition, the target text may also include time attributes (such as past, present, future, etc. time intervals).

[0135] The text parsing module 202 is used to parse the target text to obtain a short-term event text set and a long-term event text set.

[0136] In at least one embodiment of the present application, the generation of a result may be completed by a random event in the short term, or by a major event in the long term, or may be driven by both a random event in the short term and a major event in the long term. Taking the financial professional field as an example, the price of bulk commodities (futures or spot) is generally accompanied by small fluctuations caused by random events in the short term and large fluctuations driven by major events in the long term. These events include the release of macroeconomic policies, changes in supply, changes in demand, changes in inventory, etc. For example, with the development climax of artificial intelligence and "my country has listed artificial intelligence as a national development strategy", the stock prices of artificial intelligence companies such as iFlytek have ushered in a surge. For another example, mining "grain production reduction" from the target text leads to "increase in agricultural product prices", which in turn leads to "inflation", and then leads to "stock market decline" and other long-distance event dependencies.

[0137] In one embodiment, the target text is a descriptive statement containing the causal relationship of events, and the target text may contain short-term events, long-term events, or a combination of short-term events and long-term events. Among them, the "short-term" and "long-term" mentioned in this application refer to the division according to a pre-selected appropriate time scale (or time interval), and the time scale can be in units of days, weeks, months, etc. Exemplarily, the short-term events may include but are not limited to food production reduction, inventory changes, Chilean earthquakes, etc., and the long-term events may include but are not limited to the release of macroeconomic policies, etc.

[0138] In one embodiment, the short-term event and the long-term event can be determined by calculating the duration of the impact of historical events recorded in the target text on the financial market (for example, commodity prices). For events where the duration of the impact of historical events on commodity prices exceeds a preset duration threshold, the event is determined to be a long-term event; for events where the duration of the impact of historical events on commodity prices does not exceed the preset duration threshold, the event is determined to be a short-term event. The preset duration threshold is a pre-set time value, for example, the preset duration threshold is 1 month. Optionally, the calculation of the duration of the impact of historical events recorded in the target text on the market can be performed by training an impact duration calculation model, which can be a deep learning network model. The model training method is a prior art and will not be described in detail here.

[0139] Optionally, parsing the target text to obtain a short-term event text set and a long-term event text set includes:

[0140] Parsing the target text to obtain a cause event and a result event corresponding to the cause event;

[0141] Obtaining a set of several cause events corresponding to each of the result events;

[0142] Calling a pre-trained impact duration calculation model to process the plurality of cause event sets to obtain the impact duration of each cause event in the plurality of cause event sets;

[0143] The first cause event and the corresponding result event whose impact duration does not exceed the preset duration threshold are selected as the short-term event text set, and the second cause event and the corresponding result event whose impact duration exceeds the preset duration threshold are selected as the long-term event text set.

[0144] Among them, the short-term event text set includes several first cause events whose impact duration does not exceed the preset duration threshold and first result events corresponding to the first cause events, and the long-term event text set includes several second cause events whose impact duration exceeds the preset duration threshold and second result events corresponding to the second cause events.

[0145] In one embodiment, the cause event and the result event corresponding to the cause event can be determined by determining an event trigger word (Trigger, for example, "lead to", "trigger", "bring about", etc.). The event trigger word is a core word indicating the occurrence of an event and is used to identify the event type. The event trigger word is mostly a verb.

[0146] For example, when the target text is a news text, by parsing the news text, it is found that the theme of the news text is "Chilean Earthquake", and it can be known that "Chilean Earthquake" is a cause event. By traversing the news text, several event trigger words "trigger" and "cause" are obtained. For example, the "Chilean Earthquake" triggered a panic in the copper market supply, resulting in a short-term shortage of copper in the market, and a rise in copper prices. From the event trigger words "trigger" and "cause", it can be seen that "copper market supply panic", "short-term shortage of copper in the market" and "rise in copper prices" are all result events corresponding to the cause event "Chilean Earthquake".

[0147] Optionally, parsing the target text to obtain a cause event and a result event corresponding to the cause event includes:

[0148] Parsing the target text to obtain event trigger words in the target text;

[0149] Obtaining a sentence containing the event trigger word as a target causal sentence;

[0150] Determine the cause sentence and the result sentence in the target causal sentence according to the event trigger word;

[0151] Event extraction is performed on the cause sentence and the result sentence respectively to obtain a cause event and a result event corresponding to the cause event.

[0152] The target text may contain multiple event trigger words. By extracting the sentences containing the event trigger words in the target text, a target causal sentence can be obtained. The target causal sentence also includes a sentence of a cause event, an event trigger word, and a result event. The number of the target causal sentences contained in the target text may be one or more, which is not limited here.

[0153] The relationship determination module 203 is used to determine the relationship between the events in the short-term event text set and the long-term event text set to obtain an initial causal event pair.

[0154] In at least one embodiment of the present application, for several events with causal relationships, they can be stored in the form of event pairs, and the data format of the event pairs is, for example: (long-term losses, resulting in stock ST), (major shareholder reduction, triggering, stock short selling), etc. The initial causal event pair includes the short-term event text set, the long-term event text set, or a combination of the short-term event text set and the long-term event text set. The short-term event text set and the long-term event text set can be distinguished by adding a preset mark, and the preset mark can be a color mark, a letter mark, or a digital mark, etc., which is not limited here. Since short-term events and long-term events have different degrees of influence on the results (for example, the time limit of the influence on the results), the present application can distinguish short-term events from long-term events when constructing a causal event map by adding preset marks to the long-term event text set and the short-term event text set in the initial causal event pair to distinguish them, thereby more accurately assisting researchers in forming judgments on the future trends of major asset classes.

[0155] Optionally, determining the event relationship between the short-term event text set and the long-term event text set to obtain an initial causal event pair includes:

[0156] Acquire a first result event set in the short-term event text set and a second result event set in the long-term event text set;

[0157] matching the first result event set with the second result event set;

[0158] Selecting a target result event set that is the same as the first result event set and the second result event set, and obtaining a first cause event set and a second cause event set corresponding to the target result event set;

[0159] The first cause event set, the second cause event set and the target result event set are combined according to a predetermined data format to obtain an initial cause-effect event pair.

[0160] The short-term event text set includes a first result event set and a first cause event set, and the long-term event text set includes a second result event set and a second cause event set, and the first result event set and the second result event set can be the same. By selecting the same target result event set in the first result event set and the second result event set, and obtaining the first cause event set and the second cause event set corresponding to the target result event set, a short-term cause event and a long-term cause event corresponding to a result event can be obtained, and the short-term cause event, the long-term cause event and the result event can form an initial causal event pair.

[0161] The event pair acquisition module 204 is used to pre-process the initial causal event pair to obtain a target causal event pair.

[0162] In at least one embodiment of the present application, due to the uniqueness of the target text expression, the extracted events may have incomplete and non-standardized information on elements such as time and place, but the performance of temporal relationship and spatial relationship extraction is closely related to the quality of these two elements. Therefore, the contextual event time or news report time existing in the structured event is used to supplement and correct the time of the event, and uniformly convert it into a form such as "20200303". At the same time, the cpca module in Python is used as external knowledge to correct spatial information, such as different place name information such as provinces, cities, and districts. In addition, since different descriptions of the same event will result in a large number of co-referencing events in the text, and will cause redundancy or conflict in the event graph, semantic similarity calculation is used to align the events.

[0163] In one embodiment, word2vec training word vectors are used to represent event elements as text space vectors, and similarity calculations are simplified to vector calculations in vector space, and the semantic similarity of two events is measured by the angle cosine distance of the vectors. For example, if a1i=(x11,x12,…,x1n), a2i=(x21,x22,…,x2n) represent event elements of event event1 and event event2 respectively, the cosine similarity calculation and normalization of the event elements are as follows:

[0164] In the process of describing an event, the key event elements that indicate the occurrence of an event cannot be empty after filtering and completion. Therefore, in the process of calculating the similarity between event 1 and event 2, only the event elements that are not empty between the two events are selected to measure the semantic similarity between the two events. The calculation is as follows:

[0165] The closer the similarity between events is to 1, the higher the similarity between the two events, and the more likely the two events are co-referencing events. Therefore, if the semantic similarity of the events is greater than the set threshold μ, the two events are considered to be co-referencing, and the events with fewer event elements are filtered out.

[0166] Optionally, the preprocessing the initial causal event pair to obtain a target causal event pair includes:

[0167] Obtaining target element information in the initial causal event pair;

[0168] Detecting whether the target element information conforms to a preset element form;

[0169] When the detection result is that the target element information does not conform to the preset element form, correcting the target element information to conform to the preset element form;

[0170] Vectorizing the initial causal event pairs, and calculating the similarity between any two causal event pairs in the initial causal event pairs;

[0171] Detecting whether the similarity between any two causal event pairs in the initial causal event pairs exceeds a preset similarity threshold;

[0172] When the detection result shows that the similarity between any two causal event pairs in the initial causal event pairs exceeds a preset similarity threshold, one of the causal event pairs is deleted to obtain a target causal event pair.

[0173] The target element information may include a time element and a location element, and the preset element form refers to a preset data format for storing the target element information preset by the system personnel. Preset marks are added to distinguish the long-term events and short-term events in the causal relationship, which can distinguish short-term events from long-term events when constructing a causal relationship map, thereby more accurately assisting researchers in forming judgments on the future trends of major asset classes.

[0174] The graph construction module 205 is used to construct a causal event graph according to the target causal event pair.

[0175] In at least one embodiment of the present application, in terms of graph structure, the causal event graph is a directed cyclic graph, in which nodes represent events and directed edges represent the evolutionary relationship between events. The causal event graph can reflect the complexity of the evolutionary laws of events in the real world. In essence, the causal event graph is a logical knowledge base of events, which describes the evolutionary laws and patterns between events and improves the logic and integrity of the presented information.

[0176] The causal relationship diagram refers to a relationship diagram between events with a causal relationship. A causal relationship refers to the relationship between two events where the occurrence of a prior event (cause) leads to the occurrence of a subsequent event (result).

[0177] In one embodiment, the causal event graph is updated at a preset time interval to ensure that the knowledge in the event graph is as up-to-date as possible. The preset time interval is a time value preset by the system personnel. The update of the data source is the basis for knowledge update. On the one hand, the data on the financial website is regularly synchronized by web crawlers or direct downloads. On the other hand, the popular events related to the target text on social media websites and the popular words of major search engines are used as candidate events.

[0178] Optionally, constructing a causal event graph according to the target causal event pair includes:

[0179] Setting an event node according to the events included in the target causal event;

[0180] Obtaining correlation relationships between events in the target causal event pair;

[0181] Determining a transition probability according to the occurrence probability of an event in the target causal event pair;

[0182] The edges between the event nodes are determined according to the association relationship and the transition probability, and a causal graph is generated. Among them, the transition probability between event A and event B is calculated, and the probability of event A occurring in the target causal event pair is Pa = (the number of times event A occurs / the total number of events), and the probability of event A and event B occurring in the target causal event pair is Pab = (the number of times event A and event B occur at the same time / the total number of events), then the transition probability between event A and event B is Pab / Pa. That is, the transition probability between event A and event B is (the number of times event A and event B occur at the same time / the number of times event A occurs). The edges in the causal graph thus formed represent the probability of the occurrence of the subsequent event B after the previous event A occurs. In addition, the causal graph also contains preset marks to distinguish long-term events from short-term events, which more accurately assists researchers in forming judgments on the future trends of major asset classes.

[0183] For example, when an event A is acquired for a certain enterprise, the probability of a risk event (such as delisting, debt default, bankruptcy liquidation, etc.) occurring after event A occurs in the enterprise is calculated based on the causal reasoning map. If the calculated probability of a risk event is greater than the risk threshold, a risk event warning is issued.

[0184] See also Figure 3 FIG. 2 is a schematic diagram of the structure of a computer device provided in Embodiment 3 of the present application. In a preferred embodiment of the present application, the computer device 3 includes a memory 31 , at least one processor 32 , at least one communication bus 33 and a transceiver 34 .

[0185] Those skilled in the art should understand that Figure 3 The structure of the computer device shown does not constitute a limitation of the embodiments of the present application, and may be either a bus structure or a star structure. The computer device 3 may also include more or less other hardware or software than shown in the figure, or a different arrangement of components.

[0186] In some embodiments, the computer device 3 is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application-specific integrated circuits, programmable gate arrays, digital processors, and embedded devices. The computer device 3 may also include client devices, which include but are not limited to any electronic product that can interact with the client through a keyboard, mouse, remote control, touchpad, or voice control device, such as a personal computer, tablet computer, smart phone, digital camera, etc.

[0187] It should be noted that the computer device 3 is only an example, and other existing or future electronic products that are suitable for the present application should also be included in the protection scope of the present application and included here by reference.

[0188] In some embodiments, the memory 31 stores a computer program, and when the computer program is executed by the at least one processor 32, all or part of the steps in the method for constructing the causal event map as described above are implemented. The memory 31 includes a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.

[0189] Furthermore, the computer-readable storage medium may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of the blockchain node, etc.

[0190] The blockchain referred to in this application is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.

[0191] In some embodiments, the at least one processor 32 is the control core (Control Unit) of the computer device 3, and uses various interfaces and lines to connect the various components of the entire computer device 3, and executes various functions and processes data of the computer device 3 by running or executing the program or module stored in the memory 31, and calling the data stored in the memory 31. For example, when the at least one processor 32 executes the computer program stored in the memory, it implements all or part of the steps of the method for constructing the causal reason map described in the embodiment of the present application; or implements all or part of the functions of the device for constructing the causal reason map. The at least one processor 32 can be composed of an integrated circuit, for example, it can be composed of a single packaged integrated circuit, or it can be composed of multiple integrated circuits with the same function or different functions, including one or more central processing units (CPU), microprocessors, digital processing chips, graphics processors, and various control chips.

[0192] In some embodiments, the at least one communication bus 33 is configured to implement connection and communication between the memory 31 and the at least one processor 32, etc.

[0193] Although not shown, the computer device 3 may also include a power source (such as a battery) for supplying power to each component. Preferably, the power source may be logically connected to the at least one processor 32 through a power management device, so that the power management device can manage charging, discharging, and power consumption management. The power source may also include one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The computer device 3 may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.

[0194] The above-mentioned integrated unit implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a computer device, or a network device, etc.) or a processor to execute part of the method described in each embodiment of the present application.

[0195] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.

[0196] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, and may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0197] In addition, each functional module in each embodiment of the present application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of hardware plus software functional modules.

[0198] It is obvious to those skilled in the art that the present application is not limited to the details of the above exemplary embodiments, and that the present application can be implemented in other specific forms without departing from the spirit or basic features of the present application. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-restrictive, and the scope of the present application is limited by the attached claims rather than the above description, so it is intended to include all changes that fall within the meaning and scope of the equivalent elements of the claims in the present application. Any figure mark in the claims should not be regarded as limiting the claims involved. In addition, it is obvious that the word "including" does not exclude other units or, and the singular does not exclude the plural. Multiple units or devices stated in the specification can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.

[0199] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present application and are not intended to limit it. Although the present application has been described in detail with reference to the preferred embodiments, a person of ordinary skill in the art should understand that the technical solution of the present application may be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present application.

Claims

1. A method for constructing a causal reasoning graph, characterized in that: The method for constructing the causal relationship graph includes: Obtaining the target text pre-stored in the database; Parsing the target text to obtain a short-term event text set and a long-term event text set; Determine the event relationship between the short-term event text set and the long-term event text set to obtain an initial causal event pair, including: obtaining a first result event set in the short-term event text set and a second result event set in the long-term event text set; matching the first result event set with the second result event set; selecting the same target result event set in the first result event set and the second result event set, and obtaining a first cause event set and a second cause event set corresponding to the target result event set; combining the first cause event set, the second cause event set and the target result event set according to a predetermined data format to obtain an initial causal event pair; Preprocessing the initial causal event pair to obtain a target causal event pair, including: obtaining target element information in the initial causal event pair; detecting whether the target element information conforms to a preset element form; when the detection result is that the target element information does not conform to the preset element form, correcting the target element information to conform to the preset element form; vectorizing the initial causal event pair and calculating the similarity of any two causal event pairs in the initial causal event pair; detecting whether the similarity of any two causal event pairs in the initial causal event pair exceeds a preset similarity threshold; when the detection result is that the similarity of any two causal event pairs in the initial causal event pair exceeds a preset similarity threshold, deleting one of the causal event pairs to obtain a target causal event pair; A causal graph is constructed according to the target causal event pair, including: setting event nodes according to events included in the target causal event; obtaining the correlation between events in the target causal event pair; determining the transition probability according to the occurrence probability of events in the target causal event pair; determining the edges between the event nodes according to the correlation and the transition probability, and generating a causal graph.

2. The method for constructing a causal relationship diagram according to claim 1, characterized in that: The obtaining of the target text pre-stored in the database comprises: Obtaining the initial text pre-stored in the database; Process the initial text by sentence division to obtain a sentence division result; Using a joint word segmentation and part-of-speech tagging model constructed by integrating external knowledge to perform word segmentation processing and part-of-speech tagging on the sentence processing result, to obtain a word segmentation result with part-of-speech tagging; Performing syntactic analysis on the word segmentation result based on a dependency syntactic analysis method to obtain grammatical components and dependency relationships between the grammatical components; The word segmentation results are stored in a preset data format according to the dependency relationship to obtain a target text.

3. The method for constructing a causal relationship diagram according to claim 1, characterized in that: The parsing of the target text to obtain a short-term event text set and a long-term event text set includes: Parsing the target text to obtain a cause event and a result event corresponding to the cause event; Obtaining a set of several cause events corresponding to each of the result events; Calling a pre-trained impact duration calculation model to process the plurality of cause event sets to obtain the impact duration of each cause event in the plurality of cause event sets; The first cause event and the corresponding result event whose impact duration does not exceed the preset duration threshold are selected as the short-term event text set, and the second cause event and the corresponding result event whose impact duration exceeds the preset duration threshold are selected as the long-term event text set.

4. The method for constructing a causal relationship diagram according to claim 2, characterized in that: The parsing of the target text to obtain a cause event and a result event corresponding to the cause event includes: Parsing the target text to obtain event trigger words in the target text; Obtaining a sentence containing the event trigger word as a target causal sentence; Determine the cause sentence and the result sentence in the target causal sentence according to the event trigger word; Event extraction is performed on the cause sentence and the result sentence respectively to obtain a cause event and a result event corresponding to the cause event.

5. A device for constructing a causal relationship graph, used to execute the method for constructing a causal relationship graph as claimed in any one of claims 1 to 4, characterized in that: The device for constructing the causal relationship graph includes: A text acquisition module is used to acquire the target text pre-stored in the database; A text parsing module, used for parsing the target text to obtain a short-term event text set and a long-term event text set; The relationship determination module is used to determine the event relationship between the short-term event text set and the long-term event text set to obtain an initial causal event pair, including: obtaining a first result event set in the short-term event text set and a second result event set in the long-term event text set; matching the first result event set with the second result event set; selecting a target result event set that is the same as the first result event set and the second result event set, and obtaining a first cause event set and a second cause event set corresponding to the target result event set; combining the first cause event set, the second cause event set and the target result event set according to a predetermined data format to obtain an initial causal event pair; An event pair acquisition module, used for preprocessing the initial causal event pair to obtain a target causal event pair; A graph construction module is used to construct a causal event graph based on the target causal event pair.

6. A computer device, characterized in that: The computer device includes a processor, and the processor is used to implement the method for constructing a causal graph as described in any one of claims 1 to 4 when executing a computer program stored in a memory.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, it implements the method for constructing a causal graph as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Causal event map construction method, system and device and storage medium

    CN109726293A

  • Event relationship graph construction method and device

    CN110377759A

  • Emotion reason mining method based on dependency syntax and generalized causal network

    CN110781369A

  • Cause and effect reason map construction method based on integration of multiple neural networks

    CN111767408A

  • Cause-and-effect graph construction method based on hydrological events

    CN112559656A