A method and system for cloud-based knowledge base management and local collaborative query construction

By generating a unified knowledge base view and standard knowledge base artifacts, the problem of the disconnect between cloud and local knowledge base management is solved, enabling secure and flexible collaborative construction and querying of the knowledge base, improving system security and query efficiency, and meeting the needs of enterprise-level engineering implementation.

CN123117280APending Publication Date: 2026-11-17WUHAN KOTEI INFORMATICS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611311372.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-27
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

Existing knowledge base management systems suffer from problems such as a disconnect between cloud management and local use, coupling of access control and directory discovery, difficulty in standardizing and transferring knowledge base construction results, and a lack of diverse query modes.

Method used

By generating a unified knowledge base view, local and cloud-based knowledge base information is merged to generate standard knowledge base artifacts. Query routing strategies are determined based on availability, enabling flexible routing for local, cloud, and hybrid queries.

Benefits of technology

It decouples management from usage, improves security and maintainability, supports cloud-edge collaboration, establishes a closed loop between local building and cloud deployment, improves query efficiency and flexibility, and meets the needs of enterprise-level engineering implementation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123117280A_ABST
    Figure CN123117280A_ABST
Patent Text Reader

Abstract

This invention relates to a method and system for cloud-based management and local collaborative construction and querying of a knowledge base. The method includes: acquiring a set of metadata about locally installed knowledge bases and calling a cloud control plane interface to obtain cloud knowledge base directory information for which the current user has access permissions; merging the two to generate a unified knowledge base view; responding to a construction command, receiving source data, performing index construction processing, generating standard knowledge base artifacts, and registering them to a local list; and responding to a query request, determining the corresponding query routing strategy based on the availability status of the target knowledge base in the unified knowledge base view and performing a retrieval to obtain the query results. This invention decouples cloud management from local use, supports cloud-edge collaboration and offline availability; establishes a closed loop between local construction and cloud publishing through a unified artifact format; and adaptively routes query paths based on status, improving system security, query efficiency, and engineering feasibility.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of knowledge base management and cloud-edge collaborative retrieval technology, and in particular to a method and system for cloud-based knowledge base management and local collaborative query construction. Background Technology

[0002] As the scale of internal enterprise documents, code, process specifications, test cases, and project archives continues to expand, knowledge base systems have gradually evolved from traditional stand-alone document retrieval tools into an integrated platform covering knowledge building, version release, terminal installation, intelligent retrieval, and permission management.

[0003] In actual enterprise deployments, current knowledge base management solutions fall into two categories. The first category leans towards purely cloud-based centralized management. This type of solution deploys all knowledge base storage, management, and retrieval services in the cloud. Its advantage lies in facilitating unified access control and content publishing for enterprises, ensuring the centralization and security of knowledge assets. However, this type of solution is highly dependent on the network, making it completely unusable in offline environments. Furthermore, users find it difficult to conduct rapid building and verification experiments locally, and personalized knowledge accumulation is also challenging, resulting in insufficient flexibility.

[0004] The second type of solution leans towards purely local knowledge bases. These solutions typically exist as client software, where the knowledge base's construction, indexing, and querying are all completed locally on the user's machine. Their advantages lie in flexible deployment, allowing individuals to quickly import materials and build their own custom knowledge bases, and offering fast response times. However, these solutions generally lack unified metadata management, version control mechanisms, and permission distribution strategies, resulting in isolated knowledge bases built by different users.

[0005] In addition, existing knowledge base management technologies generally suffer from the following problems: 1. Fragmented view: The published status of the cloud-based knowledge base is independent of the local installation status, making it impossible for the client to form a unified and clear view of the knowledge base, which causes confusion for user management.

[0006] 2. Difficulty in knowledge transfer: Locally built knowledge products lack standardized product formats, making it difficult to be easily published to the cloud or reused by other terminals, thus hindering the transfer of knowledge.

[0007] 3. Security and performance risks: Some clients directly scan the cloud directory upon startup, which can easily lead to problems such as exposed permissions, coupled directory structures, and performance bottlenecks.

[0008] 4. Limited query modes: The query path often fails to effectively distinguish between various modes such as local queries, cloud queries, and hybrid queries, resulting in a rigid query routing strategy that cannot select the optimal path based on the actual state of the knowledge base.

[0009] 5. Lack of a complete lifecycle: From local construction of the knowledge base and cloud deployment to terminal query, there is a lack of a unified, closed-loop methodology to guide the engineering implementation.

[0010] In summary, the industry urgently needs a collaborative solution for knowledge bases that combines unified cloud-based management capabilities with the ability to build and retrieve knowledge locally. Summary of the Invention

[0011] This invention provides a method and system for cloud-based management and local collaborative construction and querying of a knowledge base, which addresses the problems of fragmented cloud management and local use, coupled access control and directory discovery, difficulty in standardizing and transferring knowledge base construction results, and limited query modes in existing knowledge base systems.

[0012] In a first aspect of the present invention, a method for cloud-based management and local collaborative construction of a knowledge base query is provided, comprising: After the client starts, it obtains the metadata set of the locally installed knowledge base and calls the cloud control plane interface to obtain the cloud knowledge base directory information that the current user has access to. The metadata set of the locally installed knowledge base is merged with the directory information of the cloud-based knowledge base to generate a unified knowledge base view; the unified knowledge base view is used to represent the availability status of each knowledge base locally and in the cloud. In response to the knowledge base construction instruction, the system receives source data and performs index construction processing to generate standard knowledge base artifacts, and registers the standard knowledge base artifacts to the local knowledge base list. In response to a query request for a target knowledge base, based on the availability status of the target knowledge base in the unified knowledge base view, a corresponding query routing strategy is determined, and a retrieval operation is performed according to the query routing strategy to obtain the query results.

[0013] Preferably, the step of obtaining the metadata set of the locally installed knowledge base and calling the cloud control plane interface to obtain the cloud knowledge base directory information that the current user has access to includes: Read the user's login status and access token, scan the manifest files in the local installed knowledge base directory, and obtain the metadata set of the local installed knowledge base; The cloud knowledge base control plane interface is invoked to request cloud knowledge base directory information for which the current user has discover permissions; wherein, the cloud knowledge base directory information includes at least: knowledge base identifier, name, version, source, available query modes, installation strategy, and user permissions.

[0014] Preferably, the step of merging the metadata set of the locally installed knowledge base with the directory information of the cloud-based knowledge base to generate a unified knowledge base view includes: Using the knowledge base identifier as the matching primary key, the metadata set of the locally installed knowledge base is aggregated and matched with the directory information of the cloud-based knowledge base; Based on the matching results, the status information of each knowledge base is marked in the unified knowledge base view. The status information includes installed, online only, local unique, and updated in the cloud.

[0015] Preferably, the step of responding to the knowledge base construction instruction, receiving source data and performing index construction processing to generate a standard knowledge base artifact, and registering the standard knowledge base artifact to the local knowledge base list specifically includes: When a user chooses to build a knowledge base, the client receives the source directory or source file specified by the user and identifies the data source, format and scale; The source directory or source files are parsed and preprocessed to convert unstructured documents into a unified intermediate format and filter process files. Based on the knowledge base type selected by the user, the corresponding construction backend is invoked to perform segmentation and index construction, generate metadata, and output standard knowledge base artifacts; the standard knowledge base artifacts include at least a manifest file, a description file, and an index file; Register the standard knowledge base artifacts to the local knowledge base list so that they can be directly used for local queries.

[0016] Preferably, after generating the standard knowledge base artifact, the method further includes: In response to a cloud-based publishing command, verify whether the current user has publishing permissions; If the client has publishing permissions, it will upload the standard knowledge base artifact to the cloud publishing service. The cloud platform sequentially performs package verification, review, storage, and version registration on the received standard knowledge base artifacts; After successful publication, the knowledge base corresponding to the standard knowledge base artifact will be added to the cloud knowledge base directory so that other authorized clients can obtain the metadata of the knowledge base through the control plane.

[0017] Preferably, in response to a query request for the target knowledge base, determining a corresponding query routing strategy based on the availability status of the target knowledge base in the unified knowledge base view specifically includes: The query request is parsed to determine whether a target knowledge base has been specified. If a target knowledge base has been specified, routing is performed within the specified target knowledge base. If no target knowledge base has been specified, automatic routing is performed within the set of knowledge bases accessible to the current user in the unified knowledge base view to determine candidate knowledge bases. Obtain the availability status of the candidate knowledge base in the unified knowledge base view, and determine the corresponding query routing strategy based on the availability status; wherein, the query routing strategy includes: using cloud query for knowledge bases that only have cloud availability status, using local query for knowledge bases that only have local availability status, and using hybrid query for knowledge bases that have both local availability status and cloud availability status.

[0018] Preferably, the retrieval operation is performed according to the query routing strategy to obtain the query results, specifically including: If the query routing strategy is cloud query, then the cloud query service is invoked to perform the retrieval; If the query routing strategy is a local query, then the local retrieval runtime is invoked to perform a retrieval of the standard knowledge base artifacts that have been registered locally; If the query routing strategy is a hybrid query, then the local retrieval runtime and the cloud query service are called simultaneously to perform the retrieval, and the local retrieval results and the cloud retrieval results are merged to obtain the final query result.

[0019] Preferably, after obtaining the query results, the method further includes: The query results are structured and encapsulated, and the encapsulated query results include at least the query answer, the matched knowledge base identifier, the evidence source fragment, and the scope information for further inquiry; The encapsulated query results can be displayed through a dialog interface or returned to the caller through a preset interface protocol.

[0020] In a second aspect of the present invention, a knowledge base cloud management and local collaborative construction query system is provided, comprising: The local directory scanning module is used to obtain the metadata set of the locally installed knowledge base after the client starts. The cloud directory retrieval module is used to call the cloud control plane interface to retrieve cloud knowledge base directory information that the current user has access to; The view merging module is used to merge the metadata set of the locally installed knowledge base with the directory information of the cloud knowledge base to generate a unified knowledge base view; the unified knowledge base view is used to represent the availability status of each knowledge base locally and in the cloud. The local build module is used to respond to knowledge base build instructions, receive source data, perform index building processing, and generate standard knowledge base artifacts. The knowledge base registration module is used to register the standard knowledge base artifacts to the local knowledge base list; The cloud publishing module is used to respond to cloud publishing commands, verify whether the current user has publishing permissions; if the verification is successful, the standard knowledge base artifact is uploaded to the cloud publishing service, triggering cloud execution package verification, review, storage and version registration, and the corresponding knowledge base is added to the cloud knowledge base directory after successful publishing; The query routing retrieval module is used to respond to a query request for a target knowledge base, determine the corresponding query routing strategy based on the availability status of the target knowledge base in the unified knowledge base view, and perform a retrieval operation according to the query routing strategy to obtain the query results. The results display module is used to encapsulate the query results in a structured manner. After encapsulation, the results are displayed through a dialog interface or output to external parties through a preset interface protocol.

[0021] In a third aspect of the present invention, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable by the processor, wherein the processor executes the computer program to implement the steps of the method as described in the first aspect of the present invention.

[0022] The knowledge base cloud management and local collaborative construction query method and system provided by this invention have the following advantages compared with the prior art: 1. Decoupling management and usage enhances security and maintainability. Clients no longer directly scan the cloud knowledge base directory; instead, they obtain directory and permission information through the control plane, avoiding permission exposure and directory coupling, thus improving system security and maintainability.

[0023] 2. Supports cloud-edge collaboration, balancing centralized governance with offline availability. It retains unified access control and version management capabilities in the cloud while supporting independent local building, installation, and offline retrieval, meeting the needs for flexible deployment and personalized knowledge accumulation.

[0024] 3. Unified artifact standards enable a closed loop between local builds and cloud deployments. A unified standard knowledge base artifact format allows locally built results to be directly uploaded and published to the cloud and automatically added to the cloud directory, achieving seamless flow and reuse of the knowledge base between local and cloud environments.

[0025] 4. Flexible query paths with adaptive routing based on status. The system automatically matches local, cloud, or hybrid query strategies according to the actual availability of the knowledge base, ensuring search quality while reducing unnecessary network overhead and improving query efficiency.

[0026] 5. Complete lifecycle, facilitating engineering implementation. The knowledge base's construction, registration, publishing, installation, updating, and querying are integrated into a unified methodology, covering the entire knowledge base lifecycle. It features clear process divisions and standardized data formats, making it easy to directly guide enterprise-level engineering implementation. Attached Figure Description

[0027] Figure 1 Flowchart of the knowledge base cloud management and local collaborative construction query method provided by this invention; Figure 2 This invention provides an overall logical diagram illustrating the cloud-based management and local collaboration of the knowledge base. Figure 3 The structural block diagram of the knowledge base cloud management and local collaborative query system provided by this invention; Figure 4 This is a structural block diagram of the electronic device provided by the present invention. Detailed Implementation

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

[0029] Figure 1 This invention provides a flowchart for the cloud-based knowledge base management and local collaborative query construction method. (Refer to...) Figure 1 The method includes the following steps: S1: After the client starts, it obtains the metadata set of the locally installed knowledge base and calls the cloud control plane interface to obtain the cloud knowledge base directory information that the current user has access to.

[0030] The metadata set of locally installed knowledge bases refers to the descriptive information set of installed knowledge bases scanned by the client in the local storage environment. The cloud control plane interface is a standardized interface used to interact with cloud services to obtain directory information within the user's permissions. The cloud knowledge base directory information contains summary information about all cloud knowledge bases that the current user has the right to access.

[0031] S2, merge the metadata set of the locally installed knowledge base with the directory information of the cloud knowledge base to generate a unified knowledge base view; the unified knowledge base view is used to represent the availability status of each knowledge base locally and in the cloud.

[0032] Specifically, the unified knowledge base view is a logically unified list of knowledge bases presented to users after integrating local and cloud-based knowledge base information. This view can clearly show whether each knowledge base exists only locally, only in the cloud, or on both ends.

[0033] S3, in response to the knowledge base construction instruction, receives source data and performs index construction processing to generate standard knowledge base artifacts, and registers the standard knowledge base artifacts to the local knowledge base list.

[0034] Among these, knowledge base construction instructions are user-initiated operation commands used to create new knowledge bases. Source data refers to the original files or directories specified by the user for building the knowledge base. Standard knowledge base artifacts are standardized knowledge base packages containing index files and metadata, generated after index building processing. The local knowledge base list is a list of all knowledge bases registered locally, maintained by the client.

[0035] S4. In response to a query request for the target knowledge base, based on the availability status of the target knowledge base in the unified knowledge base view, a corresponding query routing strategy is determined, and a retrieval operation is performed according to the query routing strategy to obtain the query results.

[0036] Specifically, the target knowledge base is the knowledge base to be queried that the user specifies in the query request or that the system determines based on the context. The query routing strategy is the retrieval execution path determined based on the availability of the target knowledge base in the unified knowledge base view, such as selecting local retrieval, cloud retrieval, or hybrid retrieval.

[0037] The method provided by this invention decouples cloud management from local use by generating a unified knowledge base view, avoiding the risk of coupling permissions and directories; it unifies the format of local construction and cloud publishing by generating standard knowledge base artifacts, promoting knowledge flow; and it enables flexible routing of local, cloud, and hybrid queries by determining query routing strategies based on availability status, improving query efficiency and system flexibility.

[0038] Based on the above embodiments, as a preferred implementation, step S1, which involves obtaining the metadata set of the locally installed knowledge base and calling the cloud control plane interface to obtain the cloud knowledge base directory information that the current user has access to, specifically includes: After the client starts, it first reads the current user's login status and access token to complete user authentication. Then, the client scans the manifest files in the local installed knowledge base directory. Here, the manifest file is a list file that records knowledge base metadata, containing basic attribute information such as the knowledge base identifier, name, and version. By scanning this file, the client can obtain the metadata set of the locally installed knowledge bases.

[0039] The client invokes the cloud-based knowledge base control plane interface to request cloud-based knowledge base directory information for which the current user has discover permissions. Here, the cloud-based knowledge base control plane interface is a unified service interface provided by the cloud for knowledge base directory discovery and permission verification. Discover permissions represent the knowledge base discovery permissions granted to the user in the cloud, i.e., the scope of knowledge bases the user can view and access. The cloud-based knowledge base directory information includes at least: knowledge base identifier, name, version, source, available query modes, installation policy, and user permissions.

[0040] Specifically, the client requests a list of knowledge bases currently visible to the user from the cloud via this interface. The cloud verifies the user's identity and permissions and returns the knowledge base directory information that the user is authorized to access. In this way, the client can obtain knowledge base directory data from both locally installed and cloud-accessible sources during the startup phase, providing a complete data foundation for the subsequent generation of a unified view.

[0041] The method provided in this invention securely obtains directory information from both local and cloud sources by reading the login status and access token and scanning the local manifest file; it decouples permissions and directories by requesting discover permissions, thus avoiding security and performance risks caused by directly scanning cloud directories.

[0042] Based on the above embodiments, as a preferred implementation, step S2, merging the metadata set of the locally installed knowledge base with the directory information of the cloud-based knowledge base to generate a unified knowledge base view, specifically includes: Using the knowledge base identifier as the matching primary key, the metadata set of the locally installed knowledge bases is aggregated and matched with the knowledge base directory information in the cloud. Here, the knowledge base identifier is an identifier used to uniquely distinguish different knowledge bases, such as a knowledge base ID (kbId). Aggregation matching refers to the process by which the client associates and integrates the metadata set of the locally installed knowledge bases with the knowledge base directory information obtained from the cloud, based on the same knowledge base identifier.

[0043] Based on the matching results, the status information of each knowledge base is marked in the unified knowledge base view. Specifically, if a knowledge base exists in both the local metadata set and the cloud directory information, it is marked as installed; if a knowledge base exists only in the cloud directory information and is not installed locally, it is marked as online only; if a knowledge base exists only in the local metadata set and has not been published to the cloud, it is marked as locally unique; if a knowledge base exists on both ends but the version number in the cloud directory information is higher than the locally installed version, it is marked as updated on the cloud. Through the above marking method, the client can clearly present the complete availability status of each knowledge base in the unified knowledge base view, providing users with an accurate knowledge base management entry point.

[0044] The method provided in this invention achieves precise alignment of local and cloud-based knowledge base information by using the knowledge base identifier as the matching primary key for aggregation and matching. By marking various status information in a unified knowledge base view, users can clearly identify the deployment and version status of each knowledge base, providing an accurate basis for subsequent query routing and knowledge base management.

[0045] Based on the above embodiments, as a preferred implementation, step S3, which involves responding to a knowledge base construction instruction, receiving source data and performing index construction processing to generate a standard knowledge base artifact, and registering the standard knowledge base artifact to the local knowledge base list, specifically includes: S31, when a user chooses to build a knowledge base, the client receives the source directory or source file specified by the user and identifies the data source, format and scale.

[0046] Here, the source directory or source file is the raw data input specified by the user, and its format can include, but is not limited to, Office documents, PDF files, Markdown files, etc. The client determines the adaptation strategy for subsequent parsing and index building by identifying the data source, format, and scale.

[0047] S32, perform parsing and preprocessing on the source directory or source file, convert unstructured documents into a unified intermediate format, and filter process files.

[0048] Specifically, for unstructured documents such as Office documents and PDFs, the client converts them into a unified intermediate format such as Markdown to facilitate subsequent segmentation and index building. At the same time, temporary or process files that do not need to be processed during the building process are filtered out to reduce the impact of noisy data on index quality.

[0049] S33, based on the knowledge base type selected by the user, calls the corresponding construction backend to perform segmentation and index construction, generates metadata, and outputs standard knowledge base artifacts.

[0050] Here, the knowledge base type indicates the construction method or index structure of the knowledge base, such as PageIndex, Graphify, or Vect. The build backend is an optional execution engine that encapsulates the specific index construction logic. The client calls the corresponding build backend based on the knowledge base type selected by the user. The standard knowledge base artifacts include at least a manifest file, a description file, and an index file. The manifest file records the knowledge base's metadata, such as the path, data source, build backend type, and construction mode; the description file describes the basic information of the knowledge base; and the index file is the core data supporting retrieval. In addition, standard knowledge base artifacts may also include optional graph artifacts to support knowledge graph-based retrieval and question-answering scenarios.

[0051] S34, Register the standard knowledge base artifact to the local knowledge base list so that it can be directly used for local querying.

[0052] Specifically, the client copies or installs the generated standard knowledge base artifact to the local knowledge base storage directory and writes the knowledge base's metadata into the local knowledge base list, completing the registration. After registration, the knowledge base can be directly invoked during local retrieval, enabling fast queries of the local knowledge base.

[0053] The method provided in this invention provides standardized input for subsequent index construction by identifying the source data format and scale and performing parsing and preprocessing; it achieves flexible adaptation to different types of knowledge bases by calling the corresponding construction backend according to the knowledge base type selected by the user; and it opens up a closed loop from local construction to direct query by outputting standard knowledge base artifacts containing manifest files, description files, and index files and registering them to the local list, enabling the knowledge results built by the user to take effect locally immediately.

[0054] Based on the above embodiments, as a preferred implementation, after generating the standard knowledge base artifact in step S3, the knowledge base cloud management and local collaborative construction query provided by the present invention also includes a cloud publishing step, specifically including: In response to a cloud-based publishing command, the system verifies whether the current user has publishing permissions. The cloud-based publishing command is a user-initiated operation to publish locally built standard knowledge base artifacts to the cloud knowledge base directory. Publishing permissions are access control permissions set by the cloud to control knowledge base publishing operations; only users with these permissions can perform the operation of uploading knowledge base artifacts to the cloud.

[0055] If the client has publishing permissions, it uploads the standard knowledge base artifact to the cloud publishing service. Based on the storage path of the standard knowledge base artifact, the client uploads its complete directory structure to the designated publishing interface on the cloud via a secure transmission protocol. During the upload process, the client generates an artifact content hash value and submits it along with the transmitted data for subsequent packet integrity verification.

[0056] The cloud platform sequentially performs package verification, review, storage, and version registration on the received standard knowledge base artifacts. Specifically, the package verification stage verifies the integrity of the artifact files and the compliance of the manifest metadata; the review stage checks the content security and format specifications according to preset rules; the storage stage persistently stores the reviewed artifacts in the cloud knowledge base repository; and the version registration stage creates or updates the corresponding knowledge base version index record in the cloud knowledge base directory based on the version number recorded in the manifest.

[0057] After successful publication, the knowledge base corresponding to the standard knowledge base artifact is added to the cloud knowledge base directory. The cloud service writes the identifier, name, version, source, and user permission information of the newly published knowledge base into the knowledge base directory database, making it visible to subsequent discover-permitted queries. Subsequently, other clients with discover permissions can obtain the metadata of this knowledge base through the cloud control plane interface when executing step S1, enabling cross-user knowledge sharing.

[0058] This invention ensures the legitimacy of knowledge base publishing identity through a publishing permission verification mechanism; guarantees the compliance and structural integrity of artifact content through a phased verification process; and enables newly published knowledge bases to participate in the construction of a unified knowledge base view in real time through version registration and dynamic directory updates, achieving seamless transfer of local construction results to the cloud knowledge ecosystem and improving the efficiency of cross-user knowledge collaboration.

[0059] Based on the above embodiments, as a preferred implementation, in step S4, responding to a query request for the target knowledge base, determining a corresponding query routing strategy based on the availability status of the target knowledge base in the unified knowledge base view, and performing a retrieval operation according to the query routing strategy to obtain query results, specifically includes: S41, parse the query request and determine whether a target knowledge base has been specified. If a target knowledge base has been specified, then routing is performed within the specified target knowledge base; if no target knowledge base has been specified, then automatic routing is performed within the set of knowledge bases currently accessible to the user in the unified knowledge base view to determine candidate knowledge bases.

[0060] A query request is an operation command initiated by the user to retrieve information from a knowledge base. Automatic routing refers to the process by which the system automatically selects the most relevant candidate knowledge bases from the set of knowledge bases currently accessible to the user, based on the query content, context information, and metadata of each knowledge base (such as business domain, tags, and descriptions), when the user does not specify a target knowledge base.

[0061] S42, obtain the availability status of the candidate knowledge base in the unified knowledge base view, and determine the corresponding query routing strategy based on the availability status.

[0062] The query routing strategy includes: using cloud query for knowledge bases that are only available in the cloud, using local query for knowledge bases that are only available locally, and using hybrid query for knowledge bases that are available in both the local and cloud environments.

[0063] S43, if the query routing strategy is cloud query, then call the cloud query service to perform the retrieval.

[0064] If the query routing strategy is a local query, the local retrieval runtime is invoked to perform a retrieval of the standard knowledge base artifacts that have been registered locally; if the query routing strategy is a mixed query, the local retrieval runtime and the cloud query service are invoked simultaneously to perform the retrieval, and the local retrieval results and the cloud retrieval results are merged and sorted to obtain the final query results.

[0065] This invention achieves intelligent scope definition when no knowledge base is specified through an automatic routing mechanism; ensures accurate execution in local, cloud, and hybrid scenarios through three types of query strategies driven by availability status; and guarantees semantic consistency of hybrid queries through result fusion rules, thereby improving the response efficiency and result completeness of cross-environment retrieval.

[0066] Based on the above embodiments, as a preferred implementation, after obtaining the query result in step S4, the method further includes: S5, the query results are structured and encapsulated; the encapsulated query results include at least the query answer, the matched knowledge base identifier, the evidence source fragment, and the scope information for further inquiry.

[0067] Specifically, the evidence source fragments include precise location identifiers of the matching documents within the knowledge base and extracts of their context. The format dynamically adapts to the knowledge base type: for PageIndex type knowledge bases, page numbers and paragraph indices are marked; for Vect type knowledge bases, vector similarity thresholds and fragment offsets are labeled. The scope of follow-up questions is dynamically generated based on the query routing strategy, clearly distinguishing the boundaries between local and cloud-based sources when using hybrid queries.

[0068] Furthermore, the encapsulated query results are displayed through a dialog interface or returned to the caller via a preset interface protocol. When a user queries through the client, the encapsulated query results are displayed in the dialog interface, with the query answer as the main content presented to the user. Accompanying knowledge base identifiers and evidence source fragments allow the user to clearly distinguish whether the answer comes from local or cloud sources. When the query request comes from an external caller, the encapsulated query results are returned in a structured data format according to the preset interface protocol for further parsing and use by the caller. During the display process, evidence sources from local and cloud knowledge bases are differentiated and labeled, enabling users to clearly identify the source of the answer.

[0069] This embodiment unifies the data format of local and cloud query results by structurally encapsulating the query results; by embedding knowledge base identifiers and evidence source fragments in the encapsulated results, users or callers can clearly trace the source of the answer, enhancing the credibility and interpretability of the search results; by differentiating the local and cloud sources, the confusion of the attribution of answers from different sources is eliminated; and by returning the results through a preset interface protocol, the standardized output of query results in different calling scenarios is achieved.

[0070] In one specific embodiment, Figure 2 This is a schematic diagram illustrating the overall logic of cloud-based knowledge base management and local collaboration provided by the present invention. (Refer to...) Figure 2 The method specifically includes the following steps: After a user or agent initiates an operation request, the system first determines the entry intent based on the user's instructions, distinguishing whether the user is performing a knowledge base building / update operation or a retrieval / question-answering operation.

[0071] If the user chooses to build a knowledge base, the local build process begins. The client first performs a data inventory of the user-specified source directory or files, identifying the data source, format, and scale. Then, parsing and preprocessing are performed, converting unstructured documents such as Office documents and PDFs into a unified intermediate format like Markdown, and filtering process files. Next, based on the user-selected knowledge base type (PageIndex, Graphify, or Vect), the corresponding build backend is invoked to perform partitioning and index building, generating knowledge base artifacts, which are then uniformly stored in the local knowledge base directory. Simultaneously, a metadata.json file is generated, recording the knowledge base's storage path, data source, build backend type, and build mode (build_mode). The metadata.json file is registered to the Aiko client's local storage directory (e.g., ~ / .sdk / knowledge_bases), completing the local registration of the knowledge base. After registration, the client automatically triggers a post-build self-test, using the same retrieval process to verify the built knowledge base, returning TopK evidence fragments to confirm successful knowledge base construction and normal retrieval capability.

[0072] If the user selects search / question-answer, the search process begins. The client first reads the metadata.json file to find all registered knowledge bases. Then, knowledge base routing is executed, calculating candidate knowledge bases based on user questions, business domains, tags, descriptions, and other information. During the distribution judgment phase, the deployment mode of the target knowledge base is determined based on the build_mode field (local / cloud), and the corresponding searcher is selected based on the backend field (pageindex / graphify / vector). If it is determined to be in local mode, the local search runtime is invoked, selecting the corresponding searcher according to the backend type to perform the search and returning the node's main text. If it is determined to be in cloud mode, the cloud HTTP knowledge base service is invoked to perform the search and return isomorphic evidence fragments.

[0073] Finally, a unified structured evidence fragment is output, which includes at least a snippet, a source, a score, metadata, and an answer. This structured output can be used manually through a dialogue interface, or by an agent via HTTP or MCP protocol.

[0074] This embodiment achieves a complete local construction loop for the knowledge base, from data inventory, parsing and preprocessing, index building to registration and self-testing, through a clear separation of the construction and retrieval links. It also achieves a flexible query loop, from routing and distribution to multi-backend retrieval. The construction and retrieval share standardized metadata descriptions and evidence fragment formats, ensuring data consistency and traceability throughout the entire link.

[0075] Figure 3 The structural block diagram of the knowledge base cloud management and local collaborative query system provided by this invention is shown below. Figure 3 The system includes: The local directory scanning module is used to obtain the metadata set of the locally installed knowledge base after the client starts. The cloud directory retrieval module is used to call the cloud control plane interface to retrieve cloud knowledge base directory information that the current user has access to; The view merging module is used to merge the metadata set of the locally installed knowledge base with the directory information of the cloud knowledge base to generate a unified knowledge base view; the unified knowledge base view is used to represent the availability status of each knowledge base locally and in the cloud. The local build module is used to respond to knowledge base build instructions, receive source data, perform index building processing, and generate standard knowledge base artifacts. The knowledge base registration module is used to register the standard knowledge base artifacts to the local knowledge base list; The cloud publishing module is used to respond to cloud publishing commands, verify whether the current user has publishing permissions; if the verification is successful, the standard knowledge base artifact is uploaded to the cloud publishing service, triggering cloud execution package verification, review, storage and version registration, and the corresponding knowledge base is added to the cloud knowledge base directory after successful publishing; The query routing retrieval module is used to respond to a query request for a target knowledge base, determine the corresponding query routing strategy based on the availability status of the target knowledge base in the unified knowledge base view, and perform a retrieval operation according to the query routing strategy to obtain the query results. The results display module is used to encapsulate the query results in a structured manner. After encapsulation, the results are displayed through a dialog interface or output to external parties through a preset interface protocol.

[0076] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the above system and modules can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0077] Figure 4 A structural block diagram of the electronic device provided by the present invention, such as Figure 4As shown, the present invention also provides an electronic device 400, which can be a mobile terminal, desktop computer, laptop, handheld computer, server, or other computing device. The electronic device 400 includes a processor 401 and a memory 402, wherein the memory 402 stores a knowledge base cloud management and local collaborative construction query program 403. In one embodiment, when the knowledge base cloud management and local collaborative construction query program 403 is executed by the processor 401, it performs the following steps: After the client starts, it obtains the metadata set of the locally installed knowledge base and calls the cloud control plane interface to obtain the cloud knowledge base directory information that the current user has access to. The metadata set of the locally installed knowledge base is merged with the directory information of the cloud-based knowledge base to generate a unified knowledge base view; the unified knowledge base view is used to represent the availability status of each knowledge base locally and in the cloud. In response to the knowledge base construction instruction, the system receives source data and performs index construction processing to generate standard knowledge base artifacts, and registers the standard knowledge base artifacts to the local knowledge base list. In response to a query request for a target knowledge base, based on the availability status of the target knowledge base in the unified knowledge base view, a corresponding query routing strategy is determined, and a retrieval operation is performed according to the query routing strategy to obtain the query results.

[0078] This embodiment also provides a computer-readable storage medium storing a knowledge base cloud management and local collaborative construction query program. When the knowledge base cloud management and local collaborative construction query program is executed by a processor, it implements the steps of the knowledge base cloud management and local collaborative construction query method.

[0079] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the appended claims.

[0080] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for cloud-based management and local collaborative construction and querying of a knowledge base, characterized in that, include: After the client starts, it obtains the metadata set of the locally installed knowledge base and calls the cloud control plane interface to obtain the cloud knowledge base directory information that the current user has access to. The metadata set of the locally installed knowledge base is merged with the directory information of the cloud-based knowledge base to generate a unified knowledge base view; the unified knowledge base view is used to represent the availability status of each knowledge base locally and in the cloud. In response to the knowledge base construction instruction, the system receives source data and performs index construction processing to generate standard knowledge base artifacts, and registers the standard knowledge base artifacts to the local knowledge base list. In response to a query request for a target knowledge base, based on the availability status of the target knowledge base in the unified knowledge base view, a corresponding query routing strategy is determined, and a retrieval operation is performed according to the query routing strategy to obtain the query results.

2. The knowledge base cloud management and local collaborative construction query method according to claim 1, characterized in that, The step of obtaining the metadata set of locally installed knowledge bases and calling the cloud control plane interface to obtain the cloud knowledge base directory information that the current user has access to includes: Read the user's login status and access token, scan the manifest files in the local installed knowledge base directory, and obtain the metadata set of the local installed knowledge base; The cloud knowledge base control plane interface is invoked to request cloud knowledge base directory information for which the current user has discover permissions; wherein, the cloud knowledge base directory information includes at least: knowledge base identifier, name, version, source, available query modes, installation strategy, and user permissions.

3. The knowledge base cloud management and local collaborative construction query method according to claim 1, characterized in that, The step of merging the metadata set of the locally installed knowledge base with the directory information of the cloud-based knowledge base to generate a unified knowledge base view includes: Using the knowledge base identifier as the matching primary key, the metadata set of the locally installed knowledge base is aggregated and matched with the directory information of the cloud-based knowledge base; Based on the matching results, the status information of each knowledge base is marked in the unified knowledge base view. The status information includes installed, online only, local unique, and updated in the cloud.

4. The knowledge base cloud management and local collaborative construction query method according to claim 1, characterized in that, The process of responding to a knowledge base construction instruction, receiving source data and performing index construction processing to generate a standard knowledge base artifact, and registering the standard knowledge base artifact to the local knowledge base list specifically includes: When a user chooses to build a knowledge base, the client receives the source directory or source file specified by the user and identifies the data source, format and scale; The source directory or source files are parsed and preprocessed to convert unstructured documents into a unified intermediate format and filter process files. Based on the knowledge base type selected by the user, the corresponding construction backend is invoked to perform segmentation and index construction, generate metadata, and output standard knowledge base artifacts; the standard knowledge base artifacts include at least a manifest file, a description file, and an index file; Register the standard knowledge base artifacts to the local knowledge base list so that they can be directly used for local queries.

5. The knowledge base cloud management and local collaborative construction query method according to claim 1 or 4, characterized in that, After generating the standard knowledge base artifact, the method further includes: In response to a cloud-based publishing command, verify whether the current user has publishing permissions; If the client has publishing permissions, it will upload the standard knowledge base artifact to the cloud publishing service. The cloud platform sequentially performs package verification, review, storage, and version registration on the received standard knowledge base artifacts; After successful publication, the knowledge base corresponding to the standard knowledge base artifact will be added to the cloud knowledge base directory so that other authorized clients can obtain the metadata of the knowledge base through the control plane.

6. The knowledge base cloud management and local collaborative construction query method according to claim 1, characterized in that, In response to a query request for a target knowledge base, based on the availability status of the target knowledge base in the unified knowledge base view, a corresponding query routing strategy is determined, specifically including: The query request is parsed to determine whether a target knowledge base has been specified. If a target knowledge base has been specified, routing is performed within the specified target knowledge base. If no target knowledge base has been specified, automatic routing is performed within the set of knowledge bases accessible to the current user in the unified knowledge base view to determine candidate knowledge bases. Obtain the availability status of the candidate knowledge base in the unified knowledge base view, and determine the corresponding query routing strategy based on the availability status; wherein, the query routing strategy includes: using cloud query for knowledge bases that only have cloud availability status, using local query for knowledge bases that only have local availability status, and using hybrid query for knowledge bases that have both local availability status and cloud availability status.

7. The knowledge base cloud management and local collaborative construction query method according to claim 6, characterized in that, The retrieval operation is performed according to the query routing strategy to obtain the query results, specifically including: If the query routing strategy is cloud query, then the cloud query service is invoked to perform the retrieval; If the query routing strategy is a local query, then the local retrieval runtime is invoked to perform a retrieval of the standard knowledge base artifacts that have been registered locally; If the query routing strategy is a hybrid query, then the local retrieval runtime and the cloud query service are called simultaneously to perform the retrieval, and the local retrieval results and the cloud retrieval results are merged to obtain the final query result.

8. The knowledge base cloud management and local collaborative construction query method according to claim 1, characterized in that, After obtaining the query results, the method further includes: The query results are structured and encapsulated, and the encapsulated query results include at least the query answer, the matched knowledge base identifier, the evidence source fragment, and the scope information for further inquiry; The encapsulated query results can be displayed through a dialog interface or returned to the caller through a preset interface protocol.

9. A knowledge base cloud management and local collaborative construction query system, the system being used to execute the knowledge base cloud management and local collaborative construction query method according to any one of claims 1-8, characterized in that, The system includes: The local directory scanning module is used to obtain the metadata set of the locally installed knowledge base after the client starts. The cloud directory retrieval module is used to call the cloud control plane interface to retrieve cloud knowledge base directory information that the current user has access to; The view merging module is used to merge the metadata set of the locally installed knowledge base with the directory information of the cloud knowledge base to generate a unified knowledge base view; the unified knowledge base view is used to represent the availability status of each knowledge base locally and in the cloud. The local build module is used to respond to knowledge base build instructions, receive source data, perform index building processing, and generate standard knowledge base artifacts. The knowledge base registration module is used to register the standard knowledge base artifacts to the local knowledge base list; The cloud publishing module is used to respond to cloud publishing commands, verify whether the current user has publishing permissions; if the verification is successful, the standard knowledge base artifact is uploaded to the cloud publishing service, triggering cloud execution package verification, review, storage and version registration, and the corresponding knowledge base is added to the cloud knowledge base directory after successful publishing; The query routing retrieval module is used to respond to a query request for a target knowledge base, determine the corresponding query routing strategy based on the availability status of the target knowledge base in the unified knowledge base view, and perform a retrieval operation according to the query routing strategy to obtain the query results. The results display module is used to encapsulate the query results in a structured manner. After encapsulation, the results are displayed through a dialog interface or output to external parties through a preset interface protocol.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the knowledge base cloud management and local collaborative construction query method as described in any one of claims 1 to 8.