Knowledge base service method and system based on fusion of large model and knowledge graph

By configuring a real-time updated differential knowledge base and security attribute metadata, combined with user permissions to filter knowledge units, the problem of insufficient dynamic update and permission control of knowledge graphs is solved, and the technology is applied to the secure and accurate response of large models in enterprise-level knowledge base systems.

CN120744971APending Publication Date: 2025-10-03NANJING ZHIRUIXI ELECTRONIC TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510841825.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-23
Publication Date
2025-10-03

AI Technical Summary

Technical Problem

In an enterprise-level knowledge base system, how to efficiently perceive the dynamic updates of the knowledge graph and combine it with fine-grained permission control to ensure that the large model uses the latest knowledge while ensuring data security when generating responses.

Method used

Configure a differential knowledge base that is updated in real time. Each differential knowledge unit is attached with security attribute metadata. The units stored in the differential knowledge base are filtered based on user permissions, and are combined with background knowledge to generate the final prompt word and sent to the large language model.

Benefits of technology

It achieves dynamic updating of efficient perception knowledge graphs, ensuring that large language models use the latest knowledge when generating responses, while strictly adhering to data access policies to prevent sensitive information leakage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120744971A_ABST
    Figure CN120744971A_ABST
Patent Text Reader

Abstract

The invention discloses a knowledge base service method and system based on fusion of a large model and a knowledge graph, and the system comprises a difference knowledge base setting module, a user authority obtaining module, a difference knowledge screening module, a cue word generation module, and a response sending module. The method comprises the following steps: configuring a real-time updated difference knowledge base and adding security attribute metadata to each difference knowledge unit, screening the difference knowledge units stored in the difference knowledge base in combination with user permission, and combining the screened difference knowledge units with background knowledge and security constraint information to generate prompt words to be sent to a large model; the method solves the problems that dynamic update perception of the knowledge graph is not timely and authority control is insufficient, and has the advantages that dynamic update of the knowledge graph can be perceived efficiently, and in combination with fine-grained authority control, newest knowledge can be utilized and data security is guaranteed when a large language model generates a response.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical fields of knowledge base services, artificial intelligence, knowledge graphs, and data security, and in particular to a knowledge base service method and system based on the integration of a large model and a knowledge graph. Background Art

[0002] In the course of long-term business operations, enterprises will accumulate a large amount of heterogeneous data such as technical documents, design materials, experimental records, patent information, project management documents, market analysis reports, as well as a large amount of internal emails, meeting minutes, etc.

[0003] In building an enterprise knowledge graph, accurately extracting entities, relationships, and attributes from massive amounts of heterogeneous data, maintaining dynamic updates of the graph, and ensuring its synchronization with the company's actual operations have become fundamental challenges. Especially when dealing with the large number of new technical reports, process change orders, and real-time market intelligence added daily, how to cost-effectively and efficiently complete the incremental construction and maintenance of the knowledge graph while ensuring the accuracy and completeness of the knowledge is crucial to the system's success.

[0004] When introducing large language models to understand user natural language queries and generate responses, they faced challenges specific to the company's specialized domains. Manufacturing companies in this area involve complex processes, precise equipment parameters, and industry-specific technical terminology. Without sufficient domain knowledge adaptation, generic large models could generate responses that lacked professional depth and could even exhibit factual biases, failing to meet the stringent information accuracy requirements of R&D and production.

[0005] In practical applications, employees in different departments and roles within an enterprise, such as R&D engineers, production technicians, and market analysts, have varying levels of knowledge needs, requiring the system to provide personalized knowledge services. Furthermore, as the knowledge base accumulates ever-increasing amounts of core enterprise data, such as key process parameters, undisclosed R&D project information, and important customer data, data security and access control become the lifeblood of the system. The nodes and edges of a knowledge graph can carry sensitive information of varying levels of confidentiality, creating the risk of data leakage during the learning and generation of large models.

[0006] In summary, in an enterprise-level knowledge base system, when integrating knowledge graphs and big models for knowledge services, facing the high-frequency, heterogeneous data update needs of the knowledge graph due to the dynamic development of the enterprise business, as well as the adaptation and tuning of the big model to adapt to specific professional fields, the big model needs to be able to perceive these changes in the knowledge graph and accurately integrate them into its subsequent reasoning and question-answering process; and in the entire information acquisition and generation chain, it cannot effectively prevent the big model from accidentally leaking sensitive information outside the user's authority when responding to user queries.

[0007] In view of the above problems, solutions are urgently needed. Summary of the Invention

[0008] The present invention aims to solve the technical problems mentioned in the background technology. The purpose of the present invention is to provide a knowledge base service method and system based on the integration of large models and knowledge graphs, which can efficiently perceive the dynamic updates of knowledge graphs, and combine fine-grained authority control to ensure that the large model can generate responses while utilizing the latest knowledge and ensuring data security.

[0009] In order to achieve the above object, the technical solutions of the present invention are:

[0010] As one aspect of this application, a knowledge base service method based on the integration of a large model and a knowledge graph includes the following steps:

[0011] S1. Configuring a differential knowledge base that is updated in real time based on data changes in the enterprise knowledge graph, wherein each differential knowledge unit in the differential knowledge base is attached with security attribute metadata;

[0012] S2. When responding to a natural language query initiated by a user, confirm the user's query intent and obtain the user's role information within the enterprise and corresponding data access permissions;

[0013] S3. Based on the user's data access rights, role information, and query intent, filter the differential knowledge units that the user has access to from the differential knowledge base;

[0014] S4. Retrieve background knowledge related to the user's query intent from the enterprise knowledge graph, combine the content of the filtered differential knowledge units with the background knowledge to obtain a final prompt word, which contains security metadata based on the differential knowledge units and embedded security constraint information;

[0015] S5. Send the final prompt word to the large language model to generate a response.

[0016] In this application, step S1 specifically includes:

[0017] S11. Configuring a differential knowledge base, wherein the differential knowledge base stores differential knowledge units, and the differential knowledge units are used to represent the changed content after the data in the enterprise knowledge graph is changed;

[0018] S12. When a data change event is detected in the enterprise knowledge graph, the change content corresponding to the current data change event is extracted and a differential knowledge unit of the change content is formed;

[0019] S13. Add security attribute metadata containing knowledge confidentiality level and user access control information to the differential knowledge unit of the changed content to obtain a differential knowledge unit with the added security attribute metadata, and store the differential knowledge unit with the added security attribute metadata into the differential knowledge base to obtain an updated differential knowledge base.

[0020] Furthermore, the step S12 further includes:

[0021] When a data change event is detected in the enterprise knowledge graph, the change content corresponding to the current data change event is extracted and a differential knowledge unit of the change content is formed;

[0022] If it is determined that the differential knowledge unit corresponding to the current data change event is related to the knowledge entity represented by the differential knowledge unit already existing in the differential knowledge base, the effectiveness status attribute corresponding to the associated and old differential knowledge unit is updated according to the preset rules, wherein the effectiveness status is one of revoked, replaced and discarded.

[0023] In the present application, the security attribute metadata includes one or more of knowledge classification level, creation / modification timestamp, knowledge source identifier, knowledge validity period, target user role label, and prohibited access role label.

[0024] In this application, step S2 specifically includes:

[0025] S21. Preset interactive system:

[0026] S22. Authenticate the user through the interactive system before making a natural language query initiated by the user, and obtain the user's role information within the enterprise and corresponding data access rights;

[0027] S23. After obtaining the user's role information and data access rights, confirm the user's query intention based on the natural language query initiated by the user.

[0028] In this application, step S3 specifically includes:

[0029] S31, filtering out differential knowledge units that the user has access to from the differential knowledge base in order according to the user's role information, the user's data access rights, and the user's query intention;

[0030] S32. When it is determined that the user's role information does not match, the current differential knowledge unit is not selected;

[0031] When it is determined that the user's data access rights do not meet the requirements, the current differential knowledge unit is not selected;

[0032] When it is determined that the user's query intention is irrelevant, the current differential knowledge unit is not selected;

[0033] When determining whether the user's role information matches, the user's data access permissions are consistent, and the user's query intention is relevant, the current differential knowledge unit is selected.

[0034] In this application, step S4 specifically includes:

[0035] S41, determining whether there is a preset association rule between the security attribute metadata of the plurality of screened differential knowledge units;

[0036] S42. If a preset association rule exists, generating a comprehensive security level according to the association rule and based on the security attribute metadata of the plurality of differential knowledge units;

[0037] S43. The comprehensive security level is used as security constraint information, and is combined with the content of the screened differential knowledge units, the user's query intention, and the retrieved background knowledge to form a final prompt word.

[0038] Furthermore, the step 42 specifically includes:

[0039] S421, obtaining multiple preset association rules corresponding to security attribute metadata of multiple differential knowledge units;

[0040] S422: When there is a conflict between the multiple preset association rules or the applicable conditions of the multiple preset association rules overlap, a conflict resolution strategy is adopted to determine a unique association rule to be executed from the multiple preset association rules;

[0041] S423: Generate the comprehensive security level based on the uniquely executed association rule and the security attribute metadata of the plurality of differential knowledge units.

[0042] In this application, step S5 specifically includes:

[0043] S51. Send the obtained final prompt word to the large language model deployed in the enterprise;

[0044] S52: Generate response information based on the final prompt word through the large language model, and display and present the response information to the user through the interactive system.

[0045] In one aspect of the present application, a knowledge base service method based on the integration of a large model and a knowledge graph is provided. By configuring a differential knowledge base that is updated in real time and each differential knowledge unit is attached with security attribute metadata, the differential knowledge units stored in the differential knowledge base are screened in combination with user permissions, and the screened differential knowledge units are combined with background knowledge and security constraint information to generate prompt words and send them to the large model. This solves the problems of untimely perception of dynamic updates of the knowledge graph and insufficient permission control, and has the advantages of being able to efficiently perceive the dynamic updates of the knowledge graph, and combined with fine-grained permission control, ensuring that the large language model can utilize the latest knowledge while ensuring data security when generating responses.

[0046] As a second aspect of this application, a knowledge base service system based on the integration of a large model and a knowledge graph includes:

[0047] A differential knowledge base setting module, which is used to configure a differential knowledge base that is updated in real time based on data changes in the enterprise knowledge graph, and each differential knowledge unit in the differential knowledge base is attached with a security attribute metadata;

[0048] A user rights acquisition module, which is used to confirm the user's query intent when responding to a natural language query initiated by the user, and obtain the user's role information within the enterprise and the corresponding data access rights;

[0049] A differential knowledge screening module is used to screen differential knowledge units that a user has access to from a differential knowledge base based on the user's data access rights, role information, and the user's query intent;

[0050] A prompt word generation module is used to retrieve background knowledge related to the user's query intent from the enterprise knowledge graph, combine the content of the screened differential knowledge units with the background knowledge to obtain a final prompt word, and the final prompt word contains security metadata based on the differential knowledge units and embedded security constraint information;

[0051] The response sending module is used to send the obtained final prompt word to the large language model to generate a response.

[0052] In the second aspect of the present application, a knowledge base service system based on the integration of a large model and a knowledge graph is provided, which includes a differential knowledge base setting module, a user authority acquisition module, a differential knowledge screening module and a prompt word generation module. By configuring a real-time updated differential knowledge base and each differential knowledge unit is attached with security attribute metadata, the differential knowledge units stored in the differential knowledge base are screened in combination with user permissions, and the screened differential knowledge units are combined with background knowledge and security constraint information to generate prompt words and send them to the large model, which solves the problems of untimely perception of dynamic updates of the knowledge graph and insufficient authority control. It has the advantages of being able to efficiently perceive the dynamic updates of the knowledge graph, and combined with fine-grained authority control, ensuring that the large language model can utilize the latest knowledge while ensuring data security when generating responses.

[0053] For better understanding and implementation, the present invention is described in detail below with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Figure 1 This is a flowchart of a knowledge base service method based on the integration of a large model and a knowledge graph in this embodiment;

[0055] Figure 2 This is a flow chart indicating step S1 in a knowledge base service method based on the fusion of a large model and a knowledge graph in this embodiment;

[0056] Figure 3 This is a flow chart indicating step S2 in a knowledge base service method based on the fusion of a large model and a knowledge graph in this embodiment;

[0057] Figure 4 This is a flow chart indicating step S3 in a knowledge base service method based on the fusion of a large model and a knowledge graph in this embodiment;

[0058] Figure 5 This is a flow chart indicating step S4 in a knowledge base service method based on the fusion of a large model and a knowledge graph in this embodiment;

[0059] Figure 6 This is a flowchart indicating step S42 in a knowledge base service method based on the fusion of a large model and a knowledge graph in this embodiment;

[0060] Figure 7 This is a flow chart indicating step S5 in a knowledge base service method based on the fusion of a large model and a knowledge graph in this embodiment;

[0061] Figure 8 This is a system structure diagram of a knowledge base service system based on the integration of a large model and a knowledge graph in this embodiment. DETAILED DESCRIPTION

[0062] In order to better illustrate the present invention, the present invention is described in further detail below with reference to the accompanying drawings.

[0063] It should be clear that the embodiments described are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments of the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the embodiments of the present application.

[0064] The terms used in the embodiments of the present application are for the purpose of describing specific embodiments only and are not intended to limit the embodiments of the present application. The singular forms "a," "the," and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0065] When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims. In the description of the present application, it should be understood that the terms "first", "second", "third", etc. are only used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence, nor can they be understood as indicating or implying relative importance. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood according to the specific circumstances.

[0066] In addition, in this application, unless otherwise specified, "plurality" refers to two or more. "And / or" describes the relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can mean: A exists alone, A and B exist simultaneously, or B exists alone. The character " / " generally indicates that the associated objects are in an "or" relationship.

[0067] Based on the understanding of existing technologies, in enterprise-level knowledge base systems, when integrating knowledge graphs and big models for knowledge services, facing the high-frequency, heterogeneous data update needs of the knowledge graph due to the dynamic development of the enterprise business, and the adaptation and tuning of the big model to adapt to specific professional fields, the big model needs to be able to perceive these changes in the knowledge graph and accurately integrate them into its subsequent reasoning and question-answering process; and in the entire information acquisition and generation chain, it cannot effectively prevent the big model from accidentally leaking sensitive information outside the user's authority when responding to user queries.

[0068] Therefore, the technical problem actually solved by this application is how to provide a convenient synchronous update of knowledge and fine-grained permission verification mechanism, so that the large model can accurately perceive and integrate changes in the knowledge graph with low latency, and when responding to the user's query intention, strictly abide by the access control policy to prevent the leakage of sensitive information.

[0069] The following is an illustrative example.

[0070] In this embodiment, if Figure 1 As shown, as one aspect of this embodiment, a knowledge base service method based on the integration of a large model and a knowledge graph includes the following steps:

[0071] S1. Configuring a differential knowledge base that is updated in real time based on data changes in the enterprise knowledge graph, wherein each differential knowledge unit in the differential knowledge base is attached with security attribute metadata;

[0072] S2. When responding to a natural language query initiated by a user, confirm the user's query intent and obtain the user's role information within the enterprise and corresponding data access permissions;

[0073] S3. Based on the user's data access rights, role information, and query intent, filter the differential knowledge units that the user has access to from the differential knowledge base;

[0074] S4. Retrieve background knowledge related to the user's query intent from the enterprise knowledge graph, combine the content of the filtered differential knowledge units with the background knowledge to obtain a final prompt word, which contains security metadata based on the differential knowledge units and embedded security constraint information;

[0075] S5. Send the final prompt word to the large language model to generate a response.

[0076] Among them, the differential knowledge base refers to a knowledge collection specifically used to store changes in enterprise knowledge graph data. It is updated in real time according to data changes in the enterprise knowledge graph. It can be implemented using an independent database, cache system or distributed file system. It is mainly used to quickly capture and reflect dynamic changes in the knowledge graph, and provide a highly timely data source for subsequent knowledge services.

[0077] A differential knowledge unit refers to each independent knowledge change entry stored in the differential knowledge base. It is used to represent the specific content of the changes in the enterprise knowledge graph, such as the description of newly added entities, relationships or attributes. It is mainly used to carry the incremental update information of the knowledge graph.

[0078] Security attribute metadata refers to the information attached to each differential knowledge unit that describes the security attributes of the knowledge unit. It can include knowledge confidentiality, creation / modification timestamp, knowledge source identifier, knowledge validity period, target user role label, and prohibited access role label, etc., validity period and other information. It is mainly used to provide fine-grained security control tags for differential knowledge units.

[0079] The user's query intention refers to the knowledge the user actually wants to obtain or the operation they want to perform after the system analyzes the natural language query input by the user through natural language processing technology. It is mainly used to understand the user's needs.

[0080] The user's role information within the enterprise and the corresponding data access rights refer to the user's identity identification in the enterprise organizational structure and the data scope and operation permissions authorized to access by the identity obtained by the system based on the user's identity authentication results. It is mainly used for user identity identification and permission verification in the knowledge service process.

[0081] Screening out differential knowledge units that users have access to means that it is mainly used to ensure that users can only obtain knowledge within their authority scope to achieve secure access control.

[0082] Background knowledge refers to the existing knowledge related to the user's query intent retrieved from the enterprise knowledge graph. It is mainly used to provide comprehensive contextual information for the large language model and enrich the response content.

[0083] The final prompt word refers to the input text sent to the large language model, which is a combination of the content of the screened differential knowledge units, the retrieved background knowledge, and security constraint information. It is mainly used to guide the large language model to generate responses that meet user needs and security requirements. The security constraint information embedded in the final prompt word refers to the security rules added to the final prompt word in a specific format or instruction form to guide the large language model to comply with when generating a response. It is mainly used to constrain the behavior of the large language model, constrain the response content within the scope specified by the security constraint information, and prevent it from leaking sensitive information.

[0084] By configuring a differential knowledge base that is updated in real time based on changes in the enterprise knowledge graph data, the system can quickly sense incremental changes in the knowledge graph. Since each differential knowledge unit is attached with security attribute metadata, this lays the foundation for subsequent fine-grained permission control. When a user initiates a natural language query, the system first confirms the user's query intent and obtains the user's role information within the enterprise and the corresponding data access rights. Based on these user attributes and query intent, the system filters out differential knowledge units that the user has access to and are relevant to the query from the differential knowledge base. At the same time, the system retrieves background knowledge associated with the user's query intent from the enterprise knowledge graph. Subsequently, the filtered differential knowledge units are combined with the background knowledge, and based on the security attribute metadata of the differential knowledge units and the embedded security constraint information, these contents are jointly constructed into the final prompt word. Finally, the final prompt word is sent to the large language model, which generates a response based on the prompt word. The entire process forms a closed loop, from knowledge update, user query, permission verification, knowledge integration to final answer generation, ensuring the timeliness, relevance and, most importantly, security of the knowledge. The use of a differential update mechanism combined with permission screening based on security metadata and security constraints at the prompt word level enables the large model to utilize the latest knowledge while strictly complying with the company's data access policy.

[0085] In an illustrative example of this embodiment:

[0086] First, configure a message queue to receive data change event notifications from the enterprise knowledge graph. These data change notifications can be obtained through a listening service subscription. When a data change event is received, the change content is parsed and encapsulated into differential knowledge units. Security attribute metadata is automatically / manually attached to each differential knowledge unit, such as marking its knowledge confidentiality as "internal restricted" or "public".

[0087] In some preferred embodiments, a message queue can be configured to receive data change event notifications from the enterprise knowledge graph. A listening service can subscribe to these notifications and, upon receiving a change event, parse the change content and encapsulate it into a differential knowledge unit object. Security attribute metadata can be automatically or manually attached to each differential knowledge unit based on pre-set security policies or the sensitivity of the change content, such as marking its knowledge classification as "internal restricted" or "public." These differential knowledge units with security metadata are then stored in the differential knowledge base. When a user enters a natural language query through a system interface (such as a web interface), the user's role information is first verified through the enterprise's authentication service, and the user management system is queried to obtain the user's role identity (e.g., "R&D engineer," "marketing analyst") and its corresponding data access permissions. A natural language understanding module analyzes the user's natural language query to identify core entities and query intent. A filtering logic module then queries the differential knowledge database based on the user's data access permissions and the identified query intent, returning only relevant differential knowledge unit records that the user has access to. At the same time, a graph query module can be used to execute queries within the enterprise knowledge graph based on the user's query intent, obtaining relevant background knowledge. A prompt word construction module then combines the content of the selected differential knowledge units, the serialized representation of the background knowledge, and the security constraint information generated and embedded based on the differential knowledge unit's security metadata (for example, "Please note that the following information is internally restricted. Do not directly quote or infer sensitive details when generating a response") into a complete text string as the final prompt word. Finally, by calling the API interface of the large language model deployed within the enterprise, the prompt word is sent to the model, the response text generated by the model is received, and it is displayed to the user through a web interface.

[0088] Through the above technical solution, a knowledge base service method based on the integration of a large model and a knowledge graph is provided. By configuring a real-time updated differential knowledge base and each differential knowledge unit is attached with security attribute metadata, the differential knowledge units stored in the differential knowledge base are screened in combination with user permissions, and the screened differential knowledge units are combined with background knowledge and security constraint information to generate prompt words and send them to the large model. This solves the problems of untimely perception of dynamic updates of the knowledge graph and insufficient permission control. It has the advantages of being able to efficiently perceive the dynamic updates of the knowledge graph and, combined with fine-grained permission control, ensure that the large language model can utilize the latest knowledge while ensuring data security when generating responses.

[0089] In this embodiment, if Figure 2 As shown, configuring a differential knowledge base that is updated in real time according to data changes in the enterprise knowledge graph, wherein each differential knowledge unit in the differential knowledge base is attached with a security attribute metadata, includes the following steps:

[0090] S11. Configuring a differential knowledge base, wherein the differential knowledge base stores differential knowledge units, and the differential knowledge units are used to represent the changed content after the data in the enterprise knowledge graph is changed;

[0091] S12. When a data change event is detected in the enterprise knowledge graph, the change content corresponding to the current data change event is extracted and a differential knowledge unit of the change content is formed;

[0092] S13. Add security attribute metadata containing knowledge confidentiality level and user access control information to the differential knowledge unit of the changed content to obtain a differential knowledge unit with the added security attribute metadata, and store the differential knowledge unit with the added security attribute metadata into the differential knowledge base to obtain an updated differential knowledge base.

[0093] Among them, data change events refer to events in which data in the enterprise knowledge graph is added, modified or deleted. They can be triggered by external data source updates, manual editing or automatic system processing. Their purpose is to identify changes in the knowledge graph status.

[0094] Change content refers to the data itself that actually changes in the data change event. Its purpose is to provide detailed information about the specific changes in the knowledge graph.

[0095] Knowledge confidentiality refers to a part of security attribute metadata, which is used to identify the confidentiality level of the knowledge contained in the differential knowledge unit. It can be divided according to the internal security policy of the enterprise. Its purpose is to manage knowledge of different sensitivities in a hierarchical manner.

[0096] User access control information refers to a part of the security attribute metadata, which is used to specify which users or user groups have the authority to access the differential knowledge unit. It can be implemented using access control lists, role-based access control, or attribute-based access control. Its purpose is to achieve fine-grained permission management of differential knowledge units.

[0097] Specifically, first, a differential knowledge base is configured to establish a foundation for storing changes in the knowledge graph. Subsequently, the system continuously detects data change events in the enterprise knowledge graph. Once a change occurs, the specific change content is immediately extracted and converted into structured differential knowledge units. This process ensures that the latest changes in the knowledge graph can be captured in a timely manner. Next, security attribute metadata is attached to the newly formed differential knowledge units. These metadata contain knowledge confidentiality and user access control information, thereby giving each change unit a clear security identification and access rules. Finally, the differential knowledge units with security attribute metadata are stored in the differential knowledge base to complete the update of the knowledge base.

[0098] It is precisely because the differential knowledge base can record changes in the knowledge graph with security attributes in real time that when providing knowledge services based on the fusion of large models and knowledge graphs, these differential knowledge units with security attributes can be used, combined with the user's permission information, to accurately screen out the latest knowledge changes that the user has access to, thereby ensuring the timeliness of knowledge while strictly complying with data access rights to prevent the leakage of sensitive information.

[0099] In an illustrative example, the differential knowledge base can be specifically implemented as a table in a relational database, which contains fields such as: change ID, change type (add / modify / delete), entity ID, relationship ID, attribute name, old value, new value, knowledge confidentiality, list of allowed access roles, list of prohibited access departments, timestamp, etc. Detecting data change events in the enterprise knowledge graph can be done by deploying database triggers. When replacement, update, or deletion operations occur in a specific table in the knowledge graph's underlying database, the trigger automatically captures the change data. The change content corresponding to the current data change event is extracted to form a differential knowledge unit of the change content. The differential knowledge unit of the change content can be structured by the trigger to process the captured change data in a preset format, and security attribute metadata containing knowledge confidentiality and user access control information can be added to the differential knowledge unit of the change content after the trigger captures the change data.

[0100] For example, if the change involves the "core technical parameters" entity, the additional knowledge classification indicates "confidential," the permitted user access control information indicates the access roles are "R&D Engineer" and "Technical Director," and the prohibited access department is "Marketing Department." After the differential knowledge unit with the additional security attribute metadata is stored in the differential knowledge base, the updated differential knowledge base can be obtained by inserting the differential knowledge unit containing the changed content and security attribute metadata into the knowledge table of the differential knowledge base.

[0101] The above technical solution enables automated configuration and real-time updates of the differential knowledge base, ensuring timely capture and recording of knowledge graph changes. Furthermore, fine-grained security attribute metadata, including knowledge classification and user access control information, is attached to each differential knowledge unit, providing a reliable basis for subsequent differential knowledge-based access control and effectively protecting the security of sensitive enterprise knowledge.

[0102] Based on the background, when a data change event is detected in the enterprise knowledge graph, the change content corresponding to the current data change event is extracted and a differential knowledge unit of the change content is formed. The extraction of the change content corresponding to the current data change event and the formation of the differential knowledge unit of the change content can be specifically achieved by analyzing the change log of the knowledge graph or monitoring the change events of the database. This can capture the dynamic changes of the knowledge graph in real time. However, in its implementation process, if the newly generated differential knowledge unit is associated with the knowledge entity represented by the differential knowledge unit that already exists in the differential knowledge base, then the old differential knowledge unit still exists, but its effectiveness may have changed. If the status of these old differential knowledge units is not updated in time, it may cause users to obtain outdated or invalid information when querying, thereby affecting the accuracy and reliability of the knowledge service.

[0103] Therefore, combined with the above description, the following steps are set. When a data change event is detected in the enterprise knowledge graph, the change content corresponding to the current data change event is extracted and the differential knowledge unit of the change content is formed. The following steps are then performed:

[0104] When a data change event is detected in the enterprise knowledge graph, the change content corresponding to the current data change event is extracted and a differential knowledge unit of the change content is formed;

[0105] If it is determined that the differential knowledge unit corresponding to the current data change event is related to the knowledge entity represented by the differential knowledge unit already existing in the differential knowledge base, the effectiveness status attribute corresponding to the associated and old differential knowledge unit is updated according to the preset rules, wherein the effectiveness status is one of revoked, replaced and discarded.

[0106] Among them, judging whether the differential knowledge unit corresponding to the current data change event is related to the knowledge entity represented by the differential knowledge unit already existing in the differential knowledge base means comparing the knowledge entity identifier, entity name or entity type and other information associated with the new / old differential knowledge units to determine whether they point to or describe the same or closely related knowledge entity in the enterprise knowledge graph. Specifically, this can be achieved by querying the old differential knowledge unit with the same entity identifier as the new differential knowledge unit in the differential knowledge base. Its purpose is to identify existing change content that may be affected by this knowledge graph change.

[0107] Updating the effectiveness status attributes corresponding to the associated and old differential knowledge units according to preset rules means modifying the value of the additional effectiveness status attribute of the old differential knowledge units identified as related to the new differential knowledge units according to pre-defined enterprise logic or enterprise policies. Specifically, it can be achieved by executing a preset update logic, which can define how different types of knowledge changes (for example, entity attribute modification, relationship deletion, entity merger, etc.) affect the effectiveness status of the relevant old knowledge (for example, the logical operation involved in the comparison between the new differential knowledge unit and the old differential knowledge unit is to replace the entity, then the effectiveness status attribute is updated to "replaced"). Its purpose is to ensure that the differential knowledge units in the differential knowledge base can accurately reflect their effectiveness in the current knowledge graph state.

[0108] The validity status includes one of revoked, superseded and obsolete, which means that the validity status attribute can be set to the "revoked" status indicating that the knowledge has been explicitly canceled or invalidated, the "superseded" status indicating that the knowledge has been replaced by new information, or the "obsolete" status indicating that the knowledge is no longer maintained or used for some reason. Its purpose is to provide status markings of multiple granularities to adapt to different types of knowledge changes and management needs.

[0109] The solution of the present application, after detecting that data changes have occurred in the enterprise knowledge graph and new differential knowledge units have been formed, actively determines the association between the new differential knowledge units and the old differential knowledge units already in the differential knowledge base, and updates the effectiveness status attributes of the associated old knowledge units according to preset rules. It is precisely because of this association judgment and status update mechanism that the knowledge units in the differential knowledge base can dynamically reflect their effectiveness in the ever-changing knowledge graph.

[0110] In some preferred embodiments, specifically, when the responsible person information for a project (e.g., project number P101) changes in the enterprise knowledge graph, the system detects this data change event. First, the system extracts the content of this change—for example, if the responsible person changes from "Zhang San" to "Li Si"—and creates a new differential knowledge unit based on this change, which records that "the responsible person for Project P101 is now Li Si." Next, the system determines whether this new differential knowledge unit is related to an existing differential knowledge unit in the differential knowledge base. Suppose there is an old differential knowledge unit in the differential knowledge base that records that "the responsible person for Project P101 was previously Zhang San." The system identifies that both differential knowledge units are associated with the knowledge entity "Project P101." Then, based on a pre-set rule, such as the rule that states that "for changes to the same attribute (responsible person) of the same entity, the knowledge unit corresponding to the old value should be marked as superseded," the system updates the effectiveness status attribute of the old differential knowledge unit (recording that "the responsible person for Project P101 was previously Zhang San") to "superseded." In this way, when the user subsequently queries "the person in charge of project P101", the system can filter out the "replaced" old knowledge units according to the effectiveness status when screening relevant knowledge units from the differential knowledge base, and give priority to or only use knowledge units with valid effectiveness status (for example, the newly formed differential knowledge unit that records "the person in charge of project P101 is now Li Si"), thereby providing accurate current information.

[0111] The above technical solution ensures that the validity status of knowledge units in the differential knowledge base remains synchronized with the actual state of the enterprise knowledge graph, avoiding the problem of the validity status of old knowledge units in the differential knowledge base being inconsistent with the actual state due to changes in the knowledge graph. This effectively prevents users from obtaining outdated or invalid information during queries, improving the accuracy and reliability of knowledge services.

[0112] In this embodiment, if Figure 3 As shown, the steps of confirming the user's query intent and obtaining the user's role information and corresponding data access permissions within the enterprise in response to a natural language query initiated by the user include:

[0113] S21. Preset interactive system:

[0114] S22. Authenticate the user through the interactive system before making a natural language query initiated by the user, and obtain the user's role information within the enterprise and corresponding data access rights;

[0115] S23. After obtaining the user's role information and data access rights, confirm the user's query intention based on the natural language query initiated by the user.

[0116] The interactive system refers to the interface or platform for users to interact with the knowledge base service system. It can be implemented using a web application, desktop client, mobile application or API interface. Its purpose is to receive user input and display system output;

[0117] Identity authentication refers to the process of verifying the user's identity, which can be achieved through username / password, single sign-on (SSO), certificate authentication, biometrics, etc. Its purpose is to confirm the legitimacy of the user;

[0118] Role information refers to the role a user plays in the enterprise organizational structure or permission system, such as R&D engineer, production technician, market analyst, administrator, etc. Its purpose is to provide a basis for subsequent permission control;

[0119] Data access permissions refer to the scope of data or the level of operations that users are authorized to access, such as the ability to view, modify, or delete knowledge entries of a specific level of confidentiality or a specific subject. The purpose is to limit users to accessing only the data they are allowed to access. Confirming the user's query intent refers to understanding the true purpose and needs of the user's natural language query and converting it into structured queries or instructions that the system can process, such as identifying the entities, relationships, attributes, or specific types of information that the user wants to query. The purpose is to accurately understand user needs and guide subsequent knowledge retrieval and answer generation.

[0120] In this application, by presetting the interactive system, before processing the natural language query initiated by the user, the user's identity can be authenticated through the interactive system first, and the user's role information within the enterprise and the corresponding data access rights can be obtained. This pre-processing ensures that only verified legitimate users can enter the subsequent query processing process. After successfully obtaining the user's identity, role and authority information, the system confirms the specific query intention based on the natural language query initiated by the user. This processing order puts the verification of user identity and authority before the confirmation of query intention, so that the subsequent knowledge retrieval, screening and answer generation process can always be based on the user's legal authority. By clarifying the user's access rights at an early stage, the processing of unauthorized access data can be effectively avoided, unnecessary computing resource consumption can be reduced, and the risk of sensitive information leakage can be reduced from the source.

[0121] In an exemplary scenario, a user can initiate a natural language query through a web-based knowledge question-and-answer platform. When the user accesses the platform, the system can call upon the enterprise's existing identity authentication service for identity verification. After successful SSO verification, the system can query the enterprise's internal user management system or permission management database based on the user's login account to obtain the user's role, such as "Senior R&D Engineer," and the specific data access permissions granted to this role or user, such as "Access to top secret and confidential technical documents and experimental data." The user enters a natural language query into the web interface, such as "Please provide a top secret technical report on the latest experimental results of Project X." Upon receiving the query, the system, combining the user's role (Senior R&D Engineer) and the permissions granted to access top secret and confidential technical documents, performs natural language processing on the query text, identifying the query intent as requesting a technical report, the entities involved as Project X, the latest experimental results, and the implicit top secret classification requirement. Since the user's permissions allow access to top secret information, the system confirms the query intent as legitimate and prepares for further processing.

[0122] In this embodiment, if Figure 4 As shown, based on the user's data access rights, role information, and query intent, the steps of filtering out differential knowledge units that the user has access to from the differential knowledge base include:

[0123] S31, filtering out differential knowledge units that the user has access to from the differential knowledge base in order according to the user's role information, the user's data access rights, and the user's query intention;

[0124] S32. When it is determined that the user's role information does not match, the current differential knowledge unit is not selected;

[0125] When it is determined that the user's data access rights do not meet the requirements, the current differential knowledge unit is not selected;

[0126] When it is determined that the user's query intention is irrelevant, the current differential knowledge unit is not selected;

[0127] When determining whether the user's role information matches, the user's data access permissions are consistent, and the user's query intention is relevant, the current differential knowledge unit is selected.

[0128] Filtering out differential knowledge units that the user has access to from the differential knowledge base in sequence according to the user's role information, the user's data access rights and the user's query intention means that when processing each differential knowledge unit in the differential knowledge base, according to a predetermined priority order, for example, first checking whether the user's role information matches, then checking whether the user's data access rights meet the requirements, and finally checking whether the user's query intention is relevant, to decide whether to include the differential knowledge unit in the final screening results. The purpose is to set the judgment order so that the differential knowledge units that do not meet the high-priority conditions can be excluded as early as possible, thereby avoiding subsequent low-priority condition judgments on these units and improving the overall efficiency of the screening process.

[0129] When judging whether the user's role information matches, the user's data access permissions comply, and the user's query intent is relevant, selecting the current differential knowledge unit means that only when a differential knowledge unit passes all the judgment conditions related to role information matching, data access permissions comply, and query intent in sequence, will the differential knowledge unit be included in the final screening result set. The purpose is to ensure that the differential knowledge unit finally provided to the user is fully in line with his or her identity, permissions, and query requirements.

[0130] By setting a clear screening order and multiple conditional judgments, accurate and efficient screening of differential knowledge units is achieved. This is achieved by using a sequential judgment method. For example, priority judgment usually restricts role information or data access rights with a wider range. This allows each differential knowledge unit to be processed. Once it is found that it does not meet any of the conditions in the current order, the subsequent judgment of the unit can be stopped immediately and it can be excluded. Only when a differential knowledge unit passes all negative judgments in sequence (i.e., role matching, permission compliance, and intention relevance) will it be "selected" by the final positive judgment. This mechanism effectively avoids redundant judgments of all conditions for differential knowledge units that do not meet the conditions, significantly reducing computational overhead. This method improves screening efficiency by optimizing the judgment process while ensuring screening accuracy. Especially when the differential knowledge base is large, its performance improvement is more obvious.

[0131] In an illustrative example, suppose user Zhang San's role is "R&D Engineer" and he has data access permissions for "Project A" and "Project B." He initiates a natural language query for "latest technical changes to Project A." The system first verifies Zhang San's role information and data access permissions and analyzes his query intent. The system then begins filtering differential knowledge units from the differential knowledge base. For each differential knowledge unit in the differential knowledge base, the system evaluates it sequentially. For example, when encountering a differential knowledge unit regarding "company financial statement updates," the system first determines whether the user's role information (R&D Engineer) matches the required role for the unit (Finance Personnel). Since there is no match, the unit is immediately excluded, and its data access permissions or relevance to the query intent are not further evaluated. Next, when encountering a differential knowledge unit regarding "Project C technical document changes," the system determines that the user's role information (R&D Engineer) matches. It then evaluates the user's data access permissions. Since Zhang San does not have data access permissions for "Project C," this unit is also excluded. Finally, when encountering a differential knowledge unit for "Project A Design Parameter Adjustment," the system determines that the user's role information (R&D Engineer) matches, that the user's data access permissions ("Project A" permissions) are consistent, and that the unit's content (Project A Design Parameter Adjustment) is relevant to the query intent (Latest Technical Changes to Project A). Since all conditions are met, according to the logic of step S32, this differential knowledge unit is selected and included in the final screening results.

[0132] In this embodiment, if Figure 5 As shown, the steps of retrieving background knowledge associated with the user's query intent from the enterprise knowledge graph, combining the content of the filtered differential knowledge units with the background knowledge to obtain a final prompt word, and including security metadata based on the differential knowledge units and embedded security constraint information in the final prompt word include:

[0133] S41, determining whether there is a preset association rule between the security attribute metadata of the plurality of screened differential knowledge units;

[0134] S42. If a preset association rule exists, generating a comprehensive security level according to the association rule and based on the security attribute metadata of the plurality of differential knowledge units;

[0135] S43. The comprehensive security level is used as security constraint information, and is combined with the content of the screened differential knowledge units, the user's query intention, and the retrieved background knowledge to form a final prompt word.

[0136] Among them, the preset association rules refer to a set of rules used to describe the potential dependencies or mutual influences between the security attribute metadata of different differential knowledge units. Its purpose is to capture the security associations between knowledge units in order to conduct an overall security assessment.

[0137] The comprehensive security level refers to the level calculated based on the security attribute metadata of multiple differential knowledge units and the association rules between them, which can reflect the overall security risk of these knowledge units as a whole. It can be generated by using a calculation method based on preset rules, a weighted average algorithm, or taking the highest confidentiality level in the associated knowledge units. Its purpose is to provide a more accurate overall security assessment result than the security attributes of a single knowledge unit.

[0138] To illustrate, suppose a user's query involves "cost control and supplier information for Project Y." The system identifies two differential knowledge units: Unit C (budget details for Project Y, classified as Confidential) and Unit D (supplier contract terms for Project Y, classified as Internal). The system determines whether a pre-set association rule exists between the security attribute metadata for Units C and D. The pre-set rule base contains a rule that states: "When budget details and supplier contract terms for the same project are accessed simultaneously, the overall security level increases by one." Given this association rule, the system generates an overall security level based on this rule and the classification levels of Units C (Confidential) and D (Internal). According to the rule, Secret is upgraded one level to Top Secret, and Internal is upgraded one level to Secret. Taking the highest level, the overall security level is determined as "Top Secret." The system uses "Top Secret" as a security constraint and combines it with the content of Units C and D, the user's query intent ("Summarize the costs and supplier situation for Project Y"), and the retrieved background knowledge to create a final prompt word, which is then sent to the large language model.

[0139] The above technical solution can determine whether there are preset association rules between the security attribute metadata of multiple screened differential knowledge units, and generate a comprehensive security level based on the association rules. This solves the problem that simply performing independent security assessments on each unit cannot accurately reflect the overall security risk. Incorporating the comprehensive security level as security constraint information into the final prompt word allows the large language model to fully consider the overall security risk brought by multiple associated knowledge units when generating a response, improving the security of the large model's response and reducing the risk of sensitive information leakage.

[0140] As a further illustration, Figure 6 As shown, if there is a preset association rule, the step of generating a comprehensive security level according to the association rule and based on the security attribute metadata of the plurality of differential knowledge units includes:

[0141] S421, obtaining multiple preset association rules corresponding to security attribute metadata of multiple differential knowledge units;

[0142] S422: When there is a conflict between the multiple preset association rules or the applicable conditions of the multiple preset association rules overlap, a conflict resolution strategy is adopted to determine a unique association rule to be executed from the multiple preset association rules;

[0143] S423: Generate the comprehensive security level based on the uniquely executed association rule and the security attribute metadata of the plurality of differential knowledge units.

[0144] Among them, based on the above, the preset association rules refer to pre-defined logical judgment or calculation methods used to evaluate the mutual influence or combination effect between the security attribute metadata of differential knowledge units.

[0145] Conflict or overlapping of applicable conditions means that when multiple preset association rules are applied to the security attribute metadata of the same set of differential knowledge units, contradictory evaluation results are generated, and these rules may lead to different subsequent processing or results.

[0146] Conflict resolution strategy refers to a technical method used to resolve conflicts or overlapping applicable conditions between multiple association rules. It can be implemented by sorting based on rule priority, selecting based on rule specificity, allocating weights based on rule source or credibility, voting mechanism, or judgment based on logical reasoning or expert system.

[0147] The only executed association rule refers to a single rule selected from multiple preset association rules through a conflict resolution strategy and ultimately used to generate a comprehensive security level.

[0148] The system obtains multiple preset association rules related to the security attribute metadata of multiple differential knowledge units to be evaluated. These rules may originate from different security policies or assessment models. The system then checks whether there are conflicts or overlapping applicable conditions between these rules. When a conflict or overlap is detected, the system no longer simply applies these rules sequentially or in full, but instead initiates a conflict resolution strategy. Based on preset logic, the conflict resolution strategy selects the most appropriate, unique rule from the conflicting or overlapping rules for execution. Finally, based on this uniquely determined association rule and the specific security attribute metadata of multiple differential knowledge units, the system calculates and generates a clear, non-contradictory comprehensive security level. This comprehensive security level is then used as security constraint information and embedded in the prompt words sent to the large language model, guiding the large model to adhere to the corresponding security restrictions when generating responses and avoid leaking sensitive information.

[0149] For example, suppose there are two differential knowledge units. Unit A is about the latest progress of Project X, and its security attribute metadata includes a confidential level and a validity period of one month; Unit B is about the technical details of Project X, and its security attribute metadata includes a top secret level and a validity period of six months. The preset association rules for the association between the two differential knowledge units include:

[0150] Rule 1: If it contains top secret knowledge units, the overall security level is the highest risk;

[0151] Rule 2: If the document contains confidential knowledge units with a validity period of less than 3 months, the overall security level is high risk;

[0152] Rule 3: If the information contains confidential knowledge units with a validity period of more than 3 months, the overall security level is medium risk;

[0153] Rule 4: If a knowledge unit with a top secret classification and a validity period of more than three months is included, the overall security level is high risk. Unit A meets the conditions of Rule 2.

[0154] Unit B meets the conditions of Rules 1 and 4. Both Rules 1 and 4 apply to Unit B, but with different results, resulting in a conflict. The applicable conditions for Rules 1 and 4 both involve the Top Secret level, and their applicable conditions overlap. A conflict resolution strategy based on level priority is employed, with rules associated with the highest level taking precedence. Both Rules 1 and 4 are Top Secret-related, and Rule 1 has the highest priority. Based on the priority strategy, Rule 1 is determined to be the only association rule to be executed. Based on Rule 1 and Unit B's Top Secret level, the resulting overall security level is the highest risk.

[0155] In this embodiment, if Figure 7 As shown, the steps of sending the obtained final prompt word to the large language model to generate a response include:

[0156] S51. Send the obtained final prompt word to the large language model deployed in the enterprise;

[0157] S52: Generate response information based on the final prompt word through the large language model, and display and present the response information to the user through the interactive system.

[0158] A large language model deployed within an enterprise refers to a large language model instance deployed within the enterprise's internal network environment. Specifically, it can be a model trained or fine-tuned using enterprise-specific domain data. Its purpose is to ensure that sensitive enterprise data does not leave the enterprise's control during model processing, thereby improving data security and privacy protection. It can also better understand and process enterprise-specific professional terminology and knowledge.

[0159] The interactive system refers to the interface or platform through which users interact with the knowledge base service. Specifically, it can be a web application, desktop client, mobile application or internal chatbot interface. Its purpose is to receive users' natural language queries, display the response information generated by the large language model to the user, and may provide further interactive functions to ensure that the response information can be delivered to the user in a clear and easy-to-understand manner.

[0160] By sending the final prompt word, which includes security metadata and security constraints, to a large language model deployed within the enterprise, the model processes the prompt word and generates a response within the secure enterprise environment, thereby maintaining information security isolation and access control at the model reasoning level. Precisely because the final prompt word, which includes security metadata and security constraints, is processed by the large language model within the secure enterprise environment and then presented through a controlled interactive system, the entire knowledge service process, from information acquisition and processing to final presentation, strictly adheres to the enterprise's security policies. This effectively mitigates the security risks and information leakage issues associated with converting prompt words containing security information into user-accessible responses.

[0161] As the second aspect of the embodiment, Figure 8 As shown in the figure, a knowledge base service system based on the integration of large models and knowledge graphs includes:

[0162] A differential knowledge base configuration module 101 is used to configure a differential knowledge base that is updated in real time based on data changes in the enterprise knowledge graph, wherein each differential knowledge unit in the differential knowledge base is attached with a security attribute metadata;

[0163] A user rights acquisition module 102, which is used to confirm the user's query intent when responding to a natural language query initiated by the user, and obtain the user's role information within the enterprise and the corresponding data access rights;

[0164] The differential knowledge screening module 103 is used to screen differential knowledge units that the user has access to from the differential knowledge base based on the user's data access rights, role information, and the user's query intention;

[0165] A prompt word generation module 104 is used to retrieve background knowledge related to the user's query intent from the enterprise knowledge graph, combine the content of the filtered differential knowledge units with the background knowledge, and generate a final prompt word. The final prompt word includes security metadata based on the differential knowledge units and embedded security constraint information;

[0166] The response sending module 105 is used to send the obtained final prompt word to the large language model to generate a response.

[0167] In the second aspect, a knowledge base service system based on the integration of a large model and a knowledge graph is provided, which includes a differential knowledge base setting module 101, a user authority acquisition module 102, a differential knowledge screening module 103, a prompt word generation module 104 and a response sending module 105. By configuring a real-time updated differential knowledge base and each differential knowledge unit is attached with security attribute metadata, the differential knowledge units stored in the differential knowledge base are screened in combination with user permissions, and the screened differential knowledge units are combined with background knowledge and security constraint information to generate prompt words and send them to the large model, which solves the problems of untimely perception of dynamic updates of the knowledge graph and insufficient authority control. It has the advantages of being able to efficiently perceive the dynamic updates of the knowledge graph and, combined with fine-grained authority control, ensure that the large language model can utilize the latest knowledge while ensuring data security when generating responses.

[0168] Based on the disclosure and teachings of the above description, those skilled in the art may also make changes and modifications to the above embodiments. Therefore, the present invention is not limited to the specific embodiments disclosed and described above, and modifications and variations of the present invention should also fall within the scope of protection of the claims of the present invention. In addition, although certain specific terms are used in this description, these terms are only for convenience of description and do not constitute any limitation to the present invention.

Claims

1. A knowledge base service method based on the integration of a large model and a knowledge graph, characterized in that: The steps include: S1. Configuring a differential knowledge base that is updated in real time based on data changes in the enterprise knowledge graph, wherein each differential knowledge unit in the differential knowledge base is attached with security attribute metadata; S2. When responding to a natural language query initiated by a user, confirm the user's query intent and obtain the user's role information within the enterprise and corresponding data access permissions; S3. Based on the user's data access rights, role information, and query intent, filter the differential knowledge units that the user has access to from the differential knowledge base; S4. Retrieve background knowledge related to the user's query intent from the enterprise knowledge graph, combine the content of the filtered differential knowledge units with the background knowledge to obtain a final prompt word, which contains security metadata based on the differential knowledge units and embedded security constraint information; S5. Send the final prompt word to the large language model to generate a response.

2. The knowledge base service method based on the fusion of large models and knowledge graphs according to claim 1 is characterized in that: The step S1 specifically includes: S11. Configuring a differential knowledge base, wherein the differential knowledge base stores differential knowledge units, and the differential knowledge units are used to represent the changed content after the data in the enterprise knowledge graph is changed; S12. When a data change event is detected in the enterprise knowledge graph, the change content corresponding to the current data change event is extracted and a differential knowledge unit of the change content is formed; S13. Add security attribute metadata containing knowledge confidentiality level and user access control information to the differential knowledge unit of the changed content to obtain a differential knowledge unit with the added security attribute metadata, and store the differential knowledge unit with the added security attribute metadata into the differential knowledge base to obtain an updated differential knowledge base.

3. The knowledge base service method based on the fusion of large models and knowledge graphs according to claim 2 is characterized in that: The step S12 further includes: When a data change event is detected in the enterprise knowledge graph, the change content corresponding to the current data change event is extracted and a differential knowledge unit of the change content is formed; If it is determined that the differential knowledge unit corresponding to the current data change event is related to the knowledge entity represented by the differential knowledge unit already existing in the differential knowledge base, the effectiveness status attribute corresponding to the associated and old differential knowledge unit is updated according to the preset rules, wherein the effectiveness status is one of revoked, replaced and discarded.

4. The knowledge base service method based on the fusion of large models and knowledge graphs according to claim 1 is characterized in that: The security attribute metadata includes one or more of knowledge confidentiality level, creation / modification timestamp, knowledge source identifier, knowledge validity period, target user role label, and prohibited access role label.

5. The knowledge base service method based on the fusion of large models and knowledge graphs according to claim 1 is characterized in that: The step S2 specifically includes: S21. Preset interactive system: S22. Authenticate the user through the interactive system before making a natural language query initiated by the user, and obtain the user's role information within the enterprise and corresponding data access rights; S23. After obtaining the user's role information and data access rights, confirm the user's query intention based on the natural language query initiated by the user.

6. The knowledge base service method based on the fusion of large models and knowledge graphs according to claim 1 is characterized in that: The step S3 specifically includes: S31, filtering out differential knowledge units that the user has access to from the differential knowledge base in order according to the user's role information, the user's data access rights, and the user's query intention; S32. When it is determined that the user's role information does not match, the current differential knowledge unit is not selected; When it is determined that the user's data access rights do not meet the requirements, the current differential knowledge unit is not selected; When it is determined that the user's query intention is irrelevant, the current differential knowledge unit is not selected; When determining whether the user's role information matches, the user's data access permissions are consistent, and the user's query intention is relevant, the current differential knowledge unit is selected.

7. The knowledge base service method based on the fusion of large models and knowledge graphs according to claim 1 is characterized in that: The step S4 specifically includes: S41, determining whether there is a preset association rule between the security attribute metadata of the plurality of screened differential knowledge units; S42. If a preset association rule exists, generating a comprehensive security level according to the association rule and based on the security attribute metadata of the plurality of differential knowledge units; S43. The comprehensive security level is used as security constraint information, and is combined with the content of the screened differential knowledge units, the user's query intention, and the retrieved background knowledge to form a final prompt word.

8. The knowledge base service method based on the fusion of large models and knowledge graphs according to claim 7 is characterized in that: The step 42 specifically includes: S421, obtaining multiple preset association rules corresponding to security attribute metadata of multiple differential knowledge units; S422: When there is a conflict between the multiple preset association rules or the applicable conditions of the multiple preset association rules overlap, a conflict resolution strategy is adopted to determine a unique association rule to be executed from the multiple preset association rules; S423: Generate the comprehensive security level based on the uniquely executed association rule and the security attribute metadata of the plurality of differential knowledge units.

9. The knowledge base service method based on the fusion of large models and knowledge graphs according to claim 1 is characterized in that: The step S5 specifically includes: S51. Send the obtained final prompt word to the large language model deployed in the enterprise; S52: Generate response information based on the final prompt word through the large language model, and display and present the response information to the user through the interactive system.

10. A knowledge base service system based on the integration of large models and knowledge graphs, characterized by: include: A differential knowledge base setting module, which is used to configure a differential knowledge base that is updated in real time based on data changes in the enterprise knowledge graph, and each differential knowledge unit in the differential knowledge base is attached with a security attribute metadata; A user rights acquisition module, which is used to confirm the user's query intent when responding to a natural language query initiated by the user, and obtain the user's role information within the enterprise and the corresponding data access rights; A differential knowledge screening module is used to screen differential knowledge units that a user has access to from a differential knowledge base based on the user's data access rights, role information, and the user's query intent; A prompt word generation module is used to retrieve background knowledge related to the user's query intent from the enterprise knowledge graph, combine the content of the screened differential knowledge units with the background knowledge to obtain a final prompt word, and the final prompt word contains security metadata based on the differential knowledge units and embedded security constraint information; The response sending module is used to send the obtained final prompt word to the large language model to generate a response.