Financial insurance knowledge base construction method and device, equipment and medium

By constructing an adaptive segmentation and multi-layered topic knowledge graph, the problem of low retrieval accuracy in the financial and insurance knowledge base is solved, and efficient and semantically complete updates and retrieval of the financial and insurance knowledge base are achieved.

CN121920487APending Publication Date: 2026-04-24PING AN TECH (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
PING AN TECH (SHENZHEN) CO LTD
Filing Date
2026-01-09
Publication Date
2026-04-24

AI Technical Summary

Technical Problem

Existing financial and insurance knowledge bases suffer from low retrieval accuracy, particularly in terms of information redundancy and semantic fragmentation.

Method used

By acquiring financial and insurance documents, adaptive segmentation is performed based on semantic similarity between sentences and segmentation granularity thresholds to construct a multi-layered topic knowledge graph. The knowledge graph is then used for retrieval, including legal topics, clause topics, question-and-answer topics, and instance topics, enabling adaptive updates and incremental indexing.

Benefits of technology

It improves the retrieval accuracy of the financial and insurance knowledge base, ensures semantic integrity and retrieval efficiency, adapts to the rapid update needs of financial and insurance documents, and reduces information redundancy and semantic fragmentation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121920487A_ABST
    Figure CN121920487A_ABST
Patent Text Reader

Abstract

The invention discloses a financial insurance knowledge base construction method and device, equipment and a medium, and belongs to the field of financial insurance. Dividing the document based on the sentence semantic similarity and a division granularity threshold to obtain a first document fragment, wherein the division granularity threshold changes along with the sentence length and the topic drift rate; based on the first document fragment, constructing a knowledge graph of multiple layers of themes including laws and regulations, terms, questions and answers and instances to obtain a financial insurance document knowledge base, wherein a current feature vector library comprises feature vectors of the first document fragment according to retrieval. According to the method and the device, the division granularity threshold is adaptively adjusted along with the sentence length and the topic drift rate, so that the semantic boundary robustness, the multi-level grading of the automatically updated knowledge graph and the semantic integrity of the retrieved information are ensured, and the technical problem that the retrieval precision is not high when the retrieval is carried out based on the existing financial insurance knowledge base is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of finance and insurance, and in particular to a method, apparatus, equipment and medium for constructing a financial and insurance knowledge base. Background Technology

[0002] Retrieval-Augmented Generation (RAG) technology is widely used in tasks such as intelligent question answering, document summarization, and business knowledge retrieval. In the financial and insurance field, when retrieving financial and insurance knowledge, the retrieved information suffers from information redundancy or semantic fragmentation. Typically, knowledge base updates are done by manually rebuilding the vector database, but these updates are lagging, resulting in low accuracy and quality of retrieval based on the existing knowledge base. In other words, existing technologies suffer from low retrieval accuracy when using existing financial and insurance knowledge bases.

[0003] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention

[0004] The main objective of this invention is to provide a method for constructing a financial and insurance knowledge base, aiming to solve the technical problem of low retrieval accuracy when searching based on existing financial and insurance knowledge bases in the prior art.

[0005] Firstly, a method for constructing a financial and insurance knowledge base is provided, including:

[0006] Obtain financial and insurance documents, wherein the financial and insurance documents include at least one of the following topics: regulatory topics, clause topics, question and answer topics, and example topics;

[0007] Based on the semantic similarity between sentences in the financial insurance document and the segmentation granularity threshold, the financial insurance document is segmented to obtain multiple first document fragments. Each of the multiple first document fragments has its own first document fragment feature vector. The segmentation granularity threshold varies with sentence length and topic drift rate.

[0008] Based on the multiple first document fragments, a multi-layered topic knowledge graph is constructed, including the legal topic, the clause topic, the question and answer topic, and the instance topic, to obtain a financial insurance document knowledge base based on the current feature vector library, wherein the current feature vector library includes the feature vectors of the first document fragments.

[0009] In one possible implementation of this application, the step of constructing a multi-layered topic knowledge graph based on the first document fragment, including the regulatory topic, the clause topic, the question-and-answer topic, and the instance topic, to obtain a financial insurance document knowledge base based on the current feature vector library for retrieval, includes:

[0010] Determine the semantic similarity of document segments between every two first document segments in the plurality of first document segments;

[0011] Based on the semantic similarity of the document fragments, directed edges under the same topic and directed edges across topics are constructed;

[0012] A knowledge graph of the same topic level is constructed based on directed edges under the same topic, and a multi-level knowledge graph of cross topics is constructed based on directed edges across topics, to obtain a multi-level topic knowledge graph.

[0013] The financial insurance document knowledge base is determined based on the knowledge graph of the multi-layered topics and the current feature vector library.

[0014] In one possible implementation of this application, before constructing a multi-layered topic knowledge graph based on the first document fragment, including the regulatory topic, the clause topic, the question-and-answer topic, and the instance topic, to obtain a financial insurance document knowledge base based on the current feature vector library for retrieval, the following steps are included:

[0015] Determine the feature vector similarity between the financial insurance document and document fragments of existing documents in the existing database, based on the feature vectors of the document fragments;

[0016] If it is determined that the similarity of the feature vectors is greater than a preset first threshold, then the feature vector of the second document segment corresponding to the existing document in the current feature vector library is replaced based on the feature vector of the first document segment corresponding to the financial insurance document.

[0017] If the similarity of the feature vectors is determined to be less than a preset second threshold, then an index node is added to the current feature vector library by adding the feature vector of the first document fragment.

[0018] In one possible implementation of this application, the step of segmenting the financial insurance document based on the semantic similarity between sentences in the document and the segmentation granularity threshold to obtain a first document fragment includes:

[0019] Determine the sentence vector corresponding to each sentence in the financial insurance document;

[0020] Calculate the similarity of sentence vectors between adjacent sentences to obtain the semantic similarity between adjacent sentences;

[0021] If the semantic similarity between adjacent sentences is less than the granularity threshold, then the semantic boundary between adjacent sentences is determined.

[0022] Based on the semantic boundaries, the financial insurance document is divided into multiple first document fragments, wherein the first document fragments are semantically consistent.

[0023] In one possible implementation of this application, before determining the semantic boundary between adjacent sentences if the semantic similarity between the adjacent sentences is less than the segmentation granularity threshold, the method includes:

[0024] Determine the sentence length of each of the two adjacent sentences;

[0025] The sentence lengths of the two sentences are normalized to obtain the normalized length factor;

[0026] If the normalized length factor exceeds a preset normalized length factor threshold, then the partitioning granularity threshold is increased.

[0027] If the normalized length factor does not exceed the preset normalized length factor threshold, then the partitioning granularity threshold is reduced.

[0028] In one possible implementation of this application, before determining the semantic boundary between adjacent sentences if the semantic similarity between the adjacent sentences is less than the segmentation granularity threshold, the method further includes...

[0029] Determine the center vector of the current first document fragment;

[0030] Identify candidate sentences for semantic boundaries to be processed following the current first document segment;

[0031] The topic drift rate is determined based on the sentence vector corresponding to the candidate sentence and the center vector.

[0032] If the topic drift rate exceeds a preset topic drift rate threshold, then the division granularity threshold is increased;

[0033] If the topic drift rate does not exceed the preset topic drift rate threshold, then the division granularity threshold is reduced.

[0034] In one possible implementation of this application, after constructing a multi-layered topic knowledge graph based on the first document fragment, including the regulatory topic, the clause topic, the question-and-answer topic, and the instance topic, to obtain a financial insurance document knowledge base based on the current feature vector library for retrieval, the following steps are included:

[0035] Upon receiving a search instruction, the text to be searched under the search instruction is encoded to obtain a search vector;

[0036] Based on the retrieval vector and the current feature vector library, the question-and-answer topic layer and the clause topic layer are used as entry layers to perform preliminary semantic retrieval in the financial insurance document knowledge base, so as to obtain question-and-answer nodes that semantically match the question-and-answer topic layer and clause nodes that semantically match the clause topic layer.

[0037] Based on the question-and-answer nodes and the clause nodes, the legal nodes and instance nodes are retrieved by searching along the cross-layer edges of the multi-layer topic knowledge graph;

[0038] The retrieved question-and-answer nodes, clause nodes, legal nodes, and instance nodes are used as recall nodes, and the corresponding content of the recall nodes is used as the search result of the search instruction.

[0039] In one possible implementation of this application, the step of using the retrieved question-and-answer nodes, clause nodes, legal nodes, and instance nodes as recall nodes, and using the corresponding content of the recall nodes as the retrieval result of the retrieval instruction, includes:

[0040] The retrieved question-and-answer nodes, clause nodes, legal nodes, and instance nodes will be used as recall nodes.

[0041] The document fragment feature vector corresponding to the recall node is semantically matched with the retrieval vector to obtain the retrieval semantic similarity.

[0042] Based on the semantic similarity of the search, the timeliness order of the document fragments corresponding to the recall node, and the weight of the topic layer where the recall node is located, knowledge fusion is performed on the document fragments corresponding to the recall node to obtain the final search result of the search instruction.

[0043] In one possible implementation of this application, before segmenting the financial insurance document based on the semantic similarity between sentences in the document and the segmentation granularity threshold to obtain the first document fragment, the following steps are included:

[0044] The financial insurance document is segmented into sentences to obtain multiple sentences;

[0045] The sentence is denoised to remove format noise, layout noise, and content noise.

[0046] In one possible implementation of this application, after denoising the sentence to remove format noise, layout noise, and content noise, metadata is extracted from the denoised financial insurance document to obtain the text content, source document ID, timestamp, and the insurance category involved in the document. The step of dividing the financial insurance document into first document fragments based on the semantic similarity between sentences in the financial insurance document and the segmentation granularity threshold includes:

[0047] Based on the semantic similarity between sentences in the text content and the granularity threshold, the text content is divided by topic, resulting in topic-level document fragments under the following topics: legal topics, clause topics, question and answer topics, and example topics.

[0048] Based on the semantic similarity between sentences in the topic-layer document fragments and the segmentation granularity threshold, the topic-layer document fragments under each topic are segmented to obtain first document fragments under different topics. Each first document fragment includes the source document ID, the timestamp, and the insurance category involved in the document.

[0049] Secondly, a device for constructing a financial and insurance knowledge base is provided, including:

[0050] The acquisition module is used to acquire financial and insurance documents, wherein the financial and insurance documents include at least one of the following topics: regulatory topics, clause topics, question and answer topics, and example topics.

[0051] The segmentation module is used to segment the financial insurance document based on the semantic similarity between sentences and the segmentation granularity threshold to obtain multiple first document fragments. Each first document fragment in the multiple first document fragments has its own first document fragment feature vector. The segmentation granularity threshold varies with the sentence length and topic drift rate.

[0052] The knowledge base construction module is used to construct a multi-layered topic knowledge graph based on the multiple first document fragments, including the legal topic, the clause topic, the question and answer topic, and the instance topic, to obtain a financial insurance document knowledge base based on the current feature vector library, wherein the current feature vector library includes the feature vectors of the first document fragments.

[0053] Thirdly, a financial insurance knowledge base construction device is provided. The financial insurance knowledge base construction device is a physical node device. The financial insurance knowledge base construction device includes: a memory, a processor, and a financial insurance knowledge base construction program stored on the memory and executable on the processor. The processor executes the financial insurance knowledge base construction program to implement the steps of the financial insurance knowledge base construction method.

[0054] Fourthly, a medium is provided, on which a program for implementing a financial and insurance knowledge base construction method is stored, wherein when the financial and insurance knowledge base construction program is executed by a processor, it implements the steps of the financial and insurance knowledge base construction method described above.

[0055] This application provides a method, apparatus, device, and medium for constructing a financial insurance knowledge base. Compared with the existing technology, which suffers from low retrieval accuracy when searching based on existing financial insurance knowledge bases, this application obtains financial insurance documents, wherein the financial insurance documents include at least one of the following topics: regulatory topics, clause topics, question-and-answer topics, and instance topics. Based on the semantic similarity between sentences in the financial insurance documents and a segmentation granularity threshold, the financial insurance documents are segmented to obtain multiple first document fragments, wherein each of the multiple first document fragments corresponds to a first document fragment feature vector, and the segmentation granularity threshold varies with sentence length and topic drift rate. Based on the multiple first document fragments, a multi-layered topic knowledge graph including the regulatory topics, clause topics, question-and-answer topics, and instance topics is constructed to obtain a financial insurance document knowledge base based on a current feature vector library, wherein the current feature vector library includes the feature vectors of the first document fragments. In this application, the segmentation granularity threshold is adaptively adjusted according to sentence length and topic drift rate, and adaptive segmentation is performed to ensure the robustness of semantic boundaries. The automatically updated knowledge graph is multi-topic and multi-level, and the retrieved information is semantically complete. This solves the technical problem of low retrieval accuracy when searching based on existing financial and insurance knowledge bases in the prior art. Attached Figure Description

[0056] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0057] Figure 1 This is a flowchart illustrating a method for constructing a financial insurance knowledge base according to an embodiment of the present invention;

[0058] Figure 2 This is a schematic flowchart of a specific implementation method before step S20 in one embodiment of the present invention;

[0059] Figure 3 yes Figure 1 A schematic diagram of a specific implementation method for step S20;

[0060] Figure 4 yes Figure 1 A schematic diagram of a specific implementation method for step S20;

[0061] Figure 5 yes Figure 1 A schematic diagram of a specific implementation method for step S20;

[0062] Figure 6 yes Figure 1 A schematic diagram of a specific implementation method for step S20;

[0063] Figure 7 yes Figure 1 A flowchart illustrating a specific implementation method prior to step S30;

[0064] Figure 8 yes Figure 1 A schematic diagram of a specific implementation method for step S30;

[0065] Figure 9 yes Figure 1 A flowchart illustrating a specific implementation method following step S30;

[0066] Figure 10 yes Figure 9 A schematic diagram of a specific implementation of step S40;

[0067] Figure 11 This is a schematic diagram of a financial insurance knowledge base construction device according to an embodiment of the present invention;

[0068] Figure 12 This is a schematic diagram of the structure of a computer device according to an embodiment of the present invention;

[0069] Figure 13 This is another structural schematic diagram of a computer device according to one embodiment of the present invention. Detailed Implementation

[0070] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, 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.

[0071] Example 1

[0072] This application provides a method for constructing a financial and insurance knowledge base. In the first embodiment of this method, the method is applied to a financial and insurance knowledge base construction device.

[0073] Retrieval-Augmented Generation (RAG) is a technical framework that combines information retrieval systems with the generative capabilities of large language models. RAG technology is widely used in tasks such as intelligent question answering, document summarization, and business knowledge retrieval. When a question is received, RAG first searches for relevant information in a specified knowledge base, such as company documents, databases, or web pages. Then, it organizes and generates an answer based on the found information. When performing a retrieval based on RAG, instead of directly answering the user's input question (Query), it first converts the question into a mathematical vector. Then, it searches a pre-built knowledge base for content fragments that are most similar to or most relevant to the mathematical vector of the question. Finally, it outputs the most relevant information fragments retrieved that are most relevant to the question.

[0074] In the financial and insurance field, when performing knowledge retrieval based on RAG (Research Aggregator), the knowledge base is typically updated manually by rebuilding the vector library, resulting in a lag in updates. However, financial and insurance documents are highly time-sensitive, including clause revisions, regulatory notices, and rate changes. The retrieved information may suffer from redundancy or semantic breaks, leading to low accuracy and quality of results when searching based on the knowledge base. In other words, existing technologies suffer from low retrieval accuracy when using existing financial and insurance knowledge bases.

[0075] Reference Figure 1 The method is applied to a financial and insurance knowledge base construction device, and the financial and insurance knowledge base construction method includes steps S10-S30:

[0076] Step S10: Obtain financial insurance documents, wherein the financial insurance documents include at least one of the following topics: regulatory topics, clause topics, question and answer topics, and example topics;

[0077] To address the issues of information redundancy or semantic fragmentation in knowledge base retrieval, a hierarchical knowledge structure with multiple semantic layers is constructed to resolve the problem of unclear knowledge base retrieval levels.

[0078] When building a financial and insurance knowledge base based on new financial and insurance documents, these documents are acquired. To construct a multi-layered semantic hierarchical knowledge structure, the selected financial and insurance documents can include multiple themes such as regulatory topics, clause topics, Q&A topics, and example topics. Each financial and insurance document must include at least one of these themes. Based on these multi-themed financial and insurance documents, a multi-layered semantic hierarchical knowledge structure is constructed, comprising regulatory, clause, Q&A, and example layers.

[0079] The system is structured as follows: the first layer is the regulatory layer, which stores higher-level rules, such as financial regulations or industry policies. The second layer is the terms layer, which maps various insurance contract terms and liability definitions. The third layer is the Q&A layer, which consists of real customer service Q&As or Q&As generated through training. The fourth layer is the instance layer, which includes historical claims, typical cases, and data samples.

[0080] Step S20: Based on the semantic similarity between sentences in the financial insurance document and the segmentation granularity threshold, the financial insurance document is segmented to obtain multiple first document fragments. Each first document fragment in the multiple first document fragments corresponds to a first document fragment feature vector. The segmentation granularity threshold varies with the sentence length and topic drift rate.

[0081] After obtaining financial and insurance documents on multiple topics, the documents are divided based on the semantic similarity between sentences and the segmentation granularity threshold, resulting in multiple first document fragments.

[0082] Before segmenting documents based on semantic similarity between sentences, the documents are first segmented into sentences. For financial insurance documents, this segmentation yields multiple sentences. These sentences are then denoised to remove formatting noise, layout noise, and content noise.

[0083] Reference Figure 2 Before step S20, steps A1-A2 are included:

[0084] Step A1: Segment the financial insurance document to obtain multiple sentences;

[0085] When segmenting a document into sentences, core delimiters such as periods, question marks, exclamation marks, semicolons, or line breaks are used as the basic delimiters. In particular, financial and insurance documents have specific requirements for sentence segmentation.

[0086] As an example, when segmenting financial and insurance documents, it is required to protect headings and numbers; avoid breaking headings or numbers such as "Article 1 Insured Subject Matter" or "1.1 Scope of Liability" after the number, and the rules should identify complete sentences such as "Article X", "XY" or "(X)" patterns.

[0087] As an example, when segmenting sentences in financial and insurance documents, certain abbreviations and amounts must be protected; for instance, the decimal point in "insurance amount of RMB 100,000.00" should not be the end of the sentence.

[0088] As an example, when segmenting sentences in financial and insurance documents, it is required to handle introductory phrases and lists; such as "Party A:" or "Insured's Name:" introductory phrases should generally be treated as independent short sentences or specially marked. In addition, list items should also be treated as independent short sentences or specially marked.

[0089] Step A2: Denoise the sentence by removing format noise, layout noise, and content noise.

[0090] Formatting noise refers to irrelevant formatting characters. If formatting noise exists, regular expressions can be used to batch match, replace, or delete it. As an example, consider the sentence "The insured amount is RMB ¢1,000,000.00 yuan (in uppercase)". Denoising this sentence removes the ¢ characters to eliminate formatting noise. As another example, multiple spaces are replaced with a single standard space to remove space formatting noise. Page layout noise includes sentences originating from headers, footers, or page numbers, resulting in fragmented sentences. For example, in the original text, sentence A states "Page 5 of 20," sentence B states "The insured suffered an insured event during the insurance period as stipulated in the contract," and sentence C states "For insured events, the insurer shall pay compensation in the following manner." Denoising these sentences removes page layout noise by deleting sentence A and merging sentences B and C, resulting in "The insured suffered an insured event during the insurance period as stipulated in the contract, and the insurer shall pay compensation in the following manner." Sentences B and C are semantically fragmented sentences. As an example, the sentence or phrase may be a meaningless cliché, advertisement, or redundant embellishment. The sentence is then denoised to remove content noise, relying on a combination of a domain-specific stop word database and named entity recognition.

[0091] The sentence is denoised to remove format noise, layout noise, and content noise.

[0092] In existing technologies, financial insurance documents are segmented based on fixed lengths to obtain document fragments, which makes it difficult to balance semantic integrity and retrieval efficiency. This embodiment divides the financial insurance document into multiple first document fragments based on the semantic similarity between sentences and a segmentation granularity threshold.

[0093] The granularity threshold characterizes the sensitivity of the decision boundary. The granularity threshold is related to sentence length and topic drift rate, varying with both. Topic drift rate indicates the shift of the semantic meaning of a sentence from one topic meaning to another.

[0094] Based on the semantic similarity between sentences in financial insurance documents and the segmentation granularity threshold, the financial insurance documents are adaptively segmented to obtain multiple semantically consistent first document fragments. Each first document fragment corresponds to its own feature vector. Multiple first document fragments The first document fragment constitutes the smallest index unit of the knowledge base.

[0095] Reference Figure 3 Step S20 includes steps S201-S204:

[0096] Step S201: Determine the sentence vector corresponding to each sentence in the financial insurance document;

[0097] As an example, suppose the document Si represents sentence i, and the sentence vector corresponding to each sentence in the financial insurance document is determined as follows: .

[0098] Step S202: Calculate the similarity of sentence vectors between adjacent sentences to obtain the semantic similarity between adjacent sentences;

[0099] The semantic similarity between adjacent sentences is obtained by calculating the similarity of their sentence vectors. The adjacency similarity is... , representing two sentence vectors of adjacent sentences and Semantic similarity between them.

[0100] Step S203: If the semantic similarity between adjacent sentences is less than the division granularity threshold, then the semantic boundary between adjacent sentences is determined.

[0101] Granularity threshold The sensitivity of the segmentation boundary is characterized. A smaller segmentation granularity threshold results in lower semantic similarity between the segmented sentences, leading to finer segmentation. Conversely, a larger segmentation granularity threshold results in higher semantic similarity between the segmented sentences, leading to coarser segmentation. If the semantic similarity between adjacent sentences is less than the segmentation granularity threshold, then it is considered that... and There are semantic boundaries between them.

[0102] By setting the granularity threshold And the granularity threshold Adjustments are made based on sentence length and topic drift rate. This achieves adaptive segmentation of financial insurance documents, forming semantically consistent segmentation units. Semantic-based adaptive segmentation ensures the integrity of document content and contextual continuity. Segmentation granularity threshold. It is not a fixed constant, but rather applies to each adjacent sentence pair. The locally calculated threshold, taking into account both sentence length features and local topic drift rate, ensures the robustness and adaptability of semantic boundary judgment.

[0103] If the semantic similarity between adjacent sentences is less than the segmentation granularity threshold, a semantic boundary exists, and a new segment is started.

[0104] Reference Figure 4 Before step S203, steps B1-B4 are included:

[0105] Step B1: Determine the sentence length of each of the two adjacent sentences;

[0106] After dividing the data into sentences, calculate the sentence length of each sentence. Determine the sentence length of any two adjacent sentences.

[0107] Step B2: Normalize the sentence length of each of the two sentences to obtain the normalized length factor;

[0108] As an example, adjacent sentences The lengths are respectively The sentence lengths of the two sentences are normalized to obtain the normalized length factor. .in, .

[0109] Normalized length factor The value between 0 and 1 indicates the information density of a local segment. The empirical upper limit for sentence length. It is 128 tokens.

[0110] Step B3: If the normalized length factor exceeds the preset normalized length factor threshold, then increase the partitioning granularity threshold.

[0111] If the normalized length factor exceeds the preset normalized length factor threshold, that is, when the sentence is long, a segment usually already contains relatively complete semantic units. Only when the similarity decreases significantly should it be considered a segmentation boundary. Therefore, in this case, the segmentation granularity threshold should be increased to avoid over-segmentation.

[0112] Step B4: If the normalized length factor does not exceed the preset normalized length factor threshold, then reduce the partitioning granularity threshold.

[0113] If the normalized length factor does not exceed the preset normalized length factor threshold, that is, when the sentence is short, the semantic information of a single sentence is limited, and moderate differences between adjacent sentences can still be regarded as the same semantic unit. Therefore, in this case, the granularity threshold should be appropriately reduced to prevent the generation of a large number of overly fragmented segments.

[0114] Therefore, sentence length serves as a factor in adjusting the direction of the segmentation granularity threshold.

[0115] Reference Figure 5 Before step S203, steps C1-C5 are also included:

[0116] Step C1: Determine the center vector of the current first document fragment;

[0117] Not only can sentence length be used as a factor to adjust the direction of the segmentation granularity threshold, but topic drift rate can also be used as a factor to adjust the direction of the segmentation granularity threshold.

[0118] Topic drift rate indicates that the semantic meaning of a sentence shifts from one topic meaning to another, depicting the trend of local topic change.

[0119] Calculate the center vector of the most recently formed first document fragment.

[0120] Step C2: Determine candidate sentences for the semantic boundaries to be processed following the current first document segment;

[0121] Based on the most recent first document segment that has been formed, determine the candidate sentences that are to be processed at the semantic boundaries following the current first document segment.

[0122] Step C3: Determine the topic drift rate based on the sentence vector corresponding to the candidate sentence and the center vector;

[0123] For candidate sentences The vector is obtained using the same encoder. For candidate new sentences Define topic drift rate ,in, This represents the most recently formed first document fragment. Sentence vectors of candidate new sentences The similarity between them.

[0124] Step C4: If the topic drift rate exceeds a preset topic drift rate threshold, then increase the division granularity threshold.

[0125] If the topic drift rate exceeds the preset topic drift rate threshold, it indicates that the topic at the current position has changed significantly. A higher threshold should be set to be more sensitive to make it easier to determine the boundary, and the division granularity threshold should be increased.

[0126] Step C5: If the topic drift rate does not exceed the preset topic drift rate threshold, then reduce the division granularity threshold.

[0127] If the topic drift rate does not exceed the preset topic drift rate threshold, it indicates that the new sentence is highly homogeneous with the current segment, and the threshold can be reduced. Sentences with slightly lower similarity are still considered as the same segment. If the topic change at the current position is significant, the division granularity threshold can be reduced.

[0128] Based on the semantic boundaries, the financial insurance document is divided into multiple first document fragments, wherein the first document fragments are semantically consistent.

[0129] As an example, the sentence length factor and topic drift factor are linearly weighted to comprehensively influence the granularity threshold. .

[0130] in, A lower bound is set for the experience, such as 0.3. An upper bound, such as 0.8, is set for the empirical test to ensure that the threshold is always within a reasonable range. To The result after normalization to [0,1] This is the weighting balance parameter between the length factor and the topic factor. The length of the sentence.

[0131] By combining length and topic drift, this solution can adaptively determine the segmentation granularity for different text formats, such as long sentences like legal provisions and short sentences like question-and-answer corpora, thus achieving a balance between semantic integrity and retrieval efficiency.

[0132] Step S204: Based on the semantic boundary, the financial insurance document is divided into multiple first document fragments, wherein the first document fragments are semantically consistent.

[0133] Based on the semantic boundaries, the financial insurance document is divided into multiple first document fragments, wherein the first document fragments are semantically consistent.

[0134] In some embodiments, metadata is extracted from the original financial insurance document after sentence segmentation and denoising. After step A2, metadata is extracted from the denoised financial insurance document to obtain the text content, source document ID, timestamp, and the type of insurance involved in the document, as referred to... Figure 6Step S20 further includes steps D1-D2:

[0135] Step D1: Based on the semantic similarity between sentences in the text content and the granularity threshold, the text content is divided by topic to obtain topic-level document fragments under the legal topic, clause topic, question and answer topic, and example topic.

[0136] After the initial segmentation of financial and insurance documents based on semantic similarity, they are further categorized according to their metadata content, placing the document fragments into corresponding levels. Each level corresponds to a topic, and these levels are called topic layers. Topic layers include the regulatory layer (regulatory topic), the clause layer (clause topic), the question-and-answer layer (question-and-answer topic), and the instance layer (example topic). The final result is topic-layered document fragments for different topics, which, as mentioned above, are hierarchically arranged.

[0137] As an example, in the regulatory documents of the regulatory layer, a document fragment corresponds to a specific clause or its natural language paragraph; in the question-and-answer documents of the question-and-answer layer, a document fragment corresponds to a complete case description.

[0138] Step D2: Based on the semantic similarity between sentences in the topic-layer document fragments and the segmentation granularity threshold, the topic-layer document fragments under each topic are segmented to obtain first document fragments under different topics. Each first document fragment includes the source document ID, the timestamp, and the insurance category involved in the document.

[0139] The document fragments at the topic level under each topic are divided to obtain the first document fragment under each topic. Each first document fragment includes the source document ID, timestamp, and the type of insurance involved in the document.

[0140] Current RAG systems require a full reconstruction of the vector library when new documents are added, resulting in high computational costs. This solution avoids this full reconstruction by using a local incremental update mechanism. An incremental index area is built, indexing only newly added segments, and the indexes are periodically merged in the background. This mechanism achieves rapid integration and asynchronous fusion, maintaining consistency and efficiency in the knowledge base even with frequent updates to monitored documents. After parsing a new document, a set of segments is generated. The similarity between each segment and existing vectors in the library is calculated. Based on the similarity, version replacement or the addition of new index nodes is performed, resulting in only local incremental updates.

[0141] Reference Figure 7 Before step S30, including steps E1-E3:

[0142] Step E1: Determine the feature vector similarity between the financial insurance document and document fragments of existing documents in the existing database, based on the feature vectors of the document fragments.

[0143] Each document fragment corresponds to a document fragment feature vector. The decision to update is based on these feature vectors. The similarity of feature vectors between financial insurance documents and document fragments of existing documents in the database is determined.

[0144] Step E2: If it is determined that the similarity of the feature vector is greater than a preset first threshold, then based on the feature vector of the first document fragment corresponding to the financial insurance document, replace the feature vector of the second document fragment corresponding to the existing document in the current feature vector library.

[0145] The preset first threshold is used to determine the difference between the newly divided document fragment and the documents in the existing database. If the new document fragment exceeds the first threshold, it means that the difference between the newly divided document fragment and the fragment in the existing database is small and there may be subtle differences. In this case, version replacement can be performed directly to update the knowledge in the existing database, ensuring the real-time performance of the existing database and avoiding the problem of low retrieval accuracy caused by the knowledge base being outdated.

[0146] The document fragment corresponding to the existing document is called the second document fragment, and the vector of the second document fragment is called the second document fragment feature vector. If it is determined that the similarity of the feature vector is greater than a preset first threshold, then the feature vector of the second document fragment corresponding to the existing document in the current feature vector library is replaced based on the feature vector of the first document fragment corresponding to the financial insurance document, thereby realizing vector update using a local incremental update mechanism.

[0147] Step E3: If it is determined that the similarity of the feature vectors is less than a preset second threshold, then add an index node to the current feature vector library by adding the feature vector of the first document fragment.

[0148] If the similarity of the feature vectors is determined to be less than the preset second threshold, it indicates that the newly divided document fragments are significantly different from the fragments in the existing library, and there may be a large difference. For the existing library, the newly divided documents belong to new knowledge points. Adding the newly divided document fragments to the existing library expands the existing library and enriches the existing content.

[0149] Step S30: Based on the multiple first document fragments, construct a multi-layered topic knowledge graph including the legal topic, the clause topic, the question and answer topic, and the instance topic, to obtain a financial insurance document knowledge base based on the current feature vector library, wherein the current feature vector library includes the feature vectors of the first document fragments.

[0150] Based on the multiple first document fragments, a multi-layered topic knowledge graph is constructed, including the legal topic, the clause topic, the question-and-answer topic, and the instance topic. The multi-layered topic knowledge graph uses the current feature vector library as the retrieval basis.

[0151] Reference Figure 8 Step S30 includes steps S301-S304:

[0152] Step S301: Determine the semantic similarity of document segments between every two first document segments in the plurality of first document segments;

[0153] As an example, semantic segmentation is performed on insurance contracts, regulatory documents, Q&A corpora, and historical claims documents to obtain a set of fragments. The metadata of each fragment includes information such as the effective date and the type of insurance. Each fragment has a source type, such as regulations, clauses, Q&A, or cases. According to the fragment type, they are classified into four levels: the first level is the regulation layer L1, the second level is the clause layer L2, the third level is the Q&A layer L3, and the fourth level is the case layer L4.

[0154] Determine the semantic similarity between every two segments of the first document fragment.

[0155] Step S302: Based on the semantic similarity of the document fragments, construct directed edges under the same topic and directed edges across topics;

[0156] As an example, cross-layer connections are constructed. Based on fragment content and metadata, edges are established for cross-layer connections. Edge L1→L2 represents regulatory constraints. If a clause fragment references a regulatory clause in its content or metadata, such as "The waiting period for this product is set in accordance with ××× regulatory requirements," then a directed edge is established from node L2 to node L1. Edge L2→L3 represents a clause-question-answer mapping. The answer in a question-and-answer sample often refers to a specific clause. When parsing the question and answer, clause references such as clause numbers or insurance product names are extracted from the answers. The QA node is then connected to the corresponding clause node. Edges L2→L4 and L1→L4 represent clause or regulation-case mapping. Historical claims cases usually contain "based on clauses or regulations" information, such as "This claim is based on ×× clause and ×× regulatory provisions." After parsing, edges are established from cases to clauses and from cases to regulations.

[0157] As an example, in addition to building cross-layer connections, semantic associations within layers are also constructed. Besides cross-layer edges, each layer also establishes near-neighbor edges based on semantic similarity, such as similar clauses between different contracts or semantically similar questions between different question-and-answer samples, to horizontally expand the recall scope.

[0158] Step S303: Construct a knowledge graph at the same topic level based on the directed edges under the same topic, and construct a multi-level knowledge graph across topics based on the directed edges across topics, to obtain a multi-level topic knowledge graph;

[0159] Step S304: Determine the financial insurance document knowledge base based on the knowledge graph of the multi-layer topics and the current feature vector library.

[0160] Based on the current feature vector library, a financial insurance document knowledge base based on a multi-layered topic knowledge graph was constructed for retrieval.

[0161] Reference Figure 9 After step S30, the following steps are included: S401-S404:

[0162] Step S401: Upon receiving a search instruction, the text to be searched under the search instruction is encoded to obtain a search vector;

[0163] Upon receiving a search instruction, the text to be searched under the search instruction is encoded to obtain a search vector.

[0164] Step S402: Based on the retrieval vector and the current feature vector library, the question-and-answer topic layer and the clause topic layer are used as entry layers to perform preliminary semantic retrieval in the financial insurance document knowledge base, so as to obtain question-and-answer nodes that semantically match the question-and-answer topic layer and clause nodes that semantically match the clause topic layer.

[0165] Based on the retrieval vector, a vector search is first performed in the current feature vector database, using either the question-and-answer topic layer or the clause topic layer as the entry layer. This initial semantic search yields question-and-answer nodes that match the semantics of the question-and-answer topic layer and clause nodes that match the semantics of the clause topic layer. The entry layer is then selected based on the user's intent. For example, if the user's intent is to inquire about clause interpretation or claims cases, the question-and-answer layer is selected as the entry layer if the user's question is closer to everyday questions and answers; otherwise, the clause layer is used as the entry layer for initial retrieval if the user's question leans towards clause interpretation and compliance. This process yields question-and-answer nodes that match the semantics of the question-and-answer topic layer and clause nodes that match the semantics of the clause topic layer.

[0166] Step S403: Based on the question-and-answer node and the clause node, retrieve the regulatory node and instance node along the cross-layer edge of the multi-layer topic knowledge graph;

[0167] Once several high-scoring question-and-answer nodes and clause nodes are retrieved, the process automatically expands to relevant regulatory and instance nodes via cross-layer edges. From the question-and-answer node, a jump along the edge leads to the corresponding clause node, retrieving the original text or summary of the clause involved in the question / answer. From the clause node, a further jump along the edge leads to the regulatory node, obtaining its higher-level regulatory basis. Simultaneously, from the clause node or regulatory node, a jump down to the instance layer retrieves instance nodes, recalling typical claims cases directly related to the clause or regulation.

[0168] Step S404: The retrieved question-and-answer node, clause node, legal node, and instance node are used as recall nodes, and the corresponding content of the recall nodes is used as the search result of the search instruction.

[0169] The retrieved question-and-answer nodes, clause nodes, regulation nodes, and instance nodes are used as recall nodes for cross-layer expansion. The corresponding content of the recall nodes is used as the search result of the search command.

[0170] Reference Figure 10 Step S404 includes steps F1-F3:

[0171] Step F1: Use the retrieved question-and-answer node, clause node, regulation node, and instance node as recall nodes;

[0172] Step F2: Semantically match the document fragment feature vector of the document fragment corresponding to the recall node with the retrieval vector to obtain the retrieval semantic similarity;

[0173] The document fragment feature vector corresponding to the recall node is semantically matched with the retrieval vector to obtain the retrieval semantic similarity. The similarity is then weighted and calculated to obtain a comprehensive score, which is then uniformly sorted and selected in the subsequent RAG knowledge fusion stage.

[0174] Step F3: Based on the semantic similarity of the retrieval, the timeliness order of the document fragments corresponding to the recall node, and the weight of the topic layer where the recall node is located, knowledge fusion is performed on the document fragments corresponding to the recall node to obtain the final retrieval result of the retrieval instruction.

[0175] A weighted knowledge fusion mechanism is employed to fuse knowledge from the document fragments corresponding to the recalled nodes, generating a final answer after fusion, thereby improving the accuracy and timeliness of the generated result. The final search result for the search instruction is then obtained.

[0176] By using a multi-layered semantic graph structure, bidirectional semantic propagation is achieved from top to bottom (regulations → clauses → Q&A → cases) and from bottom to top (cases → clauses → regulations). In a single query, rules, clause explanations, and actual cases can be retrieved simultaneously, improving the credibility and richness of RAG generation.

[0177] This application provides a method, apparatus, device, and medium for constructing a financial insurance knowledge base. Compared with existing technologies, it involves acquiring financial insurance documents, wherein the documents include at least one of the following themes: regulatory topics, clause topics, question-and-answer topics, and instance topics. Based on the semantic similarity between sentences in the financial insurance documents and a segmentation granularity threshold, the documents are segmented to obtain multiple first document fragments. Each first document fragment corresponds to a first document fragment feature vector. The segmentation granularity threshold varies with sentence length and topic drift rate. Based on the multiple first document fragments, a multi-layered topic knowledge graph is constructed, including the regulatory topics, clause topics, question-and-answer topics, and instance topics, resulting in a financial insurance document knowledge base retrieved based on a current feature vector library, wherein the current feature vector library includes the feature vectors of the first document fragments. In this application, the segmentation granularity threshold is adaptively adjusted according to sentence length and topic drift rate, and adaptive segmentation is performed to ensure the robustness of semantic boundaries. The automatically updated knowledge graph is multi-topic and multi-level, and the retrieved information is semantically complete. This solves the technical problem of low retrieval accuracy when searching based on existing financial and insurance knowledge bases in the prior art.

[0178] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0179] In one embodiment, a financial insurance knowledge base construction apparatus is provided, which corresponds one-to-one with the financial insurance knowledge base construction method described in the above embodiments. For example... Figure 11 As shown, the financial insurance knowledge base construction device includes an acquisition module 101, a partitioning module 102, and a knowledge base construction module 103. Detailed descriptions of each functional module are as follows:

[0180] The acquisition module 101 is used to acquire financial and insurance documents, wherein the financial and insurance documents include at least one of the following topics: regulatory topics, clause topics, question and answer topics, and example topics.

[0181] The segmentation module 102 is used to segment the financial insurance document based on the semantic similarity between sentences in the document and the segmentation granularity threshold to obtain multiple first document segments. Each first document segment in the multiple first document segments has its own first document segment feature vector. The segmentation granularity threshold varies with the sentence length and topic drift rate.

[0182] The knowledge base construction module 103 is used to construct a multi-layered topic knowledge graph based on the multiple first document fragments, including the legal topic, the clause topic, the question and answer topic, and the instance topic, to obtain a financial insurance document knowledge base based on the current feature vector library, wherein the current feature vector library includes the feature vectors of the first document fragments.

[0183] In one embodiment, when the knowledge base construction module 103 performs the operation of constructing a multi-layered knowledge graph based on the first document fragment, including the legal topic, the clause topic, the question-and-answer topic, and the instance topic, to obtain a financial insurance document knowledge base based on the current feature vector library, it is specifically used for:

[0184] Determine the semantic similarity of document segments between every two first document segments in the plurality of first document segments;

[0185] Based on the semantic similarity between every two first document fragments in the plurality of first document fragments, directed edges under the same topic and directed edges across topics are constructed;

[0186] A knowledge graph of the same topic level is constructed based on directed edges under the same topic, and a multi-level knowledge graph of cross topics is constructed based on directed edges across topics, to obtain a multi-level topic knowledge graph.

[0187] The financial insurance document knowledge base is determined based on the knowledge graph of the multi-layered topics and the current feature vector library.

[0188] In one embodiment, before constructing a multi-layered topic knowledge graph based on the first document fragment, including the regulatory topic, the clause topic, the question-and-answer topic, and the instance topic, to obtain a financial insurance document knowledge base based on the current feature vector library for retrieval, the knowledge base construction module 103 is specifically used for:

[0189] Determine the feature vector similarity between the financial insurance document and document fragments of existing documents in the existing database, based on the feature vectors of the document fragments;

[0190] If it is determined that the similarity of the feature vectors is greater than a preset first threshold, then the feature vector of the second document segment corresponding to the existing document in the current feature vector library is replaced based on the feature vector of the first document segment corresponding to the financial insurance document.

[0191] If the similarity of the feature vectors is determined to be less than a preset second threshold, then an index node is added to the current feature vector library by adding the feature vector of the first document fragment.

[0192] In one embodiment, the segmentation module 102, in performing the step of segmenting the financial insurance document based on the semantic similarity between sentences in the document and the segmentation granularity threshold to obtain a first document fragment, is specifically used for:

[0193] Determine the sentence vector corresponding to each sentence in the financial insurance document;

[0194] Calculate the similarity of sentence vectors between adjacent sentences to obtain the semantic similarity between adjacent sentences;

[0195] If the semantic similarity between adjacent sentences is less than the granularity threshold, then the semantic boundary between adjacent sentences is determined.

[0196] Based on the semantic boundaries, the financial insurance document is divided into multiple first document fragments, wherein the first document fragments are semantically consistent.

[0197] In one embodiment, before determining the semantic boundary between adjacent sentences if the semantic similarity between the adjacent sentences is less than the segmentation granularity threshold, the segmentation module 102 is specifically used for:

[0198] Determine the sentence length of each of the two adjacent sentences;

[0199] The sentence lengths of the two sentences are normalized to obtain the normalized length factor;

[0200] If the normalized length factor exceeds a preset normalized length factor threshold, then the partitioning granularity threshold is increased.

[0201] If the normalized length factor does not exceed the preset normalized length factor threshold, then the partitioning granularity threshold is reduced.

[0202] In one embodiment, before determining the semantic boundary between adjacent sentences if the semantic similarity between the adjacent sentences is less than the segmentation granularity threshold, the segmentation module 102 is further specifically used for...

[0203] Determine the center vector of the current first document fragment;

[0204] Identify candidate sentences for semantic boundaries to be processed following the current first document segment;

[0205] The topic drift rate is determined based on the sentence vector corresponding to the candidate sentence and the center vector.

[0206] If the topic drift rate exceeds a preset topic drift rate threshold, then the division granularity threshold is increased;

[0207] If the topic drift rate does not exceed the preset topic drift rate threshold, then the division granularity threshold is reduced.

[0208] In one embodiment, after constructing a multi-layered topic knowledge graph based on the first document fragment, including the regulatory topic, the clause topic, the question-and-answer topic, and the instance topic, and obtaining a financial insurance document knowledge base based on the current feature vector library, the knowledge base construction module 103 is specifically used for:

[0209] Upon receiving a search instruction, the text to be searched under the search instruction is encoded to obtain a search vector;

[0210] Based on the retrieval vector and the current feature vector library, the question-and-answer topic layer and the clause topic layer are used as entry layers to perform preliminary semantic retrieval in the financial insurance document knowledge base, so as to obtain question-and-answer nodes that semantically match the question-and-answer topic layer and clause nodes that semantically match the clause topic layer.

[0211] Based on the question-and-answer nodes and the clause nodes, the legal nodes and instance nodes are retrieved by searching along the cross-layer edges of the multi-layer topic knowledge graph;

[0212] The retrieved question-and-answer nodes, clause nodes, legal nodes, and instance nodes are used as recall nodes, and the corresponding content of the recall nodes is used as the search result of the search instruction.

[0213] In one embodiment, the knowledge base construction module 103, when performing the step of using the retrieved question-and-answer nodes, clause nodes, legal nodes, and instance nodes as recall nodes, and using the corresponding content of the recall nodes as the retrieval result of the retrieval instruction, is specifically used for:

[0214] The retrieved question-and-answer nodes, clause nodes, legal nodes, and instance nodes will be used as recall nodes.

[0215] The document fragment feature vector corresponding to the recall node is semantically matched with the retrieval vector to obtain the retrieval semantic similarity.

[0216] Based on the semantic similarity of the search, the timeliness order of the document fragments corresponding to the recall node, and the weight of the topic layer where the recall node is located, knowledge fusion is performed on the document fragments corresponding to the recall node to obtain the final search result of the search instruction.

[0217] In one embodiment, before segmenting the financial insurance document based on the semantic similarity between sentences and the segmentation granularity threshold to obtain the first document fragment, the segmentation module 102 is specifically used for:

[0218] The financial insurance document is segmented into sentences to obtain multiple sentences;

[0219] The sentence is denoised to remove format noise, layout noise, and content noise.

[0220] In one embodiment, after denoising the sentence to remove format noise, layout noise, and content noise, metadata is extracted from the denoised financial insurance document to obtain the text content, source document ID, timestamp, and the insurance category involved in the document. The segmentation module 102 then performs the step of segmenting the financial insurance document based on the semantic similarity between sentences and the segmentation granularity threshold to obtain a first document fragment. Specifically, this step is used to:

[0221] Based on the semantic similarity between sentences in the text content and the granularity threshold, the text content is divided by topic, resulting in topic-level document fragments under the following topics: legal topics, clause topics, question and answer topics, and example topics.

[0222] Based on the semantic similarity between sentences in the topic-layer document fragments and the segmentation granularity threshold, the topic-layer document fragments under each topic are segmented to obtain first document fragments under different topics. Each first document fragment includes the source document ID, the timestamp, and the insurance category involved in the document.

[0223] This invention provides a device for constructing a financial insurance knowledge base. The device acquires financial insurance documents, wherein each document includes at least one of the following themes: regulatory topics, clause topics, question-and-answer topics, and instance topics. Based on the semantic similarity between sentences in the financial insurance documents and a segmentation granularity threshold, the documents are segmented to obtain multiple first document fragments. Each first document fragment corresponds to a first document fragment feature vector. The segmentation granularity threshold varies with sentence length and topic drift rate. Based on the multiple first document fragments, a multi-layered knowledge graph including the regulatory topics, clause topics, question-and-answer topics, and instance topics is constructed, resulting in a financial insurance document knowledge base that uses a current feature vector library as the retrieval basis. The current feature vector library includes the feature vectors of the first document fragments. In this application, the segmentation granularity threshold is adaptively adjusted with sentence length and topic drift rate, and adaptive segmentation ensures the robustness of semantic boundaries. The automatically updated knowledge graph is multi-topic and multi-level, and the retrieved information is semantically complete. This solves the technical problem of low retrieval accuracy when searching based on existing financial insurance knowledge bases in the prior art.

[0224] Specific limitations regarding the financial and insurance knowledge base construction device can be found in the limitations of the intelligent question-answering method described above, and will not be repeated here. Each module in the aforementioned financial and insurance knowledge base construction device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.

[0225] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 12 As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile and / or volatile media and internal memory. The non-volatile media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile media. The network interface is used to communicate with external clients via a network connection. When the computer program is executed by the processor, it implements the functions or steps of a server-side method for constructing a financial insurance knowledge base.

[0226] In one embodiment, a computer device is provided, which may be a client, and its internal structure diagram may be as follows: Figure 13 As shown, the computer device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computational and control capabilities. The memory includes non-volatile media and internal memory. The non-volatile media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile media. The network interface is used to communicate with an external server via a network connection. When the computer program is executed by the processor, it implements the client-side functions or steps of a financial insurance knowledge base construction method.

[0227] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps:

[0228] Obtain financial and insurance documents, wherein the financial and insurance documents include at least one of the following topics: regulatory topics, clause topics, question and answer topics, and example topics;

[0229] Based on the semantic similarity between sentences in the financial insurance document and the segmentation granularity threshold, the financial insurance document is segmented to obtain multiple first document fragments. Each of the multiple first document fragments has its own first document fragment feature vector. The segmentation granularity threshold varies with sentence length and topic drift rate.

[0230] Based on the multiple first document fragments, a multi-layered topic knowledge graph is constructed, including the legal topic, the clause topic, the question and answer topic, and the instance topic, to obtain a financial insurance document knowledge base based on the current feature vector library, wherein the current feature vector library includes the feature vectors of the first document fragments.

[0231] In one embodiment, a computer-readable medium is provided having a computer program stored thereon, which, when executed by a processor, performs the following steps:

[0232] Obtain financial and insurance documents, wherein the financial and insurance documents include at least one of the following topics: regulatory topics, clause topics, question and answer topics, and example topics;

[0233] Based on the semantic similarity between sentences in the financial insurance document and the segmentation granularity threshold, the financial insurance document is segmented to obtain multiple first document fragments. Each of the multiple first document fragments has its own first document fragment feature vector. The segmentation granularity threshold varies with sentence length and topic drift rate.

[0234] Based on the multiple first document fragments, a multi-layered topic knowledge graph is constructed, including the legal topic, the clause topic, the question and answer topic, and the instance topic, to obtain a financial insurance document knowledge base based on the current feature vector library, wherein the current feature vector library includes the feature vectors of the first document fragments.

[0235] It should be noted that the functions or steps that can be implemented by the computer-readable medium or computer device described above can be referred to the relevant descriptions on the server side and client side in the foregoing method embodiments. To avoid repetition, they will not be described one by one here.

[0236] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0237] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0238] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.

Claims

1. A method for constructing a financial insurance knowledge base, characterized in that, The method for constructing the financial and insurance knowledge base includes: Obtain financial and insurance documents, wherein the financial and insurance documents include at least one of the following topics: regulatory topics, clause topics, question and answer topics, and example topics; Based on the semantic similarity between sentences in the financial insurance document and the segmentation granularity threshold, the financial insurance document is segmented to obtain multiple first document fragments. Each of the multiple first document fragments has its own first document fragment feature vector. The segmentation granularity threshold varies with sentence length and topic drift rate. Based on the multiple first document fragments, a multi-layered topic knowledge graph is constructed, including the legal topic, the clause topic, the question and answer topic, and the instance topic, to obtain a financial insurance document knowledge base based on the current feature vector library, wherein the current feature vector library includes the feature vectors of the first document fragments.

2. The method for constructing a financial and insurance knowledge base according to claim 1, characterized in that, The step of constructing a multi-layered knowledge graph based on the first document fragment, including the legal topic, the clause topic, the question-and-answer topic, and the instance topic, to obtain a financial and insurance document knowledge base based on the current feature vector library, includes: Determine the semantic similarity of document segments between every two first document segments in the plurality of first document segments; Based on the semantic similarity between every two first document fragments in the plurality of first document fragments, directed edges under the same topic and directed edges across topics are constructed; A knowledge graph of the same topic level is constructed based on directed edges under the same topic, and a multi-level knowledge graph of cross topics is constructed based on directed edges across topics, to obtain a multi-level topic knowledge graph. The financial insurance document knowledge base is determined based on the knowledge graph of the multi-layered topics and the current feature vector library.

3. The method for constructing a financial and insurance knowledge base according to claim 1, characterized in that, Before constructing a multi-layered topic knowledge graph based on the first document fragment, including the regulatory topic, the clause topic, the question-and-answer topic, and the instance topic, to obtain a financial and insurance document knowledge base based on the current feature vector library, the following steps are included: Determine the feature vector similarity between the financial insurance document and document fragments of existing documents in the existing database, based on the feature vectors of the document fragments; If it is determined that the similarity of the feature vectors is greater than a preset first threshold, then the feature vector of the second document segment corresponding to the existing document in the current feature vector library is replaced based on the feature vector of the first document segment corresponding to the financial insurance document. If the similarity of the feature vectors is determined to be less than a preset second threshold, then an index node is added to the current feature vector library by adding the feature vector of the first document fragment.

4. The method for constructing a financial and insurance knowledge base according to claim 1, characterized in that, The step of segmenting the financial insurance document based on the semantic similarity between sentences and the segmentation granularity threshold to obtain a first document fragment includes: Determine the sentence vector corresponding to each sentence in the financial insurance document; Calculate the similarity of sentence vectors between adjacent sentences to obtain the semantic similarity between adjacent sentences; If the semantic similarity between adjacent sentences is less than the granularity threshold, then the semantic boundary between adjacent sentences is determined. Based on the semantic boundaries, the financial insurance document is divided into multiple first document fragments, wherein the first document fragments are semantically consistent.

5. The method for constructing a financial and insurance knowledge base according to claim 4, characterized in that, Before determining the semantic boundary between adjacent sentences if the semantic similarity between adjacent sentences is less than the segmentation granularity threshold, the process includes: Determine the sentence length of each of the two adjacent sentences; The sentence lengths of the two sentences are normalized to obtain the normalized length factor; If the normalized length factor exceeds a preset normalized length factor threshold, then the partitioning granularity threshold is increased. If the normalized length factor does not exceed the preset normalized length factor threshold, then the partitioning granularity threshold is reduced.

6. The method for constructing a financial and insurance knowledge base according to claim 4, characterized in that, Before determining the semantic boundary between adjacent sentences if the semantic similarity between them is less than the segmentation granularity threshold, the process further includes... Determine the center vector of the current first document fragment; Identify candidate sentences for semantic boundaries to be processed following the current first document segment; The topic drift rate is determined based on the sentence vector corresponding to the candidate sentence and the center vector. If the topic drift rate exceeds a preset topic drift rate threshold, then the division granularity threshold is increased; If the topic drift rate does not exceed the preset topic drift rate threshold, then the division granularity threshold is reduced.

7. The method for constructing a financial and insurance knowledge base according to claim 1, characterized in that, After constructing a multi-layered topic knowledge graph based on the first document fragment, including the regulatory topic, the clause topic, the question-and-answer topic, and the instance topic, and obtaining a financial insurance document knowledge base based on the current feature vector library, the process includes: Upon receiving a search instruction, the text to be searched under the search instruction is encoded to obtain a search vector; Based on the retrieval vector and the current feature vector library, the question-and-answer topic layer and the clause topic layer are used as entry layers to perform preliminary semantic retrieval in the financial insurance document knowledge base, so as to obtain question-and-answer nodes that semantically match the question-and-answer topic layer and clause nodes that semantically match the clause topic layer. Based on the question-and-answer nodes and the clause nodes, the legal nodes and instance nodes are retrieved by searching along the cross-layer edges of the multi-layer topic knowledge graph; The retrieved question-and-answer nodes, clause nodes, legal nodes, and instance nodes are used as recall nodes, and the corresponding content of the recall nodes is used as the search result of the search instruction.

8. The method for constructing a financial and insurance knowledge base according to claim 7, characterized in that, The step of using the retrieved question-and-answer nodes, clause nodes, legal nodes, and instance nodes as recall nodes, and using the corresponding content of the recall nodes as the search results of the search instruction, includes: The retrieved question-and-answer nodes, clause nodes, legal nodes, and instance nodes will be used as recall nodes. The document fragment feature vector corresponding to the recall node is semantically matched with the retrieval vector to obtain the retrieval semantic similarity. Based on the semantic similarity of the search, the timeliness order of the document fragments corresponding to the recall node, and the weight of the topic layer where the recall node is located, knowledge fusion is performed on the document fragments corresponding to the recall node to obtain the final search result of the search instruction.

9. The method for constructing a financial and insurance knowledge base according to claim 1, characterized in that, Before segmenting the financial insurance document based on the semantic similarity between sentences and the segmentation granularity threshold to obtain the first document fragment, the process includes: The financial insurance document is segmented into sentences to obtain multiple sentences; The sentence is denoised to remove format noise, layout noise, and content noise.

10. The method for constructing a financial insurance knowledge base according to claim 9, characterized in that, After denoising the sentence to remove format noise, layout noise, and content noise, metadata is extracted from the denoised financial insurance document to obtain the text content, source document ID, timestamp, and the insurance category involved in the document. The step of segmenting the financial insurance document based on the semantic similarity between sentences and the segmentation granularity threshold to obtain the first document fragment includes: Based on the semantic similarity between sentences in the text content and the granularity threshold, the text content is divided by topic, resulting in topic-level document fragments under the following topics: legal topics, clause topics, question and answer topics, and example topics. Based on the semantic similarity between sentences in the topic-layer document fragments and the segmentation granularity threshold, the topic-layer document fragments under each topic are segmented to obtain first document fragments under different topics. Each first document fragment includes the source document ID, the timestamp, and the insurance category involved in the document.

11. A device for constructing a financial insurance knowledge base, characterized in that, The financial insurance knowledge base construction device includes: The acquisition module is used to acquire financial and insurance documents, wherein the financial and insurance documents include at least one of the following topics: regulatory topics, clause topics, question and answer topics, and example topics. The segmentation module is used to segment the financial insurance document based on the semantic similarity between sentences and the segmentation granularity threshold to obtain multiple first document fragments. Each first document fragment in the multiple first document fragments has its own first document fragment feature vector. The segmentation granularity threshold varies with the sentence length and topic drift rate. The knowledge base construction module is used to construct a multi-layered topic knowledge graph based on the multiple first document fragments, including the legal topic, the clause topic, the question and answer topic, and the instance topic, to obtain a financial insurance document knowledge base based on the current feature vector library, wherein the current feature vector library includes the feature vectors of the first document fragments.

12. A device for constructing a financial insurance knowledge base, characterized in that, The method includes a memory, a processor, and a financial insurance knowledge base construction program stored in the memory and executable on the processor. The processor executes the financial insurance knowledge base construction program to implement the steps of the financial insurance knowledge base construction method according to any one of claims 1 to 10.

13. A medium, characterized in that, The medium stores a program for implementing a method for constructing a financial and insurance knowledge base, which is executed by a processor to implement the steps of the method for constructing a financial and insurance knowledge base as described in any one of claims 1 to 10.