A knowledge base updating method and system

By extracting features from multiple dimensions and calculating similarity, combined with semantic normalization and multi-level alignment, the problem of inaccurate knowledge base updates caused by single-dimensional similarity calculation in existing technologies is solved, and more accurate new document entry and knowledge base management are achieved.

CN121835853BActive Publication Date: 2026-07-31SHANGHAI CAIYUE XINGCHEN INTELLIGENT TECHNOLOGY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANGHAI CAIYUE XINGCHEN INTELLIGENT TECHNOLOGY CO LTD
Filing Date
2026-03-13
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing knowledge base update methods rely on single-dimensional similarity calculations, which results in an incomplete and inaccurate assessment of the association between new and existing documents. This may lead to knowledge gaps or the omission of important subtle differences, thereby reducing the overall quality of the knowledge base.

Method used

We employ multi-dimensional feature extraction and similarity calculation methods, including global content features, metadata features, and document structure features. Combined with semantic normalization and multi-level alignment, we use an intelligent fusion mechanism to perform dynamic weighted scoring, comprehensively assess the similarity between documents, and analyze metadata and content differences.

Benefits of technology

It enables more accurate entry of new documents into the database, accurately locates and presents the differences in metadata and content between new and old documents in a structured manner, and improves the update quality and management efficiency of the knowledge base.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121835853B_ABST
    Figure CN121835853B_ABST
Patent Text Reader

Abstract

A knowledge base update method and system are disclosed to achieve more accurate new document entry into the knowledge base. The method includes: extracting multi-dimensional features of a document to be processed and existing documents in the knowledge base; the document to be processed is the document to be added to the knowledge base; the multi-dimensional features include global content features, metadata features, and document structure features; calculating the multi-dimensional feature similarity between the document to be processed and the existing documents; calculating the comprehensive similarity between the document to be processed and the existing documents based on the multi-dimensional feature similarity; performing difference point analysis on existing documents with high comprehensive similarity to the document to be processed; and updating the knowledge base based on the results of the difference point analysis.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of knowledge base management technology, and in particular to a knowledge base update method and system. Background Technology

[0002] Knowledge bases, as the core carriers of knowledge organization, information sharing, and decision support, play a crucial role in enterprises, research institutions, and various information service platforms. With the explosive growth of information, knowledge bases need to continuously and efficiently absorb new knowledge and documents, and establish accurate connections with existing knowledge to maintain their timeliness and value. Existing knowledge base update methods often rely on single-dimensional similarity calculations, such as calculating only keyword matching or vector similarity of document content. This single-dimensional similarity calculation method ignores important information such as title, source, creation time, and chapter organization, resulting in incomplete and inaccurate similarity assessments. Due to the single evaluation dimension and lack of difference insight, new documents may be incorrectly judged as irrelevant to existing documents (causing knowledge gaps) or highly similar and ignored (if significant subtle differences exist), or simply replaced (potentially losing important information from historical versions), thereby reducing the overall quality of the knowledge base.

[0003] Therefore, there is an urgent need for a knowledge base update method and system to achieve more accurate entry of new documents into the database. Summary of the Invention

[0004] This application provides a knowledge base update method and system to achieve more accurate entry of new documents into the database.

[0005] Firstly, this application provides a knowledge base update method. The system includes: extracting multi-dimensional features of a document to be processed and existing documents in the knowledge base; the document to be processed is a document to be added to the knowledge base; the multi-dimensional features include global content features, metadata features, and document structure features; calculating the multi-dimensional feature similarity between the document to be processed and the existing documents; calculating the comprehensive similarity between the document to be processed and the existing documents based on the multi-dimensional feature similarity; performing difference point analysis on existing documents with high comprehensive similarity to the document to be processed; and updating the knowledge base based on the results of the difference point analysis.

[0006] In one possible design, calculating the multi-dimensional feature similarity between the document to be processed and the existing document includes: calculating the metadata similarity between the document to be processed and the existing document by: applying a similarity calculation method of the corresponding type to each metadata item according to the type of the metadata item to obtain the similarity of each metadata item; determining the metadata item weight corresponding to each metadata item of the document according to the document type; wherein, the metadata item weight of the time item is determined according to the time sensitivity of the document; and determining the metadata similarity based on the similarity of each metadata item and the metadata item weight corresponding to each metadata item.

[0007] In one possible design, calculating the multi-dimensional feature similarity between the document to be processed and the existing documents includes: calculating the text structure similarity between the document to be processed and the existing documents by: performing semantic normalization on the chapter titles of each document; performing preliminary structural alignment on the normalized chapter titles of the document to be processed and the existing documents; calculating the semantic similarity of the text content under the preliminarily aligned chapter titles; determining the matching confidence of the preliminarily aligned chapter titles based on the semantic similarity, and correcting the preliminarily aligned chapter titles; determining the text structure similarity between the document to be processed and the existing documents based on the number of structurally aligned chapter titles, the semantic similarity of the chapter titles, the matching confidence, and the hierarchical weight; the hierarchical weight of the chapter titles is determined according to the hierarchy of the chapter titles in the document.

[0008] In one possible design, the matching confidence of the chapter titles with preliminary structural alignment is determined based on semantic similarity, and the chapter titles with preliminary structural alignment are modified, including: if the semantic similarity of the two chapter titles with preliminary structural alignment is high, then the confidence of the chapter structural alignment is increased; if the semantic similarity of the two chapter titles with preliminary structural alignment is low, then the confidence of the chapter structural alignment is decreased, and other chapters with more matching content are found.

[0009] In one possible design, a difference analysis is performed on existing documents that have a high overall similarity to the document to be processed. This includes: performing a difference analysis on the metadata of the document to be processed and the existing documents; dividing the content of the document into multiple semantic units; aligning the semantic units of the document to be processed and the existing documents; and performing a content difference analysis on the aligned semantic unit pairs. The content difference analysis includes extracting and comparing key information elements of the two documents and identifying the types of differences.

[0010] In one possible design, the method further includes: generating a summary report of the differences between the document to be processed and the existing documents based on the metadata difference analysis results and content difference analysis results between the document to be processed and the existing documents, using a large language model.

[0011] Secondly, embodiments of this application provide a knowledge base update system, the system comprising:

[0012] The feature extraction module is used to extract multi-dimensional features from the document to be processed and existing documents in the knowledge base; the document to be processed is the document to be added to the knowledge base; the multi-dimensional features include global content features, metadata features, and document structure features.

[0013] A multi-dimensional feature similarity calculation module is used to calculate the multi-dimensional feature similarity between the document to be processed and the existing document;

[0014] The comprehensive similarity scoring module is used to calculate the comprehensive similarity between the document to be processed and the existing document based on the multidimensional feature similarity.

[0015] The difference analysis module is used to perform difference analysis on existing documents that have a high overall similarity to the document to be processed.

[0016] The decision module is used to update the knowledge base based on the results of the difference analysis.

[0017] In one possible design, when calculating the multi-dimensional feature similarity calculation module between the document to be processed and the existing document, it specifically calculates the metadata similarity between the document to be processed and the existing document in the following ways: applying the corresponding type of similarity calculation method to each metadata item according to the type of the metadata item to obtain the similarity of each metadata item; determining the metadata item weight corresponding to each metadata item of the document according to the document type; wherein, the metadata item weight of the time item is determined according to the time sensitivity of the document; and determining the metadata similarity based on the similarity of each metadata item and the metadata item weight corresponding to each metadata item.

[0018] In one possible design, the multi-dimensional feature similarity calculation module calculates the text structure similarity between the document to be processed and the existing documents in the following manner: semantically normalizing the chapter titles of each document; performing preliminary structural alignment on the normalized chapter titles of the document to be processed and the existing documents; calculating the semantic similarity of the text content under the preliminarily aligned chapter titles; determining the matching confidence of the preliminarily aligned chapter titles based on the semantic similarity, and correcting the preliminarily aligned chapter titles; determining the text structure similarity between the document to be processed and the existing documents based on the number of structurally aligned chapter titles in the document to be processed and the existing documents, the semantic similarity of the chapter titles, the matching confidence, and the hierarchical weight; the hierarchical weight of the chapter titles is determined according to the hierarchy of the chapter titles in the document.

[0019] In one possible design, when the multi-dimensional feature similarity calculation module determines the matching confidence of the chapter titles with preliminary structural alignment based on semantic similarity and corrects the chapter titles with preliminary structural alignment, it specifically performs the following: if the semantic similarity of the two chapter titles with preliminary structural alignment is high, then the confidence of the chapter structural alignment is increased; if the semantic similarity of the two chapter titles with preliminary structural alignment is low, then the confidence of the chapter structural alignment is decreased, and other chapters with more matching content are found.

[0020] In one possible design, when the difference analysis module performs difference analysis on existing documents with a high overall similarity to the document to be processed, it is specifically used to: perform difference analysis on the metadata of the document to be processed and the existing documents; divide the content of the document into multiple semantic units, align the semantic units of the document to be processed and the existing documents, and perform content difference analysis on the aligned semantic unit pairs; the content difference analysis includes extracting and comparing key information elements of the two documents and identifying the difference types.

[0021] In one possible design, the system further includes a difference summary generation module, used to: generate a difference summary report between the document to be processed and the existing documents based on the metadata difference analysis results and content difference analysis results between the document to be processed and the existing documents, using a large language model.

[0022] Thirdly, embodiments of this application also provide a computing device, including:

[0023] Memory, used to store program instructions;

[0024] A processor for invoking program instructions stored in the memory and executing the system or method as described in any possible design of the first aspect, according to the obtained program instructions.

[0025] Fourthly, embodiments of this application also provide a computer-readable storage medium storing computer-readable instructions that, when read and executed by a computer, cause the system or method described in any possible design of the first aspect to be implemented.

[0026] Fifthly, embodiments of this application also provide a computer program product, which includes computer program code that, when run on a computer, causes the computer to perform the system or method as described in any possible design of the first aspect.

[0027] This application provides a knowledge base update method that introduces a multi-granularity semantic awareness and context-adaptive metadata similarity evaluation mechanism. It proposes a text structure similarity calculation method based on normalization processing, multi-level alignment, and content awareness. Global content similarity, metadata similarity, and text structure similarity are dynamically weighted and scored through an intelligent fusion mechanism, resulting in a more comprehensive, accurate, and robust assessment of the true similarity between documents. This effectively avoids misjudgments caused by factors such as single evaluation dimensions, superficial algorithms, and fixed weights. Further analysis of metadata and content differences in similar documents is conducted, and a highly targeted difference summary report is generated adaptively through customized prompts. This accurately locates and structurally presents the differences in metadata and specific content between new and old documents. Attached Figure Description

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

[0029] Figure 1 A flowchart illustrating a knowledge base update method provided in an embodiment of this application;

[0030] Figure 2 A flowchart illustrating a metadata similarity calculation method provided in an embodiment of this application;

[0031] Figure 3 A flowchart illustrating a method for calculating the similarity of text structure provided in an embodiment of this application;

[0032] Figure 4 This application provides a schematic diagram of the structure of a knowledge base update system according to an embodiment of the present application.

[0033] Figure 5 This is a schematic diagram of the structure of a computing device provided in an embodiment of this application. Detailed Implementation

[0034] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0035] In the embodiments of this application, "multiple" refers to two or more. Terms such as "first" and "second" are used only for descriptive purposes and should not be construed as indicating or implying relative importance or order.

[0036] Figure 1 This is a flowchart illustrating a knowledge base update method provided in an embodiment of this application, as shown below. Figure 1 As shown, the method includes the following steps:

[0037] Step 100: Extract multi-dimensional features from the document to be processed and existing documents in the knowledge base.

[0038] The system receives documents to be processed and extracts multi-dimensional features from both the document to be processed and existing documents in the knowledge base. The document to be processed is a new document to be added to the knowledge base; it can be in various formats such as text files, PDFs, and Word documents. Existing documents in the knowledge base can be any document stored in the knowledge base or a selected subset of documents. Multi-dimensional features include global content features, metadata features, and document structure features.

[0039] Extracting global content features from a document involves extracting the main text content and using natural language processing (NLP) techniques to convert it into a high-dimensional semantic vector. This high-dimensional semantic vector is then used as the document's global content feature vector. NLP techniques can utilize pre-trained models such as BERT and Word2Vec.

[0040] Extracting metadata features from documents includes, but is not limited to, extracting metadata items such as document title, creation / modification date, source / institution, author, keywords / subject terms, version number, publication journal / conference, and publication year. The extracted features are then processed in a structured manner, such as segmenting and vectorizing the title, converting the creation / modification date into a timestamp, and classifying and encoding the source / institution.

[0041] Extracting document structure features includes identifying and extracting chapter titles, paragraph divisions, list items, etc. Chapter titles can also be serialized, or a document structure tree can be constructed.

[0042] Step 200: Calculate the multi-dimensional feature similarity between the document to be processed and existing documents.

[0043] Based on the multi-dimensional features of the document to be processed and the existing documents in the knowledge base extracted in step 100, the similarity between the document to be processed and the existing documents in the knowledge base in different dimensions is calculated.

[0044] Calculating the global content similarity between the document to be processed and existing documents involves calculating the similarity between the global content feature vectors of the document to be processed and existing documents. The similarity can be calculated using cosine similarity, Euclidean distance, etc.

[0045] refer to Figure 2 Calculating the metadata similarity between the document to be processed and existing documents includes the following steps:

[0046] Step 211: Based on the type of the metadata item, use the corresponding similarity calculation method to obtain the similarity of each metadata item.

[0047] Different types of metadata items have their own distinct characteristics. Based on the type characteristics of each metadata item, a similarity calculation method of the corresponding type is used to capture subtle differences between different metadata items. For example,

[0048] For calculating the semantic similarity of titles, in addition to matching the edit distance of the title strings or surface keywords, this application embodiment also uses a pre-trained language model (such as BERT or Sentence-BERT model) to convert the titles of the document to be processed and existing documents in the knowledge base into semantic vectors. The cosine similarity between these semantic vectors is then calculated to capture the deep semantic relationships between titles. For example, it can identify the potential thematic similarity between the titles "R&D Project Management Specifications" and "Scientific Research Plan Execution Guidelines," rather than simply judging them as dissimilar due to significant literal differences.

[0049] For semantic similarity calculation of sources / institutions, this application embodiment constructs a knowledge graph of the sources / institutions or utilizes an alias database of external authoritative sources / institutions to standardize the names of sources / institutions and identify hierarchical relationships. For example, "Institute of Computing Technology, Chinese Academy of Sciences" and "Institute of Computing Technology, Chinese Academy of Sciences" should be identified as the same institution, and their similarity should be close to 1. Furthermore, the authority or relevance of the source / institution within the domain can also be calculated, and a similarity calculation adjustment factor can be set according to the authority or relevance of the source / institution within the domain. For example, the higher the authority of the source / institution within the domain, the larger its corresponding adjustment factor.

[0050] In addition to using the Jaccard coefficient, this application embodiment also uses word vectors or concept similarity calculation when comparing the keyword / topic word lists of the document to be processed and the existing documents in the knowledge base. For example, similarity can be calculated based on WordNet or a domain ontology library.

[0051] Step 212: Determine the weight of each metadata item in the document based on the document type.

[0052] Readers focus on different metadata content depending on the document type. Therefore, this embodiment adjusts the weight of each metadata item according to the document type. For example, for legal documents, the weight of "issuing authority" and "effective date" may be significantly higher than that of "author". For academic papers, "author", "journal / conference", and "publication year" have higher weights. For internal technical reports, "version number", "creation / revision date", and "responsible department" may be more critical and have higher weights.

[0053] The system can preset weight templates for different document types, or it can use machine learning methods to learn the importance of different metadata items in judging document relevance based on historical data, thereby adaptively adjusting the contribution of the similarity scores of each metadata item to the overall metadata similarity.

[0054] The weight of the time-related metadata item is determined based on the document's time sensitivity.

[0055] When calculating the weight of time items, in addition to calculating the absolute time difference of documents, embodiments of this application also consider the relative importance and decay effect of time. For example, for rapidly iterating technical documents, a one-month time difference may mean a significant version update, and their time similarity should be low; while for historical archives, a time difference of several years or even decades may still indicate a strong correlation. The time sensitivity of a document can be determined first based on its document type (or knowledge domain), and then the weight of the time item can be determined based on the document's time sensitivity.

[0056] Furthermore, new or combined metadata features can be introduced. For example, the evolution path of metadata can be analyzed (if the document has a version history), and the metadata change pattern between versions can be treated as a special metadata item. Alternatively, metadata items can be combined to treat metadata item pairs as a special metadata item. For example, by combining "source-time" metadata item pairs, it can be determined whether they are a series of documents published by the same source at similar times.

[0057] Step 213: Determine the metadata similarity based on the similarity of each metadata item and the weight of the corresponding metadata item.

[0058] Metadata similarity can be calculated using the following formula:

[0059] Sim_meta_overall = f (w_title Sim_title_semantic, w_date Sim_date_contextual, w_org Sim_org_semantic, w_type Sim_doc_type, ...)

[0060] Where Sim_meta_overall represents the metadata similarity; Sim_x_semantic represents the similarity of each metadata item; w_x represents the metadata weight corresponding to each metadata item; and f can be a weighted sum or a more complex nonlinear function.

[0061] In terms of metadata similarity calculation, this application not only considers conventional metadata items such as title, time, and source / organization, but also introduces deeper semantic understanding, context-adaptive weight adjustment, and refined processing of specific metadata such as time, which significantly improves the accuracy and robustness of metadata similarity assessment.

[0062] refer to Figure 3 Calculating the structural similarity between the document to be processed and existing documents includes the following steps:

[0063] Step 221: Perform semantic normalization on the chapter titles of each document.

[0064] Before comparing the chapter structures, the extracted chapter titles from the documents undergo semantic normalization. Semantic normalization includes, but is not limited to, removing numbering (e.g., "1.1", "Chapter 1"), synonym replacement (e.g., unifying "Introduction", "Foreword", "Overview" into the standard concept "Introduction_Concept"), stemming, or word form restoration. Semantic normalization eliminates superficial textual differences in chapter titles across documents, focusing more on core semantics.

[0065] Step 222: Perform preliminary structural alignment of the chapter titles in the document to be processed and the existing document after normalization.

[0066] Specifically, for documents with linear structures, the normalized sequence of chapter titles (which may include hierarchical information) can be initially aligned using an improved sequence matching algorithm, such as the Needleman-Wunsch or Smith-Waterman algorithm with gap penalty.

[0067] For documents with complex hierarchical nesting, the document structure can be represented as an ordered tree, and a weighted tree edit distance algorithm can be used for initial structural alignment. The cost function of editing operations (insertion, deletion, and replacement of nodes) takes into account the node hierarchy and the semantic similarity of the node titles.

[0068] Step 223: Calculate the semantic similarity of the text content under the chapter titles that have been initially aligned.

[0069] After initial structural alignment of the chapter titles in the document to be processed and the existing documents, semantic similarity is calculated for the text content under the initially aligned chapter titles. For example, after "Chapter X" in document A and "Chapter Y" in document B are initially matched, the system will further extract the actual text content under "Chapter X" and "Chapter Y" and calculate the semantic similarity of the text content under the two chapters. The cosine similarity of paragraph vectors or document summary vectors can be used to calculate the semantic similarity.

[0070] Step 224: Determine the matching confidence of the chapter titles with preliminary structural alignment based on semantic similarity, and correct the chapter titles with preliminary structural alignment.

[0071] If the semantic similarity under the two chapter titles (e.g., AX, BY) in the initial structural alignment is high, it enhances the confidence of the chapter structure matching and increases its contribution to the overall chapter structure similarity. Content similarity under the chapter titles can compensate for insufficient chapter title matching; this method can identify two chapters with different chapter titles but similar text content under each chapter title.

[0072] If the semantic similarity under the headings of two initially aligned chapters is low, the confidence in this chapter structure match should be reduced. Furthermore, for two chapters with very low text content similarity, the initial alignment can be broken to find other chapters that are more content-matched. For example, try comparing the content of AX with other unaligned chapters in document B to find chapters that are more content-matched as potential structural counterparts, thus identifying two chapters with significantly different headings or misaligned order but similar content. If a chapter cannot find a corresponding chapter with similar headings and content in another document, it is considered a structural difference, and the chapter can be added or deleted as needed.

[0073] Step 225: Determine the text structure similarity between the document to be processed and the existing documents based on the number of structurally aligned chapter titles, the semantic similarity of chapter titles, the matching confidence, and the hierarchical weight.

[0074] The final document structure similarity is a weighted function that combines the structure matching scores of normalized headings with the content similarity verification / correction results between corresponding chapters. For example, the document structure similarity between the document to be processed and existing documents can be calculated based on factors such as the number of structurally aligned chapter headings, semantic similarity of chapter headings, matching confidence, and hierarchical weights. The hierarchical weight of chapter headings is determined by their hierarchy within the document. Different levels of chapter headings have different importance in the document structure. For example, the matching / mismatch of first-level headings should have a greater impact on the overall structural similarity than third-level subheadings. The hierarchical weights of each heading level can be set according to actual needs, typically with first-level headings having the highest weight, followed by second-level headings, which in turn have the highest weight, and so on.

[0075] The above technical solution proposes a text structure similarity calculation method based on normalization processing, multi-level alignment, and content awareness. This method can more accurately identify deep-level text structure similarities and effectively overcome the limitations of relying solely on title strings or simple structural comparisons. It has significant advantages, especially when dealing with complex situations such as inconsistent title expressions and adjusted chapter order while maintaining consistency in core content modules.

[0076] Step 300: Calculate the comprehensive similarity between the document to be processed and the existing documents based on multidimensional feature similarity.

[0077] Based on the global content similarity, metadata similarity, and document structure similarity calculated in step 200 between the document to be processed and the existing documents, a comprehensive similarity score is determined between the document to be processed and the existing documents. Specifically, a weighted fusion of the above multi-dimensional feature similarities can be performed using a dynamic adaptive weight determination technique to obtain a comprehensive similarity score. For example, the comprehensive similarity score between the document to be processed and the existing documents can be calculated using the following formula:

[0078] Overall similarity = w1 Content similarity + W2 Metadata similarity + W3 Chapter structure similarity

[0079] Here, w1, w2, and w3 represent the weights of each dimension's features. The contribution of each dimension's features to the final comprehensive similarity score can be dynamically adjusted based on the statistical distribution characteristics of the similarity scores for each individual dimension or pre-defined rules. Specifically, a machine learning model can be trained using a training set containing manually labeled association levels. The similarity of each dimension can be used as a feature, and the machine learning model learns its optimal combination. The model's internal parameters or feature importance reflect the dynamic weights of each dimension.

[0080] The above technical solution, through in-depth processing of metadata and document structure, as well as intelligent fusion mechanism, can more comprehensively, accurately and robustly assess the true similarity between documents, effectively avoiding misjudgment of similarity caused by factors such as single assessment dimension, superficial algorithm, and fixed weight.

[0081] Step 400: Perform a difference analysis on existing documents that have a high overall similarity to the document to be processed.

[0082] After obtaining the overall similarity score between the document to be processed and existing documents, existing documents with high overall similarity to the document to be processed are selected for difference analysis. Specifically, the overall similarity scores between the document to be processed and several existing documents can be sorted, and K existing documents with high overall similarity to the document to be processed can be selected for difference analysis, where the value of K can be set according to actual needs; alternatively, an overall similarity threshold can be preset, and M existing documents with overall similarity scores greater than the threshold can be used for difference analysis with the document to be processed.

[0083] The difference analysis between the document to be processed and each existing document with a high overall similarity includes: analyzing the differences in metadata and document content between the document to be processed and the existing documents. Metadata difference analysis involves comparing the specific differences in metadata item by item. Content difference analysis involves dividing the content of the existing documents into several semantic units (such as paragraphs or topic text blocks) and aligning them with the semantic units of the document to be processed based on vector representations. For successfully aligned semantic unit pairs, fine-grained difference comparisons are performed, for example, extracting key information elements and comparing their differences, identifying the types of differences, or using Natural Language Inference (NLI) models to determine the implication and contradiction relationships between semantic units.

[0084] Step 500: Update the knowledge base based on the results of the difference analysis.

[0085] The system outputs a comprehensive similarity score for the new document, a list of similar documents, and analysis results of the differences for each similar document. This information assists administrators in making knowledge base update decisions, such as determining whether a document to be processed is entirely new knowledge, an updated version of existing knowledge, a supplement to existing knowledge, or duplicate content, and adopting appropriate insertion strategies, such as creating, replacing, merging, or establishing associations. It can also automate knowledge base updates based on preset rules, combined with similarity scores and difference types.

[0086] In one possible implementation, a summary report of differences between the document to be processed and existing documents can also be generated to assist managers in making knowledge base update decisions. Specifically, the metadata and content differences between the two documents are analyzed, and a highly targeted, structured, and easy-to-understand summary report of differences is generated based on a large language model. Before using the large language model, it is fine-tuned. Specifically, based on a certain amount of labeled data of "(new and old document pairs, high-quality difference summary report)," an open-source large language model is fine-tuned to make it more professional and accurate in generating difference summary reports, and to better understand domain-specific terminology and common change patterns. Furthermore, relevant domain knowledge, terminology definitions, and change patterns of previous documents in the knowledge base are provided to the large language model as contextual information through RAG technology, allowing it to refer to this background knowledge when generating difference summary reports, thereby improving the depth and accuracy of the difference summary reports.

[0087] In the above technical solution, generating high-quality and highly targeted difference summary reports through large language models can provide knowledge base administrators with richer, deeper, and more reliable information to judge document relationships. This helps knowledge base administrators quickly and accurately understand the evolutionary relationships, version iterations, or subtle differences between documents, reducing the cost of manual comparison and understanding, making knowledge base content management more convenient and intelligent, and decision-making more scientific.

[0088] To facilitate understanding by those skilled in the art, the technical solution of this application is described below with a specific example.

[0089] This embodiment describes the process of updating a document titled "Enterprise AI Ethics Review Guidelines V2.1" to the knowledge base. It is assumed that the knowledge base already contains an existing document titled "Enterprise Artificial Intelligence Ethics Specifications V2.0" and other relevant existing documents.

[0090] Step S1: The system receives the document "Guidelines for Enterprise AI Ethics Review V2.1" uploaded by the user, which is in PDF format.

[0091] Step S2: Extract multi-dimensional features from the document to be processed, "Guidelines for Enterprise AI Ethics Review V2.1", and existing documents in the knowledge base. The multi-dimensional features include global content features, metadata features, and chapter structure features.

[0092] Step S3: Calculate the multi-dimensional feature similarity between the document to be processed, "Guidelines for Enterprise AI Ethics Review V2.1", and existing documents.

[0093] Taking the calculation of the multi-dimensional feature similarity between the document to be processed, "Guidelines for Enterprise AI Ethics Review V2.1", and the existing document, "Enterprise Artificial Intelligence Ethics Code V2.0", as an example, the calculation of the multi-dimensional feature similarity between the two includes the following steps:

[0094] Step S3.1: Global content similarity calculation: Use the BERT model to convert the extracted text content into vectors and calculate the cosine similarity of the vectors. Here, we assume that the global content similarity Sim_content = 0.88.

[0095] Step S3.2: Metadata similarity calculation:

[0096] Title semantic similarity: The similarity between the corresponding vectors of the titles “Corporate AI Ethics Review Guidelines V2.1” and “Corporate Artificial Intelligence Ethics Specifications V2.0” is calculated using Sentence-BERT. Here, it is assumed that the title semantic similarity is 0.75 (higher than pure literal matching).

[0097] Semantic similarity of publishing organizations: Assume the publishing organization of the document to be processed is the "AI Governance Committee", and the publishing organization of the existing document is the "Artificial Intelligence Ethics Group". By identifying the possible hierarchical or related relationships between the two organizations through the organizational knowledge graph, or that they are both organizations responsible for ethics, a high semantic similarity is assigned to the publishing organizations of the two organizations. Here, we assume that the semantic similarity of publishing organizations is 0.8.

[0098] Time Similarity: The document to be processed, V2.1, was released on March 10, 2024, while the existing document, V2.0, was released on September 15, 2023. For "Guidelines / Specifications" type documents, an update cycle of about six months is common. Therefore, a time sensitivity parameter is set for this type of document. Here, it is assumed that the calculated time similarity Sim_date_contextual is 0.6.

[0099] Dynamic weight adjustment: Since both are "guidelines / specifications" type documents, the system dynamically increases the weight of metadata items such as "version number," "publishing organization," and "publication date" based on preset templates or machine learning results. Here, it is assumed that the metadata similarity Sim_meta_overall calculated based on the weights of each metadata item is 0.78.

[0100] Step S3.3: Calculate the similarity of the text structure:

[0101] Step S3.31: Perform semantic normalization on the chapter titles of each document. For example, the chapter title "1. Introduction and Scope" of the document to be processed and the chapter title "Part One: Overview and Objectives" of the existing document are semantically matched after normalization.

[0102] Step S3.32: Perform preliminary structural alignment on the chapter titles of the document to be processed and the existing document after normalization. The preliminary structural alignment found that the chapter title "3. Review Process Details" in the document to be processed and the chapter title "Chapter 3: Ethical Review Steps" in the existing document have high semantic similarity and are at the same level. Therefore, the two chapter titles are preliminarily structurally aligned.

[0103] Step S3.33: Extract the actual text content under the two preliminarily aligned chapter titles, and calculate the semantic similarity of the text content, such as calculating the average cosine similarity of the paragraph vectors of the two.

[0104] Step S3.34: Determine the matching confidence of the chapter titles with preliminary structural alignment based on semantic similarity, and correct the chapter titles with preliminary structural alignment.

[0105] Assuming the semantic similarity between "3. Review Process Details" and "Chapter 3: Ethical Review Steps" is calculated to be high at 0.92, the confidence in the structural matching of these chapter titles is enhanced. For example, if the chapter title "4.1 Minor Risk Scenarios" in the document to be processed does not have a direct corresponding chapter title in the existing document, but by comparing its content with the content of each chapter in the existing document, it is found that its core content is highly similar to some descriptions in "Appendix A: Examples of Common Ethical Risk Points" in the existing document, then a content-driven weak structural association is established between "4.1 Minor Risk Scenarios" in the document to be processed and "Appendix A: Examples of Common Ethical Risk Points" in the existing document, and this is marked as "Structural Adjustment / Content Reorganization".

[0106] Step S3.35: Determine the document structure similarity between the document to be processed and the existing documents based on the number of structurally aligned chapter titles, the semantic similarity of the chapter titles, the matching confidence, and the hierarchical weight. Here, the hierarchical weight of the first-level heading is set to 0.4, and the hierarchical weight of the second-level heading is set to 0.2. Assume that the comprehensively calculated document structure similarity Sim_structure_advanced is 0.85.

[0107] Step S4: Calculate the comprehensive similarity between the document to be processed and the existing documents based on multidimensional feature similarity.

[0108] The weights of the feature similarity in each dimension can be determined based on a machine learning model. The system loads a pre-trained gradient boosting tree model with the input [Sim_content=0.88, Sim_meta_overall=0.78, Sim_structure_advanced=0.85]. The model outputs a comprehensive similarity S_total = 0.86 and may provide a classification label such as "strongly related - possibly a version update".

[0109] Step S5: Perform a difference analysis on existing documents with high overall similarity to the document to be processed.

[0110] It is assumed that the document to be processed, "Guidelines for Enterprise AI Ethics Review V2.1", and the existing document, "Enterprise Artificial Intelligence Ethics Code V2.0", are the most similar documents.

[0111] Step S5.1: Perform a difference analysis on the metadata of the document (as described above).

[0112] Step S5.2: Perform a discrepancy analysis on the content of the document.

[0113] Semantic block alignment and comparison: Semantic unit alignment was performed on the document to be processed, “3.1 Review Materials List”, and the existing document, “Chapter 3, Section A: Required Materials”. After alignment, it was found that the document to be processed had added two items: “Algorithm Transparency Report” and “Data Privacy Impact Assessment (DPIA) Summary”.

[0114] Key information element extraction and comparison: For example, by extracting key limiting conditions from the definitions of "high-risk AI applications" in two documents, it was found that the definition scope of the document to be processed has been expanded.

[0115] Difference type identification: For example, "adding items to the bill of materials" is identified as a "requirement enhancement" type difference; "expanding the scope of definition" is identified as a "stricter standard" type difference.

[0116] Step S6: Generate a summary report of discrepancies based on the Big Prophecy model.

[0117] Use specialized prompts to guide the Big Prophet model to focus on core changes in regulatory documents. For example, input the prompt: "You are a senior AI ethics and regulatory analyst. Please compare the differences between the following two AI ethics documents and generate a summary report for the internal compliance department. The report should clearly indicate: 1. Any significant adjustments to the core objectives or scope of application of the documents; 2. Substantive changes to review processes or standards (additions, deletions, modifications to key steps or requirements); 3. Changes to the criteria for determining high-risk AI applications; 4. Any newly added ethical principles or considerations. Please use concise professional terminology and elaborate in points."

[0118] Big Prophecy Model Integration Output (Example):

[0119] The main updates in "Guidelines for Enterprise AI Ethics Review V2.1" compared to "Enterprise Artificial Intelligence Ethics Code V2.0" include:

[0120] Core objective expanded: V2.1 focuses more on providing actionable 'review guidelines' rather than just 'ethical norms'.

[0121] Enhanced review process: Version 2.1 explicitly adds the requirements for 'Algorithm Transparency Report' and 'DPIA Summary' to the review materials list.

[0122] High-risk assessment adjustment: Version 2.1 expands the definition of 'high-risk AI applications' to include more scenarios.

[0123] Added ethical dimension: Version 2.1 introduces preliminary considerations for 'quantitative evaluation of algorithmic fairness'.

[0124] Step S7: Output the difference analysis results and update the knowledge base.

[0125] The system displays to the administrator the overall similarity, similarity across various dimensions, detailed metadata and content differences (including type), as well as a targeted summary report generated by the Big Prophecy model. Based on this, the administrator determines that V2.1 is a major revision and refinement of V2.0, decides to archive V2.0, add V2.1 as the latest version to the knowledge base, and establish a clear version evolution relationship.

[0126] The technical solution provided by the embodiments of this application can not only accurately identify the relationship between the old and new versions when dealing with complex updates to technical specifications or legal documents, but also clearly point out key changes in metadata (such as the effective date and semantic changes in the issuing organization), substantial adjustments to the chapter structure (even if the title text and order change, the content modules remain the same), and semantic differences and potential impacts of core clauses. This is of great value for compliance review, version tracing, and knowledge transfer.

[0127] This application provides a knowledge base update method that introduces a multi-granularity semantic awareness and context-adaptive metadata similarity evaluation mechanism. It proposes a text structure similarity calculation method based on normalization processing, multi-level alignment, and content awareness. Global content similarity, metadata similarity, and text structure similarity are dynamically weighted and scored through an intelligent fusion mechanism, resulting in a more comprehensive, accurate, and robust assessment of the true similarity between documents. This effectively avoids misjudgments caused by factors such as single evaluation dimensions, superficial algorithms, and fixed weights. Further analysis of metadata and content differences in similar documents is conducted, and a highly targeted difference summary report is generated adaptively through customized prompts. This accurately locates and structurally presents the differences in metadata and specific content between new and old documents.

[0128] Based on the same technical concept, embodiments of this application provide a knowledge base update system, such as... Figure 4 As shown, the system includes:

[0129] The feature extraction module 401 is used to extract multi-dimensional features from the document to be processed and existing documents in the knowledge base; the document to be processed is a document to be added to the knowledge base; the multi-dimensional features include global content features, metadata features and document structure features.

[0130] The multi-dimensional feature similarity calculation module 402 is used to calculate the multi-dimensional feature similarity between the document to be processed and the existing document;

[0131] The comprehensive similarity scoring module 403 is used to calculate the comprehensive similarity between the document to be processed and the existing document based on the multidimensional feature similarity.

[0132] The difference point analysis module 404 is used to perform difference point analysis on existing documents that have a high overall similarity to the document to be processed.

[0133] Decision module 405 is used to update the knowledge base based on the results of difference analysis.

[0134] In one possible design, when calculating the multi-dimensional feature similarity calculation module 402 calculates the metadata similarity between the document to be processed and the existing document, it is specifically used to calculate the metadata similarity between the document to be processed and the existing document in the following manner:

[0135] Based on the type of the metadata item, the similarity calculation method of the corresponding type is used to obtain the similarity of each metadata item;

[0136] Based on the document type, determine the weight of each metadata item in the document; among them, the weight of the time item metadata item is determined based on the time sensitivity of the document.

[0137] Metadata similarity is determined based on the similarity of each metadata item and the weight of each metadata item.

[0138] In one possible design, the multi-dimensional feature similarity calculation module 402 calculates the text structure similarity between the document to be processed and the existing document in the following manner:

[0139] Semantic normalization was performed on the chapter titles of each document;

[0140] Perform preliminary structural alignment of the chapter titles in the document to be processed and the existing document after normalization.

[0141] Semantic similarity calculation is performed on the text content under the chapter titles that have been initially aligned in the structure.

[0142] The matching confidence of the chapter titles with preliminary structural alignment is determined based on semantic similarity, and the chapter titles with preliminary structural alignment are then corrected.

[0143] The structural similarity between the document to be processed and the existing documents is determined based on the number of structurally aligned chapter titles, the semantic similarity of the chapter titles, the matching confidence, and the hierarchical weight; the hierarchical weight of the chapter titles is determined according to the hierarchy of the chapter titles in the document.

[0144] In one possible design, the multi-dimensional feature similarity calculation module 402, when determining the matching confidence of the preliminarily structurally aligned chapter titles based on semantic similarity and correcting the preliminarily structurally aligned chapter titles, is specifically used for:

[0145] If the semantic similarity of the two chapter titles under the initial structural alignment is high, then the confidence of the chapter structure matching is enhanced.

[0146] If the semantic similarity of the two chapter titles under the initial structural alignment is low, the confidence of the chapter structure matching is reduced, and other chapters with better content matching are searched.

[0147] In one possible design, when the difference point analysis module 404 performs difference point analysis on existing documents with a high overall similarity to the document to be processed, it is specifically used for:

[0148] Perform a metadata difference analysis between the document to be processed and existing documents;

[0149] The document content is divided into multiple semantic units. The semantic units of the document to be processed are aligned with those of the existing documents. The differences in content between the aligned semantic unit pairs are analyzed.

[0150] The analysis of differences in content includes extracting and comparing key information elements of two documents and identifying the types of differences.

[0151] In one possible design, the system further includes a difference summary generation module 406, used for:

[0152] Based on the metadata and content differences between the document to be processed and the existing documents, a summary report of the differences between the two documents is generated using a large language model.

[0153] Based on the same technical concept, embodiments of this application provide a computing device, such as... Figure 5 As shown, it includes at least one processor 501 and a memory 502 connected to at least one processor. In this embodiment, the specific connection medium between the processor 501 and the memory 502 is not limited. Figure 5 Taking the connection between processor 501 and memory 502 via a bus as an example, the bus can be divided into address bus, data bus, control bus, etc.

[0154] In this embodiment of the application, the memory 502 stores instructions that can be executed by at least one processor 501. By executing the instructions stored in the memory 502, at least one processor 501 can execute the knowledge base update method listed in any of the above methods.

[0155] The processor 501 is the control center of the computing device. It can connect to various parts of the computer device through various interfaces and lines, and perform resource settings by running or executing instructions stored in the memory 502 and calling data stored in the memory 502.

[0156] Optionally, processor 501 may include one or more processing units. Processor 501 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into processor 501. In some embodiments, processor 501 and memory 502 may be implemented on the same chip; in some embodiments, they may be implemented separately on independent chips.

[0157] Processor 501 can be a general-purpose processor, such as a central processing unit (CPU), digital signal processor, application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly manifested as being executed by a hardware processor, or executed by a combination of hardware and software modules within the processor.

[0158] Memory 502, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. Memory 502 may include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type memory, random access memory (RAM), static random access memory (SRAM), programmable read-only memory (PROM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), magnetic memory, magnetic disk, optical disk, etc. Memory 502 can be any other medium capable of carrying or storing desired program code in the form of instructions or data structures that can be accessed by a computer, but is not limited thereto. In the embodiments of this application, memory 502 can also be a circuit or any other device capable of implementing storage functions for storing program instructions and / or data.

[0159] Based on the same technical concept, embodiments of this application also provide a computer-readable storage medium storing a computer-executable program, which is used to cause a computer to perform the knowledge base update method listed in any of the above methods.

[0160] Based on the same technical concept, embodiments of this application also provide a computer program product, which includes computer program code. When the computer program code is run on a computer, it causes the computer to execute the knowledge base update method as listed in any of the above methods.

[0161] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0162] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0163] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0164] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0165] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.

[0166] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A knowledge base update method, characterized in that, The method includes: Extract multi-dimensional features from the document to be processed and existing documents in the knowledge base; the document to be processed is the document to be added to the knowledge base; the multi-dimensional features include global content features, metadata features, and document structure features. Calculate the multi-dimensional feature similarity between the document to be processed and the existing document; The comprehensive similarity between the document to be processed and the existing document is calculated based on the multi-dimensional feature similarity. Perform a difference analysis on existing documents that have a high overall similarity to the document to be processed; The knowledge base is updated based on the results of the difference analysis; Calculating the multi-dimensional feature similarity between the document to be processed and the existing document includes: The metadata similarity between the document to be processed and the existing document is calculated in the following way: Based on the type of the metadata item, the similarity calculation method of the corresponding type is used to obtain the similarity of each metadata item; Based on the document type, determine the weight of each metadata item in the document; among them, the weight of the time item metadata item is determined based on the time sensitivity of the document. Metadata similarity is determined based on the similarity of each metadata item and the weight of each metadata item. Calculating the multi-dimensional feature similarity between the document to be processed and the existing document further includes: The document structure similarity between the document to be processed and the existing document is calculated using the following method: Semantic normalization was performed on the chapter titles of each document; Perform preliminary structural alignment of the chapter titles in the document to be processed and the existing document after normalization. Semantic similarity calculation is performed on the text content under the chapter titles that have been initially aligned in the structure. The matching confidence of the chapter titles with preliminary structural alignment is determined based on semantic similarity, and the chapter titles with preliminary structural alignment are then corrected. The structural similarity between the document to be processed and the existing documents is determined based on the number of structurally aligned chapter titles, the semantic similarity of the chapter titles, the matching confidence, and the hierarchical weight; the hierarchical weight of the chapter titles is determined according to the hierarchy of the chapter titles in the document.

2. The method according to claim 1, characterized in that, The matching confidence of the preliminarily structured aligned chapter titles is determined based on semantic similarity, and the preliminarily structured aligned chapter titles are then corrected, including: If the semantic similarity of the two chapter titles under the initial structural alignment is high, then the confidence of the chapter structure matching is enhanced. If the semantic similarity of the two chapter titles under the initial structural alignment is low, the confidence of the chapter structure matching is reduced, and other chapters with better content matching are searched.

3. The method according to claim 1, characterized in that, Perform difference analysis on existing documents with high overall similarity to the document to be processed, including: Perform a metadata difference analysis between the document to be processed and existing documents; The document content is divided into multiple semantic units. The semantic units of the document to be processed are aligned with those of the existing documents. The differences in content between the aligned semantic unit pairs are analyzed. The analysis of differences in content includes extracting and comparing key information elements of two documents and identifying the types of differences.

4. The method according to claim 3, characterized in that, The method further includes: Based on the metadata and content differences between the document to be processed and the existing documents, a summary report of the differences between the two documents is generated using a large language model.

5. A knowledge base update system, characterized in that, The system, employing the method as described in any one of claims 1 to 4, comprises: The feature extraction module is used to extract multi-dimensional features from the document to be processed and existing documents in the knowledge base; the document to be processed is the document to be added to the knowledge base; the multi-dimensional features include global content features, metadata features, and document structure features. A multi-dimensional feature similarity calculation module is used to calculate the multi-dimensional feature similarity between the document to be processed and the existing document; The comprehensive similarity scoring module is used to calculate the comprehensive similarity between the document to be processed and the existing document based on the multi-dimensional feature similarity. The difference analysis module is used to perform difference analysis on existing documents that have a high overall similarity to the document to be processed. The decision module is used to update the knowledge base based on the results of the difference analysis.

6. A computing device, characterized in that, include: Memory, used to store program instructions; A processor is configured to invoke program instructions stored in the memory and execute the method as described in any one of claims 1 to 4 according to the obtained program instructions.

7. A computer-readable storage medium, characterized in that, Includes computer-readable instructions that, when read and executed by a computer, cause the method as described in any one of claims 1 to 4 to be implemented.

8. A computer program product, characterized in that, The computer program product includes: computer program code, which, when run on a computer, causes the computer to perform the method as described in any one of claims 1 to 4.