An interpretable event thread generation method for large model retrieval enhanced generation
By using a large-scale model retrieval-enhanced generation method, the problem of traditional event context analysis struggling to extract thematic materials from large-scale and complex data is solved, generating interpretable and traceable event contexts to meet the needs of event analysis for different purposes.
Patent Information
- Application Number
- CN202311790773.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-22
- Publication Date
- 2026-08-25
- Estimated Expiration
- 2043-12-22
AI Technical Summary
In large-scale and complex data, traditional event context analysis methods struggle to quickly and accurately extract the thematic materials needed by users, and they neglect the dynamic and fluid nature of events, making it difficult to construct event contexts.
A large-model retrieval enhancement generation method is adopted, which generates interpretable event contexts through weighted summation hybrid retrieval, coreference and shared event discrimination model, inference hints and semantic similarity matching, including text data processing, retrieval database construction, coreference and shared event removal and event tracing.
It enables efficient generation of interpretable and traceable event contexts from complex text data, reduces model illusions and candidate knowledge redundancy, and meets the needs of event context generation in different dimensions.
Smart Images

Figure CN118113806B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of natural language processing analysis, and more specifically, to a method for generating interpretable event contexts through large-scale model retrieval enhancement. Background Technology
[0002] Event context analysis is a crucial tool for tracing the origins and development of an event. It's an analytical method that focuses on the interactions and temporal evolution of events, aiming to uncover correlations, temporal relationships, and causal relationships between them. Event context analysis provides a more comprehensive and in-depth analytical approach, primarily aimed at understanding the development and changes of events, as well as the driving forces behind these changes, including identifying key stages of an event and analyzing the connections between these stages. However, with the development of big data in the information age, the sheer volume, complexity, and low quality of data have made it increasingly difficult to quickly extract the thematic materials needed by users, discover shared and referential events, and ultimately construct event contexts based on the cleaned and organized materials. Therefore, establishing an efficient and accurate event context analysis method based on open-source material data has significant research value.
[0003] Traditional event context analysis involves identifying the theme, collecting data, organizing events, analyzing events, building a model, parsing the model, and drawing conclusions. However, it has limitations when dealing with large-scale and open-source data. For example, rule-based or template-based methods often face challenges when handling large datasets because they typically require manually defining rules or templates, which becomes increasingly difficult to create and maintain as the amount of data increases. Furthermore, it tends to overlook the dynamic and fluid nature of events. "Process-event analysis" better highlights the dynamic and fluid nature of social facts, while some traditional event context analysis methods still primarily focus on the static characteristics of events, neglecting their dynamic changes. Summary of the Invention
[0004] To address the problems existing in the prior art, this invention proposes an interpretable event context generation method using large-scale model retrieval enhancement. This method retrieves a candidate set of events for the user's analysis using a weighted summation hybrid retrieval method based on the user's actual topic. It then cleans the data of common and shared events using a semantic and key element joint method, sorts and categorizes the candidate set by time, and finally generates a prompt for a specific task based on the search content. This method generates on-demand event contexts based on a generative large-scale model, and ensures that the generated event contexts are interpretable and traceable, aiming to solve the problem of generating event contexts under complex text data.
[0005] This invention provides a method for generating interpretable event contexts through enhanced large-model retrieval, characterized by comprising the following steps:
[0006] S1: Process text data and build a retrieval database;
[0007] S2: Perform a weighted summation-based hybrid search in the retrieval database;
[0008] S3: Construct a coreference and shared event discrimination model and use the coreference and shared event discrimination model to discriminate coreference and shared events in mixed search results, and remove coreference and shared events from mixed search results;
[0009] S4: Generate an event timeline based on reasoning hints based on the mixed search results processed in step S3;
[0010] S5: Perform interpretable event context tracing based on semantic similarity matching.
[0011] Furthermore, step S1 includes:
[0012] Fixed-size text cutting;
[0013] Summarize and extract keywords from the segmented text;
[0014] Vectorization of the summary and segmented text is performed based on the bge word embedding model;
[0015] A retrieval database is constructed based on keywords, abstract vectors, and segmented text and its vectors.
[0016] Furthermore, step S2 includes:
[0017] Based on the retrieval database, three retrieval methods are performed: text-summary, text-keyword, and text-segmented text. Then, a weighted summation hybrid retrieval method is used to filter relevant topic candidate events. Finally, the articles corresponding to the segmented sentences are returned, and the articles are sorted by publication time to obtain the final set of relevant topic candidate events.
[0018] Furthermore, in step S2, the relevant topic candidate events are filtered using a weighted summation hybrid retrieval method for the three retrieval methods, including:
[0019] For the vector database constructed from the summary vector and the segmented text vector, the similarity between the input topic and the data in the vector database is calculated using cosine similarity.
[0020] A preliminary selection of candidate events for relevant topics is made based on a set threshold score.
[0021] The initial set of relevant topic candidate events is further refined using keywords to obtain the final set of relevant topic candidate events.
[0022] Furthermore, step S3 includes:
[0023] The candidate event set is vectorized based on the bge word embedding model.
[0024] The vectorized candidate event set is combined pairwise, and the cosine similarity is calculated for each pair. Events with a value greater than a set threshold are retained in the similar event candidate set.
[0025] Key elements are extracted from the candidate set of similar events, and by comparing the key elements of similar events, the co-referenced and shared events are further filtered.
[0026] Furthermore, step S4 includes:
[0027] Different needs require the construction of different dimensions of event context, therefore different prompts should be designed according to different dimensions and candidate event sets;
[0028] Using prompts as input to a generative LLM large model enables the generation of event context.
[0029] Furthermore, step S5 includes:
[0030] The generated event timeline and candidate event set are segmented by sentence.
[0031] The segmented sentences are vectorized based on the bge word embedding model;
[0032] The sentence vectors generated from the event context and the candidate event set are combined in pairs;
[0033] The similarity between the two sentences is calculated using cosine similarity, and the sentence with the highest similarity result is taken as the relevant source content for generating the event timeline.
[0034] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are:
[0035] This invention addresses three main issues: First, it enables generative large models to respond based on retrieved candidate knowledge, reducing the model illusion problem; second, it removes coreferences and shared events based on a semantic and key element combination method, reducing the redundancy of candidate knowledge; and third, it enables large models to generate event contexts with different requirements through reasoning prompts, while ensuring that the generated results are interpretable and traceable. Attached Figure Description
[0036] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0037] Figure 1 This is a flowchart of the method for generating interpretable event contexts through large model retrieval enhancement in an embodiment of the present invention.
[0038] Figure 2 This is a flowchart illustrating the construction of a retrieval database in an embodiment of the present invention. Detailed Implementation
[0039] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0040] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0041] Example
[0042] like Figure 1 As shown in the figure, this embodiment proposes a method for generating interpretable event contexts through large model retrieval enhancement, including the following steps:
[0043] S1: Process text data and build a retrieval database;
[0044] The retrieval-enhanced interpretable event context generation method first retrieves a candidate set of events related to the user's input topic, and then generates a relevant context based on the event candidate set. Therefore, relevant text data processing and vector library construction are performed according to actual needs. Figure 2 As shown, step S1 includes the following sub-steps:
[0045] Fixed-size text segmentation: Assuming the text is represented as N and the fixed segment length is n, then take a segment of text of length n from the text N in a loop. If the segment at position n is not a complete sentence, then segment it after the complete period at that position to form a fixed-size text set [N1, N2, ...]..];
[0046] Summarize and extract keywords from the segmented text: Based on the segmented text, summarize and extract keywords using the LLM model. Keyword extraction includes definite words such as "person, time, organization".
[0047] Vectorization of the summary and segmented text is performed based on the bge word embedding model;
[0048] A retrieval database is constructed based on keywords, abstract vectors, and segmented text and its vectors.
[0049] S2: Perform a weighted summation-based hybrid search in the search database:
[0050] Based on the retrieval database, three retrieval methods were performed: text-summary, text-keyword, and text-segmented text. Then, a weighted summation hybrid retrieval method was used to filter relevant topic candidate events. Specifically, for the vector database constructed from summary vectors and segmented text vectors, cosine similarity was used to calculate the similarity between the input topic and the data in the vector database. Let the weight of the summary retrieval result α1 be ω1, and the weight of the segmented text retrieval result α2 be ω2, where ω1 > ω2. Then, the weighted summation result α is:
[0051]
[0052] Based on the above method, a set of relevant topic candidate events with a score greater than the set threshold can be obtained. Since vector retrieval is good in semantic effect but insufficient in keyword recognition, the constructed keyword database is used to further refine the set of relevant topic candidate events obtained by semantic retrieval by matching and inputting keywords in the topic. Finally, the articles corresponding to the segmented sentences are returned, and the articles are sorted by time based on their publication time to obtain the final set of relevant topic candidate events.
[0053] S3: Construct a coreference and shared event discrimination model and use the coreference and shared event discrimination model to identify coreference and shared events in the mixed search results, and remove coreference and shared events from the mixed search results:
[0054] In the retrieved set of candidate events related to relevant topics, there are certain coreferences and shared events. Therefore, it is necessary to construct a coreference and shared event discrimination model to remove coreferences and shared events from the candidate event set. In this embodiment, the coreference and shared event discrimination model adopts a method based on a combination of semantics and key elements to discriminate coreferences and shared events. Specifically, it includes:
[0055] The candidate event set is vectorized based on the bge word embedding model.
[0056] The vectorized candidate event set is combined pairwise, represented as: [[a1,a2],[a1,a2],......]; cosine similarity is calculated for each pair, and events with a value greater than a set threshold are retained in the similar event candidate set;
[0057] Based on the generative LLM large model, key elements are extracted from the candidate set of similar events. By comparing the key elements of similar events (subject, object, time, place, etc.), the core reference and shared events are further screened. If their key elements are the same, they can be judged as core reference or shared events.
[0058] S4: Generate an event timeline based on inference hints from the mixed search results:
[0059] Different needs require the construction of event timelines across different dimensions. Generative LLMs possess the ability to follow instructions and, based on the retrieved candidate event set, can design different prompts according to different dimensions and the candidate event set. For example: "Following the chronological order, outline the event timeline of event xxx based on the following article content. Article content: xxx." Using these prompts as input to the generative LLM model enables the generation of event timelines.
[0060] S5: Explainable event context tracing based on semantic similarity matching:
[0061] To ensure the interpretability of the generated results, this embodiment uses semantic similarity matching to trace the origin of the generated context. Specifically, this includes:
[0062] The generated event timeline and candidate event set are segmented by sentence.
[0063] The segmented sentences are vectorized based on the bge word embedding model. The sentence vectors after event context segmentation are represented as [s1, s2, ...], and the sentence vectors after candidate event set segmentation are represented as [w1, w2, ...].
[0064] The sentence vectors generated from the event context and the candidate event set are combined in pairs and represented as [[s1,w1],[s1,w2],[s2,w1],[s2,w2]......].
[0065] The similarity between the two sentences is calculated using cosine similarity, and the sentence with the highest similarity result is taken as the relevant source content for generating the event timeline.
[0066] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for generating interpretable event contexts through enhanced large-model retrieval, characterized in that, Includes the following steps: S1: Process text data and build a retrieval database; S2: Perform a weighted summation-based hybrid search in the retrieval database; S3: Construct a coreference and shared event discrimination model and use the coreference and shared event discrimination model to discriminate coreference and shared events in mixed search results, and remove coreference and shared events from mixed search results; S4: Generate an event timeline based on reasoning hints based on the mixed search results processed in step S3; S5: Perform interpretable event context tracing based on semantic similarity matching; Step S1 includes: Fixed-size text cutting; Summarize and extract keywords from the segmented text; Vectorization of the summary and segmented text is performed based on the bge word embedding model; A retrieval database is constructed based on keywords, abstract vectors, and segmented text and its vectors; Step S2 includes: Based on the retrieval database, three retrieval methods are performed: text-summary, text-keyword, and text-segmented text. Then, a weighted summation hybrid retrieval method is used to filter relevant topic candidate events. Finally, the articles corresponding to the segmented sentences are returned, and the articles are sorted by publication time to obtain the final set of relevant topic candidate events.
2. The method for generating interpretable event contexts using large model retrieval enhancement as described in claim 1, characterized in that, In step S2, the relevant topic candidate events are filtered using a weighted summation hybrid retrieval method for the three retrieval methods, including: For the vector database constructed from the summary vector and the segmented text vector, the similarity between the input topic and the data in the vector database is calculated using cosine similarity. A preliminary selection of candidate events for relevant topics is made based on a set threshold score. The initial set of relevant topic candidate events is further refined using keywords to obtain the final set of relevant topic candidate events.
3. The method for generating interpretable event contexts using large model retrieval enhancement as described in claim 2, characterized in that, Step S3 includes: The candidate event set is vectorized based on the bge word embedding model. The vectorized candidate event set is combined pairwise, and the cosine similarity is calculated for each pair. Events with a value greater than a set threshold are retained in the similar event candidate set. Key elements are extracted from the candidate set of similar events, and by comparing the key elements of similar events, the co-referenced and shared events are further filtered.
4. The method for generating interpretable event contexts using large model retrieval enhancement as described in claim 3, characterized in that, Step S4 includes: Different needs require the construction of different dimensions of event context, therefore different prompts should be designed according to different dimensions and candidate event sets; Using prompts as input to a generative LLM large model enables the generation of event context.
5. The method for generating interpretable event contexts using large model retrieval enhancement as described in claim 4, characterized in that, Step S5 includes: The generated event timeline and candidate event set are segmented by sentence. The segmented sentences are vectorized based on the bge word embedding model; The sentence vectors generated from the event context and the candidate event set are combined in pairs; The similarity between the two sentences is calculated using cosine similarity, and the sentence with the highest similarity result is taken as the relevant source content for generating the event timeline.
Citation Information
Patent Citations
Long text summarization method and device, equipment and medium
CN116933774A
Text summarization generation method and apparatus, and device and storage medium
WO2022241950A1