Event relation reasoning evolution method and device based on large language model, equipment and storage medium

By employing an event-based relational reasoning method based on a large language model, and utilizing instruction learning and soft prompting learning, the event-based relational reasoning task is unified, which solves the problem of insufficient long-distance dependency modeling and achieves efficient event-based relational reasoning and risk assessment.

CN118394880BActive Publication Date: 2026-08-25XINJIANG TECH INST OF PHYSICS & CHEM CHINESE ACAD OF SCI
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410334277.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-22
Publication Date
2026-08-25
Estimated Expiration
2044-03-22

AI Technical Summary

Technical Problem

Existing deep learning-based event relationship reasoning methods are insufficient in modeling long-distance dependencies, severing the correlation between different event relationships, resulting in high training and storage costs, and failing to effectively track event dependencies over long time intervals.

Method used

We adopt a large language model-based approach, extract instruction-label supervised data by constructing event trigger words, utilize instruction learning and soft prompting learning to unify the event relationship reasoning task, and design a collaborative fusion mechanism to enhance the performance of event relationship reasoning.

Benefits of technology

It improves the accuracy of event relationship reasoning, can perform various event relationship reasoning tasks according to different needs and instructions, generates event relationship chains and performs risk assessment, and enhances the generalization ability of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure FT_1
    Figure FT_1
  • Figure FT_2
    Figure FT_2
  • Figure FT_3
    Figure FT_3
Patent Text Reader

Abstract

The application discloses an event relation reasoning evolution method and device based on a large language model, equipment and a storage medium. The method extracts event trigger words by constructing event trigger word extraction instruction-label supervision data, and realizes event trigger word extraction by using a large language model and fine tuning. A multi-task instruction is constructed to unify the event relation reasoning task. A corresponding soft prompt is learned for each fine-grained event relation reasoning task, and a collaborative fusion mechanism is designed to improve the event relation reasoning performance. Based on the event relation obtained by reasoning, an event relation chain is generated according to the instruction requirement and the context learning. The world knowledge of the large language model is used to design event evolution instructions and context learning, realize event evolution, predict the development trend of the event, and generate an event evolution chain. According to the result of event evolution, risk assessment is performed to generate an event risk chain. The application enhances the generalization ability of the large language model in event relation reasoning, can realize various event relation reasoning tasks according to different requirement instructions, and improves the accuracy of event relation reasoning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of natural language processing in the field of information technology, and particularly to the technical fields of artificial intelligence, large language models, event relation reasoning, and event evolution. Specifically, this invention provides a method, apparatus, device, and storage medium for event relation reasoning and evolution based on a large language model. Background Technology

[0002] Event Relation Reasoning aims to understand the evolution of relationships between events by analyzing events described in text and inferring logical connections between them. It is an important subtask in Natural Language Processing. With the continuous development of deep learning, many studies, inspired by neural networks, use pre-trained language models combined with attention mechanisms to address event relation reasoning. However, these existing deep learning models treat event relation reasoning as a separate subtask, neglecting the connections between different event relation reasoning tasks. Furthermore, since relationships between events may involve long time intervals, existing methods, limited by the performance of pre-trained models such as BERT, cannot effectively model and track long-term event dependencies, thus still possessing certain limitations.

[0003] With the advent of the era of large-scale models, their stunning generative and generalization capabilities have propelled the field of natural language processing to a new level. Large-scale models enable more powerful contextual modeling. They allow for a deeper understanding of long text sequences, thus better capturing the dynamics of event evolution. This is crucial for solving event-related reasoning problems involving long time intervals. Secondly, the rich world knowledge inherent in large-scale language models facilitates the extraction of event-triggered words; their powerful understanding and reasoning capabilities enhance semantic understanding of event-related reasoning evolution tasks, providing a strong foundation for models to better understand and reason about the relationships between events.

[0004] Currently, existing methods for event-related reasoning and evolution have the following problems:

[0005] 1) Existing deep learning-based methods are insufficient in modeling long-distance dependencies between events. Because deep learning models typically utilize local contextual information, long text sequences can lead to vanishing or exploding gradients, limiting the model's accuracy in modeling long-distance dependencies. This limitation is particularly pronounced in event reasoning tasks, as the associations between events can involve complex information transfer across several sentences or document paragraphs.

[0006] 2) Existing event relationship reasoning methods model and study different event relationships separately, thus severing the correlation between various event relationships. For example, the causal relationship between events must have a chronological order. Secondly, modeling different event relationship reasoning tasks separately requires a lot of training and storage overhead.

[0007] To address the problems existing in the aforementioned event relationship reasoning evolution methods, this invention provides an event relationship reasoning evolution method, apparatus, device, and storage medium based on a large language model. The technology of this application is based on a large language model and involves three methods: instruction learning, soft prompting learning, and context learning. On the basis of the large language model, instruction learning is introduced to uniformly model event relationship reasoning; context learning guides the model to perform event relationship reasoning evolution as needed; and soft prompting learning reduces training resources, alleviating the resource and consumption problems during model training without changing the foundation of the large language model. Summary of the Invention

[0008] The present invention aims to provide a method, apparatus, device, and storage medium for event relationship reasoning evolution based on a large language model. This is achieved by constructing event trigger word extraction instruction-label supervised data, utilizing a large language model and fine-tuning to extract event trigger words; constructing multi-task instructions to unify event relationship reasoning tasks; learning corresponding soft hints for each fine-grained event relationship reasoning task, and designing a collaborative fusion mechanism to improve event relationship reasoning performance; generating event relationship chains based on the reasoned event relationships, according to instruction requirements and context; utilizing the world knowledge of the large language model to design event evolution instructions and context learning, realizing event evolution, predicting event development trends, and generating event evolution chains; and conducting risk assessment based on the event evolution results to generate event risk chains. This invention enhances the generalization ability of the large language model in event relationship reasoning, enabling the implementation of various event relationship reasoning tasks according to different instruction requirements, and improving the accuracy of event relationship reasoning.

[0009] The event-relationship reasoning evolution method based on a large language model described in this invention is performed according to the following steps:

[0010] a. Constructing event trigger word extraction instruction-label supervised data is based on existing traditional event trigger word extraction datasets. For each selected training sample, corresponding event trigger word extraction instructions are constructed. When constructing the instruction-label dataset, it is ensured that samples from different domains, contexts, and complexities are covered. b. Based on the instruction-tag supervision data, extract event trigger words using a large language model and instruction fine-tuning; c. Unify the event relationship reasoning task, construct multi-task instructions to infer the logical relationships such as timing and causality between events; learn a unified foundation based on multi-task instructions, each multi-task instruction contains multiple sub-instructions, each sub-instruction corresponds to a sub-task of event relationship reasoning, and learn a large language model with basic event relationship reasoning ability based on multi-task instructions, which can realize a variety of event relationship reasoning tasks. d. For each fine-grained event relationship reasoning task, add corresponding soft prompts to guide the large language model to complete specific event relationship reasoning. Based on the large language model with basic event relationship reasoning capabilities described in step c, add continuous learnable prefixes to each layer to learn fine-grained event relationship reasoning knowledge. Fine-tune through soft prompts to learn and effectively save specific event relationship reasoning knowledge. e. Based on the specific soft hints in step d, optimize the reasoning of event relationships using soft hint collaborative reasoning. Merge prefixes containing multiple event relationship reasoning knowledge and improve the performance of event relationship reasoning through collaborative soft hints, including logical relationships such as event sequence and causality. f. Based on the event relationships obtained through the reasoning, and according to the instruction requirements and context learning, generate an event relationship chain; g. After generating the event relationship chain, based on the rich world knowledge contained in the large language model, design event evolution instructions and context learning to realize event evolution, predict the development trend of events, and generate event evolution chains. h. Based on the evolution of the above events, a risk assessment is performed on the current event according to the evolved events, and an event risk chain is generated. The event evolution chain is combined with the current event context and the two are merged in the form of natural language text. The risk magnitude of each event in the event chain is analyzed with the help of a large language model.

[0011] The event trigger word extraction instructions described in step a clearly and concisely express the operations or requirements related to event trigger word extraction, so that the large model can accurately understand the relationship between the instructions and the corresponding tags.

[0012] The instruction requirements and context learning described in step f are as follows: Instruction requirements are natural language text that explicitly describes the generation of event relationship chains. Context learning provides task examples during the model's generation of event relationship chains, allowing the large language model to learn the semantics and format of the task based on these examples. Without changing the parameters, it solves the generation of event relationship chains through observation and imitation. Examples include event sequence chains and event causal chains.

[0013] The event evolution instructions and context learning described in step g refer to the event evolution instructions being natural language text that specifies the direction of event evolution, used to guide the large language model to complete specific event evolution tasks and predict the future development and possible outcomes of events. The task examples provided by context learning guide and standardize the large language model in generating event evolution chains.

[0014] An apparatus for the event relation reasoning evolution method based on a large language model, comprising: an event trigger word extraction module, a multi-task instruction learning module, a soft prompt fine-tuning module, a soft prompt collaborative reasoning module, an event relation chain generation module, an event evolution chain generation module, and an event risk assessment module, wherein: Event trigger word extraction module: Leveraging the powerful language understanding capabilities of large language models, it extracts event trigger words from the input sentence using an instruction-based learning approach; Multi-task instruction learning module: It uses a generative paradigm to perform event relationship reasoning, constructs multi-task instructions, and uses them to infer the logical relationships such as temporal and causal relationships between events. Soft hint tuning module: For each fine-grained event relationship reasoning task, corresponding soft hints are added to guide the large language model to complete specific event relationship reasoning tasks. The soft hint tuning module adds appropriate soft hints to multi-task instructions, enabling it to better complete specific event relationship reasoning tasks. Soft-cue collaborative reasoning module: Based on added specific soft cues, it optimizes the reasoning of event relationships through soft-cue collaborative reasoning. Leveraging the correlations between various event relationship reasoning tasks, it enhances the ability of large language models to perform event relationship reasoning through soft-cue collaboration. Event Relationship Generation Module: Based on the event relationships obtained through reasoning, and according to the instruction requirements and context learning, the module supplements and integrates the event relationships from the reasoning results of the large language model to generate an event relationship chain. Event Evolution Chain Generation Module: Based on the event relationship chain and the rich world knowledge contained in the large language model, this module designs event evolution instructions and context learning to realize event evolution, predict the development trend of events, and generate event evolution chains. Event Risk Assessment Module: Based on the event relationship chain and event evolution chain, and using a large language model, this module designs event risk assessment instructions, analyzes the possible impact of events based on context learning, and assesses the risk level of events.

[0015] An electronic device comprising: at least one processor; at least one GPU computing card; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor or the at least one GPU computing card, the instructions being executed by the at least one processor or the at least one GPU computing card to enable the at least one processor or the at least one GPU computing card to perform any of the methods described herein.

[0016] A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to perform any of the methods described above.

[0017] The present invention discloses an event relation reasoning evolution method, apparatus, device, and storage medium based on a large language model. The method includes: a. Construct event-triggered word extraction instructions - tag supervision data; b. Based on the instruction-tag supervision data, extract event trigger words using a large language model and instruction fine-tuning; c. Construct multi-task instructions to unify the training of basic, instruction-based large language models, which can realize various event relationship reasoning tasks. d. For each fine-grained event relationship reasoning task, add corresponding soft hints and fine-tune the soft hints; e. Optimize the reasoning of event relationships using soft-hint collaborative reasoning based on the added specific soft hints; f. Based on the event relationships obtained through the reasoning, generate an event relationship chain according to the instruction requirements and context. g. Based on the generated event relationship chain, design event evolution instructions and use context learning to generate event evolution chains; h. Based on the event evolution chain, conduct a risk assessment of the current event and generate an event risk chain.

[0018] This invention provides an event-relational reasoning evolution device based on a large language model, the device comprising: Event trigger word extraction module: Uses a large language model to extract event trigger words.

[0019] Multi-task instruction learning module: It uses a generative paradigm to unify event relationship reasoning, constructs multi-task instructions, and uses them to infer the logical relationships such as timing and causality between events.

[0020] Soft hint fine-tuning module: Add corresponding soft hints for each fine-grained event relationship reasoning task to guide the large language model to complete the specific event relationship reasoning task.

[0021] Soft hint collaborative reasoning module: Based on the added specific soft hints, it optimizes the reasoning of event relationships through soft hint collaborative reasoning, thereby enhancing the ability of the large language model to perform event relationship reasoning.

[0022] Event Relationship Generation Module: Based on the event relationships obtained through reasoning, the module supplements and integrates the event relationships with the help of a large language model to generate an event relationship chain.

[0023] Event Evolution Chain Generation Module: Based on the event relationship chain and the rich world knowledge contained in the large language model, this module designs event evolution instructions and context learning to realize event evolution and generate event evolution chains.

[0024] Event Risk Assessment Module: Based on the event relationship chain and event evolution chain, design event risk assessment instructions, analyze the possible impact of the event, and assess the risk level of the event.

[0025] This invention provides an electronic device, the device comprising: At least one processor; At least one GPU computing card; and A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor or the at least one GPU computing card, such that the at least one processor or the at least one GPU computing card can perform either of the methods described above.

[0026] According to another aspect of the present invention, a non-transitory computer-readable storage medium is provided storing computer instructions for causing the computer to perform the method described in any one of the embodiments of the present application.

[0027] The technology according to this application can complete the task of event relationship reasoning and evolution based on instructions, and improve the accuracy of event relationships and event evolution.

[0028] Other features and advantages of the invention will be set forth in the following description, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention can be realized and obtained by means of the structures particularly pointed out in the written description and the accompanying drawings. The technical solutions of the invention will now be described in further detail with reference to the accompanying drawings and embodiments. Attached Figure Description

[0029] Figure 1 This is a flowchart of the present invention; Figure 2 This is a structural diagram of the present invention; Figure 3A flowchart for extracting event trigger words is provided by the present invention; Figure 4 This invention provides a flowchart for learning multi-task instructions; Figure 5 A flowchart for fine-tuning a large language model provided by the present invention; Figure 6 A flowchart of collaborative reasoning event relationships is provided for this invention; Figure 7 A flowchart for generating an event relationship chain is provided by the present invention; Figure 8 A flowchart for generating an event evolution chain is provided by the present invention; Figure 9 A flowchart for assessing event risk is provided for this invention; Figure 10 This is a schematic diagram of the structure of an event relationship reasoning evolution device provided by the present invention; Figure 11 This is a block diagram of the electronic device of the present invention. Detailed Implementation

[0030] To enable those skilled in the art to better understand the present invention, a further detailed description of the invention is provided below with reference to the accompanying drawings. This includes various details of the embodiments of this application to aid understanding, and these should be considered merely exemplary. Therefore, those skilled in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this application. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description. Example

[0031] The event-relationship reasoning evolution method based on a large language model described in this invention is performed according to the following steps: a. Constructing event trigger word extraction instruction-label supervised data is based on existing traditional event trigger word extraction datasets. For each selected training sample, corresponding event trigger word extraction instructions are constructed. When constructing the instruction-label dataset, it is ensured that samples from different domains, contexts, and complexities are covered. b. Based on the instruction-tag supervision data, extract event trigger words using a large language model and instruction fine-tuning; c. Unify the event relationship reasoning task, construct multi-task instructions to infer the logical relationships such as timing and causality between events; learn a unified foundation based on multi-task instructions, each multi-task instruction contains multiple sub-instructions, each sub-instruction corresponds to a sub-task of event relationship reasoning, and learn a large language model with basic event relationship reasoning ability based on multi-task instructions, which can realize a variety of event relationship reasoning tasks. d. For each fine-grained event relationship reasoning task, add corresponding soft prompts to guide the large language model to complete specific event relationship reasoning. Based on the large language model with basic event relationship reasoning capabilities described in step c, add continuous learnable prefixes to each layer to learn fine-grained event relationship reasoning knowledge. Fine-tune through soft prompts to learn and effectively save specific event relationship reasoning knowledge. e. Based on the specific soft hints in step d, optimize the reasoning of event relationships using soft hint collaborative reasoning. Merge prefixes containing multiple event relationship reasoning knowledge and improve the performance of event relationship reasoning through collaborative soft hints, including logical relationships such as event sequence and causality. f. Based on the event relationships obtained through the reasoning, and according to the instruction requirements and context learning, generate an event relationship chain; g. After generating the event relationship chain, based on the rich world knowledge contained in the large language model, design event evolution instructions and context learning to realize event evolution, predict the development trend of events, and generate event evolution chains. h. Based on the evolution of the above events, a risk assessment is performed on the current event according to the evolved events, and an event risk chain is generated. The event evolution chain is combined with the current event context and the two are merged in the form of natural language text. The risk magnitude of each event in the event chain is analyzed with the help of a large language model.

[0032] The event trigger word extraction instructions described in step a clearly and concisely express the operations or requirements related to event trigger word extraction, so that the large model can accurately understand the relationship between the instructions and the corresponding tags.

[0033] The instruction requirements and context learning described in step f are as follows: Instruction requirements are natural language text that explicitly describes the generation of event relationship chains. Context learning provides task examples during the model's generation of event relationship chains, allowing the large language model to learn the semantics and format of the task based on these examples. Without changing the parameters, it solves the generation of event relationship chains through observation and imitation. Examples include event sequence chains and event causal chains.

[0034] The event evolution instructions and context learning described in step g refer to the event evolution instructions being natural language text that specifies the direction of event evolution, used to guide the large language model to complete specific event evolution tasks and predict the future development and possible outcomes of events. The task examples provided by context learning guide and standardize the large language model in generating event evolution chains.

[0035] An apparatus for the event relation reasoning evolution method based on a large language model, comprising: an event trigger word extraction module, a multi-task instruction learning module, a soft prompt fine-tuning module, a soft prompt collaborative reasoning module, an event relation chain generation module, an event evolution chain generation module, and an event risk assessment module, wherein: Event trigger word extraction module: Leveraging the powerful language understanding capabilities of large language models, it extracts event trigger words from the input sentence using an instruction-based learning approach; Multi-task instruction learning module: It uses a generative paradigm to perform event relationship reasoning, constructs multi-task instructions, and uses them to infer the logical relationships such as temporal and causal relationships between events. Soft hint tuning module: For each fine-grained event relationship reasoning task, corresponding soft hints are added to guide the large language model to complete specific event relationship reasoning tasks. The soft hint tuning module adds appropriate soft hints to multi-task instructions, enabling it to better complete specific event relationship reasoning tasks. Soft-cue collaborative reasoning module: Based on added specific soft cues, it optimizes the reasoning of event relationships through soft-cue collaborative reasoning. Leveraging the correlations between various event relationship reasoning tasks, it enhances the ability of large language models to perform event relationship reasoning through soft-cue collaboration. Event Relationship Generation Module: Based on the event relationships obtained through reasoning, and according to the instruction requirements and context learning, the module supplements and integrates the event relationships from the reasoning results of the large language model to generate an event relationship chain. Event Evolution Chain Generation Module: Based on the event relationship chain and the rich world knowledge contained in the large language model, this module designs event evolution instructions and context learning to realize event evolution, predict the development trend of events, and generate event evolution chains. Event Risk Assessment Module: Based on the event relationship chain and event evolution chain, and using a large language model, this module designs event risk assessment instructions, analyzes the possible impact of events based on context learning, and assesses the risk level of events.

[0036] An electronic device comprising: at least one processor; at least one GPU computing card; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor or the at least one GPU computing card, the instructions being executed by the at least one processor or the at least one GPU computing card to enable the at least one processor or the at least one GPU computing card to perform any of the methods described herein.

[0037] A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to perform any of the methods described herein.

[0038] Figure 1 A flowchart illustrating an event relation reasoning evolution method based on a large language model is provided as an embodiment of the present invention. This method is applicable to reasoning and evolving event relations based on a large language model under given demand instructions. The method is executed by an event relation reasoning evolution device, which is implemented in software and / or hardware. See [link to relevant documentation]. Figure 1 The event relationship reasoning evolution method based on a large language model provided in this embodiment includes: S110. Obtain the event trigger word extraction dataset and construct the event trigger word extraction instruction-label supervision data: In one embodiment, the construction of the event trigger word extraction instruction-label supervised data specifically involves providing each text sample with explicit guiding instructions and corresponding event trigger word labels, enabling the model to learn the association between event trigger words extracted from the instructions; such a dataset helps improve the model's performance on the event trigger word extraction task and provides explicit training signals for supervised learning; For example, the input text is: XX invested in domestic manufacturers and then acquired two foreign manufacturers. The event trigger word extraction instruction can be: mark the event trigger words that appear in the text, with the tags: investment, acquisition; S120. Based on the instruction-tag supervision data, extract event trigger words using a large language model and instruction fine-tuning: The method for extracting event trigger words based on a large language model and instruction fine-tuning is as follows: extracting event trigger words based on a large language model and using instruction fine-tuning, and using the sequence generation loss of the large language model for learning; In one embodiment, the extracted event trigger words can be understood as keywords representing the occurrence of an event. The sequence generation capability of a large language model is used to model the association between instructions and event trigger word labels, with the cross-entropy loss being... ,in For the instruction-label supervision data constructed above, For large language model parameters, Instructions constructed for the current sample; S130. Construct multi-task instructions, unify event relationship reasoning tasks, and learn a unified training base event relationship reasoning model based on multi-task instructions: The multi-task instruction learning method is as follows: a multi-task instruction contains multiple sub-instructions, each sub-instruction corresponds to a sub-task of event relationship reasoning, and a large language model with basic event relationship reasoning ability is learned based on the multi-task instruction. For example, the instruction for inferring the temporal relationship of events is: infer the temporal relationship between events in the text, and the instruction for inferring the causal relationship of events is: based on the given text, organize the causal relationship between events; S140. For each fine-grained event relationship reasoning task, add corresponding soft prompts to guide the large language model to complete the specific event relationship reasoning task: S150. Based on the added specific soft hints, optimize the reasoning event relationships using a soft hint collaborative reasoning approach: In one embodiment, an attention-based approach optimizes reasoning about event relationships by integrating multiple soft cues in a collaborative reasoning manner. The attention mechanism allows the model to focus more on important parts when processing text, while soft cues provide additional information about the task to help the model reason more accurately. S160. Based on the event relationships obtained through the reasoning, and according to the instruction requirements and context learning, generate an event relationship chain: In one embodiment, the model learns to generate an event relationship chain containing related events according to given instructions and its understanding of the context, so as to present the relationship between events and the evolution process. For example, the input text is: XX invested in domestic manufacturers and then acquired two foreign manufacturers. The instruction requirement is: generate an event sequence relationship chain according to the order in which the events occurred. The generated event sequence relationship chain is: investment - acquisition. S170. Based on the rich world knowledge contained in the large language model, design event evolution instructions and context learning to realize event evolution and generate event evolution chains: In one embodiment, the event evolution instruction is a natural language text that specifies the direction of event evolution, used to guide the large model to complete a specific event evolution task and predict the future development and possible outcomes of the event; the large language model is guided and standardized to generate an event evolution chain based on task examples provided by context learning; For example, the input text is: XX invested in domestic manufacturers and then acquired two foreign manufacturers. The time sequence relationship it contains is: Investment The acquisition event evolution reasoning instruction requires: following the sequence of events, what are the possible events that might occur? The generated event evolution chain is: investment – ​​acquisition – increase in market value; S180. Based on the evolved events, conduct a risk assessment of the current event and generate an event risk chain: In one embodiment, the event risk assessment is based on knowledge of previously evolved events, and on the current... Figure 2 This is a structural diagram of an event relationship reasoning evolution method based on a large language model provided by an embodiment of the present invention; the event relationship reasoning evolution method shown mainly consists of five parts, namely, extracting event trigger words, reasoning event relationships and generating event relationship chains, reasoning event evolution chains, and generating event risk chains; S201, Event Trigger Word Extraction: Large language models possess powerful semantic understanding capabilities, guided by event-triggered words. The model combines the input text with the instructions and the event-triggered words appearing in the text by minimizing the cross-entropy loss function. The cross-entropy loss is... ,in For the instruction-label supervision data constructed above, For large language model parameters, Instructions constructed for the current sample.

[0039] S202, Event Relationship Reasoning: First, a unified training model for event-related reasoning is developed through multi-task instruction learning. Second, event-related reasoning knowledge at a specific granularity is learned through soft cues. Finally, an attention mechanism is used to fuse the soft cues, synergistically improving the performance of event-related reasoning. Specifically, first, different instructions are designed for various event-related reasoning tasks, and the basic event-related reasoning model is trained using multi-task instruction. The training objective is: Where T is the set of all event-related reasoning tasks. The instructions corresponding to the current event relationship reasoning task. The first step is to define the parameters of the large language model. Secondly, soft prompts are added to event-related reasoning tasks at a specific granularity, using the original input and corresponding instructions as input. The parameters of the large language model are fixed, and the model learns specific event-related reasoning knowledge. The training objective is: ,in For the instruction-label supervision data constructed above, These are the parameters of the large language model after freezing. Instructions constructed for the current sample. The soft cue features are to be learned; finally, multiple event relationship reasoning knowledge are fused through an attention mechanism, and the soft cue features are mapped to the same space through a multilayer perceptron (MLP) to synergistically improve the performance of event relationship reasoning. S203, Event Relationship Chain Generation: Through contextual learning, based on the previously inferred event relationships, and leveraging the powerful comprehension capabilities of the large language model, the event relationships in the text are organized and supplemented to obtain a chain of event relationships contained within the text. S204, Event Evolution Chain Reasoning: Based on the aforementioned generated event relationship chain and input text, the rich world knowledge in the large language model is used to reason about the evolution of the current event context; in addition, through context learning, the output format of the large language model is constrained to infer possible event evolution chains. S205, Event Risk Chain Generation: Based on the current text and the inferred event evolution chain, the risk assessment of the current event is carried out through instruction and context learning and the use of a large language model, so as to better understand the development of the event. Figure 3 This invention provides a flowchart for extracting event trigger words. The method for extracting event trigger words provided by this solution includes: S310, The input is the event trigger word command and the input text; S320: Based on fine-grained instructions and text, trigger word inference is performed through a large language model; S330. After instruction learning, the large language model is fine-tuned using instruction-label parallel supervised data to achieve event-triggered word extraction. In one embodiment, the fine-tuning of the large language model specifically involves guiding the input text with event-triggered words; the input text is modeled by minimizing the cross-entropy loss function, which combines the instructions with the event-triggered words appearing in the text. The cross-entropy loss is... ,in For the instruction-label supervision data constructed above, For large language model parameters, Instructions constructed for the current sample; For example, given the input text: "XX invested in domestic manufacturers and then acquired two foreign manufacturers," the event trigger word extraction instruction is: mark the event trigger words appearing in the text, with labels: investment, acquisition. The large language model needs to model this using sequence modeling capabilities: (Input: Mark the event trigger words appearing in the text: "XX invested in domestic manufacturers and then acquired two foreign manufacturers"; Output: investment, acquisition). S340. Generate event trigger words implicit in the input text: Figure 4 This invention provides a flowchart for learning multi-task instructions. The method for learning multi-task instructions provided by this solution includes: S410. Preprocess various types of event-relational reasoning data, and design and define a unified event-relational reasoning paradigm: In one embodiment, the multi-tasking instruction is: to infer the temporal relationship between events in the text, and the event causal relationship inference instruction can be: based on the given text, to organize the causal relationship between events, etc.

[0040] S420. Design objectives for various event-related reasoning tasks, and design appropriate instructions and output formats for each fine-grained event-related reasoning task; S430, Based on a large language model, the basic event relationship reasoning model is trained through multi-task instructions; S440: Using cross-entropy loss, which is commonly used in generative large models, as the loss function, the modeling instructions combine the language patterns between the input and the labels; In one embodiment, a basic event relationship reasoning model is trained uniformly through multi-task instructions, and its objective function is as follows: Where T is the set of all event-related reasoning tasks. The instructions corresponding to the current event relationship reasoning task. For large language model parameters; S450. Design a suitable unified training strategy to help the model better learn shared task knowledge and information; In one embodiment, a generative paradigm is used to unify multiple event relationship reasoning tasks; S460. Construct and maintain a basic event-relationship reasoning model that can handle various event-relationship reasoning tasks according to different instructions; Figure 5 The present invention provides a flowchart for fine-tuning a large language model, which involves fine-tuning training through soft prompting while freezing the parameters of the large language model; the present invention also provides a method for fine-tuning a large language model, comprising: S510. Construct fine-grained event relationship reasoning task data and instructions, and define the fine-grained event relationship reasoning paradigm; S520. The basic event relationship reasoning model obtained through the aforementioned fine-tuning is used as the foundation; S530. Construct continuous learnable vectors as soft cues, which are combined with word embeddings of a large language model to guide the model's output. In one embodiment, for different types of fine-grained event relationship reasoning tasks, corresponding soft prompts are provided to a large language model to guide the model to complete specific event relationship reasoning tasks; For example, the large language model can be the Baichuan large model, and the added soft hints can be 10 consecutive tokens added before each layer of the Decoder, and each token can have 1024 feature dimensions. S540: Freeze the parameters of the large language model and only update the parameters added by the soft cue, reducing training overhead and avoiding overfitting; S550: Fine-tunes soft prompts by combining instructions with input and label data to achieve fine-grained event relationship reasoning; In one embodiment, soft prompts are added to an event-related reasoning task at a specific granularity. These prompts, along with the original input and corresponding instructions, are used as input. The parameters of the large language model are fixed, and the task learns specific event-related reasoning knowledge. The training objective is: ,in For the instruction-label supervision data constructed above, These are the parameters of the large language model after freezing. Instructions constructed for the current sample. These are soft cue features to be learned; S560: Retain the learned fine-grained event reasoning knowledge, i.e., the trained soft cue vector, to avoid knowledge forgetting; Figure 6 The flowchart provided by this invention illustrates a collaborative reasoning event relationship method. When fusing multiple soft cues, an attention-based approach is used to focus on soft cue features useful for the current task. The collaborative reasoning event relationship method provided by this solution includes: S610. Construct fine-grained event relationship reasoning task data and instructions, and define fine-grained event relationship reasoning paradigm; S620. Freeze the aforementioned basic event relationship reasoning model to reduce training overhead and avoid overfitting; S630: Design a soft prompting fusion method, which is combined with the word embedding of the large language model to guide the model's output; In one embodiment, multiple event relationship reasoning knowledge are fused through an attention mechanism, and then the soft cue features are mapped to the same space through a multilayer perceptron (MLP) to synergistically improve the performance of event relationship reasoning. S640: Fine-tuning through instruction learning, and collaboratively improving fine-grained event relationship reasoning performance based on attention mechanism; Figure 7 This invention provides a flowchart for generating event relationship chains. The model, according to given instructions and its understanding of the context, learns to generate an event relationship chain containing related events, thus presenting the relationships and evolution of events. The method for generating event relationship chains provided in this solution includes: S710. Based on the existing event trigger words and the inferred event relationships, design an event chain generation instruction; S720. Use a large language model to supplement and integrate event relationships; S730. Utilize contextual learning to generate event relationship chains that conform to the expected output format; For example, the input text is: "XX invested in a domestic manufacturer and then acquired two foreign manufacturers." The instruction requirement is: "Generate an event sequence chain according to the chronological order of events. The generated event sequence chain is: Investment..." Acquisition; Figure 8This invention provides a flowchart for generating an event evolution chain. Based on event evolution instructions, it guides a large language model to complete specific event evolution tasks, predicting the future development and possible outcomes of events. Using task examples provided by context learning to guide and standardize the generation of event evolution chains by a large language model, this solution provides a method for generating event evolution chains, including: S810. Based on the input text and the generated event relationship chain, design natural language instructions that can guide the evolution of events; S820. Based on specific task requirements, construct examples for reference by the large model to conduct context learning; S830: Based on the world knowledge contained in the large language model, generate some possible event evolution results according to event evolution instructions and contextual constraints; In one embodiment, the event evolution instruction is a natural language text that specifies the direction of event evolution, used to guide the large model to complete a specific event evolution task, predict the future development and possible results of the event, and guide and regulate the large language model to generate an event evolution chain based on task examples provided by context learning; S840. Based on the provided context, generate an event evolution chain that conforms to the expected output format: For example, the input text is: XX invested in domestic manufacturers and then acquired two foreign manufacturers. The time sequence relationship is: investment - acquisition. The event evolution reasoning instruction requirement is: following the sequence of events, what events might occur? The generated event evolution chain is: investment - acquisition - market value increase. Figure 9 This invention provides a flowchart for assessing event risk. Based on the event evolution chain and the current text, and using knowledge of previously evolved events, a risk assessment is performed on the current event to generate an event risk chain. The method for assessing event risk provided by this solution includes: S910. Based on the input text and the generated event relationship chain and evolution chain, design event risk assessment instructions; S920. Based on contextual learning, construct some examples for reference; S930. Based on the world knowledge contained in the large language model, conduct risk assessment of events according to event risk assessment instructions and contextual constraints; For example, the input text is: XX invested in domestic manufacturers and then acquired two foreign manufacturers. The generated event evolution chain is: investment - acquisition - market value increase. The event risk assessment instruction is: based on the event evolution chain and the current text, infer whether there is any risk in the current event? The label is: low risk. S940: Based on the provided sample, generate an event risk chain that meets the output expectations; Figure 10This is a schematic diagram of the structure of an event relationship reasoning evolution device provided in this embodiment. See also: Figure 9 The event relationship reasoning evolution device based on a large language model provided in this embodiment includes: an event trigger word extraction module, a multi-task instruction learning module, a soft prompt fine-tuning module, a soft prompt collaborative reasoning module, an event relationship chain generation module, an event evolution chain generation module, and an event risk assessment module. Event trigger word extraction module: Leveraging the powerful language understanding capabilities of large language models, it extracts event trigger words from the input sentence using an instruction-based learning approach; Multi-task instruction learning module: It uses a generative paradigm to perform event relationship reasoning, constructs multi-task instructions, and uses them to infer the logical relationships such as temporal and causal relationships between events. Soft hint tuning module: For each fine-grained event relationship reasoning task, corresponding soft hints are added to guide the large language model to complete specific event relationship reasoning tasks. The soft hint tuning module adds appropriate soft hints to multi-task instructions, enabling it to better complete specific event relationship reasoning tasks. Soft-cue collaborative reasoning module: Based on added specific soft cues, it optimizes the reasoning of event relationships through soft-cue collaborative reasoning. Leveraging the correlations between various event relationship reasoning tasks, it enhances the ability of large language models to perform event relationship reasoning through soft-cue collaboration. Event Relationship Generation Module: Based on the event relationships obtained through reasoning, and according to the instruction requirements and context learning, the module supplements and integrates the event relationships from the reasoning results of the large language model to generate an event relationship chain. Event Evolution Chain Generation Module: Based on the event relationship chain and the rich world knowledge contained in the large language model, this module designs event evolution instructions and context learning to realize event evolution, predict the development trend of events, and generate event evolution chains. Event Risk Assessment Module: Based on the event relationship chain and event evolution chain, and using a large language model, this module designs event risk assessment instructions, analyzes the potential impact of events based on context learning, and assesses the risk level of events. like Figure 11 The diagram shown is a block diagram of the electronic device of the present invention. The electronic device refers to various modern electronic digital computers, including personal computers, portable computers, and various server devices. The components, their interconnections, and functions shown herein are merely examples. like Figure 11 As shown, the electronic device includes: one or more multi-core processors, one or more GPU computing cards, and memory. To enable the electronic device to interact, it should also include: input devices and output devices. The various devices are interconnected and communicate with each other through a bus. The memory is the non-transitory computer-readable storage medium provided in this application, wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor or the at least one GPU computing card to enable the at least one processor or the at least one GPU computing card to perform the method described in any one of the embodiments of this application; Input devices provide and accept control signals from the user into the electronic device, including keyboards that generate numeric or character information and mice used to control the device to generate other key signals. Output devices provide feedback information to the user's electronic device, including displays that print out execution results or processes.

[0041] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the disclosure herein. This application is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein. It should be understood that the invention is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope.

Claims

1. An event-relational reasoning evolution method based on a large language model, characterized in that, Follow these steps: a. Constructing event trigger word extraction instruction-label supervised data is based on existing traditional event trigger word extraction datasets. For each selected training sample, corresponding event trigger word extraction instructions are constructed. When constructing the instruction-label dataset, it is ensured that samples from different domains, contexts, and complexities are covered. b. Based on the instruction-tag supervision data, extract event trigger words using a large language model and instruction fine-tuning; c. Unify the event relationship reasoning task, construct multi-task instructions to infer the temporal and causal logical relationships between events; learn and train a unified foundation based on multi-task instructions. The multi-task instructions contain multiple sub-instructions, each sub-instruction corresponding to a sub-task of event relationship reasoning. Learn a large language model with basic event relationship reasoning ability based on the multi-task instructions, which can realize a variety of event relationship reasoning tasks. d. For each fine-grained event relationship reasoning task, add corresponding soft prompts to guide the large language model to complete specific event relationship reasoning. Based on the large language model with basic event relationship reasoning capabilities described in step c, add continuous learnable prefixes to each layer to learn fine-grained event relationship reasoning knowledge. Fine-tune through soft prompts to learn and effectively save specific event relationship reasoning knowledge. e. Based on the specific soft hints in step d, optimize the reasoning of event relationships using soft hint collaborative reasoning. Merge prefixes containing multiple event relationship reasoning knowledge and improve the performance of event relationship reasoning through collaborative soft hints, including event sequence and causal logic relationships. f. Based on the event relationships obtained through the reasoning, and according to the instruction requirements and context learning, generate an event relationship chain; g. After generating the event relationship chain, based on the rich world knowledge contained in the large language model, design event evolution instructions and context learning to realize event evolution, predict the development trend of events, and generate event evolution chains. h. Based on the evolution of the above events, a risk assessment is performed on the current event according to the evolved events, and an event risk chain is generated. The event evolution chain is combined with the current event context and the two are merged in the form of natural language text. The risk magnitude of each event in the event chain is analyzed with the help of a large language model.

2. According to the event relationship reasoning evolution method based on a large language model as described in claim 1, the event trigger word extraction instruction in step a clearly and concisely expresses the operation or requirement related to event trigger word extraction, so that the large model can accurately understand the relationship between the instruction and the corresponding label.

3. According to claim 1, the event relationship reasoning evolution method based on a large language model, the instruction requirements and context learning in step f are as follows: the instruction requirements are natural language text that explicitly describes the generation of event relationship chains; the context learning provides some task examples during the process of the model generating event relationship chains, allowing the large language model to learn the semantics and format of the task based on the examples, and solves the generation of event relationship chains, such as event temporal chains and event causal chains, through observation and modeling without changing the parameters.

4. The event relation reasoning evolution method based on a large language model according to claim 1, wherein, The event evolution instructions and context learning mentioned in step g are as follows: the event evolution instructions are natural language text that specifies the direction of event evolution, used to guide the large model to complete specific event evolution tasks, predict the future development and possible results of events, and guide and standardize the large language model to generate event evolution chains based on the task examples provided by context learning.

5. An apparatus for an event relation reasoning evolution method based on a large language model as described in claim 1, characterized in that... The device includes: an event trigger word extraction module, a multi-task instruction learning module, a soft prompt fine-tuning module, a soft prompt collaborative reasoning module, an event relationship chain generation module, an event evolution chain generation module, and an event risk assessment module, wherein: Event trigger word extraction module: Leveraging the powerful language understanding capabilities of large language models, it extracts event trigger words from the input sentence using an instruction-based learning approach; Multi-task instruction learning module: It uses a generative paradigm to unify event relationship reasoning, constructs multi-task instructions, and uses them to infer the temporal and causal logical relationships between events; Soft hint fine-tuning module: For each fine-grained event relationship reasoning task, corresponding soft hints are added to guide the large language model to complete specific event relationship reasoning tasks. The soft hint fine-tuning module adds corresponding soft hints on the basis of multi-task instructions to enable it to better complete specific event relationship reasoning tasks. Soft hint collaborative reasoning module: Based on the added specific soft hints, it optimizes the reasoning of event relationships through soft hint collaborative reasoning, and utilizes the correlation between various event relationships to reason about the relationship between tasks. Through soft hint collaboration, it enhances the ability of large language models to perform event relationship reasoning. Event Relationship Generation Module: Based on the event relationships obtained through reasoning, and according to the instruction requirements and context learning, the module supplements and integrates the event relationships from the reasoning results of the large language model to generate an event relationship chain. Event Evolution Chain Generation Module: Based on the event relationship chain and the rich world knowledge contained in the large language model, this module designs event evolution instructions and context learning to realize event evolution, predict the development trend of events, and generate event evolution chains. Event Risk Assessment Module: Based on the event relationship chain and event evolution chain, and using a large language model, this module designs event risk assessment instructions, analyzes the possible impact of events based on context learning, and assesses the risk level of events.

6. An electronic device, wherein, include: At least one processor; 1. At least one GPU computing card; And a memory communicatively connected to the at least one processor; wherein the memory stores instructions that are executed by the at least one processor or the at least one GPU computing card, such that the at least one processor or the at least one GPU computing card can perform the method of any one of claims 1-4.

7. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-4.

Citation Information

Patent Citations

  • Document template automatic generation method and system based on recurrent neural network language model

    CN112541337A

  • Emergency disposal auxiliary decision-making system for gas transmission and distribution system

    CN116541503A