Event prediction processing method, device, equipment and storage medium
By constructing event characteristics in the financial field and using causal relationships to identify event evolution directions, it solves the problem of insufficient time information when determining the evolutionary relationship between financial events, improves the accuracy of transition probabilities and event predictions, and helps enterprises reduce risks.
Patent Information
- Application Number
- CN202011461534.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-07
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2040-12-07
AI Technical Summary
When the existing technology determines the evolutionary relationship between financial events in the financial field, due to the lack of complete time information and time inaccuracy, the accuracy of the transition probability is not high, which in turn affects the accuracy of event prediction.
By extracting event pairs from the target text collection, the features of the event pairs are constructed, such as frequency features, proportion features, and context features, and pre-trained classifiers are used to identify the evolution direction between events based on causal relationships and determine the direction of the target event to other events. transition probability to predict events.
It improves the accuracy of the transfer probability between financial events, enhances the accuracy of event prediction, can more accurately characterize the transfer probability of events to other events, reduces risks in the business process, and assists decision-making.
Smart Images

Figure CN112465262B
Abstract
Description
Technical Field
[0001] The present application relates to the field of information mining technology, and in particular to an event prediction processing method, device, equipment and storage medium. Background Art
[0002] With the rapid development of networking and informatization, the evolutionary relationship between events in time and space is a very valuable knowledge. For example, in the financial field, the transition probability between financial events is the most concerned by the banking, securities, and venture capital industries, which can reduce the risks that may exist in the business process of enterprises and help enterprises make decisions.
[0003] At present, the evolutionary relationship between financial events is mainly mined based on time and through the sequential relationship between time. Among them, the sequential relationship mainly includes two situations: one is that after the predecessor event a ends, the subsequent event b occurs immediately; the other is that after the predecessor event a ends, the subsequent event b will occur after a period of time. There is a transition probability between 0 and 1 between the two consecutive events, which indicates the confidence of evolving from one event to the next event according to the temporal sequential relationship.
[0004] However, texts in the financial field sometimes do not contain the complete time of occurrence of each financial event, or when the text in the financial field includes multiple financial events, the time of occurrence of each financial event may be inaccurate, which will make the evolutionary relationship between financial events inaccurate, and further lead to low accuracy of the transition probability between financial events determined based on the evolutionary relationship between financial events. Summary of the invention
[0005] The purpose of this application is to provide an event prediction processing method, device, equipment and storage medium to address the deficiencies in the above-mentioned prior art, which can improve the accuracy of the transition probability between financial events determined based on the evolutionary relationship between financial events, thereby improving the accuracy of event prediction.
[0006] To achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows:
[0007] In a first aspect, an embodiment of the present application provides an event prediction processing method, the method comprising:
[0008] Extracting an event pair set from a target text set, wherein the event pair set includes at least one event pair, and each event pair includes two events;
[0009] Constructing features of each of the event pairs, wherein the features include at least one of the following: a frequency feature of the event pair, a ratio feature constructed based on the frequency feature of the event pair, and a context feature of the event;
[0010] Inputting the features of each event pair into a pre-trained classifier, and the classifier identifying the evolution direction between the events based on the causal relationship between the events;
[0011] Determine, according to the evolution direction between the events, a transition probability of a target event to an event other than the target event in the event set, wherein the target event is an event in any event pair in the event set;
[0012] Event prediction is performed based on the transition probability.
[0013] Optionally, the classifier includes: a first sub-classifier and a second sub-classifier;
[0014] Inputting the features of each event pair into a pre-trained classifier, and allowing the classifier to identify the evolution direction between events based on the causal relationship between the events, includes:
[0015] Inputting the features of each event pair into the first sub-classifier, and having the first sub-classifier output association information of each event pair, wherein the association information is used to indicate the association probability of two events in the event pair;
[0016] The features of at least one candidate event pair whose association probability is greater than a preset threshold are input into the second sub-classifier, and the second sub-classifier identifies the evolution direction between the two events in each candidate event pair based on the causal relationship between the two events in each candidate event pair.
[0017] Optionally, the feature of at least one candidate event pair with an association probability greater than a preset threshold is input into the second sub-classifier, and the second sub-classifier identifies the evolution direction between the two events in each candidate event pair based on the causal relationship between the two events in each candidate event pair, including: the feature of at least one candidate event pair with an association probability greater than a preset threshold is input into the second sub-classifier, and the second sub-classifier obtains the causal relationship between the two events in each candidate event pair based on a pre-built causal relationship extraction template, and identifies the evolution direction between the two events in each candidate event pair based on the causal relationship between the two events in each candidate event pair.
[0018] Optionally, determining the transition probability of the target event to an event other than the target event in the event set according to the evolution direction between the events includes:
[0019] According to the evolution direction between the two events in each of the candidate event pairs, a transition probability of the target event to an event other than the target event in the event set is determined.
[0020] Optionally, determining the transition probability of the target event to an event other than the target event in the event set according to the evolution direction between the two events in each of the candidate event pairs includes:
[0021] Filter out at least one screening event pair from the candidate event pairs, which includes the target event and the target event is a cause event in the evolution direction;
[0022] respectively determining the number of occurrences of each of the screening event pairs;
[0023] According to the number of occurrences of each of the screening event pairs, a transition probability of the target event to an event other than the target event in the event set is obtained.
[0024] Optionally, constructing the features of each event pair includes:
[0025] Constructing frequency features of each event pair according to the occurrence frequencies and co-occurrence frequencies of the two events in the event pair;
[0026] constructing the proportion feature according to the frequency feature;
[0027] The context features of the event are constructed according to the features of the keywords in the text corresponding to the event.
[0028] Optionally, performing event prediction according to the transition probability includes:
[0029] According to the transition probability, an event occurring after the target event is predicted.
[0030] In a second aspect, an embodiment of the present application further provides an event prediction processing device, the device comprising:
[0031] An extraction module, used for extracting an event pair set from a target text set, wherein the event pair set includes at least event pairs, and each event pair includes two events;
[0032] A construction module, used to construct features of each of the event pairs, wherein the features include at least one of the following: a frequency feature of the event pair, a proportion feature constructed based on the frequency feature of the event pair, and a context feature of the event;
[0033] An identification module, used for inputting the features of each event pair into a pre-trained classifier, and the classifier identifies the evolution direction between the events based on the causal relationship between the events;
[0034] A determination module, used to determine the transition probability of a target event to an event other than the target event in the event set according to the evolution direction between the events, wherein the target event is an event in any event pair in the event set;
[0035] A prediction module is used to predict events according to the transition probability.
[0036] Optionally, the classifier includes: a first sub-classifier and a second sub-classifier;
[0037] Correspondingly, the identification module is also used to input the features of each of the event pairs into the first sub-classifier, and the first sub-classifier outputs the association information of each of the event pairs, and the association information is used to indicate the association probability of the two events in the event pair; input the features of at least one candidate event pair whose association probability is greater than a preset threshold into the second sub-classifier, and the second sub-classifier identifies the evolution direction between the two events in each of the candidate event pairs based on the causal relationship between the two events in each of the candidate event pairs.
[0038] Optionally, the identification module is also specifically used to input the features of at least one candidate event pair whose association probability is greater than a preset threshold into the second sub-classifier, and the second sub-classifier obtains the causal relationship between the two events in each candidate event pair based on a pre-built causal relationship extraction template, and based on the causal relationship between the two events in each candidate event pair, identifies the evolution direction between the two events in each candidate event pair.
[0039] Optionally, the determination module is specifically configured to determine a transition probability of the target event transitioning to an event other than the target event in the event set according to an evolution direction between two events in each of the candidate event pairs.
[0040] Optionally, the determination module is further specifically used to filter out at least one filtered event pair from the candidate event pairs, which includes the target event and the target event is a cause event in the evolution direction; determine the number of occurrences of each of the filtered event pairs respectively; and obtain the transition probability of the target event to an event other than the target event in the event set based on the number of occurrences of each of the filtered event pairs.
[0041] Optionally, the construction module is specifically used to construct the frequency features of each event pair based on the occurrence frequency and co-occurrence frequency of the two events in the event pair; construct the proportion feature based on the frequency feature; and construct the context feature of the event based on the features of the keywords in the text corresponding to the event.
[0042] Optionally, the prediction module is specifically configured to predict an event occurring after the target event based on the transition probability.
[0043] In a third aspect, an embodiment of the present application provides an event prediction processing device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor. When the event prediction processing device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of the event prediction processing method of the first aspect above.
[0044] In a fourth aspect, an embodiment of the present application provides a storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the event prediction processing method of the first aspect are executed.
[0045] The beneficial effects of this application are:
[0046] The embodiment of the present application provides an event prediction processing method, device, equipment and storage medium, the method comprising: extracting an event pair set from a target text set, the event pair set including at least one event pair, each event pair including two events; constructing the features of each event pair, wherein the features include at least one of the following: the frequency feature of the event pair, the proportion feature constructed according to the frequency feature of the event pair, and the context feature of the event; inputting the features of each event pair into a pre-trained classifier, and the classifier identifies the evolution direction between the events based on the causal relationship between the events; according to the evolution direction between the events, determining the transition probability of the target event to an event other than the target event in the event set, wherein the target event is an event in any event pair in the event set; and performing event prediction according to the transition probability. Using the event prediction processing method provided by the embodiment of the present application, the evolution direction between the events can be identified based on the causal relationship between the events by constructing the features of each event pair and the pre-trained classifier, and then the transition probability of the target event to an event other than the target event in the event set can be determined according to the evolution direction between the events, and the degree to which the target event evolves to other events in the event set can be predicted according to the transition probability. Compared with the method in the prior art of mining the evolutionary relationship between events according to the sequential relationship between time, this embodiment mines the evolutionary relationship between events according to the causal relationship between events, which can more accurately characterize the probability of an event transitioning to other events, thereby improving the accuracy of the probability of a target event transitioning to other events, and further improving the accuracy of event prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0048] Figure 1 A schematic diagram of a flow chart of an event prediction processing method provided in an embodiment of the present application;
[0049] Figure 2 A flowchart of another event prediction processing method provided in an embodiment of the present application;
[0050] Figure 3 A flowchart of another event prediction processing method provided in an embodiment of the present application;
[0051] Figure 4 A flowchart of another event prediction processing method provided in an embodiment of the present application;
[0052] Figure 5 A schematic diagram of the structure of an event prediction processing device provided in an embodiment of the present application;
[0053] Figure 6 A schematic diagram of the structure of an event prediction processing device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0054] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments.
[0055] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present application. 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.
[0056] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0057] Before explaining the embodiments of the present application in detail, the application scenario of the present application is first introduced. The application scenario can be specifically an event prediction and processing scenario in the financial field, or an event prediction and processing scenario in the medical field or an event prediction and processing scenario in other fields, which is not limited by the present application. Here, the event prediction and processing scenario in the financial field is used as an example for explanation. Other fields are similar. A large number of financial historical texts can be downloaded from the Internet to obtain financial historical events contained in the financial historical texts. After obtaining a large number of financial historical events, a variety of features corresponding to financial historical events can be obtained through natural language processing technology, and the correlation between financial historical events can be analyzed by combining different features and pre-trained classifiers, and the evolution direction between financial historical events can be analyzed by using the causal relationship, a directional event relationship identification method, to obtain the evolution relationship between financial historical events. Finally, the transition probability of the target financial event evolving to other financial events can be obtained according to the evolution relationship between financial historical events, and then the evolution closeness of the target financial event and other financial events can be predicted according to the transition probability. In other words, the evolution patterns between historical financial events can be explored through event characteristics and causal relationships, and risk forecasts can be provided for companies such as the banking, securities, and venture capital industries. This can greatly reduce possible risks in the business operations of companies and help companies make correct decisions.
[0058] The event prediction processing method mentioned in this application is illustrated as follows with reference to the accompanying drawings. Figure 1 The following is a flow chart of an event prediction processing method provided in an embodiment of the present application. Figure 1 As shown, the method may include:
[0059] S101. Extract an event pair set from a target text set.
[0060] Among them, the event pair set includes at least one event pair, and each event pair includes two events. A large amount of literature texts can be obtained from relevant websites according to the field involved in the event, and / or a large amount of news texts related to the field can be obtained from the Internet, and the literature texts and / or news texts can be directly used as the target text set. It is also possible to screen the large amount of literature texts and / or news texts obtained according to actual needs, eliminate the texts that do not meet the preset requirements, and use the texts that meet the preset requirements as the target text set. It should be noted that the present application does not limit the method of obtaining the target text, nor does it limit the number of target texts contained in the target text set.
[0061] All events contained in the target text set can be extracted according to natural language processing technology, and the types corresponding to the events can be counted, or events matching the preset event types can be extracted from the target text set according to the preset event types, which is not limited in this application. The extracted events can be combined according to the event types to obtain an event pair set.
[0062] For example, in the financial field, 18 pre-set categories of financial events can be extracted from the target text set consisting of 2.8 million Internet financial news texts, and a total of 38,000 financial events can be extracted. Based on these 18 categories of financial events, a set of event pairs is obtained.
[0063] S102: Construct features of each event pair.
[0064] The feature includes at least one of the following: a frequency feature of an event pair, a ratio feature constructed based on the frequency feature of the event pair, and a context feature of the event. The feature of an event pair may include the features of each event included in the event pair and the common features of the event pair. Specifically, the frequency feature of the event pair may include the number of times each event included in the event pair appears in the target text set, the number of times the two events appear together in the same target text in the target text set, the number of times the trigger words that trigger the two events appear in the target text set, and the number of times the trigger words of the two events appear together in the same target text in the target text set. The trigger words may include "trigger, lead to, bring about", etc.
[0065] The proportion feature of each event pair is a feature related to the frequency feature and is a supplement to the frequency feature. The context feature of the event may include a context feature consisting of keywords with a frequency greater than a preset frequency (such as 5 times) after removing basic information such as company names and stop words from the target text. It should be noted that this application does not limit the feature types corresponding to each event pair.
[0066] S103: Input the features of each event pair into a pre-trained classifier, and the classifier identifies the evolution direction between the events based on the causal relationship between the events.
[0067] The initial classifier can be trained according to the training samples constructed by experts, and the classifier can be trained when the training conditions are met, wherein the training samples may include features and labels corresponding to multiple event pair samples, and the label can characterize the causal relationship between the two events included in the event pair.
[0068] For example, the feature matrix corresponding to the event pair (A, B) can be input into a trained classifier, and the classifier can identify the cause event and the effect event in the event pair (A, B) based on the causal relationship between the events. When event A is identified as the cause event and event B is the effect event, the evolution direction of the event pair (A, B) is that event A can evolve into event B, that is, event A can cause event B to occur.
[0069] S104. Determine the transition probability of the target event to an event other than the target event in the event set according to the evolution direction between the events.
[0070] S105: Predict an event based on the transition probability.
[0071] The target event is an event in any event pair in the event set. The evolution direction of each event pair can be identified by a trained classifier, and the event pair with the target event can be selected, and the event set of the target event as the cause event can be counted. The event set can include the first event and other second events. The transition probability of the target event to an event other than the target event in the event set can be determined based on the number of event pairs when the target event evolves to the first event and the number of event pairs when the target event evolves to other second events.
[0072] The transition probabilities of the target events corresponding to other second events as the first event transferring to the first event can be statistically calculated, and the transition probabilities corresponding to the first event can be sorted from large to small. The larger the transition probability corresponding to the first event, the easier it is for the target event to evolve into the first event, that is, the greater the probability that the target event will cause the first event to occur.
[0073] In summary, in the event prediction processing method provided by the present application, an event pair set is extracted from a target text set, the event pair set includes at least one event pair, and each event pair includes two events; the features of each event pair are constructed, wherein the features include at least one of the following: the frequency feature of the event pair, the proportion feature constructed according to the frequency feature of the event pair, and the context feature of the event; the features of each event pair are input into a pre-trained classifier, and the classifier identifies the evolution direction between events based on the causal relationship between events; according to the evolution direction between events, the transition probability of the target event to an event other than the target event in the event set is determined, wherein the target event is an event in any event pair in the event set; and event prediction is performed according to the transition probability. Using the event prediction processing method provided by the embodiment of the present application, the evolution direction between events can be identified based on the causal relationship between events by constructing the features of each event pair and the pre-trained classifier, and then the transition probability of the target event to an event other than the target event in the event set can be determined according to the evolution direction between events, and the degree to which the target event evolves to other events in the event set can be predicted according to the transition probability. Compared with the method in the prior art of mining the evolutionary relationship between events according to the sequential relationship between time, this embodiment mines the evolutionary relationship between events according to the causal relationship between events, which can more accurately characterize the probability of an event transitioning to other events, thereby improving the accuracy of the probability of a target event transitioning to other events, and further improving the accuracy of event prediction.
[0074] Optionally, the above-mentioned event prediction based on the transition probability includes: predicting an event occurring after the target event based on the transition probability.
[0075] The transition probabilities of the target event to multiple preset other events can be sorted in descending order, and other events corresponding to the sorting position within the preset interval (such as the top 5) are extracted. These other events can be considered as events that occur after the target event.
[0076] Figure 2 A flow chart of another event prediction processing method provided in an embodiment of the present application. Figure 2 As shown, optionally, the classifier includes: a first sub-classifier and a second sub-classifier; the above-mentioned inputting the features of each event pair into the pre-trained classifier, and the classifier identifying the evolution direction between the events based on the causal relationship between the events, may include:
[0077] S201: Input the features of each event pair into a first sub-classifier, and have the first sub-classifier output association information of each event pair.
[0078] The association information is used to indicate the association probability of the two events in the event pair. The initial first sub-classifier can be trained in advance according to the first training sample constructed by the expert, and the first sub-classifier can be trained after the training stop condition is met, wherein the first training sample can include features and labels corresponding to multiple event pair samples, and the label can characterize the association relationship between the two events included in the event pair, which is 1 if there is an association and 0 if there is no association.
[0079] The feature vector matrix composed of each event pair can be input into the first sub-classifier respectively, and the first sub-classifier can output the association probability corresponding to each event pair, wherein the larger the association probability is, the stronger the association between the corresponding event pairs is, and the smaller the association probability is, the weaker the association between the event pairs is.
[0080] S202, inputting the features of at least one candidate event pair whose association probability is greater than a preset threshold into a second sub-classifier, and the second sub-classifier identifying the evolution direction between the two events in each candidate event pair based on the causal relationship between the two events in each candidate event pair.
[0081] According to the association probability corresponding to each event pair output by the first subclassifier and the preset threshold, a candidate event set can be selected from the event pair set, and the candidate event set includes at least one candidate event pair. The initial second subclassifier can be trained according to the second training sample pre-constructed by the expert, and the second subclassifier can be trained after the training stop condition is met, wherein the second training sample can include features and labels corresponding to multiple event pair samples, and the label can characterize the causal relationship between the two events included in the event pair, and the positive causal relationship is represented by 1, and the negative causal relationship is represented by 0.
[0082] The feature vector matrix corresponding to each candidate event pair in the candidate event set can be input into the second sub-classifier, and the second sub-classifier can output the causal relationship corresponding to each candidate event pair, and the causal relationship represents the evolution direction between the two events in each candidate event pair.
[0083] It can be seen that whether there is a correlation between events in an event pair is judged based on the characteristics of the event pair. Based on the combination of characteristics, the correlation characteristics between events can be judged more accurately. After obtaining event pairs with correlation characteristics, the causal relationship, a directional event relationship, can be used to identify the evolution direction between events in the event pair with correlation characteristics. This can improve the recognition accuracy of the evolution direction between events in the event pair, and then improve the event prediction accuracy obtained by calculating the transition probability between events based on the evolution direction, which can reduce the risks that may exist in the business operation process of the enterprise and assist enterprise decision-making.
[0084] Optionally, the features of at least one candidate event pair with an association probability greater than a preset threshold are input into a second sub-classifier, and the second sub-classifier obtains the causal relationship between the two events in each candidate event pair based on a pre-constructed causal relationship extraction template, and identifies the evolution direction between the two events in each candidate event pair based on the causal relationship between the two events in each candidate event pair.
[0085] Among them, a causal relationship feature seed word library can be pre-built, and the causal relationship feature seed word library can be expanded based on experience. A causal relationship extraction template is built based on the causal relationship feature seed word library, and the causal relationship extraction template can include features corresponding to event pairs with causal relationships. The second sub-classifier can perform positive matching and negative matching on the event features of each input candidate event pair based on the causal relationship extraction template, and finally determine the evolution direction between the two events of each candidate event according to the matching results.
[0086] Optionally, based on the evolution direction between events, determining the transition probability of the target event to an event other than the target event in the event set, includes: based on the evolution direction between two events in each pair of candidate events, determining the transition probability of the target event to an event other than the target event in the event set.
[0087] A candidate event pair with a target event pair is selected from each candidate event pair, and an event set with the target event as the cause event is counted. The event set may include a first event and other second events. The transition probability of the target event to an event other than the target event in the event set can be determined according to the number of event pairs when the target event evolves to the first event and the number of event pairs when the target event evolves to other second events.
[0088] Figure 3 A flowchart of another event prediction processing method provided in an embodiment of the present application is shown below. Figure 3 As shown, optionally, according to the evolution direction between two events in each candidate event pair, determining the transition probability of the target event to an event other than the target event in the event set may include:
[0089] S301. Filter out at least one screening event pair from each candidate event pair, which includes the target event and the target event is a cause event in the evolution direction.
[0090] S302: Determine the number of occurrences of each screening event pair.
[0091] S303: Obtain, according to the number of occurrences of each screening event pair, a transition probability of the target event to an event other than the target event in the event set.
[0092] The events included in each candidate event pair include cause events and effect events. The candidate event pairs with the target event as the cause event can be screened out to form a set of screened event pairs. All effect events are determined from each screened event pair in the set of screened event pairs, and the cause event (equivalent to the target event) and all effect events form an event set E. The number of occurrences of each effect event can be counted based on the set of screened event pairs. According to the number of occurrences of each effect event (equivalent to the number of occurrences of each screened event pair) and the total number of screened event pairs in the set of screened event pairs, the transition probability of the target event to an event other than the target event in the event set E can be determined respectively. Then, based on the transition probability, the most likely event to occur after the target event can be predicted, wherein the larger the transition probability corresponding to a certain effect event, the more likely the event to occur after the target event is the effect event.
[0093] For example, the event set E includes the target event A and other result events O. j , other fruit events O j The result event B is included in the result event, and the transition probability of the target event A to the result event B can be solved by the following formula:
[0094]
[0095] Among them, N(E|A→B) represents the number of times the target event A belongs to the event set E when the target event A transfers to the result event B. For target event A to other result events O j The total number of times event A belongs to event set E at the time of transition.
[0096] Figure 4 The following is a flow chart of another event prediction processing method provided in the embodiment of the present application. Figure 4 As shown, optionally, constructing the features of each event pair may include:
[0097] S401. Construct frequency features of each event pair according to the occurrence frequency and co-occurrence frequency of two events in the event pair.
[0098] S402: construct the proportion feature according to the frequency feature.
[0099] S403: Construct context features of the event according to features of keywords in the text corresponding to the event.
[0100] Among them, it can be based on the number of times the two events in the event pair appear respectively in the target text set, the number of times the two event pairs appear simultaneously in the same target text, the number of times the trigger words that trigger the two events respectively appear in the target text set, and the number of times the trigger words of the two events appear together in the same target text in the target text set.
[0101] For example, the frequency features corresponding to the event pair (A, B) may include: feature T1: count(A,B): the number of times events A and B occur together; feature T2: count(A): the number of times event A occurs; feature T3: count(B): the number of times event B occurs; feature T4: count(TriA, TriB): the number of times the trigger words of events A and B occur together; feature T5: count(TriA): the number of times the trigger word of event A occurs; feature T6: count(TriB): the number of times the trigger word of event B occurs.
[0102] The proportion feature can be constructed according to the frequency features corresponding to the above event pair (A, B), and the proportion feature may include: Feature R1: Feature R2: Feature R3: Features R4: Features R5: Features R6:
[0103] The context features of event A and event B may include context features consisting of keywords whose occurrence frequency is greater than a preset frequency (eg, 5 times) after removing basic information such as company name and stop words from the target text.
[0104] Figure 5 This is a schematic diagram of the structure of an event prediction processing device provided in an embodiment of the present application. Figure 5 As shown, the device may include:
[0105] An extraction module 501 is used to extract an event pair set from a target text set;
[0106] A construction module 502 is used to construct features of each event pair;
[0107] The identification module 503 is used to input the features of each event pair into a pre-trained classifier, and the classifier identifies the evolution direction between the events based on the causal relationship between the events;
[0108] A determination module 504 is used to determine the transition probability of the target event to an event other than the target event in the event set according to the evolution direction between the events;
[0109] The prediction module 505 is used to perform event prediction according to the transition probability.
[0110] Optionally, the classifier includes: a first sub-classifier and a second sub-classifier;
[0111] Correspondingly, the identification module 503 is also used to input the features of each event pair into the first sub-classifier, and the first sub-classifier outputs the association information of each event pair, and the association information is used to indicate the association probability of the two events in the event pair; the features of at least one candidate event pair with an association probability greater than a preset threshold are input into the second sub-classifier, and the second sub-classifier identifies the evolution direction between the two events in each candidate event pair based on the causal relationship between the two events in each candidate event pair.
[0112] Optionally, the identification module 503 is also specifically used to input the features of at least one candidate event pair with an association probability greater than a preset threshold into a second sub-classifier, and the second sub-classifier obtains the causal relationship between the two events in each candidate event pair based on a pre-built causal relationship extraction template, and based on the causal relationship between the two events in each candidate event pair, identifies the evolution direction between the two events in each candidate event pair.
[0113] Optionally, the determination module 504 is specifically configured to determine the transition probability of the target event to an event other than the target event in the event set according to the evolution direction between the two events in each candidate event pair.
[0114] Optionally, the determination module 504 is also specifically used to filter out at least one filtered event pair from each candidate event pair that contains the target event and the target event belongs to the cause event in the evolution direction; determine the number of occurrences of each filtered event pair respectively; and obtain the transition probability of the target event to an event other than the target event in the event set based on the number of occurrences of each filtered event pair.
[0115] Optionally, construction module 502 is specifically used to construct frequency features of each event pair according to the occurrence frequency and co-occurrence frequency of the two events in the event pair; construct proportion features according to the frequency features; and construct context features of the event according to the features of keywords in the text corresponding to the event.
[0116] Optionally, the prediction module 505 is specifically configured to predict an event that occurs after the target event based on the transition probability.
[0117] The above-mentioned device is used to execute the method provided by the aforementioned embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.
[0118] The above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASIC), or one or more microprocessors (DSP), or one or more field programmable gate arrays (FPGA). For another example, when a module is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0119] Figure 6 A schematic diagram of the structure of an event prediction processing device provided in an embodiment of the present application, such as Figure 6 As shown, the event prediction processing device may include: a processor 601, a storage medium 602 and a bus 603, the storage medium 602 stores machine-readable instructions executable by the processor 601, when the event prediction processing device is running, the processor 601 and the storage medium 602 communicate through the bus 603, and the processor 601 executes the machine-readable instructions to perform the steps of the above event prediction processing method. The specific implementation method and technical effect are similar and will not be repeated here.
[0120] Optionally, the present application also provides a storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the above-mentioned event prediction processing method are executed.
[0121] 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 schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the indirect coupling or communication connection of the device or unit can be electrical, mechanical or other forms.
[0122] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0123] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0124] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to perform some steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (English: Read-Only Memory, abbreviated: ROM), random access memory (English: Random Access Memory, abbreviated: RAM), disk or optical disk and other media that can store program codes.
[0125] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
Claims
1. An event prediction processing method, characterized in that: The method comprises: Extracting an event pair set from a target text set, wherein the event pair set includes at least one event pair, and each event pair includes two events; Constructing features of each of the event pairs, wherein the features include at least one of the following: a frequency feature of the event pair, a ratio feature constructed based on the frequency feature of the event pair, and a context feature of the event; Inputting the features of each event pair into a pre-trained classifier, and the classifier identifying the evolution direction between the events based on the causal relationship between the events; Determine, according to the evolution direction between the events, a transition probability of a target event to an event other than the target event in the event set, wherein the target event is an event in any event pair in the event set; Predicting events based on the transition probabilities; The classifier includes: a first sub-classifier and a second sub-classifier; Inputting the features of each event pair into a pre-trained classifier, and allowing the classifier to identify the evolution direction between events based on the causal relationship between the events, includes: Inputting the features of each event pair into the first sub-classifier, and having the first sub-classifier output association information of each event pair, wherein the association information is used to indicate the association probability of two events in the event pair; The features of at least one candidate event pair whose association probability is greater than a preset threshold are input into the second sub-classifier, and the second sub-classifier identifies the evolution direction between the two events in each candidate event pair based on the causal relationship between the two events in each candidate event pair.
2. The event prediction processing method according to claim 1, characterized in that: The step of inputting the features of at least one candidate event pair whose association probability is greater than a preset threshold into the second sub-classifier, and identifying the evolution direction between the two events in each candidate event pair based on the causal relationship between the two events in each candidate event pair by the second sub-classifier, comprises: The features of at least one candidate event pair whose association probability is greater than a preset threshold are input into the second sub-classifier, and the second sub-classifier obtains the causal relationship between the two events in each candidate event pair based on a pre-constructed causal relationship extraction template, and identifies the evolution direction between the two events in each candidate event pair based on the causal relationship between the two events in each candidate event pair.
3. The event prediction processing method according to claim 1 or 2, characterized in that: Determining the transition probability of the target event to an event other than the target event in the event set according to the evolution direction between the events includes: According to the evolution direction between the two events in each of the candidate event pairs, a transition probability of the target event to an event other than the target event in the event set is determined.
4. The event prediction processing method according to claim 3, characterized in that: The step of determining the transition probability of the target event to an event other than the target event in the event set according to the evolution direction between the two events in each of the candidate event pairs includes: Filter out at least one screening event pair from the candidate event pairs, which includes the target event and the target event is a cause event in the evolution direction; respectively determining the number of occurrences of each of the screening event pairs; According to the number of occurrences of each of the screening event pairs, a transition probability of the target event to an event other than the target event in the event set is obtained.
5. The event prediction processing method according to claim 1, characterized in that: The constructing of the features of each event pair includes: Constructing frequency features of each event pair according to the occurrence frequencies and co-occurrence frequencies of the two events in the event pair; constructing the proportion feature according to the frequency feature; The context features of the event are constructed according to the features of the keywords in the text corresponding to the event.
6. The event prediction processing method according to claim 1, characterized in that: The performing event prediction according to the transition probability comprises: According to the transition probability, an event occurring after the target event is predicted.
7. An event prediction processing device, characterized in that: The device comprises: An extraction module, used for extracting an event pair set from a target text set, wherein the event pair set includes at least one event pair, and each event pair includes two events; A construction module, used to construct features of each of the event pairs, wherein the features include at least one of the following: a frequency feature of the event pair, a proportion feature constructed based on the frequency feature of the event pair, and a context feature of the event; An identification module, used for inputting the features of each event pair into a pre-trained classifier, and the classifier identifies the evolution direction between the events based on the causal relationship between the events; A determination module, used to determine the transition probability of a target event to an event other than the target event in the event set according to the evolution direction between the events, wherein the target event is an event in any event pair in the event set; A prediction module, used for predicting events according to the transition probability; The classifier includes: a first sub-classifier and a second sub-classifier; The identification module is specifically used to input the features of each of the event pairs into the first sub-classifier, and the first sub-classifier outputs the association information of each of the event pairs, wherein the association information is used to indicate the association probability of the two events in the event pair; input the features of at least one candidate event pair whose association probability is greater than a preset threshold into the second sub-classifier, and the second sub-classifier identifies the evolution direction between the two events in each of the candidate event pairs based on the causal relationship between the two events in each of the candidate event pairs.
8. An event prediction processing device, characterized in that: include: A processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor. When the event prediction processing device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of the event prediction processing method as described in any one of claims 1 to 6.
9. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by the processor, the steps of the event prediction processing method according to any one of claims 1 to 6 are executed.
Citation Information
Patent Citations
Reason mapping knowledge domain construction method and system
CN108052576A
Event prediction method and device
CN110245237A
Data risk prediction method, device and equipment
CN110263157A
Social network event evolution tracking method based on time division
CN110472105A
Time series data prediction method and device and computer readable storage medium
CN110472798A
