Event context generation method, device and medium based on large language model

By generating and organizing event timelines using a large language model, this technology addresses the issues of insufficient clarity and poor versatility in existing technologies, providing clear and hierarchical event analysis capabilities applicable to event analysis across multiple domains.

CN119782520BActive Publication Date: 2025-12-19北京中科闻歌科技股份有限公司 +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411840116.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-13
Publication Date
2025-12-19
Estimated Expiration
2044-12-13

AI Technical Summary

Technical Problem

Existing event context generation technologies suffer from insufficient clarity, excessive information complexity, and a lack of versatility, making them difficult to apply effectively in different fields.

Method used

An event context generation method based on a large language model is adopted. Through data cleaning, clustering, semantic judgment and logical sorting, a clear, hierarchical and universal event context is generated.

Benefits of technology

It enhances the logical flow and visualization of events, accurately capturing the core content and development logic of events in different fields, and meeting the analysis needs of multiple fields.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119782520B_ABST
    Figure CN119782520B_ABST
Patent Text Reader

Abstract

The application provides a large language model-based event context generation method, device and medium, comprising: event information input and related data acquisition, data cleaning and correlation judgment, large model event context generation, event context cleaning and carding, and event context traceability information tracing. The application generates and carding the event context through the large language model, can guarantee the logicality of the context, and enables the user to more clearly browse the causes and effects of the event. In addition, the general understanding ability of the large language model is used, and no adaptability work needs to be performed for each field.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of large language model application, in particular to an event context generation method, device and medium based on a large language model. BACKGROUND

[0002] With the development of the Internet, information is growing exponentially. Every day, a large amount of data is generated from various channels such as news media, social media, and corporate documents. For example, in the news field, a major event may have hundreds of reports from different media. The content of these reports is diverse, including different aspects of the event and the situation at different stages. It is difficult for users to sort out the causes and effects of the event in a short time. Enterprises also face similar problems. In market research, project tracking and other work, a large amount of documents and data about market trends and project progress will be accumulated. A technology is needed to help users quickly understand the development path of related events. Event context generation technology has emerged to meet the demand for extracting key event clues from a large amount of information. The current event context generation scheme mainly has the following shortcomings: 1. Lack of clarity: on the one hand, poor visualization results in unclear context, making it difficult for users to quickly grasp the core content and development process; on the other hand, the information in the event context is too complex and has not been effectively divided into levels and highlighted, making it easy for users to get lost in a large amount of information when browsing. For example, when presenting a large-scale technology research and development event, if the technical details, personnel changes and other information at each stage are listed without any arrangement, the entire context will appear chaotic. 2. Limited versatility: Event context generation schemes are often designed for specific types of events or fields, lacking versatility. When applied to other fields or different types of events, the effect is greatly reduced. For example, a context generation technology designed for entertainment events may not be able to accurately capture the concepts, relationships and development logic specific to the financial field when dealing with financial market fluctuations, resulting in a context that cannot meet the needs of financial analysis. SUMMARY

[0003] To solve the above technical problems, the technical solution adopted by the present application is:

[0004] According to the first aspect of the present application, an event context generation method based on a large language model is provided, which comprises the following steps:

[0005] S100, based on the event attribute information input by the user, obtaining a plurality of event data related to the event attribute information, the event attribute information at least including the event name.

[0006] S200, denoising the plurality of event data to obtain a plurality of denoised event data.

[0007] S300, clustering the plurality of event data after the denoising processing to obtain M clustering clusters, and obtaining one event data from each clustering cluster to add to the set of event data to be processed; the initial value of the set of event data to be processed is empty.

[0008] S400, for each event data in the set of event data to be processed, determining whether the event data is semantically related to the event attribute information by using the preset large language model, and if so, adding the event data to the set of candidate event data; the initial value of the set of candidate event data is empty.

[0009] S500, using the preset large language model to sort the event context in the set of candidate event data to generate a corresponding event context list.

[0010] S600, for each context node in the event context list, determining whether the context node is semantically related to the event attribute information by using the preset large language model, and if so, adding the context node to the set of candidate context nodes; the initial value of the set of candidate context nodes is empty; the context node includes an event context time and an event context name.

[0011] S700, using the preset large language model to sort the logical order of the context nodes in the set of candidate context nodes to obtain a set of context nodes with clear logic as an intermediate set of context nodes.

[0012] S800, for each context node in the intermediate set of context nodes, obtaining the similarity between the context node and each event data in the set of candidate event data, if there is event data in the set of candidate event data that has a similarity greater than a set similarity threshold with the context node, taking the event data as the source data of the context node, and adding the context node and the corresponding source data to the set of target context nodes; the initial value of the set of target context nodes is empty.

[0013] According to the second aspect of the application, an electronic device is provided, comprising a processor and a memory; the processor is used to execute the steps of the method according to the first aspect of the application by calling the program or instructions stored in the memory.

[0014] According to the second aspect of the application, a computer readable storage medium is provided, which stores programs or instructions, and the programs or instructions make the computer execute the steps of the method according to the first aspect of the application.

[0015] The application has at least the following beneficial effects:

[0016] The event context generation method based on the large language model provided by the embodiment of the present application can generate and sort the event context through the large language model, can guarantee the logicality of the context, and can enable the user to more clearly browse the causes and effects of the event. In addition, the general understanding ability of the large language model is used, and no adaptation work needs to be performed for each field.

[0017] It should be understood that the content described in this part is not intended to attribute key or important features of the embodiments of the present application, nor is it used to limit the scope of the present application. Other features of the present application will become apparent through the following description. BRIEF DESCRIPTION OF DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0019] Figure 1 The flowchart of the event context generation method based on the large language model provided by the embodiment of the present application. DETAILED DESCRIPTION

[0020] The technical solutions in the embodiments of the present application will be described clearly and completely in the following with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.

[0021] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in the description of the application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this description, the singular forms "a", "an" and "the" include plural references unless the context clearly dictates otherwise. The term "and / or" includes any and all combinations of one or more of the associated listed items.

[0022] It should be noted that some example embodiments are described as processes depicted as flow diagrams. Although the processes are described in a particular sequence or order, many of the processes can be performed in parallel, concurrently or in an order opposite to that described below. Many of the processes can be replaced or eliminated entirely. The processes can correspond to methods, functions, procedures, subroutines, subprograms, etc.

[0023] The present application aims to provide an event context generation method capable of satisfying conditions (1) to (3) as follows:

[0024] Condition (1): enhancing the visual effect, making the presented event context clear and enabling the user to quickly grasp the core content and development process of the event;

[0025] Condition (2): effectively classifying and highlighting information in the event context, avoiding the user from getting lost when browsing a large amount of information, and ensuring that whether it is a large-scale technological project development event or other complex events, the information presentation is organized;

[0026] Condition (3): not limited to a specific type of event or field context generation technology, so that it can work well in different fields and various events. For example, this technology can accurately capture the concepts, relationships and development logic specific to the financial field, meet the needs of financial analysis, and also be applicable to event analysis in other fields such as entertainment.

[0027] Based on this, the present application provides an event context generation method based on a large language model, which generates an event context through a large language model. The method includes the following steps: event information input and related data acquisition; data cleaning and correlation judgment; large model event context generation; event context cleaning and carding; event context traceability information tracing. Specifically, as shown in Figure 1 The method can include the following steps:

[0028] S100, based on the event attribute information input by the user, acquiring a plurality of event data related to the event attribute information, the event attribute information at least including an event name.

[0029] In an embodiment of the present application, the attribute information further includes one of an event keyword and an event description.

[0030] In another embodiment of the present application, the attribute information further includes an event keyword and an event description.

[0031] In the embodiment of the present application, the relevant multiple documents can be acquired from the open source database as the corresponding event data according to the event name or according to the event name and the event keyword. It is known to those skilled in the art that any method of acquiring a plurality of event data related to the event attribute information from the open source database based on the event attribute information input by the user falls within the protection scope of the present application.

[0032] S200, performing denoising processing on the plurality of event data to obtain a plurality of event data after denoising processing.

[0033] In the embodiment of the present application, the noise data in the plurality of event data is removed.

[0034] As known by those skilled in the art, any method for removing noise data in the plurality of event data falls within the protection scope of the present application.

[0035] S300, the plurality of event data after the noise removal processing is clustered to obtain M clustering clusters, and one event data from each clustering cluster is added to the event data set to be processed; the initial value of the event data set to be processed is empty.

[0036] In the embodiment of the present application, the plurality of event data after the noise removal processing is clustered to perform semantic deduplication, remove data with too high similarity, reduce the amount of subsequent processing, and keep the data pure.

[0037] In S300, the plurality of event data after the noise removal processing can be clustered by using a commonly used clustering algorithm such as K-Means or Single-pass clustering algorithm, and the specific clustering method can be the prior art.

[0038] In the embodiment of the present application, one event data from each clustering cluster can be randomly added to the event data set to be processed.

[0039] S400, for each event data in the event data set to be processed, a preset large language model is used to determine whether the event data is semantically related to the event attribute information, and if so, the event data is added to the candidate event data set; the initial value of the candidate event data set is empty.

[0040] Since the event data in the event data set to be processed is obtained only by event name or event name and event keyword information retrieval, it cannot be guaranteed that all event data is related to the event corresponding to the event name, so it is necessary to further determine the relevance in the semantic.

[0041] In the embodiment of the present application, the preset large language model can be any large language model in the prior art. By inputting the corresponding interaction information, i.e., the instruction sentence, to the preset large language model, it can be determined whether each event data in the event data set to be processed is semantically related to the event attribute information.

[0042] Specifically, in S400, the preset large language model determines whether the event data is semantically related to the event attribute information based on the first interaction information.

[0043] In the embodiment of the present application, the first interaction information can include judgment description information, answer indication information, output indication information and event data to be judged, wherein the judgment description information is used to indicate the description information for the preset large language model to judge whether the event data to be judged is semantically related to the event attribute information, the answer indication information is used to indicate how the preset large language model answers, and the output indication information is used to indicate how the preset large language model outputs the answer. The first interaction information can be determined based on actual conditions, for example, it can be determined according to experience.

[0044] In one illustrative embodiment, the first interaction information can be: "Judge whether the following news contains information related to eventName based on event description, answer 'yes' or 'no', and output the result in standard json format { 'Is related': ''} \n

Event description

News

[0045] By inputting the first interaction information into the large language model, the large language model will judge whether each event data in the event data set to be processed is semantically related to the event attribute information according to the received first interaction information, and if so, it will output yes in json format, otherwise, it will output no.

[0046] In S400, if a piece of event data in the event data set to be processed is not semantically related to the event attribute information, the event data is not used.

[0047] S500, using the preset large language model to card the event context in the candidate event data set, and generating a corresponding event context list.

[0048] In the embodiment of the present application, the context node includes event context time and event context name, and the specific format is [{“event context time”: “”, “event context name”: “”}].

[0049] In S500, the preset large language model cards the event context in the candidate event data set based on the second interaction information, and generates a corresponding event context list.

[0050] In the embodiment of the present application, the second interaction information includes carding description information, output indication information, carding condition information, and event data that needs to be carded, the carding description information is used to instruct the preset large language model to card the event context in the candidate event data set based on the second interaction information, the output indication information is used to instruct the preset large language model to output the answer in which way, and the carding condition information is used to instruct the preset large language model to card based on which conditions. The second interaction information can be determined based on actual conditions, for example, it can be determined according to experience.

[0051] In one illustrative embodiment, the second interaction information can be: summarize the development context related to the event eventName according to the following news list, and output [{“event context time”: “”, “event context name”: “”}] in standard json format. Requirements: 1. The context name needs to be a declarative sentence; 2. The context name is concise and concise; 3. Remove the reference phenomenon

News list

[0052] By inputting the second interaction information into the large language model, the large language model will card the event context in the candidate event data set according to the received second interaction information, and output the event context list in the format of [{“event context time”: “”, “event context name”: “”}] in standard json format.

[0053] S600, for each context node in the event context list, determine whether the context node is semantically related to the event attribute information using the preset large language model, and if so, add the context node to the candidate context node set; the initial value of the candidate context node set is empty.

[0054] Since there may be unrelated contexts in the carding context of the large model, it is necessary to further determine the relevance of each context node to the event.

[0055] Further, in S600, the preset large language model determines whether the context node is semantically related to the event attribute information based on third interaction information.

[0056] In the embodiment of the present application, the third interaction information includes judgment description information, answer indication information, output indication information, and context nodes that need to be judged, the judgment description information is used to instruct the preset large language model to judge whether the context node that needs to be judged is semantically related to the event attribute information based on the third interaction information, the answer indication information is used to instruct the preset large language model to answer in which way, and the output indication information is used to instruct the preset large language model to output the answer in which way. The third interaction information can be determined based on actual conditions, for example, it can be determined according to experience.

[0057] In an illustrative embodiment, the third interaction information can be: "Judge whether the following venation nodes contain information related to the event name based on the event description, answer 'yes' or 'no', and the result is output in the standard json format { "Is related": ""} \n

Event description

Venation node

[0058] By inputting the third interaction information into the large language model, the large language model will judge whether each venation node in the event data set to be processed is semantically related to the event attribute information according to the received third interaction information, and if so, it will output yes in json format, otherwise, output no.

[0059] In S600, if a venation node in the event venation list is not semantically related to the event attribute information, the venation node is discarded.

[0060] S700, using the preset large language model to comb the logical order of the venation nodes in the candidate venation node set, obtaining a logical clear venation node set as an intermediate venation node set.

[0061] Because the event venation time sorted according to the large language model will have the phenomenon of insufficient clarity and logical confusion, it is necessary to logically comb the entire event venation to make the event venation logically clear. The combing process requires simultaneous consideration of the occurrence time and the occurrence logic.

[0062] Further, in S700, the preset large language model combs the logical order of the candidate venation nodes based on the fourth interaction information.

[0063] In an embodiment of the present application, the fourth interaction information includes combing description information, output indication information, and venation nodes that need to be combed. The combing description information is used to indicate that the preset large language model combs the logical order of the candidate venation nodes based on the fourth interaction information. The output indication information is used to indicate the way the preset large language model outputs the answer. The fourth interaction information can be determined based on actual conditions, for example, it can be determined according to experience.

[0064] In an illustrative embodiment, the fourth interaction information can be: "Please sort and reorder the following event context, make it clear in logic, and remove duplicates. Output the sorted context node sequence list directly in standard json format [sequence number 1, sequence number 2].

context node list

[0065] By inputting the fourth interaction information into the large language model, the large language model will sort the logical order of the candidate context nodes according to the received fourth interaction information, and output the sorted context node sequence list in standard json format.

[0066] S800, for each context node in the intermediate context node set, obtain the similarity between the context node and each event data in the candidate event data set, if there is an event data in the candidate event data set that has a similarity greater than a set similarity threshold with the context node, take the event data as the source data of the context node, and add the context node and the corresponding source data to the target context node set; the initial value of the target context node set is empty.

[0067] In the embodiment of the application, the similarity can be a cosine similarity. The set similarity threshold can be an empirical value, for example, 0.8. Those skilled in the art know that any method of obtaining the cosine similarity between the context node and each event data in the candidate event data set is within the protection scope of the present application.

[0068] In S800, if there is no event data in the candidate event data set that has a similarity greater than a set similarity threshold with a certain context node, the context node is discarded.

[0069] Further, the event context generation method based on a large language model provided by the embodiment of the application further comprises the following steps:

[0070] S900, visually display the context nodes in the target context node set.

[0071] Those skilled in the art know that any method of visually displaying the context nodes in the target context node set is within the protection scope of the present application.

[0072] The embodiment of the application also provides an electronic device, comprising: at least one processor; and a memory communicatively connected with the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are configured to execute the method described in the embodiment of the application.

[0073] The embodiment of the present application further provides a computer readable storage medium, which stores computer executable instructions, and the computer executable instructions are used for executing the method described in the embodiment of the present application.

[0074] It should be understood that the steps shown above can be reordered, added to, or deleted from, using various forms of flow. For example, the steps described in the present application can be executed in parallel, sequentially, or in different orders, as long as the desired results of the technical solutions disclosed in the present application can be achieved, which is not limited herein.

[0075] The above detailed description does not constitute a limitation on the protection scope of the present application. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modification, equivalent replacement, and improvement within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims

1. A method for generating an event context based on a large language model, characterized in that, The event is a news event, and the method comprises the following steps: S100, based on the event attribute information input by the user, obtaining a plurality of event data related to the event attribute information, the event attribute information at least comprising an event name; wherein a plurality of documents related are obtained from an open source database as corresponding event data by using a data acquisition interface; S200, denoising the plurality of event data to obtain a plurality of denoised event data; S300, clustering the plurality of denoised event data to obtain M clusters, and obtaining one event data from each cluster to join the set of event data to be processed; the initial value of the set of event data to be processed is empty; S400, for each event data in the set of event data to be processed, using a preset large language model to determine whether the event data is semantically related to the event attribute information based on interaction information, and if so, adding the event data to the set of candidate event data; the initial value of the set of candidate event data is empty; S500, using the preset large language model to comb the event context in the set of candidate event data to generate a corresponding event context list; S600, for each context node in the event context list, using the preset large language model to determine whether the context node is semantically related to the event attribute information, and if so, adding the context node to the set of candidate context nodes; the initial value of the set of candidate context nodes is empty; the context node comprises an event context time and an event context name; S700, using the preset large language model to comb the logical order of the context nodes in the set of candidate context nodes to obtain a set of context nodes with clear logic as an intermediate set of context nodes; S800, for each context node in the intermediate set of context nodes, obtaining the similarity between the context node and each event data in the set of candidate event data, if there is an event data in the set of candidate event data that has a similarity greater than a set similarity threshold with the context node, the event data is taken as the source data of the context node, and the context node and the corresponding source data are added to the set of target context nodes; the initial value of the set of target context nodes is empty.

2. The method of claim 1, wherein, Further comprising the following steps: S900, visually displaying the context nodes in the set of target context nodes.

3. The method of claim 1, wherein, The attribute information further comprises an event description.

4. The method of claim 3, wherein, In S400, the preset large language model determines whether the event data is semantically related to the event attribute information based on first interaction information, wherein the first interaction information comprises judgment description information, answer indication information, output indication information, and event data to be judged, wherein the judgment description information is used to indicate the description information of the preset large language model judging whether the event data to be judged is semantically related to the event attribute information, the answer indication information is used to indicate the way in which the preset large language model answers, and the output indication information is used to indicate the way in which the preset large language model outputs the answer.

5. The method of claim 1, wherein, In S500, the preset large language model combs the event thread in the candidate event data set based on second interaction information to generate a corresponding event thread list, wherein the second interaction information includes combing description information, output indication information, combing condition information, and event data that needs to be combed, the combing description information is used to indicate that the preset large language model combs the event thread in the candidate event data set based on the second interaction information, the output indication information is used to indicate how the preset large language model outputs the answer, and the combing condition information is used to indicate which conditions the preset large language model combs based on.

6. The method of claim 1, wherein, In S600, the preset large language model determines whether the thread node is semantically related to event attribute information based on third interaction information, the third interaction information includes judgment description information, answer indication information, output indication information, and a thread node that needs to be determined, the judgment description information is used to indicate that the preset large language model determines whether the thread node that needs to be determined is semantically related to the event attribute information based on the third interaction information, the answer indication information is used to indicate how the preset large language model answers, and the output indication information is used to indicate how the preset large language model outputs the answer.

7. The method of claim 1, wherein, In S700, the preset large language model combs the logical order of the candidate thread node based on fourth interaction information, the fourth interaction information includes combing description information, output indication information, and a thread node that needs to be combed, the combing description information is used to indicate that the preset large language model combs the logical order of the candidate thread node based on the fourth interaction information, and the output indication information is used to indicate how the preset large language model outputs the answer.

8. The method of claim 1, wherein, In S300, the K-Means or Single-pass clustering algorithm is used to cluster the plurality of event data after denoising processing.

9. An electronic device, comprising: The processor and the memory are included. The processor is configured to execute the steps of the method according to any one of claims 1 to 8 by invoking the program or the instruction stored in the memory.

10. A computer-readable storage medium, characterized in that, The computer readable storage medium is configured to store the program or the instruction, which makes the computer execute the steps of the method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Hot news event venation generation method and device based on BERT

    CN116992886A

  • Contradiction dispute event venation generation method

    CN118569389A