Event causal relationship identification method based on structure optimization and reinforcement learning

By incorporating the key context semantics of event causality into the reward function of reinforcement learning, the problem of insufficient allocation of causal labels and context importance in event causality recognition is solved, improving the recognition accuracy and efficiency, and simplifying event correlation express.

CN119248941APending Publication Date: 2025-01-03XINJIANG UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411383472.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

The importance of existing models cannot effectively allocate causal labels and context in event causal recognition, resulting in the generated dependency paths containing unnecessary sentence components, affecting the accuracy of recognition.

Method used

Using a method based on structural optimization and reinforcement learning, the key context semantics between events are included in the reward function, and the network model is pre-trained by constructing a comprehensive reward function and the final loss function to improve the accuracy of causal relationship recognition.

Benefits of technology

It improves the performance and efficiency of the generative model, enhances the accuracy of causal relationship recognition, eliminates unnecessary information, and simplifies event correlation representation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119248941A_ABST
    Figure CN119248941A_ABST
Patent Text Reader

Abstract

The invention provides an event causal relationship identification method based on structure optimization and reinforcement learning, and the method comprises the steps: carrying out the data preprocessing operation of an original text, obtaining a data set, and dividing the data set into a training set and a verification set; inputting the training set into the network model to obtain prediction output and a final loss function; extracting a real label of the verification set, and constructing a comprehensive reward function according to the real label and the prediction output; pre-training the network model according to the comprehensive reward function and the final loss function to obtain a trained network model; and identifying the event causal relationship through the trained network model to obtain an identification result. According to the method, the performance and efficiency of model generation are improved, and the causal relationship identification accuracy is also improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of natural language processing, and in particular to an event causal relationship recognition method based on structure optimization and reinforcement learning. Background Art

[0002] Event causality identification refers to the identification of causal relationships between event pairs in text, and is a fundamental research direction in the field of natural language processing and information extraction. In recent years, event causality identification has attracted extensive research interest. Compared with feature-based methods, the latest deep learning models have made progress in ECI performance. Like early studies, most generative models treat the identification of event causality as a classification problem, and the output labels only include the causal relationship between the input events or the undisplayed relationship.

[0003] However, during the model training process, the model cannot assign the importance of causal labels and contexts related to the causal relationship between events mentioned during the training process, and the generated dependency paths contain unnecessary sentence components. Therefore, it is necessary to design an event causal relationship identification method based on structural optimization and reinforcement learning. Summary of the invention

[0004] The purpose of the present invention is to provide an event causal relationship identification method based on structural optimization and reinforcement learning, which incorporates the key contextual semantics between events into the reward function of reinforcement learning to improve the performance and efficiency of the generation model and improve the accuracy of causal relationship identification.

[0005] To achieve the above object, the present invention provides the following solutions:

[0006] A method for identifying event causal relationships based on structure optimization and reinforcement learning includes the following steps:

[0007] Perform data preprocessing on the original text to obtain a data set, and divide the data set into a training set and a validation set;

[0008] Input the training set into the network model to obtain the predicted output and the final loss function;

[0009] Extract the true labels of the validation set and construct a comprehensive reward function based on the true labels and predicted outputs;

[0010] Pre-train the network model according to the comprehensive reward function and the final loss function to obtain a trained network model;

[0011] The causal relationship of events is identified through the trained network model to obtain the identification result.

[0012] Optionally, data preprocessing operations are performed on the original text to obtain a data set. The specific steps include: deleting special characters in the text, removing stop words in the text, removing extra spaces and line breaks, unifying the text format, and correcting spelling and grammatical errors.

[0013] Optionally, the prediction output includes: predicted causal labels and predicted dependency paths; the true labels include: true causal labels and true dependency paths; and the network model is a T5 model.

[0014] Optionally, the training set is input into the network model to obtain the predicted output and the final loss function. The specific steps include:

[0015] Determine the causal relationship between two events in the training set based on the network model and obtain the predicted causal label;

[0016] The predicted dependency path is obtained through the dependency tree of two events in the training set;

[0017] The final loss function is obtained through maximum likelihood training.

[0018] Optionally, the causal relationship between two events in the training set is determined according to the network model to obtain a predicted causal label. The specific steps include:

[0019] Map the two events in the training set to the first variable and the second variable respectively;

[0020] Extract variable features of the first variable and the second variable respectively;

[0021] Constructing causal graphs of the first variable and the second variable respectively according to the variable characteristics of the first variable and the second variable;

[0022] Intervene in the first variable or the second variable, and obtain the change result of the second variable or the first variable through the cause-effect diagram;

[0023] The predicted causal label is obtained according to the change result.

[0024] Optionally, the predicted dependency path is obtained through the dependency tree of two events in the training set, and the specific steps include:

[0025] Split the two events in the training set into separate words;

[0026] Get dependency relationships based on the contextual semantics of words;

[0027] Build dependency trees for two events in the training set based on the dependency relationships;

[0028] Find the lowest common ancestor based on the dependency tree of two events in the training set;

[0029] The dependency trees of two events in the training set are merged and pruned through the relationship between the subject and the predicate and the relationship between the object and the predicate to obtain the final dependency tree, which is used as the predicted dependency path.

[0030] Optionally, the final loss function is obtained through maximum likelihood training, and the specific steps include:

[0031] The generated sequence is obtained through the network model, and the loss function is calculated based on the generated sequence;

[0032] Reconstruct the generated sequence and input it into the network model to obtain the reconstructed sequence, and calculate the reconstruction loss function based on the reconstructed sequence;

[0033] Reconstruct the reconstructed sequence and input it into the network model to obtain a secondary reconstructed sequence, and calculate the secondary reconstruction loss function based on the secondary reconstructed sequence;

[0034] Perform multiple reconstruction inputs to obtain multiple loss functions; multiple loss functions are all cross entropy loss functions;

[0035] Multiple loss functions are weighted to obtain the final loss function.

[0036] Optionally, a comprehensive reward function is constructed based on the true label and the predicted output. The specific steps include:

[0037] Construct an accuracy reward function based on the predicted causal labels and the true causal labels;

[0038] Construct a similarity reward function based on the predicted dependency path and the actual dependency path;

[0039] The accuracy reward function and the similarity reward function are weighted to obtain a comprehensive reward function.

[0040] Optionally, an accuracy reward function is constructed based on the predicted causal label and the true causal label. The specific steps are: compare the predicted causal label with the true causal label. If the predicted causal label correctly reflects the causal relationship represented by the true causal label, the function value is 1, otherwise it is 0. The calculation formula of the accuracy reward function is: Among them, R a is the accuracy reward value, N is the number of samples of the predicted output, exp is the exponential function, {} is the comparison operation, and Y i To predict the causal label, Z i is the true causal label.

[0041] Optionally, a similarity reward function is constructed based on the predicted dependency path and the actual dependency path. The specific steps are: extracting the feature vectors of the predicted dependency path and the actual dependency path respectively, calculating the cosine value and amplitude of the feature vector angle, and constructing a similarity reward function based on the cosine value and amplitude; the calculation formula of the similarity reward function is:

[0042] Among them, T i is the feature vector for predicting the dependent path, S i is the eigenvector of the real dependency path, cos() is the operation for calculating the cosine of the eigenvector angle, |T i | is the feature vector amplitude of the predicted dependent path, |S i | is the eigenvector amplitude of the true dependency path, R s is the similarity reward value.

[0043] According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects: the event causal relationship identification method based on structural optimization and reinforcement learning provided by the present invention includes: performing data preprocessing operations on the original text to obtain a data set, and dividing the data set into a training set and a verification set; inputting the training set into the network model to obtain a predicted output and a final loss function; extracting the true label of the verification set, and constructing a comprehensive reward function based on the true label and the predicted output; pre-training the network model according to the comprehensive reward function and the final loss function to obtain a trained network model; identifying event causal relationships through the trained network model to obtain recognition results. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0045] Figure 1 This is a flow chart of a method for identifying event causal relationships based on structure optimization and reinforcement learning according to an embodiment of the present invention;

[0046] Figure 2 A flow chart of a method for obtaining a prediction output and a final loss function according to an embodiment of the present invention;

[0047] Figure 3 A flow chart of a method for obtaining predicted causal labels according to an embodiment of the present invention;

[0048] Figure 4 A flow chart of a method for obtaining a prediction dependency path according to an embodiment of the present invention;

[0049] Figure 5 A flow chart of a method for constructing a final loss function according to an embodiment of the present invention;

[0050] Figure 6 This is a flow chart of a method for constructing a comprehensive reward function according to an embodiment of the present invention. DETAILED DESCRIPTION

[0051] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0052] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and understandable, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0053] like Figure 1 As shown, an embodiment of the present invention provides an event causal relationship identification method based on structure optimization and reinforcement learning, comprising the following steps:

[0054] Step 100: Perform data preprocessing on the original text to obtain a data set, and divide the data set into a training set and a validation set;

[0055] Specifically, data preprocessing operations are performed on the original text to obtain a data set. The specific steps include: deleting special characters in the text, removing stop words in the text, removing extra spaces and line breaks, unifying the text format, and correcting spelling and grammatical errors.

[0056] More specifically, to remove special characters in the text, regular expressions or string replacement functions can be used to identify and remove special characters in the text. In this embodiment, preferably, a string replacement function is used to identify and remove special characters. All the characters of the text are encoded to obtain their respective Unicode character encodings, and then it is checked whether the Unicode characters are non-standard characters or special characters, and the identified non-standard characters or special characters are removed from the text. By clearing these irrelevant characters, the purity and readability of the text are ensured. The information in the text is compared and retrieved with the stop word list in the natural language processing library to identify stop words such as prepositions, conjunctions, articles, or pronouns in the text. For example, words such as "de", "shi", and "he" that frequently appear in the language but do not have obvious actual meanings are removed from the text, which can improve the efficiency and accuracy of text processing, reduce the size of the text index, and improve the retrieval efficiency. Similarly, a string replacement function can be used to identify and remove redundant spaces and line breaks in the text to avoid incorrect formatting problems in the text. The specific steps for unifying the text format in this embodiment include changing all lowercase and uppercase in the text to lowercase or uppercase forms, and converting all the representations of dates and times in the text to the form of XX year XX month XX day and the 24-hour system, which ensures the consistency of the representation of the same content in the text. An automatic error correction system based on machine learning or an online spell checker is used to check and automatically correct the spelling and grammar usage in this text to improve the accuracy and readability of the text content and avoid the problem of difficult understanding caused by grammar and spelling errors.

[0057] Step 200: Input the training set into the network model to obtain the predicted output and the final loss function;

[0058] Specifically, the predicted output includes: predicted causal labels and predicted dependency paths; the network model is a T5 model.

[0059] More specifically, the T5 model includes a sentence embedding module, a word embedding module, an encoder, and a decoder; the text information in the training set is split into multiple events through the sentence embedding module, and then each event is split into multiple words by the word embedding module, and the encoder is used to encode the connections between words, events, words and words, words and events, and events and events to form their respective matrices, and finally the decoder is used to decode the matrices to obtain the predicted output of the model.

[0060] Specifically, inputting the training set into the network model to obtain the predicted output and the final loss function, the specific steps are as Figure 2 shown, including:

[0061] Step 210: Determine the causal relationship between two events in the training set based on the network model to obtain a predicted causal label; the specific steps are as follows: Figure 3 As shown, including:

[0062] Step 211: Map two events in the training set to a first variable and a second variable respectively;

[0063] Step 212: extract variable features of the first variable and the second variable respectively; the variable features include: the time interval between events, the sequence of events, and context information related to the events, etc.

[0064] Step 213: Treat the result of the first variable as a "fishbone", connect the time interval of the first variable's events, the order of events, and contextual information related to the events as "fishbones" and separate more "fishbones" to form a first variable causal graph; replace the first variable with the second variable and repeat the connection process to form a second variable causal graph. The first variable and its variable characteristics and the second variable and its variable characteristics exist in the second variable causal graph and the first variable causal graph in the form of "fishbones" respectively.

[0065] Specifically, the causal relationship between the first variable and the second variable can be represented in a more structured and systematic way through the causal diagram, making the causal relationship between the first variable and the second variable clearer to understand, and the potential connection between the first variable and the second variable can be found through the divergent connection of the "fishbone" of the causal diagram, making the subsequent causal judgment more accurate.

[0066] Step 214: Intervene in the first variable to change the variable characteristics of the first variable, and obtain the affected probability of the second variable through the degree of change of the second causal graph. Similarly, obtain the affected probability of the first variable.

[0067] Step 215: Determine whether the first variable and the second variable have a causal relationship based on the affected probability of the first variable and the affected probability of the second variable, and output the determination result as a predicted causal label.

[0068] Furthermore, the judgment process is as follows:

[0069] If the probability of the first variable being affected and the probability of the second variable being affected are both greater than the probability threshold, then it is determined that the first variable and the second variable are causally related to each other;

[0070] If the probability of the first variable being affected is greater than the probability threshold and the probability of the second variable being affected is less than or equal to the probability threshold, then it is determined that the second variable is only the cause of the first variable;

[0071] If the probability of the second variable being affected is greater than the probability threshold and the probability of the first variable being affected is less than or equal to the probability threshold, then it is determined that the first variable is only the cause of the second variable;

[0072] If the affected probability of the first variable and the affected probability of the second variable are both less than or equal to the probability threshold, it is determined that the first variable and the second variable have no causal relationship.

[0073] Furthermore, the probability threshold is preset to 0.6, and the affected probability of the first variable and the affected probability of the second variable are compared with the probability threshold respectively. The two comparisons have two comparison results respectively, and the four results of the two comparisons are combined in pairs to obtain four combination results. Based on these four combination results, a comprehensive judgment of the causal relationship is made to obtain the predicted causal labels of the first variable and the second variable. This comprehensive judgment method makes the judgment of the causal relationship between the first variable and the second variable more accurate, not only to identify whether the two have a causal relationship, but also to specifically identify which of the first variable and the second variable is the cause and which is the effect if the two have a causal relationship.

[0074] Step 220: Obtain the predicted dependency path through the dependency tree of two events in the training set; the specific steps are as follows Figure 4 As shown, including:

[0075] Step 221: Split the two events in the training set into separate words respectively, so as to more accurately identify the dependency relationship between the specific words in the two events.

[0076] Step 222: Obtain dependency relationships according to the contextual semantics of the words; dependency relationships include: subject-predicate relationship, verb-object relationship, attributive-modifier relationship, parallel relationship, supplementary relationship and preposition-object relationship.

[0077] Step 223: construct dependency trees of two events in the training set according to the dependency relationship;

[0078] Specifically, the dependency tree reveals the semantic relationship between words in a sentence by constructing dependencies between words, which are directly mapped to a directed graph representation, where the words in the sentence are nodes in the graph and the dependencies are edge labels.

[0079] More specifically, the dependency tree can clearly show the grammatical structure of a sentence, making it more intuitive to analyze sentence components and sentence structure. The dependency tree can also accurately express the dependency relationship between words, such as subject-predicate relationship, object relationship, etc., which helps to perform semantic analysis and understanding more accurately.

[0080] Step 224: Find the lowest common ancestor based on the dependency tree of two events in the training set;

[0081] Step 225: Taking the lowest common ancestor as the starting point of the dependency tree, only the dependency relationships formed by the predicate verb and its most relevant subject and object are selected, the remaining dependency relationships are removed and the selected dependency relationships are merged into the final dependency tree, and the final dependency tree is regarded as a predicted dependency path for output.

[0082] Specifically, the dependency relationships contained in the final dependency tree only include subject-predicate relationships and predicate-object relationships, and the remaining dependency relationships are pruned, so that the predicted dependency path represented by the final dependency tree eliminates irrelevant information and more directly reflects the causal relationship between events, that is, it simplifies the complex event associations while ensuring the strong correlation of the associations.

[0083] Step 230: Obtain the final loss function through maximum likelihood training; the specific steps are as follows Figure 5 As shown, including:

[0084] Step 231: Input the training data into the T5 network model, output a complementary generated sequence, and use the generated sequence as a parameter of the conditional probability distribution to calculate the generated loss function; so as to maximize the probability of the output sequence generated by the model that matches the distribution of the training data.

[0085] Step 232: input the generated sequence into the network model again as the input sequence to obtain a reconstructed sequence that better matches the actual input, and calculate the reconstruction loss function based on the reconstructed sequence;

[0086] Step 233: input the reconstructed sequence into the network model again as the input sequence, repeatedly perform sequence reconstruction and calculate the loss function after each reconstruction until the output reconstructed sequence matches the training data distribution;

[0087] Step 234: Perform a weighted operation on all loss functions to obtain a final loss function.

[0088] Specifically, the loss function calculated each time is a cross entropy loss function; the weights of each loss function are adjusted by hyperparameters.

[0089] Step 300: extract the true label of the validation set, and construct a comprehensive reward function based on the true label and the predicted output; the true label includes: the true causal label and the true dependency path;

[0090] Specifically, the specific steps of constructing a comprehensive reward function based on the true label and predicted output are as follows: Figure 6 As shown, including:

[0091] Step 301: construct an accuracy reward function based on the predicted causal label and the true causal label; the specific steps are: compare the predicted causal label with the true causal label, if the causal relationship represented by the predicted causal label is the same as the causal relationship represented by the true causal label, then the function value of the predicted output sample is 1; if the causal relationship represented by the predicted causal label is different from the causal relationship represented by the true causal label, then the function value of the predicted output sample is 0.

[0092] Specifically, the calculation formula of the accuracy reward function is:

[0093]

[0094] Among them, R a is the accuracy reward value, N is the number of samples of the predicted output, exp is the exponential function, {} is the comparison operation, and Y i is the predicted causal label of the i-th predicted output sample, Z i Output the true causal label of the sample for the i-th prediction.

[0095] Step 302: construct a similarity reward function based on the predicted dependency path and the actual dependency path; the specific steps are: extract the feature vectors of the predicted dependency path and the actual dependency path respectively, calculate the cosine value of the angle between the two feature vectors and their respective amplitudes, and construct a similarity reward function based on the cosine value of the angle and their respective amplitudes.

[0096] Specifically, the calculation formula of the similarity reward function is:

[0097]

[0098] Among them, T i is the feature vector of the prediction dependency path of the i-th prediction output sample, S i is the feature vector of the true dependency path of the i-th predicted output sample, cos() is the operation for calculating the cosine value of the feature vector angle, |T i | is the feature vector amplitude of the predicted dependent path, |S i | is the eigenvector amplitude of the true dependency path, R s is the similarity reward value.

[0099] Step 303: Perform a weighted operation on the accuracy reward function and the similarity reward function to obtain a comprehensive reward function. The specific steps are: assign different weighting parameters to the accuracy reward function and the similarity reward function, perform a weighted combination operation according to their respective weighting parameters, and optimize the combined function by the gradient descent method to finally obtain a comprehensive reward function.

[0100] Specifically, different trade-off parameters are assigned to the accuracy reward function and the similarity reward function, and a weighted merging operation is performed according to their respective trade-off parameters. The specific calculation formula is:

[0101] W=α a R a +α s R s ;

[0102] Among them, α a is the trade-off parameter of the accuracy reward function, α s is the trade-off parameter of the similarity reward function, which is adjusted by the hyperparameter, and W is the merging function.

[0103] Specifically, the specific formula for optimizing the merged function by gradient descent method is:

[0104]

[0105] Among them, J is the comprehensive reward function value, p(y i |x i ) is the probability that the model generates the final reconstructed sequence, y i is the final reconstructed sequence, x i The input sequence for model training data.

[0106] Step 400: pre-training the network model according to the comprehensive reward function and the final loss function to obtain a trained network model;

[0107] Specifically, the comprehensive reward function and the final loss function are combined with the principal component analysis method to pre-train the network model.

[0108] Step 500: Identify the causal relationship of events through the trained network model to obtain the identification result.

[0109] The beneficial effects of the present invention are as follows:

[0110] 1) The present invention incorporates the key contextual semantics between events into the reward function of reinforcement learning, which improves the performance and efficiency of the generative model;

[0111] 2) The accuracy of causal relationship identification is improved by training the model through comprehensive reward function and final loss function.

[0112] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0113] The present invention uses specific examples to illustrate the principles and implementation methods of the present invention. The above examples are only used to help understand the method and core ideas of the present invention. At the same time, for those skilled in the art, according to the ideas of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.

Claims

1. A method for identifying event causal relationships based on structural optimization and reinforcement learning, characterized in that: The steps include: Performing data preprocessing operations on the original text to obtain a data set, and dividing the data set into a training set and a validation set; Inputting the training set into the network model to obtain the predicted output and the final loss function; Extracting the true label of the validation set, and constructing a comprehensive reward function according to the true label and the predicted output; Pre-training the network model according to the comprehensive reward function and the final loss function to obtain a trained network model; The causal relationship of events is identified through the trained network model to obtain an identification result.

2. The event causal relationship identification method based on structure optimization and reinforcement learning according to claim 1 is characterized in that: The original text is preprocessed to obtain the data set. The specific steps include: deleting special characters in the text, removing stop words in the text, removing extra spaces and line breaks, unifying the text format, and correcting spelling and grammatical errors.

3. The event causal relationship identification method based on structure optimization and reinforcement learning according to claim 1 is characterized in that: The predicted output includes: predicted causal labels and predicted dependency paths; the true labels include: true causal labels and true dependency paths; and the network model is a T5 model.

4. The event causal relationship identification method based on structure optimization and reinforcement learning according to claim 3 is characterized in that: The training set is input into the network model to obtain the predicted output and the final loss function. The specific steps include: Determine the causal relationship between two events in the training set according to the network model to obtain the predicted causal label; Obtaining the predicted dependency path through the dependency tree of two events in the training set; The final loss function is obtained through maximum likelihood training.

5. The event causal relationship identification method based on structure optimization and reinforcement learning according to claim 4 is characterized in that: Determining the causal relationship between two events in the training set according to the network model to obtain the predicted causal label, the specific steps include: Mapping two events in the training set into a first variable and a second variable respectively; extracting variable features of the first variable and the second variable respectively; Constructing causal graphs of the first variable and the second variable respectively according to the variable characteristics of the first variable and the second variable; Intervene the first variable or the second variable, and obtain a change result of the second variable or the first variable through the cause-effect diagram; The predicted causal label is obtained according to the change result.

6. The event causal relationship identification method based on structure optimization and reinforcement learning according to claim 4 is characterized in that: The predicted dependency path is obtained by using the dependency tree of two events in the training set, and the specific steps include: Splitting the two events in the training set into separate words respectively; Obtain dependency relationships according to contextual semantics of the words; Construct dependency trees of two events in the training set respectively according to the dependency relationship; Finding the lowest common ancestor according to the dependency tree of two events in the training set; The dependency trees of the two events in the training set are merged and pruned through the relationship between the subject and the predicate and the relationship between the object and the predicate to obtain a final dependency tree, and the final dependency tree is used as the predicted dependency path.

7. The event causal relationship identification method based on structure optimization and reinforcement learning according to claim 4 is characterized in that: The final loss function is obtained through maximum likelihood training, and the specific steps include: Obtaining a generated sequence through the network model, and calculating a loss function according to the generated sequence; Reconstructing the generated sequence and inputting it into the network model to obtain a reconstructed sequence, and calculating a reconstruction loss function according to the reconstructed sequence; Reconstructing the reconstructed sequence and inputting it into the network model to obtain a secondary reconstructed sequence, and calculating a secondary reconstruction loss function according to the secondary reconstructed sequence; Performing the reconstruction input multiple times to obtain multiple loss functions; the multiple loss functions are all cross entropy loss functions; The multiple loss functions are weighted to obtain the final loss function.

8. The event causal relationship identification method based on structure optimization and reinforcement learning according to claim 3 is characterized in that: Constructing a comprehensive reward function according to the true label and the predicted output, the specific steps include: Constructing an accuracy reward function according to the predicted causal label and the true causal label; Constructing a similarity reward function according to the predicted dependency path and the actual dependency path; The accuracy reward function and the similarity reward function are weighted to obtain the comprehensive reward function.

9. The event causal relationship identification method based on structure optimization and reinforcement learning according to claim 8 is characterized in that: The accuracy reward function is constructed according to the predicted causal label and the true causal label. The specific steps are: comparing the predicted causal label with the true causal label. If the predicted causal label correctly reflects the causal relationship represented by the true causal label, the function value is 1, otherwise it is 0. The calculation formula of the accuracy reward function is: Among them, R a is the accuracy reward value, N is the number of samples of the predicted output, exp is the exponential function, {} is the comparison operation, and Y i To predict the causal label, Z i is the true causal label.

10. The event causal relationship identification method based on structure optimization and reinforcement learning according to claim 8, characterized in that: A similarity reward function is constructed according to the predicted dependency path and the actual dependency path, and the specific steps are: extracting the feature vectors of the predicted dependency path and the actual dependency path respectively, calculating the cosine value and the amplitude of the feature vector angle, and constructing the similarity reward function according to the cosine value and the amplitude; the calculation formula of the similarity reward function is: Among them, T i is the feature vector for predicting the dependent path, S i is the eigenvector of the real dependency path, cos() is the operation for calculating the cosine of the eigenvector angle, |T i | is the feature vector amplitude of the predicted dependent path, |S i | is the eigenvector amplitude of the true dependency path, R s is the similarity reward value.