Intelligent event extraction method based on message
By uniformly defining it as entity relationship extraction in event extraction, and using special relationship labels and polling question-and-answer model, the problem of inaccurate correspondence between entities is solved, and the accuracy and consistency of event extraction is improved.
Patent Information
- Application Number
- CN202510049572.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-13
- Publication Date
- 2025-04-25
AI Technical Summary
In the prior art, in event extraction, entities cannot correspond correctly, resulting in confusion in the extraction results and the next round of problems cannot be correctly constructed.
The event extraction is unified through the label definition link as entity relationship extraction, special relationship labels are used to identify different descriptions of the same entity, and extract them through a polled question-and-answer model, and build the model with the Encoder part of the Transformer model.
It improves the accuracy of message event extraction, solves the problem of entity confusion, and enhances the consistency and reliability of the extraction results.
Smart Images

Figure CN119884323A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of text information processing, and in particular to a message-based event intelligent extraction method. Background Art
[0002] In recent years, with the continuous innovation of information technology, the amount of text message information acquired and stored has increased. Messages often contain a lot of useful information. How to automatically extract and associate this information through algorithms is of great significance. Manual analysis of massive message data is very time-consuming. However, through automated extraction, the extraction results can be continuously associated with information obtained by other collection methods, and time context, index and map can be established, which can greatly improve the work efficiency of message analysts and make the control of the overall situation and event development more accurate and rapid.
[0003] At present, there are some models in the field of text-based event extraction, but they are all limited to the industry's definition of event extraction tasks. Generally speaking, event extraction tasks are defined as the extraction of event type trigger words and related arguments, but the actual message situation is much more complicated. For example, there are still relationships between the extracted arguments and other entities that need to be extracted.
[0004] For the NLP algorithm model used for extraction, the existing models are mainly divided into two categories. One is the text generation type, such as the large model or T5, etc. Its disadvantage is that there may be hallucinations, that is, the output is uncontrollable, and it is possible to output things that do not exist in the message. The second is the text annotation type, which can ensure that the output result must be the information that exists in the message, but due to the uncertain number of results, possible overlap, and difficulty in expressing relationship information, it often requires multiple models to be used together, and the difficulty of training and adjusting parameters is relatively large.
[0005] Based on this, a solution based on question-answer polling extraction has recently emerged. This solution is applied to the text annotation model and only extracts the result of one question at a time, avoiding the problem of extracting all results at the same time. However, the disadvantage of this solution is that when the contents of multiple extracted results are different but represent the same entity, or when the contents of multiple results are the same but belong to different entities, the next round of questions constructed based on this result will be ambiguous, which will eventually lead to confusion in the extraction results and the inability to correctly correspond between entities.
[0006] Therefore, it is necessary to provide a message-based event intelligent extraction method to solve the technical problem that entities cannot be correctly matched with each other in the above situation. Summary of the invention
[0007] The purpose of the present invention is to overcome the shortcomings of the prior art and provide an easy-to-operate method for intelligent event extraction based on messages, which solves the technical problem that when multiple extracted results have different contents but represent the same entity, or multiple results have the same content but belong to different entities, entities cannot be correctly matched with each other, thereby improving the accuracy of message extraction.
[0008] To achieve the above purpose, the present application proposes a method for intelligent event extraction of messages, including a label definition step, a message text annotation step, a training data generation step, a model training step and a model reasoning step; wherein,
[0009] Label definition phase: uniformly define the elements of event extraction as entity relationship extraction, and identify different descriptions of the same entity by defining special relationship labels;
[0010] Message text annotation: annotate the message text using entity tags, relationship tags, and special relationship tags;
[0011] Training data generation phase: Based on the annotated message text, prompt words are constructed according to the rules, and the constructed prompt words are used as training data, which are copied and processed to obtain data sets A and B;
[0012] Model training: Mix and shuffle dataset A and dataset B to obtain the total sample set; divide the total sample set into training set, test set and validation set, and train the round-robin question-answering model;
[0013] Model reasoning: The round-robin question-answer model is used to perform model reasoning on the message text to obtain the extraction result corresponding to the input message text;
[0014] The round-robin question-answer model is constructed based on the Encoder part of the Transformer model.
[0015] As a further solution, the tag definition step is performed through the following steps:
[0016] The event type is defined by an entity tag; wherein the text content of the message text marked by the entity tag is the event type trigger word;
[0017] Defining arguments through event element tags, wherein the event element tags are simultaneously annotated through relationship tags and entity tags, and entities and relationships between entities in the message text are simultaneously annotated through the event element tags;
[0018] A special relationship tag is defined; wherein the special relationship tag is used to merge the extracted same entities represented by different descriptions.
[0019] As a further solution, the message text annotation step is performed through the following steps:
[0020] Use entity tags to annotate event type trigger words in message texts;
[0021] Data annotation is performed on arguments in the message text by using event element tags; wherein the event element tags include relationship tags and entity tags;
[0022] Data is annotated for each entity label through special relationship labels; wherein different annotated entity labels all represent the same entity.
[0023] As a further solution, when annotating data for each entity label through a special relationship label, the entities that are not desired to be identified by the relationship are connected to the entities that are desired to be identified by the relationship, so that only the entities that are desired to be identified by the relationship are retained for constructing prompt words.
[0024] As a further solution, construct the prompt word through the following rules:
[0025] For entities: directly use the entity label as the prompt word, and the entity content as the result output; the entity content is the corresponding text content in the entity message text;
[0026] For relations: traverse all combinations of entities and relations, generate prompt words for the combinations that exist in the annotations using a preset fixed template, use the entity content pointed to by the relationship as the output, and use the combinations that do not exist in the annotations as negative examples.
[0027] As a further solution, dataset B is processed as follows: in the annotation results, if the annotation of the relationship has a non-negative example structure of [entity 1-relationship-entity 2], if the content of entity 1 is found to be repeated, a random non-repeating suffix is added to entity 1, and after adding the random non-repeating suffix, the start and end positions of all annotation results are recalculated.
[0028] As a further solution, dataset A is processed as follows: some samples in dataset A are randomly selected without change, and random non-repeating suffixes are added to the other samples. After adding the random non-repeating suffixes, the start and end positions of all labeled results are recalculated.
[0029] As a further solution, the model reasoning phase is performed through the following steps:
[0030] Step 1: Get the message text;
[0031] Step 2: Construct several prompt words through the defined entity tags; each prompt word is connected with the text content corresponding to the message text and input into the round-robin model, which will obtain several entity extraction results; add the entity extraction results to the set S;
[0032] Step 3: Construct prompt words through the relationship labels of each entity in the set S and the same entity represented by different descriptions; each prompt word is connected with the text content corresponding to the message text and input into the round-robin model, which will obtain several entity relationship extraction results; if the extracted entity exists in the set S and is not itself, delete its own entity in the set S;
[0033] Step 4: Continue to construct several prompt words; if it is found that the constructed prompt words are repeated, a random non-repeating suffix is added to the entity extraction result that causes the prompt words to be repeated in the original message text to form a new message text, and the suffix addition operation information is recorded;
[0034] Step 5: Use the entity extraction results with suffixes to reconstruct the prompt words; wherein each prompt word is connected with the text content corresponding to the new message text, and input into the round-robin question-answering model to obtain a new entity relationship extraction result;
[0035] Step 6: If the entity relationship extraction results need to be applied to the next round of relationship extraction, return to step 4;
[0036] Step 7: After all information is extracted, add operation information according to the recorded suffix, restore the extraction result to the state without suffix, and form the final output result.
[0037] Compared with related technologies, the message-based event intelligent extraction method provided by the present invention has the following advantages:
[0038] 1. The present invention uses event extraction as a prerequisite for event analysis, and the accuracy and real-time performance of its results affect the effects of a series of subsequent algorithms; by using a deep learning algorithm model, the automatic extraction of message text is achieved;
[0039] 2. The present invention specially designs and processes the training set by adding suffixes to entities and using "same entity" relationship labels, and improves the reasoning process, thereby solving the ambiguity and result duplication problems in question-answering polling extraction, so that the question-answering extraction method can make up for its disadvantages while retaining its original advantages;
[0040] 3. The present invention breaks the traditional concept of event extraction tasks and uniformly regards them as entity relationship extraction, making the data annotation method more flexible and the extraction content richer, ultimately achieving a comprehensive improvement in the accuracy of event extraction, and establishing reliable data support for subsequent tasks such as event context analysis and knowledge graphs in practical applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0043] Figure 1 A schematic diagram of a flow chart of a message-based event intelligent extraction method provided by the present invention;
[0044] Figure 2 A schematic diagram of the flow of the model reasoning link provided by the present invention;
[0045] Figure 3 This is a schematic diagram of the Encoder architecture of the Transformer model;
[0046] Figure 4 This is a schematic diagram of the content between the start and end of the Encoder part;
[0047] Figure 5 This is a schematic diagram of the annotation results of the message text annotation phase;
[0048] Figure 6 This is a schematic diagram of the annotation result after adding a suffix.
[0049] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0051] See also Figure 1The embodiment of the present application provides a method for intelligent extraction of events from a message, including a label definition step, a message text annotation step, a training data generation step, a model training step, and a model reasoning step; wherein,
[0052] Label definition phase: uniformly define the elements of event extraction as entity relationship extraction, and identify different descriptions of the same entity by defining special relationship labels;
[0053] Message text annotation: annotate the message text using entity tags, relationship tags, and special relationship tags;
[0054] Training data generation phase: Based on the annotated message text, prompt words are constructed according to the rules, and the constructed prompt words are used as training data, which are copied and processed to obtain data sets A and B;
[0055] Model training: Mix and shuffle dataset A and dataset B to obtain the total sample set; divide the total sample set into training set, test set and validation set, and train the round-robin question-answering model;
[0056] Model reasoning: The round-robin question-answer model is used to perform model reasoning on the message text to obtain the extraction result corresponding to the input message text;
[0057] The round-robin question-answer model is constructed based on the Encoder part of the Transformer model.
[0058] It should be noted that the present invention constructs a round-robin question-and-answer model based on the Encoder part of the Transformer model. It is not limited to the traditional definition of event extraction, but extracts event types, arguments, and related entities and relationship information together, and uniformly defines the elements of event extraction as entity relationship extraction. It defines special relationship tags to identify different descriptions of the same entity, and distinguishes entities with the same content but different entities by automatically adding suffixes, so as to remove unnecessary question construction and extraction processes, avoid complex post-processing processes caused by repeated extraction results, and solve the technical problem of entity confusion.
[0059] The following is a brief description of the Encoder architecture of the Transformer model used; Figure 3 As shown in the figure, the input of the model is the message text and the prompt word, which are identified by a special token. <cls> 、 <sep>Separate them so that the model can distinguish the message part from the prompt word part, and output two binary classification results corresponding to each word, which respectively represent the probability of this word being the start and the probability of being the end.
[0060] According to Figure 3 The results shown can obtain the classification labels of start and end at each word position, and then pair start and end according to the principle of proximity, and the content between start and end is the extraction result. Figure 4 As shown, for the message "I ate peaches and bananas" and the prompt word "what did you eat", the output result of the model is ["peaches", "bananas"].
[0061] Regarding the label definition phase:
[0062] The event type is defined by an entity tag; wherein the text content of the message text marked by the entity tag is the event type trigger word;
[0063] Defining arguments through event element tags, wherein the event element tags are simultaneously annotated through relationship tags and entity tags, and entities and relationships between entities in the message text are simultaneously annotated through the event element tags;
[0064] A special relationship tag is defined; wherein the special relationship tag is used to merge the extracted same entities represented by different descriptions.
[0065] Combined with the specific implementation example, the tag definition link is explained:
[0066] First, define the event type. Taking the takeoff event as an example, you can define the entity tag "takeoff trigger word" to mark the words in the message that can represent the takeoff event;
[0067] Then define the event element label. Assuming that the argument of the take-off event is "airplane", define "airplane" as both a relationship and an entity label.
[0068] Assuming that the number of aircraft needs to be extracted at the same time, continue to define "quantity" as a relationship and entity label.
[0069] In this way, in addition to the takeoff event and related arguments, other entities and relationships that need to be extracted can be freely defined.
[0070] Finally, an additional special relationship tag "same entity" is defined to merge the same entities extracted in different ways.
[0071] At this point, the entity tags are ("takeoff trigger word", "aircraft", "quantity"), and the relationship tags are ("aircraft", "quantity", "same entity"). It can be seen that the concept of events has been weakened, and there are only two types of tags: entities and relationships.
[0072] Regarding the message text annotation phase:
[0073] Use entity tags to annotate event type trigger words in message texts;
[0074] Data is annotated by using arguments in the event element tag message text; wherein the event element tag includes a relationship tag and an entity tag;
[0075] Data is annotated for each entity label through special relationship labels; wherein different annotated entity labels all represent the same entity.
[0076] In conjunction with a specific embodiment, the message text annotation link is explained:
[0077] "An X-YZ passenger plane took off from AAA. It is expected that this X-YZ plane will land at BBB airport at 9:10."
[0078] "Three X-YZ passenger planes took off from CCC and are expected to land at DDD airport at 11 o'clock."
[0079] Taking the above message as an example, the marking results are as follows Figure 5 As shown, the "one" in the first row is marked as a quantity entity, "X-YZ passenger plane" and "X-YZ airplane" are marked as airplane entities, and "takeoff" is marked as a takeoff trigger entity. The "aircraft" relationship of "takeoff" is "X-YZ passenger plane", the "quantity" relationship of "X-YZ passenger plane" is "one", and the "same entity" relationship of "X-YZ airplane" is "X-YZ passenger plane".
[0080] The "three" in the second row is marked as a quantity entity, "X-YZ passenger plane" is marked as an airplane entity, and "takeoff" is marked as a takeoff trigger word entity. The "aircraft" relationship of "takeoff" is "X-YZ passenger plane", and the "quantity" relationship of "X-YZ passenger plane" is "three"; the marking principle of "the same entity" is to connect the entity that is not expected to be identified by the relationship to the entity that is expected to be identified by the relationship, so as to delete such entities in the extraction results and avoid using such entities to construct the next round of prompt words again.
[0081] For example, in this specific embodiment, although "X-YZ Aircraft" is also an aircraft entity, "X-YZ Passenger Plane" which is more closely related to the take-off event has appeared before, so the take-off event is connected to "X-YZ Passenger Plane" but not to "X-YZ Aircraft", so the same entity relationship of "X-YZ Aircraft" points to "X-YZ Passenger Plane".
[0082] For the training data generation process, construct prompts according to the following rules:
[0083] For entities: directly use the entity's label as the prompt, and the entity content as the output; where the entity content is the text content corresponding to the entity message text;
[0084] For relationships: traverse all combinations of entities and relationships, generate prompts for the combinations that exist in the annotation using a preset fixed template, use the entity content pointed to by the relationship as the output, and use the combinations that do not exist in the annotation as negative examples.
[0085] Combined with specific embodiments, explain in detail the construction of prompts according to the rules:
[0086] First, construct prompts and corresponding outputs. For entities, directly use the entity's label as the prompt and the entity content as the output; for relationships, generate prompts using the template {"relationship" of "entity content"}, and use the entity content pointed to by the relationship as the output.
[0087] Taking the above message text as an example, first construct entities:
[0088] The prompt is "takeoff trigger word", and the output is [(start: 12, end: 13, word: takeoff), (start: 52, end: 53, word: takeoff)];
[0089] The prompt is "airplane", and the output is [(start: 2, end: 7, word: X-YZ airliner), (start: 18, end: 23, word: X-YZ airplane), (start: 42, end: 47, word: X-YZ airliner)];
[0090] The prompt is "quantity", and the output is [(start: 0, end: 0, word: one), (start: 40, end: 40, word: three)];
[0091] Then traverse the entity output results and construct relationships in sequence:
[0092] The prompt is "airplane taking off", and the output is [(start: 2, end: 7, word: X-YZ airliner), (start: 42, end: 47, word: X-YZ airliner)];
[0093] The prompt is "quantity of X-YZ airliners", and the output is [(start: 0, end: 0, word: one), (start: 40, end: 40, word: three)];
[0094] The prompt word is "the same entity of X-YZ aircraft", and the output is [(start:2,end:7,word:X-YZ passenger plane)];
[0095] The prompt word is "the number of takeoffs", and the output is empty. The relationship construction that does not exist in this type of annotation result is used as a negative example. The construction method of other negative examples is similar (such as "the same entity of X-YZ passenger plane"), that is, traversing all combinations of entities and relationships, and the combinations that do not exist in the annotation are used as negative examples.
[0096] Copy the constructed training data, and now there are two identical training data sets, called data set A and data set B.
[0097] Through the above process, we can find that due to the consistency of the content of some entities, it is impossible to distinguish which specific entity it is when constructing questions. For example, if "the number of X-YZ passenger planes" is used as a prompt, two results "one" and "three" will appear, which cannot be distinguished and matched.
[0098] In this case, the data in data set B is processed as follows:
[0099] 1. In the annotation results, the annotation of the relationship has the structure of "entity 1-relationship-entity 2", and the prompt words are generated based on this structure. For all such non-negative example structures, if the content of entity 1 is found to be repeated, a random non-repeating suffix is added to entity 1;
[0100] 2. After adding the suffix, the original text is changed, and the start and end positions of all annotation results are recalculated.
[0101] For the above example, the content "takeoff" of entity 1 in "takeoff trigger word" (entity 1) - "aircraft" (relationship) - "aircraft" (entity 2) is repeated, and the text can be updated as follows:
[0102] "An X-YZ passenger plane takes off from AAA <042> , it is estimated that the X-YZ aircraft will land at BBB airport at 9:10.”
[0103] "Three X-YZ passenger planes took off from CCC <007> , expected to land at DDD airport at 11 o'clock."
[0104] Furthermore, the content of entity 1 "X-YZ passenger plane" in "aircraft" (entity 1) - "quantity" (relationship) - "quantity" (entity 2) is repeated, and the text can be further updated as follows:
[0105] "An X-YZ passenger plane <998> Take off from AAA <042> , it is estimated that the X-YZ aircraft will land at BBB airport at 9:10.”
[0106] "Three X-YZ passenger planes <010> Take off from CCC <007> , expected to land at DDD airport at 11 o'clock."
[0107] The annotation result at this time becomes Figure 6 As shown, compared with the previous output, the output of the prompt word "takeoff trigger word" becomes [(start:17,end:23,word:takeoff <042> ),(start:67,end:73,word:Takeoff <007> )]; the same applies to other cases.
[0108] The data in dataset B are transformed in the above way. For dataset A, 30% of the samples are taken without change, and the other 70% are randomly added with suffixes, that is, the entities in each sample are randomly selected, and the number of selected entities is also a random number between 0 and the total number of entities in this sample. The selected entities are processed in the same way as in dataset B, and random suffixes are added. <xxx>Suffix, then update the start and end positions as a whole.
[0109] At this point, there are two data sets, whose main content is the same, but the way of adding suffixes is different. In data set B, suffixes are added only when there is ambiguity and indistinguishability when establishing the prompt words. In data set A, 30% has no suffixes and 70% has random suffixes.
[0110] The reason for this is that when the model is reasoning, it first faces the original message without any suffix. At this time, the model needs to be able to extract all that needs to be extracted, so that it can further add suffixes based on the extraction results and perform a second extraction. Therefore, it is necessary to let the model know during training that extraction needs to be performed regardless of whether there is a suffix or not.
[0111] For the model training phase, data set A and data set B are mixed together and shuffled to use this as the total sample set, based on which the training set, test set, and validation set are divided, and training begins.
[0112] like Figure 2 As shown in the figure, the model reasoning phase is carried out through the following steps:
[0113] Step 1: Get the message text;
[0114] Step 2: Construct several prompt words through the defined entity tags; each prompt word is connected with the text content corresponding to the message text and input into the round-robin model, which will obtain several entity extraction results; add the entity extraction results to the set S;
[0115] Step 3: Construct prompt words through the relationship labels of each entity in the set S and the same entity represented by different descriptions; each prompt word is connected with the text content corresponding to the message text and input into the round-robin model, which will obtain several entity relationship extraction results; if the extracted entity exists in the set S and is not itself, delete its own entity in the set S;
[0116] Step 4: Continue to construct several prompt words; if it is found that the constructed prompt words are repeated, a random non-repeating suffix is added to the entity extraction result that causes the prompt words to be repeated in the original message text to form a new message text, and the suffix addition operation information is recorded;
[0117] Step 5: Use the entity extraction results with suffixes to reconstruct the prompt words; wherein each prompt word is connected with the text content corresponding to the new message text, and input into the round-robin question-answering model to obtain a new entity relationship extraction result;
[0118] Step 6: If the entity relationship extraction results need to be applied to the next round of relationship extraction, return to step 4;
[0119] Step 7: After all information is extracted, add operation information according to the recorded suffix, restore the extraction result to the state without suffix, and form the final output result.
[0120] It should be noted that: this embodiment uses event extraction as a prerequisite for event analysis, and the accuracy and real-time performance of its results affect the effects of a series of algorithms that follow. By using a deep learning algorithm model, the automatic extraction of message texts is realized. By adding suffixes to entities and using "same entity" relationship labels, the training set is specially designed and processed. At the same time, the reasoning process is improved to solve the ambiguity and result duplication problems in question-and-answer polling extraction, so that the question-and-answer extraction method can make up for its disadvantages while retaining its original advantages, and break the traditional concept of event extraction tasks, uniformly treating them as entity relationship extraction, making the data annotation method more flexible and the extraction content richer, and ultimately achieving a comprehensive improvement in the accuracy of event extraction, and establishing reliable data support for subsequent tasks such as event context analysis and knowledge graphs in practical applications.
[0121] The above are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect application in other related technical fields are included in the patent protection scope of the present application.< / xxx> < / sep> < / cls>
Claims
1. A message-based event intelligent extraction method, characterized in that: It includes label definition, message text annotation, training data generation, model training and model reasoning. Label definition phase: uniformly define the elements of event extraction as entity relationship extraction, and identify different descriptions of the same entity by defining special relationship labels; Message text annotation: annotate the message text using entity tags, relationship tags, and special relationship tags; Training data generation phase: Based on the annotated message text, prompt words are constructed according to the rules, and the constructed prompt words are used as training data, which are copied and processed to obtain data sets A and B; Model training: Mix and shuffle dataset A and dataset B to obtain the total sample set; divide the total sample set into training set, test set and validation set, and train the round-robin question-answering model; Model reasoning: The round-robin question-answer model is used to perform model reasoning on the message text to obtain the extraction result corresponding to the input message text; The round-robin question-answer model is constructed based on the Encoder part of the Transformer model.
2. The method for intelligent event extraction based on messages according to claim 1, characterized in that: The label definition process is carried out through the following steps: The event type is defined by an entity tag; wherein the text content of the message text marked by the entity tag is the event type trigger word; Defining arguments through event element tags, wherein the event element tags are simultaneously annotated through relationship tags and entity tags, and entities and relationships between entities in the message text are simultaneously annotated through the event element tags; A special relationship tag is defined; wherein the special relationship tag is used to merge the extracted same entities represented by different descriptions.
3. The method for intelligent event extraction based on messages according to claim 2 is characterized in that: The message text annotation phase is performed through the following steps: Use entity tags to annotate event type trigger words in message texts; Data is annotated by using arguments in the event element tag message text; wherein the event element tag includes a relationship tag and an entity tag; Data is annotated for each entity label through special relationship labels; wherein different annotated entity labels all represent the same entity.
4. The method for intelligent event extraction based on messages according to claim 3 is characterized in that: When data is annotated for each entity label through a special relationship label, the entity that is not desired to be identified by the relationship is connected to the entity that is desired to be identified by the relationship, so that only the entity that is desired to be identified by the relationship is retained for constructing the prompt word.
5. The method for intelligent event extraction based on messages according to claim 1, characterized in that: The prompt words are constructed according to the following rules: For entities: directly use the entity label as the prompt word, and the entity content as the result output; the entity content is the text content corresponding to the entity message text; For relations: traverse all combinations of entities and relations, generate prompt words for the combinations that exist in the annotations using a preset fixed template, use the entity content pointed to by the relationship as the output, and use the combinations that do not exist in the annotations as negative examples.
6. The method for intelligent event extraction based on messages according to claim 5, characterized in that: Dataset B is processed as follows: In the annotation results, if the annotation of the relationship has a non-negative example structure of [entity 1-relationship-entity 2], if the content of entity 1 is found to be repeated, a random non-repeating suffix is added to entity 1, and after adding the random non-repeating suffix, the start and end positions of all annotation results are recalculated.
7. The method for intelligent event extraction based on messages according to claim 5, characterized in that: The dataset A is processed as follows: some samples are randomly selected from the dataset A without any changes, and random non-repeating suffixes are added to the other samples. After adding the random non-repeating suffixes, the start and end positions of all the labeled results are recalculated.
8. The method for intelligent event extraction based on messages according to claim 5, characterized in that: The model reasoning phase is performed through the following steps: Step 1: Get the message text; Step 2: Construct several prompt words through the defined entity tags; each prompt word is connected with the text content corresponding to the message text and input into the round-robin model, which will obtain several entity extraction results; add the entity extraction results to the set S; Step 3: Construct prompt words through the relationship labels of each entity in the set S and the same entity represented by different descriptions; each prompt word is connected with the text content corresponding to the message text and input into the round-robin model, which will obtain several entity relationship extraction results; if the extracted entity exists in the set S and is not itself, delete its own entity in the set S; Step 4: Continue to construct several prompt words; if it is found that the constructed prompt words are repeated, a random non-repeating suffix is added to the entity extraction result that causes the prompt words to be repeated in the original message text to form a new message text, and the suffix addition operation information is recorded; Step 5: Use the entity extraction results with suffixes to reconstruct the prompt words; wherein each prompt word is connected with the text content corresponding to the new message text, and input into the round-robin question-answering model to obtain a new entity relationship extraction result; Step 6: If the entity relationship extraction results need to be applied to the next round of relationship extraction, return to step 4; Step 7: After all information is extracted, add operation information according to the recorded suffix, restore the extraction result to the state without suffix, and form the final output result.