An event graph-based enterprise knowledge base content retrieval method, device, equipment and storage medium
By constructing an event graph and performing semantic matching and time intent recognition, the problem of low efficiency in processing time-sensitive information in enterprise knowledge bases by large language models is solved, achieving efficient and accurate retrieval result generation and improving user experience.
Patent Information
- Application Number
- CN202511297185.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-11
- Publication Date
- 2026-07-21
- Estimated Expiration
- 2045-09-11
AI Technical Summary
Existing large-scale language models struggle to effectively handle time-sensitive information or multi-step temporal chain reasoning in enterprise knowledge bases, especially when the order of events is disordered or there are logical jumps. The lack of explicit modeling of the temporal relationships between events in a document leads to low retrieval efficiency.
By extracting time-anchored features, entity behavior features, and candidate event information from unstructured enterprise knowledge base text, a structured event graph is constructed. Then, a pre-set large language model is used for semantic matching and time intent recognition, and time consistency path search and reasoning are performed to generate retrieval text with citation basis, time tag, and credibility mark.
It improves the efficiency of enterprise knowledge base content retrieval, enhances user experience, and ensures the accuracy and consistency of search results.
Smart Images

Figure CN121071101B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of natural language processing technology, and in particular to a method, apparatus, device, and storage medium for retrieving enterprise knowledge base content based on event graphs. Background Technology
[0002] Currently, with the significant progress made by large language models in tasks such as open-domain question answering, knowledge generation, and natural language understanding, their application in practical scenarios such as enterprise knowledge bases is becoming increasingly widespread. These enterprise knowledge bases include, but are not limited to, medical, financial, and government enterprise knowledge bases. However, current mainstream LLMs (Large Language Models) often have significant limitations when dealing with problems involving time-sensitive information or multi-step temporal chain reasoning. Traditional generation mechanisms mainly rely on knowledge stored in the model's static parameters, which often leads to information lag, disordered event order, or logical jumps for queries with frequently updated facts or large time spans. To alleviate these problems, Retrieval-Augmented Generation (RAG) methods have emerged, introducing external document retrieval as auxiliary context to improve knowledge coverage and factual accuracy.
[0003] However, while RAG enhances the model's knowledge access capabilities to some extent, existing methods primarily rely on paragraph-level matching based on semantic vector similarity, lacking explicit modeling of temporal relationships between events in a document. This makes it difficult to effectively handle questions with temporal constraints and causal chains, such as "what someone did after a certain time." To address this, some studies have introduced graph structures (such as Graph-RAG) to model entity associations between information blocks. However, these graph structures are mostly static, unable to dynamically reflect event evolution and temporal progression, and lack accurate modeling and retrieval capabilities for event-level temporal semantics.
[0004] As can be seen from the above, how to improve the efficiency of retrieving enterprise knowledge base content in the process of retrieving enterprise knowledge base content based on event graphs is an urgent problem to be solved. Summary of the Invention
[0005] In view of this, the purpose of this invention is to provide a method, apparatus, device, and storage medium for retrieving enterprise knowledge base content based on event graphs, which can improve the efficiency of retrieving enterprise knowledge base content during the event graph-based enterprise knowledge base content retrieval process. The specific solution is as follows:
[0006] Firstly, this application provides a method for retrieving enterprise knowledge base content based on event graphs, including:
[0007] Candidate event information, including time anchoring features, entity behavior features, and action behaviors, is extracted from unstructured initial enterprise knowledge base text to obtain a structured set of event sentences. Each candidate event information in the event sentence set is set as a node, and the temporal relationship between each candidate event information is set as an edge. An event graph with a directed graph structure is generated based on the nodes and the edges.
[0008] The user query content is structured and parsed to obtain the query fields. Based on the query fields, semantic matching and time intent recognition operations are performed in the event graph to obtain a set of candidate nodes. Then, time consistency path search is performed in the set of candidate nodes to obtain the event path to be processed.
[0009] Semantic aggregation, redundancy elimination and path fusion expression are performed sequentially on the event path to be processed to obtain the corresponding candidate event path. Then, time-aware reasoning is performed on the candidate event path using a preset large language model and based on a preset time chain thinking prompting strategy to obtain the reasoning result.
[0010] The reasoning results are subjected to structured parsing, event path alignment, and confidence assessment to obtain enterprise knowledge base retrieval text with citation basis, time tag, and confidence mark.
[0011] Optionally, the step of extracting candidate event information, including time-anchored features, entity behavior features, and action behaviors, from the unstructured initial enterprise knowledge base text to obtain a structured set of event sentences, including:
[0012] By using a preset global context enhancement mechanism, the global background, structural tags and context window corresponding to the initial enterprise knowledge base text are used to splice together the text fragments in the initial enterprise knowledge base text to obtain a first text block to be processed with consistent context.
[0013] The number of entities, the number of time expressions, and the number of verbs in each of the first text blocks to be processed, as well as their corresponding weights, are determined. Then, a preset information density scoring function is used to evaluate each of the text blocks to be processed based on the number of entities, the number of time expressions, the number of verbs, and their respective weights, to obtain the event-based evaluation result.
[0014] Determine whether the event assessment result is greater than a preset event threshold. If the event assessment result is greater than the preset event threshold, then set the first text block to be processed corresponding to the event assessment result as the second text block to be processed.
[0015] The semantic understanding of each second text block to be processed is performed using a preset large language model to obtain the understanding result. Then, the understanding result is subjected to named entity recognition using a preset named entity recognition model to obtain the named entity recognition result. Finally, the understanding result is subjected to semantic role labeling to obtain the semantic role labeling result. The named entities include people's names, organizations, and positions.
[0016] Based on the understanding results, the named entity recognition results, and the semantic role labeling results, the event sentence to be processed is determined, and the original time phrase in the event sentence to be processed is extracted using a preset time recognition tool. Then, the original time phrase is normalized into a standard timestamp by combining a preset document time benchmark to obtain the event sentence to be evaluated.
[0017] The retention value of each event sentence to be evaluated is evaluated using an event-based scoring mechanism to obtain a value evaluation result. It is then determined whether the value evaluation result is greater than a preset value evaluation threshold. If the value evaluation result is greater than the preset value evaluation threshold, an event sentence set is constructed based on the event sentences to be evaluated corresponding to each value evaluation result.
[0018] Optionally, the step of using a preset global context enhancement mechanism to concatenate the text fragments in the initial enterprise knowledge base text with the global background, structural tags, and context window corresponding to the initial enterprise knowledge base text to obtain a first text block to be processed with consistent context includes:
[0019] A context-aware inter-sentence boundary prediction function is used to calculate the boundary probability of each adjacent sentence in the unstructured initial enterprise knowledge base text, and the boundary probability calculation result is obtained. It is then determined whether each boundary probability calculation result is greater than a preset boundary threshold. If the boundary probability calculation result is greater than the preset boundary threshold, the sentence corresponding to the boundary probability calculation result is set as the starting point of the slice.
[0020] The initial enterprise knowledge base text is segmented according to the preset window length and the starting point of each slice to obtain several text segments. Then, the global background, structural tags, and context window corresponding to the initial enterprise knowledge base text are determined. The global background includes the document title, time, and main domain of the initial enterprise knowledge base text. The structural tags include the title and segmentation tags in the text segments. The context window is the last sentence of the text segment preceding the text segment.
[0021] Each text fragment is configured with a corresponding structured location label, including a unique document identifier, a segmentation unit number, and a relative position ratio. Then, a preset global context enhancement mechanism is used to concatenate the text fragments in the initial enterprise knowledge base text with the global background, the structure label, the context window, and the structured location label, resulting in a first text block to be processed with consistent context.
[0022] Optionally, the step of setting each candidate event information in the event sentence set as a node, and then setting the temporal relationship between each candidate event information as an edge, to generate an event graph with a directed graph structure based on the nodes and the edges, includes:
[0023] Each event sentence in the candidate event information of the event sentence set is set as a node, and core attributes are extracted from each node to obtain attribute information. A node feature vector is constructed based on the attribute information. The attribute information includes the subject agent, event action, action verb, action object, timestamp, and organizational background.
[0024] Determine whether each pair of nodes satisfies the time stamp order relationship. If so, construct a directed time edge between each pair of nodes to obtain the corresponding first edge. Then, determine whether the events corresponding to each pair of nodes have the same subject or organization. If so, construct an entity co-occurrence edge between each pair of nodes to obtain the corresponding second edge.
[0025] The temporal proximity of the first side and the second side is determined by using a preset exponential decay function, and the semantic similarity of the first side and the second side is determined by using a preset vector cosine similarity function. Based on the temporal proximity and the semantic similarity, a first weight corresponding to the first side and a second weight corresponding to the second side are determined.
[0026] Determine whether each of the first edges and each of the second edges overlap. If they overlap, accumulate the first weight and the second weight to obtain the weight accumulation result. Then, based on the weight accumulation result, each node and each edge, generate an event graph with a directed graph structure.
[0027] Optionally, the structured parsing of user query content yields query fields, and semantic matching and temporal intent recognition are performed on the event graph based on these query fields to obtain a candidate node set. Then, a time-consistent path search is performed on the candidate node set to obtain the event path to be processed, including:
[0028] A semantic augmentation representation is used to determine the query vector corresponding to the user's query content. Then, a large language model is used to perform structured parsing of the user's query content based on the query vector to obtain the parsing result. The parsing result includes time prompts, subjects of interest, actions of interest, and question types.
[0029] Based on the parsing results, the query vector and the event sentences corresponding to the nodes in the event graph, semantic matching is performed to obtain semantic matching results. Then, based on the time prompts in the user query content and the event sentences corresponding to the nodes in the event graph, time filtering is performed to obtain time filtering results. Finally, a set of candidate nodes is determined based on the semantic matching results and the time filtering results.
[0030] Using preset path search constraints, the event paths to be processed are constructed by traversing backward along the time edge of the event graph in the candidate node set. The preset path search constraints include time increment constraints, semantic relevance constraints, and hop count limitation constraints.
[0031] Optionally, the process involves sequentially performing semantic aggregation, redundancy elimination, and path fusion expression on the event path to be processed to obtain corresponding candidate event paths. Then, a preset large language model is used, and a preset time-chain thinking prompting strategy is applied to perform time-aware reasoning on the candidate event paths to obtain the reasoning results, including:
[0032] An ordered set is constructed based on each of the event paths to be processed, and event paths to be merged that share the same event nodes or whose semantic expressions meet preset similarity conditions are identified among the event paths to be processed in the ordered set; wherein, the event paths to be processed include a set of event nodes that are sequentially continuous.
[0033] The paths of the events to be fused are fused to obtain fused event paths. The cosine similarity between the corresponding event nodes is determined by using a preset event similarity matrix. Then, it is determined whether the cosine similarity is greater than a preset similarity threshold. If the cosine similarity is greater than the preset similarity threshold, the corresponding event nodes are fused to obtain a fused path set.
[0034] The event nodes corresponding to each fused event path in the fused path set are sorted according to the time anchor point to obtain the sorting result. It is then determined whether the time span between two event nodes corresponding to the sorting result is greater than a preset time span threshold. If the time span is greater than the preset time span threshold, the corresponding event sentence node is chained in the event graph to obtain the inference result.
[0035] Optionally, the process of performing structured parsing, event path alignment, and confidence assessment on the inference results to obtain enterprise knowledge base retrieval text with citation basis, time tags, and confidence markers includes:
[0036] The reasoning results are subjected to structured parsing, event path alignment, and confidence assessment to obtain the initial enterprise knowledge base retrieval text. Then, the conclusive statement and explanatory statement corresponding to the initial enterprise knowledge base retrieval text are determined, and a set of candidate fact units is determined based on the conclusive statement and the explanatory statement.
[0037] Align the language text in the candidate fact unit set with the event sentences corresponding to the nodes in the event graph to obtain the alignment result, and generate a confidence score based on the alignment result and time anchors;
[0038] If the confidence score is greater than a preset confidence threshold, then the confidence tag corresponding to the initial enterprise knowledge base retrieval text is set as reliable. Then, the node corresponding to the highest confidence score among all the confidence scores is set as the reference basis corresponding to the initial enterprise knowledge base retrieval text. Based on the reference basis, the confidence tag, and the initial enterprise knowledge base retrieval text, the target enterprise knowledge base retrieval text with a time tag is determined.
[0039] Secondly, this application provides an event graph-based enterprise knowledge base content retrieval device, comprising:
[0040] The event graph generation module is used to extract candidate event information, including time anchoring features, entity behavior features and action behaviors, from unstructured initial enterprise knowledge base text to obtain a structured set of event sentences. Each candidate event information in the event sentence set is set as a node, and the temporal relationship between each candidate event information is set as an edge, so as to generate an event graph with a directed graph structure based on the nodes and the edges.
[0041] The event path determination module is used to parse the user query content in a structured manner to obtain the query fields, and perform semantic matching and time intent recognition operations on the event graph based on the query fields to obtain a set of candidate nodes. Then, a time consistency path search is performed on the set of candidate nodes to obtain the event path to be processed.
[0042] The reasoning result generation module is used to sequentially perform semantic aggregation, redundancy elimination and path fusion expression on the event path to be processed to obtain the corresponding candidate event path. Then, it uses a preset large language model and a preset time chain thinking prompting strategy to perform time-aware reasoning on the candidate event path to obtain the reasoning result.
[0043] The retrieval text determination module is used to perform structured parsing, event path alignment, and confidence assessment on the reasoning results to obtain enterprise knowledge base retrieval text with citation basis, time tag, and confidence mark.
[0044] Thirdly, this application provides an electronic device, comprising:
[0045] Memory, used to store computer programs;
[0046] A processor is used to execute the computer program to implement the aforementioned event graph-based enterprise knowledge base content retrieval method.
[0047] Fourthly, this application provides a computer-readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the aforementioned event graph-based enterprise knowledge base content retrieval method.
[0048] As can be seen from the above, before performing enterprise knowledge base content retrieval based on event graphs, this application needs to extract candidate event information, including time anchoring features, entity behavior features, and action behaviors, from the unstructured initial enterprise knowledge base text to obtain a structured set of event sentences. Each candidate event information in the event sentence set is set as a node, and the temporal relationship between each candidate event information is set as an edge, generating an event graph with a directed graph structure based on nodes and edges. The user query content is structured and parsed to obtain query fields. Based on the query fields, semantic matching and time intent recognition operations are performed on the event graph to obtain a set of candidate nodes. Then, time consistency path search is performed on the candidate node set to obtain the event path to be processed. The event path to be processed is sequentially subjected to semantic aggregation, redundancy elimination, and path fusion expression to obtain the corresponding candidate event path. Then, a preset large language model and a preset time chain thinking prompt strategy are used to perform time-aware reasoning on the candidate event path to obtain the reasoning result. The reasoning result is subjected to structured parsing, event path alignment, and confidence evaluation to obtain enterprise knowledge base retrieval text with citation basis, time label, and credibility mark.
[0049] Therefore, this application first needs to extract candidate event information, including time anchoring features, entity behavior features, and action behaviors, from the unstructured initial enterprise knowledge base text to obtain a structured set of event sentences. Each candidate event information in the event sentence set is set as a node, and the temporal relationship between each candidate event information is set as an edge, so as to generate an event graph with a directed graph structure based on nodes and edges. Second, the user query content is structured and parsed to obtain query fields. Based on the query fields, semantic matching and time intent recognition operations are performed on the event graph to obtain a set of candidate nodes. Then, time consistency path search is performed on the candidate node set to obtain the event path to be processed. Then, the event path to be processed is sequentially subjected to semantic aggregation, redundancy elimination, and path fusion expression to obtain the corresponding candidate event path. Then, a preset large language model is used and a preset time chain thinking prompt strategy is used to perform time-aware reasoning on the candidate event path to obtain the reasoning result. Finally, the reasoning result is processed by structured parsing, event path alignment, and confidence evaluation to obtain enterprise knowledge base retrieval text with citation basis, time label, and credibility mark. This improves the efficiency of retrieving enterprise knowledge base content based on event graphs, thereby enhancing the user experience. Attached Figure Description
[0050] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0051] Figure 1 This application discloses a flowchart of an enterprise knowledge base content retrieval method based on event graphs.
[0052] Figure 2 This is a schematic diagram of the structure of an event graph-based enterprise knowledge base content retrieval device disclosed in this application;
[0053] Figure 3 This is a structural diagram of an electronic device disclosed in this application. Detailed Implementation
[0054] 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. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0055] Currently, with the significant progress made by large-scale language models in tasks such as open-domain question answering, knowledge generation, and natural language understanding, their application in the practical scenario of enterprise knowledge bases is becoming increasingly widespread. However, current mainstream LLMs often have significant limitations when dealing with problems involving time-sensitive information or multi-step time-chain reasoning. To address this, this application provides an event graph-based method for retrieving enterprise knowledge base content, which can improve the efficiency of retrieving enterprise knowledge base content during the event graph-based enterprise knowledge base content retrieval process.
[0056] See Figure 1 As shown in the figure, this invention discloses a method for retrieving enterprise knowledge base content based on event graphs, including:
[0057] Step S11: Extract candidate event information, including time anchoring features, entity behavior features and action behaviors, from the unstructured initial enterprise knowledge base text to obtain a structured event sentence set. Set each candidate event information in the event sentence set as a node, and then set the temporal relationship between each candidate event information as an edge, so as to generate an event graph with a directed graph structure based on the nodes and the edges.
[0058] In this embodiment, during the event graph-based enterprise knowledge base content retrieval process, this application embodiment first extracts candidate event sentences with time anchoring and entity behavior characteristics from the unstructured long text in the enterprise knowledge base content, laying a structured foundation for subsequent event graph construction. The unstructured long text includes, but is not limited to, business event information corresponding to internal enterprise documents, reports, emails, and meeting minutes. Subsequently, this application embodiment introduces a global context enhancement mechanism to enhance the document's title, summary, or introduction. Each text fragment is concatenated to obtain context-consistent segmentation units, thereby improving the accuracy of subsequent event recognition. It is worth noting that the enterprise knowledge base content includes, but is not limited to, knowledge bases of medical enterprises, financial enterprises, and government enterprises.
[0059] In one specific implementation, let the input document be... Each of them To represent a sentence, then set the window length. Perform sliding window segmentation to obtain the first... There are several fragments, and the expressions are as follows:
[0060] ;
[0061] Then, the document header information (Such as titles, introductions, etc.) are appended before each slice, resulting in the following stitched result:
[0062] ;
[0063] Among them, symbols This indicates a text-level concatenation operation.
[0064] It is worth mentioning that the above splicing method can significantly improve LLM's ability to understand the subject and context timeline in the fragment, thereby reducing the misidentification of pronouns or omitted subject sentences.
[0065] Specifically, candidate event information, including time-anchored features, entity behavior features, and action behaviors, is extracted from the unstructured initial enterprise knowledge base text to obtain a structured set of event sentences. This can include: using a preset global context enhancement mechanism to concatenate the text fragments in the initial enterprise knowledge base text with the corresponding global background, structural labels, and context windows to obtain a first text block to be processed with consistent context; determining the number of entities, time expressions, and verbs in each first text block to be processed, as well as their corresponding weights; then using a preset information density scoring function and evaluating each text block to be processed based on the number of entities, time expressions, verbs, and their respective weights to obtain an event evaluation result; determining whether the event evaluation result is greater than a preset event threshold; if the event evaluation result is greater than the preset event threshold, then setting the first text block to be processed corresponding to the event evaluation result as the second text block to be processed. This section utilizes a pre-defined large language model to perform semantic understanding on each second text block to be processed, obtaining the understanding result. A pre-defined named entity recognition model is then used to perform named entity recognition on the understanding result, obtaining the named entity recognition result. Semantic role labeling is then performed on the understanding result, obtaining the semantic role labeling result. Named entities include names, organizations, and positions. Based on the understanding result, named entity recognition result, and semantic role labeling result, the event sentences to be processed are determined. A pre-defined time recognition tool is used to extract the original time phrases from the event sentences to be processed. These original time phrases are then normalized to standard timestamps using a pre-defined document time benchmark, resulting in the event sentences to be evaluated. An event-based scoring mechanism is used to evaluate the retention value of each event sentence to be evaluated, obtaining the value evaluation result. It is then determined whether the value evaluation result is greater than a pre-defined value evaluation threshold. If the value evaluation result is greater than the pre-defined value evaluation threshold, an event sentence set is constructed based on the event sentences to be evaluated corresponding to each value evaluation result.
[0066] It is worth noting that traditional window segmentation can disrupt syntactic boundaries, easily truncating sentences or breaking paragraph logic. Therefore, this application's embodiments choose to utilize a text boundary recognition model for dynamic window generation. In one specific implementation, suppose the original document is a sequence of n sentences: ,in, This represents a sentence; subsequently, embodiments of this application require the use of a context-aware inter-sentence boundary prediction function. For each pair of adjacent sentences Calculate the boundary probabilities. Then, set the boundary threshold as... In this application embodiment, all conditions are met. The sentence index is used as the starting point for slicing, and the expression is as follows: Finally, we obtained the first... There are several slices, and the expressions are as follows:
[0067] .
[0068] Furthermore, this application embodiment requires the introduction of a multi-layered context enhancement structure, combining three types of information for splicing. These three types of information include a first-level global background, second-level structural tags, and a third-level context window. The first-level global background includes the document title, time, and main subject area; the second-level structural tags include "background," "process," and "result" extraction tags, serving as prompts for local paragraph themes; the third-level context window is the last sentence of the previous chunk, acting as a contextual bridge. The spliced information obtained after combining the above information is shown below:
[0069] ;
[0070] in, This is the splicing information obtained after splicing. For the document title, summary, or publication date (e.g., "Company Announcement (2023)"); Used as section headings or paragraph labels within a document (e.g., "Job Change"). This is the last sentence of the previous slice (used as a context bridge).
[0071] Subsequently, to improve the effect of event time sequence reconstruction in the subsequent time graph, this embodiment adds a set of structured location labels to each chunk, and the location labels... The expression is as follows:
[0072] ;
[0073] in, This is a unique identifier for the current document, and for The corresponding unique identifier, Used to represent the current chunk number (starting from 1), and Number the chunk. This represents the relative position of the current chunk within the entire document, and its value ranges from [value missing]. And the expression is , This is the overall document number in the entire document.
[0074] It is worth mentioning that adding the location label as a prefix to the text helps the model understand the current event's temporal position within the entire text.
[0075] Specifically, a preset global context enhancement mechanism is used to concatenate text fragments in the initial enterprise knowledge base text using the global background, structural tags, and context window corresponding to the initial text, resulting in a first text block to be processed with consistent context. This can include: using a context-aware inter-sentence boundary prediction function to calculate the boundary probability of each adjacent sentence in the unstructured initial enterprise knowledge base text, obtaining the boundary probability calculation results, and determining whether each boundary probability calculation result is greater than a preset boundary threshold. If the boundary probability calculation result is greater than the preset boundary threshold, the sentence corresponding to the boundary probability calculation result is set as the slice starting point; the initial enterprise knowledge base text is segmented according to the preset window length and each slice starting point to obtain several... The text fragments are processed, and then the global background, structural tags, and context window corresponding to the initial enterprise knowledge base text are determined. The global background includes the document title, time, and subject area of the initial enterprise knowledge base text; the structural tags include the titles and paragraph tags in the text fragments; the context window is the last sentence of the previous text fragment; each text fragment is configured with a corresponding structured position tag including a unique document identifier, segmentation unit number, and relative position ratio; then, using a preset global context enhancement mechanism, the global background, structural tags, context window, and structured position tags corresponding to the initial enterprise knowledge base text are used to concatenate the text fragments in the initial enterprise knowledge base text to obtain a first text block to be processed with consistent context.
[0076] In this embodiment, for each generated This application introduces an information density scoring function. To evaluate whether the fragment is event-driven, the expression is as follows:
[0077] ;
[0078] in, The number of named entities (person names, organizations, positions, etc.). To standardize the number of expressions for time, The number of verbs (keywords such as "appoint", "resign", "issue"). To and The corresponding adjustable weights, To and The corresponding adjustable weights, To and The corresponding adjustable weights.
[0079] In this embodiment, only the embodiments of this application retain The chunk is used for subsequent event extraction and processing. The preset density scoring threshold is used.
[0080] In one specific implementation, the title is "Personnel Adjustment in the Management of a Certain Company," and the text reads: In August 2022, Zhang Qiang was appointed as the CTO of a certain company. Subsequently, he presided over the initiation of a 5G chip project. In January 2023, Zhang Qiang transferred to the position of Senior Advisor to the Group, and the automatically segmented and stitched result (the first chunk) is shown below:
[0081] ;
[0082] In addition, the main text of the personnel adjustment in the communications management team states: In August 2022, Zhang Qiang was appointed as the CTO of a certain company. Subsequently, he presided over the initiation of a 5G chip project.
[0083] This application embodiment requires calculating the density score corresponding to the above information: The value is 3 (Zhang Qiang, CTO of a certain company). The value is 1 (August 2022). The value of is 2 (appointed, presiding over), in addition... If the value is 3, then the final density score for the document is obtained based on the density score above:
[0084] ;
[0085] In other words, if the density score is greater than the preset density score threshold, the above document will be retained.
[0086] In this embodiment, the present application requires the use of a large language model (such as Qwen, GPT-4, etc.) to perform semantic understanding on the segmented text blocks in order to extract sentences with event-related information (including time, entities, and actions). That is, for each segmented enhanced fragment... This application embodiment requires the use of the following standard prompt template input language model:
[0087] Please extract all event-related sentences from the following list that contain a specific time, named entity, and action. Each event should be a complete, independent sentence:
[0088] content: ;
[0089] The output is a set of event candidate sentences: ,in, For the first Each event candidate sentence, in addition, All of these include time anchoring, action behavior, and a clearly defined entity.
[0090] It is worth mentioning that an event-based sentence The document must have a clear time anchor (specific year, month, day, relative time, etc.); contain at least one named entity (person's name, job title, or organization); and contain at least one action verb to indicate a change in status or action, such as appoint, resign, merge, or publish.
[0091] Subsequently, for each event candidate sentence In this application embodiment, a pre-trained named entity recognition model (such as BERT-NER) is required to identify named entities such as person name (PERSON), organization (ORG), and job title (TITLE) in each event candidate sentence:
[0092] ;
[0093] Then, the embodiments of this application need to further perform semantic role labeling (SRL) or dependency parsing to extract who "did what" and "was related to whom" in the event: Agent (the agent); Action / event; Theme (the affected object); Affiliation (the organization to which it belongs).
[0094] For example:
[0095] Event sentence:
[0096] Zhang Qiang was appointed as the CTO of a company in August 2022.
[0097] Recognition results:
[0098] PERSON: Zhang Qiang → Agent;
[0099] DATE: 2022-08-01 → Time Anchor;
[0100] ORG: Company → Affiliation;
[0101] TITLE: CTO → Theme;
[0102] Action verb: to be appointed → Action.
[0103] It is worth mentioning that, for event sentences For time expressions appearing in the text (such as "August 2022" or "last month"), this application embodiment requires the use of a time recognition tool to extract the original time phrases:
[0104] ;
[0105] Subsequently, in this embodiment of the application, the extracted original time phrases need to be normalized into standard timestamps by combining the context or document time base, and the expression is as follows:
[0106] ;
[0107] Among them, the time value obtained by normalization This will serve as a time anchor point for events, ensuring that subsequent event graphs can be sorted and time-based inferences can be performed.
[0108] In one specific implementation, the normalized result obtained from the embodiments of this application is in a standard format:
[0109] "August 2022" → 2022-08-01
[0110] "Subsequently" → Calculate the offset based on the time of the previous event
[0111] For example:
[0112] "Subsequently, he presided over the establishment of the 5G chip project."
[0113] Contextual time: The previous sentence is "August 2022".
[0114] In this application embodiment, "subsequently" can be interpreted as 2022-08-15 (default shifted two weeks later) based on the above content.
[0115] Furthermore, to ensure the quality of subsequent composition, this embodiment of the application employs an event-based scoring mechanism to evaluate the retention value of candidate sentences, and the scoring function is set as follows:
[0116] ;
[0117] in, For the rating of the named entity, Scoring for action verbs To clarify the scores corresponding to the time anchor points, This is the score corresponding to the state change description. That is, if it contains named entities, then... =1; if it contains an event verb, =1; if standardized time is included, =1; If there is a status change description, such as promotion or transfer, =1; In addition, These are weighting factors (the default value is 1).
[0118] Furthermore, the embodiments of this application set a threshold. And only retain scores of not less than The candidate sentences are used as the final event sentence set, and the expression is as follows:
[0119] ;
[0120] For example: for the statement "Zhang Qiang was appointed CTO of ZTE Corporation in August 2022", the Entity, Action, Time, and Change values are all 1, resulting in a final score of 4, which is greater than... If so, the above candidate sentences will be retained as the final set of event sentences.
[0121] Furthermore, in this embodiment of the application, the extracted set of structured event sentences needs to be represented as a computable graph structure to support subsequent retrieval, reasoning, and generation. The event graph is in the form of a directed graph, where each event is a node, and edges represent temporal or semantic relationships between events.
[0122] In one specific implementation, the embodiments of this application will assign each event sentence As a node And extract the core attributes to form the node feature vector:
[0123] ;
[0124] The attributes mentioned above include: Agent: subject / agent, such as "Zhang Qiang"; Action: action or behavior verb, such as "appoint"; Theme: object of the action, such as "CTO"; Time: standardized timestamp, such as "2022-08-01"; Affiliation: organizational background, such as "a certain company".
[0125] It is worth mentioning that for any two event nodes , If satisfied Then add a directed time edge:
[0126] ;
[0127] in, This timeline indicates the event. It occurred in time Previously, it was used to construct causal chains or time paths.
[0128] Furthermore, if two events share the same subject or organization (such as a person or company), then an entity co-occurrence edge is constructed:
[0129] ;
[0130] Among them, the entity co-occurrence edge Used to represent the trajectories of semantically belonging to the same entity, it can be used to track the behavioral evolution of an individual or organization.
[0131] Furthermore, for edges that appear repeatedly (such as multiple events co-occurring), the edge weights can be accumulated or updated, and the defined edge weight function is as follows:
[0132] ;
[0133] in, Used to indicate time proximity Used to identify two event sentences and Cosine similarity of sentence vectors between them; , These are the weighting coefficients (all default to 1); The weight of the edge.
[0134] For example:
[0135] Given two events:
[0136] Zhang Qiang was appointed CTO in August 2022;
[0137] Zhang Qiang was transferred to the position of Group Consultant in January 2023;
[0138] Composition result:
[0139] node: , ;
[0140] Time edge: ;
[0141] Co-occurrence edge: (Zhang Qiang is the agent in all cases);
[0142] Time difference =May;
[0143] Subsequently, the weights need to be updated in this embodiment of the application, and the expression is as follows:
[0144] .
[0145] Specifically, each candidate event information in the event sentence set is set as a node, and the temporal relationship between each candidate event information is set as an edge. An event graph with a directed graph structure based on nodes and edges is generated. This can include: setting each event sentence in each candidate event information in the event sentence set as a node, extracting core attributes from each node to obtain attribute information, and constructing node feature vectors based on the attribute information; the attribute information includes the subject agent, event action, action verb, action object, timestamp, and organizational background; determining whether each pair of nodes satisfies the timestamp sequence relationship; if so, constructing a directed temporal edge between each pair of nodes to obtain the corresponding first edge, and then determining the relationship between each pair of nodes... If the corresponding events have the same subject or organization, then an entity co-occurrence edge is constructed between every two nodes to obtain the corresponding second edge. The temporal proximity of the first edge and the second edge is determined using a preset exponential decay function, and the semantic similarity of the first edge and the second edge is determined using a preset vector cosine similarity function. Based on the temporal proximity and semantic similarity, the first weight corresponding to the first edge and the second weight corresponding to the second edge are determined. It is determined whether each first edge and each second edge overlaps. If they overlap, the first weight and the second weight are accumulated to obtain the weight accumulation result. Then, based on the weight accumulation result, each node and each edge, an event graph with a directed graph structure is generated.
[0146] Step S12: Structure the user query content to obtain the query fields, and perform semantic matching and time intent recognition operations on the event graph based on the query fields to obtain a candidate node set. Then, perform time consistency path search on the candidate node set to obtain the event path to be processed.
[0147] In this embodiment, the user query content needs to be parsed and combined with a dynamic event graph. The structural information (G is the graph, V is the set of nodes, ...) This application performs time-aware event path retrieval and aggregation (using an edge set). Therefore, embodiments of this application introduce joint modeling of graph structure, temporal context, and query intent to improve the temporal consistency and semantic alignment of the retrieval.
[0148] In one specific implementation, let the user query be a natural language question. We use semantic enhancement representation to embed it as a query vector representation:
[0149] ;
[0150] in, As a semantically enhanced representation, this embodiment of the application then requires the use of a large language model to perform structured parsing of the query intent, thereby extracting the following fields:
[0151] TimeHint(q): Explicit or implicit time hints (such as "the last three years", "2022");
[0152] TargetEntity(q): The entity being monitored (e.g., "Zhang Qiang" or "CTO");
[0153] EventVerb(q): The action to be followed (e.g., "appointment", "resignation");
[0154] QueryType: Question type (e.g., factual, evolutionary, causal).
[0155] Subsequently, in this embodiment of the application, a set of semantically matching candidate nodes needs to be selected from the event graph based on the parsed query structure. .
[0156] It is worth mentioning that the process of filtering the candidate node set from the event graph based on the parsed query structure consists of two steps:
[0157] First, semantic alignment scoring: for each node event In this embodiment of the application, a semantic matching score with the query needs to be calculated:
[0158] ;
[0159] in, Encoding of node event text. This is the query vector.
[0160] Then, if the query contains time-related information (such as "after 2022"), a time filter is introduced:
[0161] ;
[0162] in, This is the semantic matching threshold. The event time.
[0163] Furthermore, in the candidate node set In this embodiment, it is necessary to follow the time edge of the graph. Iterate backwards to construct a time-consistent event path, as shown in the following expression:
[0164] .
[0165] The constraints for path search are as follows: Time increment: guarantees Semantic relevance: The semantic similarity between two events on each edge is greater than a set threshold; Hop count limit: Set a maximum path length L to prevent excessively long paths from causing information generalization.
[0166] Specifically, the process involves structured parsing of user queries to obtain query fields. Based on these fields, semantic matching and temporal intent recognition are performed on the event graph to obtain a candidate node set. Then, a time-consistent path search is conducted within this candidate node set to obtain the event path to be processed. This process may include: determining the query vector corresponding to the user query content using semantic enhancement representation; then using a large language model and based on the query vector to perform structured parsing of the user query content to obtain parsing results; the parsing results include time prompts, subjects of interest, actions of interest, and question types; performing semantic matching based on the parsing results, query vectors, and event sentences corresponding to nodes in the event graph to obtain semantic matching results; then performing time filtering based on the time prompts in the user query content and the event sentences corresponding to nodes in the event graph to obtain time filtering results; and determining the candidate node set based on the semantic matching results and the time filtering results; and using preset path search constraints, traversing backward along the time edge of the event graph within the candidate node set to construct a time-consistent event path to be processed; the preset path search constraints include time increment constraints, semantic relevance constraints, and hop count limits.
[0167] Step S13: Semantic aggregation, redundancy elimination and path fusion expression are performed on the event path to be processed in sequence to obtain the corresponding candidate event path. Then, time-aware reasoning is performed on the candidate event path using a preset large language model and based on a preset time chain thinking prompt strategy to obtain the reasoning result.
[0168] In this embodiment, the present application requires the construction of a query-centric time-series subgraph. ,in, These are event nodes in the time-series subgraph that are semantically related to the query and occur in consecutive time. These are edges in the temporal subgraph that are semantically related to the query and are temporally continuous.
[0169] Furthermore, in this embodiment of the application, information fusion is performed on the subgraph to generate structured views such as multi-hop causal chains and multi-role behavior trajectories for use by the generation module.
[0170] For example:
[0171] User Inquiry:
[0172] What positions did Zhang Qiang hold at that company?
[0173] Analysis results:
[0174] Target Entity = Zhang Qiang
[0175] Affiliation = Company
[0176] Verb Hint = Appointment, Transfer
[0177] Time Hint = Empty (default is no limit)
[0178] Image retrieval process:
[0179] Filter the nodes in the graph where the Agent is "Zhang Qiang" and the Affiliation is "a certain company";
[0180] Retain events where the verb is "to appoint", "to transfer", or "to reassign".
[0181] Sorting along the time edge forms an event sequence:
[0182] 2022-08: Zhang Qiang appointed CTO;
[0183] 2023-01: Transferred to the position of Group Consultant;
[0184] The output path or subgraph is used to generate the answer.
[0185] Furthermore, in this embodiment of the application, multiple event paths extracted from the dynamic event graph need to be sorted by time consistency, semantically aggregated, redundancy eliminated, and path fusion expressed to generate the final context input structure for use by the generation module.
[0186] In one specific implementation, embodiments of this application query related subgraphs. k candidate event paths are constructed:
[0187] ;
[0188] Each path is an ordered set of event nodes that occur in a sequential order.
[0189] ;
[0190] In this embodiment, since multiple paths may share the same event nodes or repeatedly express semantically similar events, path fusion is required, and the expression for the event similarity matrix is as follows:
[0191] ;
[0192] Subsequently, a similarity threshold was set. ,like Then it is believed and Expressing the same event and merging the corresponding nodes into a new node. The expression for the merged path set is as follows:
[0193] ;
[0194] Furthermore, for each path In this embodiment of the application, all nodes need to be linked according to time anchor points. Sort the data, and the expression is as follows:
[0195] ;
[0196] In this embodiment, if there are two event nodes in the path with a large time span (e.g., more than 6 months), this embodiment of the application needs to attempt to [address the issue in the graph]. The intermediate events are searched to fill in the chain, thereby enhancing logical coherence, and the expression is as follows:
[0197] ;
[0198] Subsequently, each sorted path can be structured and encoded for use as input to the generation module, and the structured encoding expression is shown below:
[0199] ;
[0200] For example: Search: "What career changes has Zhang Qiang undergone in recent years?"
[0201] The candidate paths subsequently constructed are:
[0202] CTO → Consultant
[0203] CTO → Consultant → Resignation
[0204] Consultant → Resignation
[0205] Fusion process:
[0206] Deduplication and merging , ;
[0207] Preserve the complete timeline ;
[0208] The final fusion result is shown below:
[0209] Zhang Qiang was appointed CTO in August 2022, became a group consultant in January 2023, and left the company in May 2023.
[0210] Subsequently, embodiments of this application may utilize structured time event paths. And the Time-CoT (Time-Aware Chain-of-Thought) cue template is used to guide the language model to... By employing step-by-step reasoning, common issues in time-sensitive questions such as logical jumps, time discrepancies, and missed answers are addressed, thereby improving the temporal consistency and factual accuracy of the generated content.
[0211] In this embodiment, the fusion path obtained in the previous stage needs to be... Convert to a contextual hint template with a time stamp, and the expression is as follows:
[0212] ;
[0213] The generation format is as follows:
[0214] The following is a timeline of Zhang Qiang's career changes:
[0215] August 2022: Appointed as CTO of a company;
[0216] January 2023: Appointed as a group consultant;
[0217] May 2023: Officially resigned.
[0218] In this embodiment, a prompt template to support temporal reasoning needs to be designed, combining "question + temporal context + reasoning guidance", in the following form:
[0219] Question: What job changes has Zhang Qiang experienced in recent years?
[0220] Please consider the following timeline step by step, and draw a logical conclusion:
[0221] [Prompt Context]
[0222] Please analyze each item in chronological order and then summarize:
[0223] This chain of prompts guides the language model through: event-by-event analysis; time-constrained reasoning; and cross-sentence integration of conclusions.
[0224] Furthermore, if multiple important paths exist (such as...) , (Involving different branch behaviors), a multi-path parallel suggestion mechanism is used, and independent analysis paragraphs are generated based on each path, finally aggregated and summarized. For example:
[0225] Path 1: CTO appointment → Consultant transfer;
[0226] Path 2: Regarding joining the board of directors → Investment activities;
[0227] Please analyze each path separately and summarize Zhang Qiang's overall career trajectory over the past three years.
[0228] Specifically, the event paths to be processed are sequentially subjected to semantic aggregation, redundancy elimination, and path fusion expression to obtain corresponding candidate event paths. Then, a pre-set large language model and a pre-set time-chain thinking prompting strategy are used to perform time-aware reasoning on the candidate event paths to obtain the reasoning results. These results may include: constructing an ordered set based on each event path to be processed, and identifying event paths in the ordered set that share the same event nodes or whose semantic expressions meet pre-set similarity conditions; wherein, each event path to be processed includes a set of temporally consecutive event nodes; and performing path fusion on each event path to be fused to obtain a fused event path. The system first identifies the path and uses a preset event similarity matrix to determine the cosine similarity between corresponding event nodes. Then, it checks whether the cosine similarity is greater than a preset similarity threshold. If the cosine similarity is greater than the preset similarity threshold, the corresponding event nodes are merged to obtain a merged path set. The event nodes corresponding to each merged event path in the merged path set are sorted according to the time anchor point to obtain the sorting result. The system then checks whether the time span between two event nodes corresponding to the sorting result is greater than a preset time span threshold. If the time span is greater than the preset time span threshold, the corresponding event sentence nodes are chained in the event graph to obtain the reasoning result.
[0229] Step S14: Perform structured parsing, event path alignment, and confidence assessment on the reasoning results to obtain enterprise knowledge base retrieval text with citation basis, time tag, and confidence mark.
[0230] In this embodiment, after the language model completes the time-path-based generation task, the embodiment of this application needs to perform structured parsing, original event path alignment, and confidence assessment on its output results, and finally generate answer text with citation basis, time tag, and high credibility mark, thereby improving the verifiability of the output results and user trust.
[0231] In one specific implementation, the answer generated by the language model is assumed to be natural language text. The text typically contains multiple conclusive or explanatory statements, which are then divided into a set of candidate fact units:
[0232] ;
[0233] Then for each line With the path node set in the graph The events in the data are aligned using the following scoring formula:
[0234] ;
[0235] in, , For sentence vectors, Used for characterization Does it match the time anchor point? and This is the weighting factor.
[0236] Ultimately, the event node that best matches the event in the path is retained as the source of the statement.
[0237] In this embodiment, the confidence score of the overall output needs to be generated based on the matching degree between each generated statement and the event node, and the expression is as follows:
[0238] ;
[0239] If the confidence level of a statement is lower than the set threshold If so, the above statement will be marked as "unverified" or an alternative generation strategy will be adopted, such as prompting the user to regenerate the segment.
[0240] Specifically, the reasoning results are processed through structured parsing, event path alignment, and confidence assessment to obtain enterprise knowledge base retrieval text with citation basis, time tag, and credibility marker. This process may include: performing structured parsing, event path alignment, and confidence assessment on the reasoning results to obtain initial enterprise knowledge base retrieval text; determining the conclusive and explanatory statements corresponding to the initial enterprise knowledge base retrieval text; determining a set of candidate fact units based on the conclusive and explanatory statements; aligning the language text in the candidate fact unit set with the event sentences corresponding to the nodes in the event graph to obtain alignment results; generating a confidence score based on the alignment results and time anchors; determining whether the confidence score is greater than a preset confidence threshold; if the confidence score is greater than the preset confidence threshold, setting the credibility marker corresponding to the initial enterprise knowledge base retrieval text as credible; then setting the node corresponding to the highest confidence score among all confidence scores as the citation basis corresponding to the initial enterprise knowledge base retrieval text; and determining the target enterprise knowledge base retrieval text with time tags based on the citation basis, credibility marker, and initial enterprise knowledge base retrieval text.
[0241] As can be seen from the above, the embodiments of this application first need to extract candidate event information, including time anchoring features, entity behavior features, and action behaviors, from the unstructured initial enterprise knowledge base text to obtain a structured set of event sentences. Each candidate event information in the event sentence set is set as a node, and the temporal relationship between each candidate event information is set as an edge, so as to generate an event graph with a directed graph structure based on nodes and edges. Second, the user query content is structured and parsed to obtain query fields. Based on the query fields, semantic matching and time intent recognition operations are performed in the event graph to obtain a set of candidate nodes. Then, time consistency path search is performed in the candidate node set to obtain the event path to be processed. Then, the event path to be processed is sequentially subjected to semantic aggregation, redundancy elimination, and path fusion expression to obtain the corresponding candidate event path. Then, a preset large language model is used and a preset time chain thinking prompt strategy is used to perform time-aware reasoning on the candidate event path to obtain the reasoning result. Finally, the reasoning result is subjected to structured parsing, event path alignment, and confidence evaluation to obtain enterprise knowledge base retrieval text with citation basis, time tag, and confidence mark. This improves the efficiency of retrieving enterprise knowledge base content based on event graphs, thereby enhancing the user experience.
[0242] Accordingly, see Figure 2 As shown, this application also provides an enterprise knowledge base content retrieval device based on event graphs, including:
[0243] Event graph generation module 11 is used to extract candidate event information including time anchoring features, entity behavior features and action behavior from unstructured initial enterprise knowledge base text, obtain a structured event sentence set, set each candidate event information in the event sentence set as a node, and then set the temporal relationship between each candidate event information as an edge, so as to generate an event graph with a directed graph structure based on the nodes and the edges.
[0244] The event path determination module 12 is used to structure and parse the user query content to obtain the query fields, and perform semantic matching and time intent recognition operations on the event graph based on the query fields to obtain a set of candidate nodes. Then, it performs time consistency path search on the set of candidate nodes to obtain the event path to be processed.
[0245] The reasoning result generation module 13 is used to sequentially perform semantic aggregation, redundancy elimination and path fusion expression on the event path to be processed to obtain the corresponding candidate event path, and then use a preset large language model and a preset time chain thinking prompting strategy to perform time-aware reasoning on the candidate event path to obtain the reasoning result.
[0246] The retrieval text determination module 14 is used to perform structured parsing, event path alignment, and confidence assessment on the reasoning results to obtain enterprise knowledge base retrieval text with citation basis, time tag, and confidence mark.
[0247] In some specific embodiments, the event graph generation module 11 may specifically include:
[0248] The text fragment splicing unit is used to splice the text fragments in the initial enterprise knowledge base text by using a preset global context enhancement mechanism to splice the global background, structural tags and context window corresponding to the initial enterprise knowledge base text, so as to obtain a first text block to be processed with consistent context.
[0249] The evaluation result determination unit is used to determine the number of entities, the number of time expressions, and the number of verbs in each of the first text blocks to be processed, as well as their corresponding weights. Then, it uses a preset information density scoring function and evaluates each of the text blocks to be processed based on the number of entities, the number of time expressions, the number of verbs, and their respective weights to obtain the event-based evaluation result.
[0250] An evaluation result judgment unit is used to determine whether the event evaluation result is greater than a preset event threshold. If the event evaluation result is greater than the preset event threshold, the first text block to be processed corresponding to the event evaluation result is set as the second text block to be processed.
[0251] The annotation result determination unit is used to perform semantic understanding on each of the second text blocks to be processed using a preset large language model to obtain an understanding result, and to perform named entity recognition on the understanding result using a preset named entity recognition model to obtain a named entity recognition result. Then, semantic role annotation is performed on the understanding result to obtain a semantic role annotation result. The named entities include personal names, organizations, and positions.
[0252] The time phrase extraction unit is used to determine the event sentence to be processed based on the understanding result, the named entity recognition result and the semantic role labeling result, and to extract the original time phrase in the event sentence to be processed using a preset time recognition tool. Then, the original time phrase is normalized into a standard timestamp by combining a preset document time benchmark to obtain the event sentence to be evaluated.
[0253] The retention value assessment unit is used to evaluate the retention value of each of the event sentences to be evaluated using an event-based scoring mechanism, obtain a value assessment result, and determine whether the value assessment result is greater than a preset value assessment threshold. If the value assessment result is greater than the preset value assessment threshold, then an event sentence set is constructed based on the event sentences to be evaluated corresponding to each of the value assessment results.
[0254] In some specific embodiments, the event graph generation module 11 may specifically include:
[0255] The slice starting point determination unit is used to calculate the boundary probability of each adjacent sentence in the unstructured initial enterprise knowledge base text using a context-aware inter-sentence boundary prediction function, obtain the boundary probability calculation result, and determine whether each boundary probability calculation result is greater than a preset boundary threshold. If the boundary probability calculation result is greater than the preset boundary threshold, the sentence corresponding to the boundary probability calculation result is set as the slice starting point.
[0256] A text segmentation unit is used to segment the initial enterprise knowledge base text according to a preset window length and the starting point of each slice, obtaining several text segments, and then determining the global background, structural labels, and context window corresponding to the initial enterprise knowledge base text; wherein, the global background includes the document title, time, and main domain of the initial enterprise knowledge base text; the structural labels include the title and segmentation labels in the text segments; and the context window is the last sentence of the text segment preceding the text segment.
[0257] The location label determination unit is used to configure a corresponding structured location label for each text fragment, including a unique document identifier, a segmentation unit number, and a relative position ratio. Then, using a preset global context enhancement mechanism, the global background, the structure label, the context window, and the structured location label corresponding to the initial enterprise knowledge base text are used to concatenate each text fragment in the initial enterprise knowledge base text to obtain a first text block to be processed with consistent context.
[0258] In some specific embodiments, the event path determination module 12 may specifically include:
[0259] The node feature vector construction unit is used to set each event sentence in the candidate event information of the event sentence set as a node, extract core attributes from each node to obtain attribute information, and construct a node feature vector based on the attribute information; the attribute information includes subject agent, event action, action verb, action object, timestamp, and organizational background;
[0260] The time edge construction unit is used to determine whether each two nodes satisfy the timestamp sequence relationship. If they do, a directed time edge is constructed between each two nodes to obtain the corresponding first edge. Then, it is determined whether the events corresponding to each two nodes have the same subject or organization. If they do, an entity co-occurrence edge is constructed between each two nodes to obtain the corresponding second edge.
[0261] The weight determination unit is used to determine the temporal proximity of the first side and the second side respectively using a preset exponential decay function, and to determine the semantic similarity of the first side and the second side respectively using a preset vector cosine similarity determination function, so as to determine the first weight corresponding to the first side and the second weight corresponding to the second side based on the temporal proximity and the semantic similarity.
[0262] The weight accumulation unit is used to determine whether each of the first edges and each of the second edges overlap. If they overlap, the first weight and the second weight are accumulated to obtain the weight accumulation result. Then, based on the weight accumulation result, each node and each edge, an event graph with a directed graph structure is generated.
[0263] In some specific embodiments, the event path determination module 12 may specifically include:
[0264] The parsing result determination unit is used to determine the query vector corresponding to the user's query content using semantic enhancement representation, and then use a large language model to perform structured parsing of the user's query content based on the query vector to obtain the parsing result; the parsing result includes time prompts, subject of interest, action of interest, and question type;
[0265] The event sentence filtering unit is used to perform semantic matching based on the parsing result, the query vector and the event sentences corresponding to the nodes in the event graph to obtain the semantic matching result, then perform time filtering based on the time prompt in the user query content and the event sentences corresponding to the nodes in the event graph to obtain the time filtering result, and determine the candidate node set based on the semantic matching result and the time filtering result.
[0266] The event graph traversal unit is used to traverse the event graph backward along the time edge in the candidate node set using preset path search constraints to construct time-consistent paths for events to be processed; the preset path search constraints include time increment constraints, semantic relevance constraints, and hop count limits.
[0267] In some specific embodiments, the reasoning result generation module 13 may specifically include:
[0268] The event path determination unit is used to construct an ordered set based on each of the event paths to be processed, and to determine the event paths to be processed in the ordered set that share the same event nodes or whose semantic expressions meet preset similarity conditions; wherein, the event paths to be processed include a set of temporally consecutive event nodes;
[0269] The event node fusion unit is used to perform path fusion on each of the event paths to be fused to obtain a fused event path, and to determine the cosine similarity between the corresponding event nodes using a preset event similarity matrix. Then, it is determined whether the cosine similarity is greater than a preset similarity threshold. If the cosine similarity is greater than the preset similarity threshold, the corresponding event nodes are fused to obtain a fused path set.
[0270] The chain filling unit is used to sort the event nodes corresponding to each fused event path in the fused path set according to the time anchor point, obtain the sorting result, and determine whether the time span between two event nodes corresponding to the sorting result is greater than a preset time span threshold. If the time span is greater than the preset time span threshold, the chain filling unit is used to fill the nodes of the corresponding event sentence in the event graph to obtain the inference result.
[0271] In some specific embodiments, the text retrieval determination module 14 may specifically include:
[0272] A candidate fact unit set construction unit is used to perform structured parsing, event path alignment and confidence evaluation on the reasoning results to obtain the initial enterprise knowledge base retrieval text, then determine the conclusive statement and explanatory statement corresponding to the initial enterprise knowledge base retrieval text, and determine the candidate fact unit set based on the conclusive statement and the explanatory statement;
[0273] The event sentence alignment unit is used to align the language text in the candidate fact unit set with the event sentences corresponding to the nodes in the event graph to obtain the alignment result, and generate a confidence score based on the alignment result and the time anchor point.
[0274] A credibility tag setting unit is used to determine whether the confidence score is greater than a preset credibility threshold. If the confidence score is greater than the preset credibility threshold, the credibility tag corresponding to the initial enterprise knowledge base retrieval text is set as credible. Then, the node corresponding to the highest confidence score among the confidence scores is set as the reference basis corresponding to the initial enterprise knowledge base retrieval text. Based on the reference basis, the credibility tag, and the initial enterprise knowledge base retrieval text, the target enterprise knowledge base retrieval text with a time tag is determined.
[0275] Furthermore, embodiments of this application also disclose an electronic device, Figure 3This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the event graph-based enterprise knowledge base content retrieval method disclosed in any of the foregoing embodiments. Furthermore, the electronic device 20 in this embodiment may specifically be a computer.
[0276] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.
[0277] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon can include operating system 221, computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0278] The operating system 221 is used to manage and control the various hardware devices on the electronic device 20 and the computer program 222, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of performing the event graph-based enterprise knowledge base content retrieval method executed by the electronic device 20 as disclosed in any of the foregoing embodiments, the computer program 222 may further include computer programs capable of performing other specific tasks.
[0279] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned event graph-based enterprise knowledge base content retrieval method. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.
[0280] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.
[0281] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0282] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0283] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0284] The technical solutions provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for retrieving enterprise knowledge base content based on event graphs, characterized in that, include: Candidate event information, including time-anchored features, entity behavior features, and action behaviors, is extracted from unstructured initial enterprise knowledge base text to obtain a set of structured event sentences; Each candidate event information in the event sentence set is set as a node, and the temporal relationship between each candidate event information is set as an edge, so as to generate an event graph with a directed graph structure based on the nodes and the edges; specifically, it includes: setting each event sentence in each candidate event information in the event sentence set as a node, extracting core attributes from each node to obtain attribute information, and constructing a node feature vector based on the attribute information; the attribute information includes subject agent, event action, action verb, action object, timestamp, and organizational background; determining whether each pair of nodes satisfies the timestamp sequence relationship, if so, constructing a directed temporal edge between each pair of nodes to obtain the corresponding first edge, and then determining the event corresponding to each pair of nodes. If the nodes have the same subject or organization, then a co-occurrence edge is constructed between each pair of nodes to obtain the corresponding second edge. The temporal proximity of the first edge and the second edge is determined using a preset exponential decay function, and the semantic similarity of the first edge and the second edge is determined using a preset vector cosine similarity function. Based on the temporal proximity and the semantic similarity, a first weight corresponding to the first edge and a second weight corresponding to the second edge are determined. It is determined whether each first edge and each second edge overlaps. If they overlap, the first weight and the second weight are accumulated to obtain a weight accumulation result. Then, an event graph with a directed graph structure is generated based on the weight accumulation result, each node, and each edge. The user query content is structured and parsed to obtain the query fields. Based on the query fields, semantic matching and time intent recognition operations are performed in the event graph to obtain a set of candidate nodes. Then, time consistency path search is performed in the set of candidate nodes to obtain the event path to be processed. The process involves sequentially performing semantic aggregation, redundancy elimination, and path fusion expression on the event paths to be processed, obtaining corresponding candidate event paths. Then, a preset large language model is used, along with a preset time-chain thinking prompting strategy, to perform time-aware reasoning on the candidate event paths, yielding a reasoning result. Specifically, this includes: constructing an ordered set based on each of the event paths to be processed, and identifying event paths in the ordered set that share the same event nodes or whose semantic expressions meet preset similarity conditions; wherein each event path to be processed includes a set of temporally consecutive event nodes; performing path fusion on each of the event paths to be fused to obtain a fused event path, and utilizing... The cosine similarity between corresponding event nodes is determined using a preset event similarity matrix. Then, it is determined whether the cosine similarity is greater than a preset similarity threshold. If the cosine similarity is greater than the preset similarity threshold, the corresponding event nodes are merged to obtain a merged path set. The event nodes corresponding to each merged event path in the merged path set are sorted according to time anchor points to obtain a sorting result. It is then determined whether the time span between two event nodes corresponding to the sorting result is greater than a preset time span threshold. If the time span is greater than the preset time span threshold, the nodes of the corresponding event sentences in the event graph are chained to obtain a reasoning result. The reasoning results are subjected to structured parsing, event path alignment, and confidence assessment to obtain enterprise knowledge base retrieval text with citation basis, time tag, and confidence mark.
2. The enterprise knowledge base content retrieval method based on event graphs according to claim 1, characterized in that, The process involves extracting candidate event information, including time-anchored features, entity behavior features, and action behaviors, from unstructured initial enterprise knowledge base text to obtain a structured set of event sentences, including: By using a preset global context enhancement mechanism, the global background, structural tags and context window corresponding to the initial enterprise knowledge base text are used to splice together the text fragments in the initial enterprise knowledge base text to obtain a first text block to be processed with consistent context. The number of entities, the number of time expressions, and the number of verbs in each of the first text blocks to be processed, as well as their corresponding weights, are determined. Then, a preset information density scoring function is used to evaluate each of the text blocks to be processed based on the number of entities, the number of time expressions, the number of verbs, and their respective weights, to obtain the event-based evaluation result. Determine whether the event assessment result is greater than a preset event threshold. If the event assessment result is greater than the preset event threshold, then set the first text block to be processed corresponding to the event assessment result as the second text block to be processed. The semantic understanding of each second text block to be processed is performed using a preset large language model to obtain the understanding result. Then, the understanding result is subjected to named entity recognition using a preset named entity recognition model to obtain the named entity recognition result. Finally, the understanding result is subjected to semantic role labeling to obtain the semantic role labeling result. The named entities include people's names, organizations, and positions. Based on the understanding results, the named entity recognition results, and the semantic role labeling results, the event sentence to be processed is determined, and the original time phrase in the event sentence to be processed is extracted using a preset time recognition tool. Then, the original time phrase is normalized into a standard timestamp by combining a preset document time benchmark to obtain the event sentence to be evaluated. The retention value of each event sentence to be evaluated is evaluated using an event-based scoring mechanism to obtain a value evaluation result. It is then determined whether the value evaluation result is greater than a preset value evaluation threshold. If the value evaluation result is greater than the preset value evaluation threshold, an event sentence set is constructed based on the event sentences to be evaluated corresponding to each value evaluation result.
3. The enterprise knowledge base content retrieval method based on event graphs according to claim 2, characterized in that, The method utilizes a preset global context enhancement mechanism to concatenate text fragments in the initial enterprise knowledge base text using the global background, structural tags, and context window corresponding to the initial enterprise knowledge base text, resulting in a first text block to be processed with consistent context, including: A context-aware inter-sentence boundary prediction function is used to calculate the boundary probability of each adjacent sentence in the unstructured initial enterprise knowledge base text, and the boundary probability calculation result is obtained. It is then determined whether each boundary probability calculation result is greater than a preset boundary threshold. If the boundary probability calculation result is greater than the preset boundary threshold, the sentence corresponding to the boundary probability calculation result is set as the starting point of the slice. The initial enterprise knowledge base text is segmented according to the preset window length and the starting point of each slice to obtain several text segments. Then, the global background, structural tags, and context window corresponding to the initial enterprise knowledge base text are determined. The global background includes the document title, time, and main domain of the initial enterprise knowledge base text. The structural tags include the title and segmentation tags in the text segments. The context window is the last sentence of the text segment preceding the text segment. Each text fragment is configured with a corresponding structured location label, including a unique document identifier, a segmentation unit number, and a relative position ratio. Then, a preset global context enhancement mechanism is used to concatenate the text fragments in the initial enterprise knowledge base text with the global background, the structure label, the context window, and the structured location label, resulting in a first text block to be processed with consistent context.
4. The enterprise knowledge base content retrieval method based on event graphs according to claim 1, characterized in that, The structured parsing of user query content yields query fields. Based on these query fields, semantic matching and temporal intent recognition operations are performed on the event graph to obtain a candidate node set. Then, a time-consistent path search is performed on the candidate node set to obtain the event path to be processed, including: A semantic augmentation representation is used to determine the query vector corresponding to the user's query content. Then, a large language model is used to perform structured parsing of the user's query content based on the query vector to obtain the parsing result. The parsing result includes time prompts, subjects of interest, actions of interest, and question types. Based on the parsing results, the query vector and the event sentences corresponding to the nodes in the event graph, semantic matching is performed to obtain semantic matching results. Then, based on the time prompts in the user query content and the event sentences corresponding to the nodes in the event graph, time filtering is performed to obtain time filtering results. Finally, a set of candidate nodes is determined based on the semantic matching results and the time filtering results. Using preset path search constraints, the event paths to be processed are constructed by traversing backward along the time edge of the event graph in the candidate node set. The preset path search constraints include time increment constraints, semantic relevance constraints, and hop count limitation constraints.
5. The enterprise knowledge base content retrieval method based on event graphs according to claim 1, characterized in that, The inference results are then subjected to structured parsing, event path alignment, and confidence assessment to obtain enterprise knowledge base retrieval text with citations, time tags, and confidence markers, including: The reasoning results are subjected to structured parsing, event path alignment, and confidence assessment to obtain the initial enterprise knowledge base retrieval text. Then, the conclusive statement and explanatory statement corresponding to the initial enterprise knowledge base retrieval text are determined, and a set of candidate fact units is determined based on the conclusive statement and the explanatory statement. Align the language text in the candidate fact unit set with the event sentences corresponding to the nodes in the event graph to obtain the alignment result, and generate a confidence score based on the alignment result and time anchors; If the confidence score is greater than a preset confidence threshold, then the confidence tag corresponding to the initial enterprise knowledge base retrieval text is set as reliable. Then, the node corresponding to the highest confidence score among all the confidence scores is set as the reference basis corresponding to the initial enterprise knowledge base retrieval text. Based on the reference basis, the confidence tag, and the initial enterprise knowledge base retrieval text, the target enterprise knowledge base retrieval text with a time tag is determined.
6. A content retrieval device for an enterprise knowledge base based on an event graph, characterized in that, include: The event graph generation module is used to extract candidate event information, including time anchoring features, entity behavior features and action behaviors, from unstructured initial enterprise knowledge base text to obtain a structured set of event sentences; The event graph generation module is further configured to set each candidate event information in the event sentence set as a node, and then set the temporal relationship between each candidate event information as an edge, so as to generate an event graph with a directed graph structure based on the nodes and the edges; specifically, it includes: setting each event sentence in each candidate event information in the event sentence set as a node, extracting core attributes from each node to obtain attribute information, and constructing a node feature vector based on the attribute information; the attribute information includes subject agent, event action, action verb, action object, timestamp, and organizational background; determining whether each pair of nodes satisfies the timestamp sequence relationship, if so, constructing a directed temporal edge between each pair of nodes to obtain the corresponding first edge, and then determining whether each pair of nodes satisfies the temporal sequence relationship. If the corresponding events have the same subject or organization, then an entity co-occurrence edge is constructed between every two nodes to obtain the corresponding second edge. The temporal proximity of the first edge and the second edge is determined using a preset exponential decay function, and the semantic similarity of the first edge and the second edge is determined using a preset vector cosine similarity function. Based on the temporal proximity and the semantic similarity, a first weight corresponding to the first edge and a second weight corresponding to the second edge are determined. It is determined whether each first edge and each second edge overlaps. If they overlap, the first weight and the second weight are accumulated to obtain a weight accumulation result. Then, an event graph with a directed graph structure is generated based on the weight accumulation result, each node, and each edge. The event path determination module is used to parse the user query content in a structured manner to obtain the query fields, and perform semantic matching and time intent recognition operations on the event graph based on the query fields to obtain a set of candidate nodes. Then, a time consistency path search is performed on the set of candidate nodes to obtain the event path to be processed. The reasoning result generation module is used to sequentially perform semantic aggregation, redundancy elimination, and path fusion expression on the event paths to be processed, obtaining corresponding candidate event paths. Then, it uses a preset large language model and a preset time-chain thinking prompting strategy to perform time-aware reasoning on the candidate event paths to obtain reasoning results. Specifically, it includes: constructing an ordered set based on each of the event paths to be processed, and determining the event paths to be fused that share the same event nodes or whose expressed semantics meet preset similarity conditions among the event paths to be processed in the ordered set; wherein, the event paths to be processed include a set of temporally consecutive event nodes; and performing path fusion on each of the event paths to be fused to obtain a fused event. The path is determined, and the cosine similarity between corresponding event nodes is determined using a preset event similarity matrix. Then, it is determined whether the cosine similarity is greater than a preset similarity threshold. If the cosine similarity is greater than the preset similarity threshold, the corresponding event nodes are merged to obtain a merged path set. The event nodes corresponding to each merged event path in the merged path set are sorted according to time anchor points to obtain a sorting result. It is determined whether the time span between two event nodes corresponding to the sorting result is greater than a preset time span threshold. If the time span is greater than the preset time span threshold, the nodes of the corresponding event sentences in the event graph are chained to obtain the reasoning result. The retrieval text determination module is used to perform structured parsing, event path alignment, and confidence assessment on the reasoning results to obtain enterprise knowledge base retrieval text with citation basis, time tag, and confidence mark.
7. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the event graph-based enterprise knowledge base content retrieval method as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, Used to store computer programs, wherein the computer programs, when executed by a processor, implement the event graph-based enterprise knowledge base content retrieval method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Public opinion means intelligent identification system based on artificial intelligence large model
CN120181064A
Fact validation method and system, computer device and storage medium
US20220230050A1