A method, device, equipment and medium for constructing and using a knowledge base of a trusted data space

By building a distributed knowledge base cluster in a trusted data space, based on sensitivity hierarchy and vectorization processing, the problem that existing knowledge bases cannot be shared across institutions is solved, and more comprehensive knowledge sharing and more accurate answers are achieved.

CN120338085BActive Publication Date: 2025-08-12HANGZHOU DBAPPSECURITY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510799442.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-16
Publication Date
2025-08-12
Estimated Expiration
2045-06-16

AI Technical Summary

Technical Problem

The construction of existing knowledge bases is mainly limited to a single enterprise or institution, with limited knowledge coverage, and large models cannot accurately answer questions related to unpublished sensitive data, and cannot achieve cross-institutional knowledge sharing, which limits the comprehensiveness and accuracy of the answers.

Method used

The local knowledge bases of multiple subjects are interconnected through a trusted data space to form a distributed cluster, and based on sensitivity hierarchy and vectorization processing, the target knowledge base is built, and secure isolation and computing resource optimization are carried out in a trusted execution environment, supporting cross-institutional knowledge sharing and collaborative reasoning.

Benefits of technology

It realizes cross-organization knowledge sharing, improves the comprehensiveness and accuracy of large-scale model answers, and optimizes the allocation of computing resources while meeting compliance requirements, reducing the risk of sensitive information leakage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120338085B_ABST
    Figure CN120338085B_ABST
Patent Text Reader

Abstract

This application discloses a method, apparatus, device, and medium for constructing and using a knowledge base in a trusted data space, relating to the field of artificial intelligence. The method comprises: performing sensitivity grading on a target knowledge block to obtain a corresponding first grading result, performing vectorization processing on the target knowledge block using different types of preset large models based on the first grading result to obtain target vector data, and constructing a target knowledge base based on the target vector data; performing vectorization processing on a knowledge query request to obtain a query request vector, and determining target data corresponding to the query request vector from each constructed target knowledge base; performing sensitivity grading on the target data to obtain a corresponding second grading result, and inputting the target data into a preset large model based on the second grading result to obtain a corresponding inference result; and using the inference result to determine a request result corresponding to the knowledge query request and returning the request result to the knowledge user. This application connects different knowledge bases together, thereby increasing the scope of knowledge retrieval.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence, and in particular to a method, apparatus, device, and medium for constructing and using a knowledge base in a trusted data space. Background Art

[0002] A trusted data space is a data circulation and utilization infrastructure based on consensus rules, connecting multiple parties and enabling the sharing and utilization of data resources. It is an application ecosystem for the co-creation of data value and a key vehicle for building a national integrated data market. Through a trusted data space, knowledge bases across different organizations can be connected, ensuring data sharing among all parties under consensus rules, thereby unlocking the value of data.

[0003] Currently, knowledge bases based on large models are primarily confined to a single enterprise or organization, limiting their scope. Large models rely on publicly available data from the internet for reasoning, but a large amount of undisclosed sensitive data (such as internal business data and confidential documents) cannot be circulated online, making it difficult for large models to accurately answer questions related to this data. While integrating knowledge bases can partially address this issue, existing knowledge bases are limited to internal enterprise use and cannot achieve cross-organizational knowledge sharing, limiting the comprehensiveness and accuracy of large models' responses. Summary of the Invention

[0004] In view of this, the purpose of this application is to provide a method, apparatus, device, and medium for constructing and using a knowledge base in a trusted data space. This method can interconnect the local knowledge bases of multiple entities to form a distributed cluster based on the trusted data space, support global retrieval and collaborative reasoning, and realize cross-institutional knowledge sharing. The specific solution is as follows:

[0005] In a first aspect, the present application provides a method for constructing and using a knowledge base of a trusted data space, including:

[0006] Obtaining the target document uploaded by the data provider, and performing a block operation on the target document to obtain target knowledge blocks;

[0007] Performing sensitivity grading on the target knowledge blocks based on a preset sensitivity detection method to obtain first grading results corresponding to each target knowledge block, performing vectorization processing on the target knowledge blocks using different types of preset large models according to the first grading results to obtain target vector data, and constructing a target knowledge base based on the target vector data;

[0008] Obtaining a knowledge query request sent by a knowledge user, performing vectorization processing on the knowledge query request to obtain a query request vector, and determining target data corresponding to the query request vector from each constructed target knowledge base;

[0009] Performing the sensitivity classification on the target data based on the preset sensitivity detection method to obtain a second classification result corresponding to each target data; and inputting the target data into the different types of preset large models according to the second classification result to obtain a corresponding inference result;

[0010] The inference result is used to determine a request result corresponding to the knowledge query request, and the request result is returned to the knowledge user.

[0011] Optionally, the performing a block operation on the target document to obtain target knowledge blocks includes:

[0012] Detecting the target document to determine complete paragraphs contained in the target document, and determining any complete paragraph in the target document as a first target knowledge block;

[0013] Segmenting the document data of the target document after removing the first target knowledge block based on a preset block size to obtain a second target knowledge block;

[0014] The target knowledge block corresponding to the target document is determined according to the first target knowledge block and the second target knowledge block, and an index is set for each target knowledge block.

[0015] Optionally, the sensitivity grading of the target knowledge blocks based on a preset sensitivity detection method to obtain a first grading result corresponding to each target knowledge block includes:

[0016] Performing sensitivity detection on the target knowledge block based on a preset sensitivity detection method;

[0017] If the current target knowledge block meets the preset high sensitivity standard, the current target knowledge block is determined as a high sensitivity knowledge block; if the current target knowledge block meets the preset medium sensitivity standard, the current target knowledge block is determined as a medium sensitivity knowledge block; if the current target knowledge block meets the preset low sensitivity standard, the current target knowledge block is determined as a low sensitivity knowledge block.

[0018] Optionally, the vectorizing the target knowledge block using different types of preset large models according to the first classification result to obtain target vector data, and constructing a target knowledge base based on the target vector data includes:

[0019] For the highly sensitive knowledge block, vectorize the highly sensitive knowledge block using a preset large model constructed based on a trusted execution environment cluster to obtain first vector data;

[0020] For the medium-sensitivity knowledge block, vectorize the medium-sensitivity knowledge block using a preset large model deployed in a local infrastructure platform corresponding to the data provider to obtain second vector data;

[0021] For the low-sensitivity knowledge block, vectorization processing is performed on the low-sensitivity knowledge block using a preset large model provided by a platform other than the local infrastructure platform corresponding to the data provider to obtain third vector data;

[0022] Determine target vector data corresponding to the target knowledge block based on the first vector data, the second vector data, and the third vector data;

[0023] A target knowledge base is constructed based on the target knowledge blocks, the indexes corresponding to the target knowledge blocks and the target vector data.

[0024] Optionally, determining target data corresponding to the query request vector from each constructed target knowledge base includes:

[0025] Determining the vector similarity between the query request vector and the target vector data in each constructed target knowledge base based on a preset search method;

[0026] The target vector data are sorted in descending order of the vector similarity, and a preset number of vector data are determined from the sorted target vector data as target vectors corresponding to the query request vector, and the target knowledge blocks corresponding to the target vectors are used as target data corresponding to the knowledge query request.

[0027] Optionally, inputting the target data into the different types of preset large models according to the second classification result to obtain corresponding inference results includes:

[0028] Inputting the first target data representing high sensitivity in the second classification result into a preset large model built based on the trusted execution environment cluster to obtain a corresponding first inference result;

[0029] Inputting the second target data representing the sensitivity in the second classification result into a preset large model deployed in the local infrastructure platform corresponding to the data provider to obtain a corresponding second inference result;

[0030] The third target data representing low sensitivity in the second classification result is input into a preset large model provided by a platform other than the local infrastructure platform corresponding to the data provider to obtain a corresponding third inference result.

[0031] Optionally, before inputting the target data into the different types of preset large models to obtain corresponding inference results according to the second classification result, the method further includes:

[0032] For the first target data characterized as highly sensitive in the second classification result, determining first target credibility corresponding to each of the first target data based on a preset credibility standard, constructing a first target query request related to the content of the first target data based on the content of the first target data and the corresponding first target credibility, and inputting the first target query request and the first target data into a corresponding preset large model to obtain a corresponding inference result;

[0033] For the second target data characterized by sensitivity in the second classification result, determining the second target credibility corresponding to each of the second target data based on the preset credibility standard, constructing a second target query request related to the content of the second target data according to the content of the second target data and the corresponding second target credibility, and inputting the second target query request and the second target data into the corresponding preset large model to obtain a corresponding inference result;

[0034] For the third target data representing low sensitivity in the second grading result, the third target credibility corresponding to the third target data is determined based on the preset credibility standard, and a third target query request related to the content of the third target data is constructed according to the content of the third target data and the corresponding third target credibility, so as to input the third target query request and the third target data into the corresponding preset large model to obtain the corresponding inference result.

[0035] In a second aspect, the present application provides a device for constructing and using a knowledge base of a trusted data space, comprising:

[0036] The data acquisition module is used to obtain the target document uploaded by the data provider and perform block operations on the target document to obtain target knowledge blocks;

[0037] a knowledge base construction module, configured to perform sensitivity grading on the target knowledge blocks based on a preset sensitivity detection method to obtain a first grading result corresponding to each target knowledge block, perform vectorization processing on the target knowledge blocks using different types of preset large models according to the first grading result to obtain target vector data, and construct a target knowledge base based on the target vector data;

[0038] a data determination module, configured to obtain a knowledge query request sent by a knowledge user, perform vectorization processing on the knowledge query request to obtain a query request vector, and determine target data corresponding to the query request vector from each constructed target knowledge base;

[0039] a result acquisition module, configured to perform the sensitivity classification on the target data based on the preset sensitivity detection method to obtain a second classification result corresponding to each target data, and input the target data into the preset large models of different types according to the second classification result to obtain a corresponding inference result;

[0040] The request response module is used to determine the request result corresponding to the knowledge query request using the inference result, and return the request result to the knowledge user.

[0041] In a third aspect, the present application provides an electronic device, comprising:

[0042] Memory, used to store computer programs;

[0043] The processor is used to execute the computer program to implement the aforementioned knowledge base construction and use method of the trusted data space.

[0044] In a fourth aspect, the present application provides a computer-readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the aforementioned method for constructing and using a knowledge base of a trusted data space.

[0045] This application obtains the target document uploaded by the data provider, and performs a block operation on the target document to obtain a target knowledge block; based on a preset sensitivity detection method, the target knowledge block is subjected to sensitivity grading to obtain a first grading result corresponding to each target knowledge block, and according to the first grading result, the target knowledge block is vectorized using different types of preset large models to obtain target vector data, and a target knowledge base is constructed based on the target vector data; the knowledge query request sent by the knowledge user is obtained, the knowledge query request is vectorized to obtain a query request vector, and the target data corresponding to the query request vector is determined from each target knowledge base that has been constructed; based on the preset sensitivity detection method, the target data is subjected to sensitivity grading to obtain a second grading result corresponding to each target data, and according to the second grading result, the target data is input into the preset large models of different types to obtain a corresponding reasoning result; the reasoning result is used to determine the request result corresponding to the knowledge query request, and the request result is returned to the knowledge user. As can be seen from the above, this application grades the target knowledge blocks based on the preset sensitivity detection method. Through graded processing, knowledge blocks of different sensitivity levels can be securely isolated in the vectorization stage, meeting compliance requirements while optimizing computing resource allocation. At the same time, each data provider builds a target knowledge base based on the vectorized results of local knowledge blocks. All target knowledge bases form a distributed cluster through the trusted data space, supporting global retrieval and collaborative reasoning across data sources, and improving the comprehensiveness and accuracy of large model answers. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without any creative work.

[0047] Figure 1 A flow chart of a method for constructing and using a knowledge base of a trusted data space disclosed in this application;

[0048] Figure 2 A schematic diagram of the process of establishing a local knowledge base for a data provider disclosed in this application;

[0049] Figure 3 A schematic diagram of a knowledge block vectorization operation based on a large model deployed in a TEE cluster disclosed in this application;

[0050] Figure 4 A schematic diagram of a knowledge base cluster disclosed in this application;

[0051] Figure 5 A schematic diagram of a user query knowledge process disclosed in this application;

[0052] Figure 6 A schematic diagram of the structure of a knowledge base construction and use device for a trusted data space disclosed in this application;

[0053] Figure 7 This is a schematic diagram of the structure of an electronic device disclosed in this application. DETAILED DESCRIPTION

[0054] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0055] The current construction of knowledge bases based on large models is mainly limited to a single enterprise or institution, and the knowledge coverage is limited. The reasoning of large models relies on public data on the Internet, but a large amount of undisclosed sensitive data cannot be circulated on the Internet, resulting in the inability of large models to accurately answer questions related to this type of data. Although combining knowledge bases can partially solve the problem, existing knowledge bases are only used within enterprises and cannot achieve cross-institutional knowledge sharing, which limits the comprehensiveness and accuracy of large model answers. To this end, the present application provides a method for constructing and using a knowledge base in a trusted data space, which can interconnect the local knowledge bases of multiple subjects to form a distributed cluster, support global retrieval and collaborative reasoning, and achieve cross-institutional knowledge sharing.

[0056] See also Figure 1 As shown, the embodiment of the present application discloses a method for constructing and using a knowledge base of a trusted data space, including:

[0057] Step S11: Obtain the target document uploaded by the data provider, and perform a block operation on the target document to obtain target knowledge blocks.

[0058] In this embodiment, the target document is segmented into blocks to obtain target knowledge blocks, which may include: first, detecting the target document to determine the complete paragraphs contained in the target document, and determining any complete paragraph in the target document as a first target knowledge block; then, based on a preset segmentation size, segmenting the document data in the target document after removing the first target knowledge block to obtain a second target knowledge block; finally, determining the target knowledge block corresponding to the target document based on the first target knowledge block and the second target knowledge block, and setting an index for each target knowledge block.

[0059] For example Figure 2As shown in the figure, after the data provider uploads the knowledge document locally to the access connector, the access connector uses the document segmentation module to segment the uploaded knowledge document into chunks. During segmentation, the connector first checks whether the chunk to be segmented contains a complete paragraph. If so, the paragraph is treated as a knowledge chunk. Otherwise, the data is segmented according to the pre-set chunk size to obtain the knowledge chunks, and indexes are set for the resulting knowledge chunks.

[0060] In this way, through the combined strategy of prioritizing the retention of complete paragraphs and dividing the remaining content into preset sizes, a reasonable segmentation of knowledge blocks can be achieved.

[0061] Step S12: Based on a preset sensitivity detection method, the target knowledge blocks are subjected to sensitivity grading to obtain a first grading result corresponding to each target knowledge block; according to the first grading result, the target knowledge blocks are vectorized using different types of preset large models to obtain target vector data; and a target knowledge base is constructed based on the target vector data.

[0062] In this embodiment, the target knowledge blocks can first be sensitivity graded based on the preset sensitivity detection method to obtain the first grading results corresponding to each target knowledge block, which can specifically include: first performing sensitivity detection on the target knowledge blocks based on the preset sensitivity detection method; if the current target knowledge block meets the preset high sensitivity standard, the current target knowledge block is determined as a high sensitivity knowledge block; if the current target knowledge block meets the preset medium sensitivity standard, the current target knowledge block is determined as a medium sensitivity knowledge block; if the current target knowledge block meets the preset low sensitivity standard, the current target knowledge block is determined as a low sensitivity knowledge block.

[0063] For example Figure 2 As shown, the sensitivity identification module is called locally in the access connector. The sensitivity identification module performs sensitivity detection on each knowledge block based on a preset sensitivity detection method. The detection results are divided into three levels, namely high sensitivity knowledge block, medium sensitivity knowledge block, and low sensitivity knowledge block.

[0064] Furthermore, for highly sensitive knowledge blocks, the highly sensitive knowledge blocks can be vectorized using a preset large model built based on a trusted execution environment cluster to obtain first vector data; for medium-sensitive knowledge blocks, the medium-sensitive knowledge blocks can be vectorized using a preset large model deployed in the local infrastructure platform corresponding to the data provider (i.e., the large model mentioned later) to obtain second vector data; for low-sensitivity knowledge blocks, the low-sensitivity knowledge blocks can be vectorized using a preset large model provided by a platform other than the local infrastructure platform corresponding to the data provider to obtain third vector data; then, the target vector data corresponding to the target knowledge block is determined based on the first vector data, the second vector data, and the third vector data; finally, the target knowledge base is constructed based on the target knowledge block, the index corresponding to each target knowledge block, and the target vector data. When vectorizing the knowledge blocks, a preset embedding model can be selected, such as the BERT model (Bidirectional Encoder Representations from Transformers, a pre-trained language model based on the Transformer architecture).

[0065] It should be noted that the sensitivity of the target knowledge blocks can be graded based on technical means such as keyword matching, data label recognition, and content compliance analysis to obtain high-sensitivity knowledge blocks containing confidential information, personal privacy, commercial secrets, etc., medium-sensitivity knowledge blocks containing internal business data, industry sensitive information, etc., and low-sensitivity knowledge blocks containing publicly available information.

[0066] After the sensitivity of the target knowledge block is graded, different types of preset large models can be used to vectorize the knowledge blocks of different sensitivities based on the differentiated secure computing environment provided by the trusted data space and according to the graded results of the target knowledge blocks. Specifically, for highly sensitive knowledge blocks, the large model deployed in the TEE (Trusted Execution Environment) cluster can be used to vectorize the knowledge blocks, ensuring that highly sensitive data is vectorized in an encrypted and isolated environment. Figure 2 In the "AI based on TEE deployment" module. It should be noted that, see Figure 3As shown in the figure, a large model built based on the TEE cluster will be deployed on the infrastructure support platform, and the credibility of the large model is ensured by the hardware TEE. Before the user requests the large model, the user query message will first be encrypted by the local user-side agent, and the encrypted information will be sent to the agent in the TEE through the encrypted channel again. The agent in the TEE will send the decrypted message to the large model for reasoning, and after the large model completes the reasoning, the result will be encrypted and returned to the user-side agent. Through the above process, the reasoning task based on the large model can be completed while ensuring that the user request data is not leaked. For medium-sensitive knowledge blocks, the large model deployed on the local infrastructure platform of the data provider can be used to complete the calculation within the trusted local area network, balancing security and efficiency. Figure 2 For low-sensitivity knowledge blocks, vectorization can be performed directly by requesting an external large model API (Application Programming Interface), such as Figure 2 The "Open AI API" module.

[0067] In this way, the above process builds a "security fortress" for sensitive data through technologies such as TEE clusters to prevent unauthorized access. At the same time, computing resources are dynamically scheduled based on sensitivity levels to avoid wasting resources by "processing low-sensitivity data with high-security configurations." This provides a secure and compliant underlying foundation for subsequent cross-institutional knowledge retrieval scenarios, promoting the efficient flow of knowledge elements in trusted data spaces.

[0068] like Figure 2 As shown, after the knowledge block is vectorized, the knowledge block, knowledge block index, and knowledge block vector data can be stored in a local vectorized database, namely, the target knowledge base.

[0069] Step S13: obtaining a knowledge query request sent by a knowledge user, performing vectorization processing on the knowledge query request to obtain a query request vector, and determining target data corresponding to the query request vector from each constructed target knowledge base.

[0070] In this embodiment, the target knowledge bases of all knowledge providers are regarded as a knowledge base cluster so that when users query, the best knowledge can be retrieved from the knowledge base cluster. Figure 4 Shown is a schematic diagram of a knowledge base cluster.

[0071] like Figure 5 As shown, the user can first enter a knowledge query request locally in the access connector to ask a question, and then the access connector will process the knowledge query request based on the vectorization process in step S12 to obtain a query request vector, and then synchronize the query request vector to each target knowledge base that has been constructed.

[0072] Furthermore, the vector similarity between the query request vector and the target vector data in each constructed target knowledge base can be determined based on a preset search method; then the target vector data is sorted in descending order of vector similarity, and a preset number of vector data are determined from the sorted target vector data as the target vector corresponding to the query request vector, and the target knowledge block corresponding to the target vector is used as the target data corresponding to the knowledge query request.

[0073] For example Figure 5 As shown in the figure, after each node in the knowledge base cluster receives the query request vector, it can use search methods such as Exact Nearest Neighbor (ENN) and Approximate Nearest Neighbor (ANN) to recall the knowledge. After the recall is completed, the knowledge is re-sorted in descending order according to its relevance, and the first N pieces of knowledge in the sorting result are used as the retrieved target data.

[0074] Step S14: performing sensitivity grading on the target data based on the preset sensitivity detection method to obtain a second grading result corresponding to each target data; and inputting the target data into the preset large models of different types according to the second grading result to obtain a corresponding inference result.

[0075] In this embodiment, the retrieved target data can be graded based on the sensitivity identification module in step S12 to obtain a graded result corresponding to each target data. The first target data representing high sensitivity in the second graded result can then be input into a preset large model constructed based on the trusted execution environment cluster to obtain a corresponding first reasoning result; the second target data representing medium sensitivity in the second graded result can be input into a preset large model deployed in the local infrastructure platform corresponding to the data provider to obtain a corresponding second reasoning result; and the third target data representing low sensitivity in the second graded result can be input into a preset large model provided by a platform other than the local infrastructure platform corresponding to the data provider to obtain a corresponding third reasoning result.

[0076] For example Figure 5 As shown, the target data with the classification results is sent to the AI agent service module deployed on the infrastructure support platform to use the AI agent service, and large models with different deployment methods are used for reasoning based on different sensitivity levels. The specific process can be referred to step S12.

[0077] It should be noted that by adding a trusted AI reasoning module (including an AI proxy service module, a prompt word sorting module, and a large model deployment module) to the trusted data space, the basic capabilities for integrating trusted data space with AI are provided. The large model deployment module can be divided into three types of large models based on the degree of trustworthiness:

[0078] 1. For high credibility: large models deployed based on TEE clusters;

[0079] 2. For general credibility: large models deployed based on local clusters;

[0080] 3. For low credibility: based on the API provided by external large model service providers.

[0081] "Trustworthiness" refers to the reliability level of different large-scale model deployment methods in terms of data privacy, security, and controllability. High-trustworthiness TEE cluster deployments utilize hardware-level encryption technologies (such as Trusted Execution Environments) to ensure full-chain security for data processing. Average-trustworthiness local cluster deployments rely on an organization's own infrastructure, offering some controllability but less security than TEE cluster deployments. Low-trustworthiness external APIs, due to their reliance on third-party service providers, carry risks such as data outbound transmission and protocol constraints, resulting in the lowest controllability.

[0082] Before inputting the target data into different types of preset large models to obtain corresponding inference results according to the second grading result, the method may also include: for the first target data characterized by high sensitivity in the second grading result, determining the first target credibility corresponding to the first target data based on a preset credibility standard, constructing a first target query request related to the content of the first target data according to the content of the first target data and the corresponding first target credibility, so as to input the first target query request and the first target data into the corresponding preset large model to obtain corresponding inference results; for the second target data characterized by medium sensitivity in the second grading result, determining the first target credibility corresponding to the second target data based on the preset credibility standard; Second target credibility, construct a second target query request related to the content of the second target data according to the content of the second target data and the corresponding second target credibility, so as to input the second target query request and the second target data into the corresponding preset large model to obtain the corresponding inference result; for the third target data representing low sensitivity in the second grading result, determine the third target credibility corresponding to the third target data based on the preset credibility standard, and construct a third target query request related to the content of the third target data according to the content of the third target data and the corresponding third target credibility, so as to input the third target query request and the third target data into the corresponding preset large model to obtain the corresponding inference result.

[0083] It should be noted that the quality of target data from different sources varies. For example, the credibility of internal corporate documents is usually higher than that of public information on the Internet. Therefore, based on the prompt word sorting module, the credibility of different contents in the target data can be evaluated by preset credibility standards, such as source authority, content timeliness, data integrity, etc., so as to sort the contents in the target data according to credibility. Based on the sorted results and combined with the knowledge query request sent by the user, a complete question, that is, the target query request, is generated. The target query request is used as the sorted prompt word, and the sorted prompt word is sent to different large models for reasoning.

[0084] Step S15: Determine a request result corresponding to the knowledge query request using the inference result, and return the request result to the knowledge user.

[0085] In this embodiment, the AI agent forms a complete answer by integrating the reasoning results of different large models, and returns the answer to the user as the request result corresponding to the knowledge query request.

[0086] It should be noted that this embodiment, building upon the fundamental capabilities of AI, explores scenarios where trusted data spaces can be combined with AI, specifically the aforementioned methods for building and using a knowledge base within a trusted data space. By building a distributed, dynamically scalable knowledge base cluster and integrating various trusted data space capabilities, such as data transactions and data usage controls, into the knowledge base cluster, cross-institutional knowledge sharing is achieved. These capabilities, such as data transactions and data usage controls, encourage knowledge holders to circulate knowledge.

[0087] As can be seen from the above, this embodiment provides a method for constructing and using a knowledge base in a trusted data space, which is mainly divided into two parts. The first part is to establish a local knowledge base based on the knowledge documents provided by each data provider, and the second part is for the data user to use the knowledge base in the trusted data space to retrieve relevant knowledge by asking questions. In this way, the creation and use of the knowledge base cluster are basically realized through the above two parts, so that the knowledge in the knowledge base can be circulated, and the answer results of the large model can be more accurate and more in line with the user's questions. At the same time, the knowledge blocks are graded for sensitivity, and large models with different protection capabilities are requested according to different sensitivity levels, so as to achieve more fine-grained protection of knowledge, improve the security of large model reasoning, and reduce the risk of sensitive information leakage.

[0088] See also Figure 6 As shown, the embodiment of the present application also discloses a knowledge base construction and use device of a trusted data space, including:

[0089] The data acquisition module 11 is used to acquire the target document uploaded by the data provider and perform a block operation on the target document to obtain target knowledge blocks;

[0090] A knowledge base construction module 12 is configured to perform sensitivity grading on the target knowledge blocks based on a preset sensitivity detection method to obtain a first grading result corresponding to each target knowledge block, perform vectorization processing on the target knowledge blocks using different types of preset large models according to the first grading results to obtain target vector data, and construct a target knowledge base based on the target vector data;

[0091] The data determination module 13 is configured to obtain a knowledge query request sent by a knowledge user, perform vectorization processing on the knowledge query request to obtain a query request vector, and determine target data corresponding to the query request vector from each constructed target knowledge base;

[0092] A result acquisition module 14 is configured to perform the sensitivity classification on the target data based on the preset sensitivity detection method to obtain a second classification result corresponding to each target data, and input the target data into the preset large models of different types according to the second classification result to obtain a corresponding inference result;

[0093] The request response module 15 is used to determine the request result corresponding to the knowledge query request using the inference result, and return the request result to the knowledge user.

[0094] As can be seen from the above, this application classifies target knowledge blocks based on a preset sensitivity detection method. Through hierarchical processing, knowledge blocks of different sensitivity levels can be securely isolated during the vectorization stage, meeting compliance requirements while optimizing computing resource allocation. At the same time, each data provider builds a target knowledge base based on the vectorization results of local knowledge blocks. All target knowledge bases form a distributed cluster through a trusted data space, supporting global retrieval and collaborative reasoning across data sources, improving the comprehensiveness and accuracy of large model answers.

[0095] In some specific implementations, the data acquisition module 11 includes:

[0096] a first knowledge block determining unit, configured to detect the target document to determine complete paragraphs contained in the target document, and determine any complete paragraph in the target document as a first target knowledge block;

[0097] a second knowledge block determining unit, configured to segment the document data of the target document after removing the first target knowledge block based on a preset block size to obtain a second target knowledge block;

[0098] The target knowledge block determining unit is configured to determine the target knowledge block corresponding to the target document according to the first target knowledge block and the second target knowledge block, and to set an index for each target knowledge block.

[0099] In some specific implementations, the knowledge base construction module 12 includes:

[0100] a detection unit, configured to perform sensitivity detection on the target knowledge block based on a preset sensitivity detection method;

[0101] A sensitivity grading unit is used to determine the current target knowledge block as a high-sensitivity knowledge block if the current target knowledge block meets the preset high-sensitivity standard, determine the current target knowledge block as a medium-sensitivity knowledge block if the current target knowledge block meets the preset medium-sensitivity standard, and determine the current target knowledge block as a low-sensitivity knowledge block if the current target knowledge block meets the preset low-sensitivity standard.

[0102] In some specific implementations, the knowledge base construction module 12 includes:

[0103] a first data determining unit, configured to perform vectorization processing on the highly sensitive knowledge block by using a preset large model constructed based on a trusted execution environment cluster to obtain first vector data;

[0104] a second data determining unit, configured to perform vectorization processing on the medium-sensitivity knowledge block by using a preset large model deployed in a local infrastructure platform corresponding to the data provider, so as to obtain second vector data;

[0105] a third data determining unit, configured to perform vectorization processing on the low-sensitivity knowledge block by using a preset large model provided by a platform other than the local infrastructure platform corresponding to the data provider, so as to obtain third vector data;

[0106] a target data determining unit, configured to determine target vector data corresponding to the target knowledge block based on the first vector data, the second vector data, and the third vector data;

[0107] The knowledge base construction unit is used to construct a target knowledge base based on the target knowledge blocks, the indexes corresponding to the target knowledge blocks and the target vector data.

[0108] In some specific implementations, the data determination module 13 includes:

[0109] A similarity determination unit, configured to determine, based on a preset search method, a vector similarity between the query request vector and target vector data in each constructed target knowledge base;

[0110] The fourth data determination unit is used to sort the target vector data in descending order of the vector similarity, and determine a preset number of vector data from the sorted target vector data as the target vector corresponding to the query request vector, and use the target knowledge block corresponding to the target vector as the target data corresponding to the knowledge query request.

[0111] In some specific implementations, the result acquisition module 14 includes:

[0112] A first result determination unit is configured to input the first target data representing high sensitivity in the second classification result into a preset large model constructed based on the trusted execution environment cluster to obtain a corresponding first inference result;

[0113] A second result determination unit is configured to input the second target data representing the sensitivity in the second classification result into a preset large model deployed in a local infrastructure platform corresponding to the data provider to obtain a corresponding second inference result;

[0114] The third result determination unit is used to input the third target data representing low sensitivity in the second classification result into a preset large model provided by a platform other than the local infrastructure platform corresponding to the data provider to obtain a corresponding third inference result.

[0115] In some specific implementations, the result acquisition module 14 includes:

[0116] a first request determining unit configured to determine, for each of the first target data characterized by high sensitivity in the second classification result, first target credibility corresponding to each of the first target data based on a preset credibility standard, construct a first target query request related to the content of the first target data according to the content of the first target data and the corresponding first target credibility, and input the first target query request and the first target data into a corresponding preset large model to obtain a corresponding inference result;

[0117] a second request determining unit configured to determine, for the second target data characterized by sensitivity in the second classification result, second target credibility corresponding to each of the second target data based on the preset credibility standard, construct a second target query request related to the content of the second target data according to the content of the second target data and the corresponding second target credibility, and input the second target query request and the second target data into a corresponding preset large model to obtain a corresponding inference result;

[0118] A third request determination unit is used to determine, for the third target data representing low sensitivity in the second grading result, the third target credibility corresponding to the third target data based on the preset credibility standard, and to construct a third target query request related to the content of the third target data according to the content of the third target data and the corresponding third target credibility, so as to input the third target query request and the third target data into the corresponding preset large model to obtain a corresponding inference result.

[0119] Furthermore, the embodiment of the present application also discloses an electronic device, Figure 7 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the diagram should not be considered as any limitation to the scope of application of the present application.

[0120] Figure 7 This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps of the method for constructing and using a knowledge base of a trusted data space disclosed in any of the aforementioned embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.

[0121] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device. The communication protocol it follows is any communication protocol that can be applied to the technical solution of this application and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world. Its specific interface type can be selected according to specific application needs and is not specifically limited here.

[0122] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or CD, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.

[0123] The operating system 221 is used to manage and control the hardware devices on the electronic device 20 and the computer program 222, and can be Windows Server, NetWare, Unix, Linux, etc. In addition to including computer programs that can be used to implement the knowledge base construction and use method of the trusted data space executed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include computer programs that can be used to perform other specific tasks.

[0124] Furthermore, this application discloses a computer-readable storage medium for storing a computer program; wherein, when executed by a processor, the computer program implements the aforementioned disclosed method for constructing and using a knowledge base of a trusted data space. The specific steps of this method can be found in the corresponding contents disclosed in the aforementioned embodiments and will not be further described here.

[0125] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from the other embodiments. Reference can be made to the descriptions of the identical or similar parts between the various embodiments. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple, and the relevant parts can be referred to the descriptions of the methods.

[0126] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0127] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0128] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.

[0129] The above is a detailed introduction to the technical solution provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for those skilled in the art, according to the ideas of the present application, there may be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A method for constructing and using a knowledge base of a trusted data space, characterized in that: include: Obtaining the target document uploaded by the data provider, and performing a block operation on the target document to obtain target knowledge blocks; Performing sensitivity grading on the target knowledge blocks based on a preset sensitivity detection method to obtain first grading results corresponding to each target knowledge block, performing vectorization processing on the target knowledge blocks using different types of preset large models according to the first grading results to obtain target vector data, and constructing a target knowledge base based on the target vector data; Obtaining a knowledge query request sent by a knowledge user, performing vectorization processing on the knowledge query request to obtain a query request vector, and determining target data corresponding to the query request vector from each constructed target knowledge base; Performing the sensitivity classification on the target data based on the preset sensitivity detection method to obtain a second classification result corresponding to each target data; and inputting the target data into the different types of preset large models according to the second classification result to obtain a corresponding inference result; The inference result is used to determine a request result corresponding to the knowledge query request, and the request result is returned to the knowledge user.

2. The method for constructing and using a knowledge base of a trusted data space according to claim 1, characterized in that: The block operation on the target document to obtain target knowledge blocks includes: Detecting the target document to determine complete paragraphs contained in the target document, and determining any complete paragraph in the target document as a first target knowledge block; Segmenting the document data of the target document after removing the first target knowledge block based on a preset block size to obtain a second target knowledge block; The target knowledge block corresponding to the target document is determined according to the first target knowledge block and the second target knowledge block, and an index is set for each target knowledge block.

3. The method for constructing and using a knowledge base of a trusted data space according to claim 1, characterized in that: The sensitivity grading of the target knowledge blocks based on the preset sensitivity detection method to obtain a first grading result corresponding to each target knowledge block includes: Performing sensitivity detection on the target knowledge block based on a preset sensitivity detection method; If the current target knowledge block meets the preset high sensitivity standard, the current target knowledge block is determined as a high sensitivity knowledge block; if the current target knowledge block meets the preset medium sensitivity standard, the current target knowledge block is determined as a medium sensitivity knowledge block; if the current target knowledge block meets the preset low sensitivity standard, the current target knowledge block is determined as a low sensitivity knowledge block.

4. The method for constructing and using a knowledge base of a trusted data space according to claim 3, characterized in that: The vectorization processing of the target knowledge block using different types of preset large models according to the first classification result to obtain target vector data, and constructing a target knowledge base based on the target vector data includes: For the highly sensitive knowledge block, vectorize the highly sensitive knowledge block using a preset large model constructed based on a trusted execution environment cluster to obtain first vector data; For the medium-sensitivity knowledge block, vectorize the medium-sensitivity knowledge block using a preset large model deployed in a local infrastructure platform corresponding to the data provider to obtain second vector data; For the low-sensitivity knowledge block, vectorization processing is performed on the low-sensitivity knowledge block using a preset large model provided by a platform other than the local infrastructure platform corresponding to the data provider to obtain third vector data; Determine target vector data corresponding to the target knowledge block based on the first vector data, the second vector data, and the third vector data; A target knowledge base is constructed based on the target knowledge blocks, the indexes corresponding to the target knowledge blocks and the target vector data.

5. The method for constructing and using a knowledge base of a trusted data space according to claim 4, characterized in that: The determining of target data corresponding to the query request vector from each constructed target knowledge base includes: Determining the vector similarity between the query request vector and the target vector data in each constructed target knowledge base based on a preset search method; The target vector data are sorted in descending order of the vector similarity, and a preset number of vector data are determined from the sorted target vector data as target vectors corresponding to the query request vector, and the target knowledge blocks corresponding to the target vectors are used as target data corresponding to the knowledge query request.

6. The method for constructing and using a knowledge base of a trusted data space according to any one of claims 1 to 5, characterized in that: Inputting the target data into the different types of preset large models according to the second classification result to obtain corresponding inference results includes: Inputting the first target data representing high sensitivity in the second classification result into a preset large model built based on the trusted execution environment cluster to obtain a corresponding first inference result; Inputting the second target data representing the sensitivity in the second classification result into a preset large model deployed in the local infrastructure platform corresponding to the data provider to obtain a corresponding second inference result; The third target data representing low sensitivity in the second classification result is input into a preset large model provided by a platform other than the local infrastructure platform corresponding to the data provider to obtain a corresponding third inference result.

7. The method for constructing and using a knowledge base of a trusted data space according to claim 1, characterized in that: Before inputting the target data into the different types of preset large models to obtain corresponding inference results according to the second classification results, the method further includes: For the first target data characterized as highly sensitive in the second classification result, determining first target credibility corresponding to each of the first target data based on a preset credibility standard, constructing a first target query request related to the content of the first target data based on the content of the first target data and the corresponding first target credibility, and inputting the first target query request and the first target data into a corresponding preset large model to obtain a corresponding inference result; For the second target data characterized by sensitivity in the second classification result, determining the second target credibility corresponding to each of the second target data based on the preset credibility standard, constructing a second target query request related to the content of the second target data according to the content of the second target data and the corresponding second target credibility, and inputting the second target query request and the second target data into the corresponding preset large model to obtain a corresponding inference result; For the third target data representing low sensitivity in the second grading result, the third target credibility corresponding to the third target data is determined based on the preset credibility standard, and a third target query request related to the content of the third target data is constructed according to the content of the third target data and the corresponding third target credibility, so as to input the third target query request and the third target data into the corresponding preset large model to obtain the corresponding inference result.

8. A device for constructing and using a knowledge base of a trusted data space, characterized in that: include: The data acquisition module is used to obtain the target document uploaded by the data provider and perform block operations on the target document to obtain target knowledge blocks; a knowledge base construction module, configured to perform sensitivity grading on the target knowledge blocks based on a preset sensitivity detection method to obtain a first grading result corresponding to each target knowledge block, perform vectorization processing on the target knowledge blocks using different types of preset large models according to the first grading result to obtain target vector data, and construct a target knowledge base based on the target vector data; a data determination module, configured to obtain a knowledge query request sent by a knowledge user, perform vectorization processing on the knowledge query request to obtain a query request vector, and determine target data corresponding to the query request vector from each constructed target knowledge base; a result acquisition module, configured to perform the sensitivity classification on the target data based on the preset sensitivity detection method to obtain a second classification result corresponding to each target data, and input the target data into the preset large models of different types according to the second classification result to obtain a corresponding inference result; The request response module is used to determine the request result corresponding to the knowledge query request using the inference result, and return the request result to the knowledge user.

9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the method for constructing and using a knowledge base of a trusted data space as claimed in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that Used to store a computer program, which, when executed by a processor, implements the knowledge base construction and use method of the trusted data space according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Retrieval enhancement method and device, equipment and storage medium

    CN118394793A

  • Problem processing method and device based on artificial intelligence, computer equipment and medium

    CN119202152A