Access control method, device and equipment for plug-in knowledge base large model
By using tags in the plug-in knowledge base for permission control, and dynamically adjusting permissions according to user needs and interaction results, the problem of excessive granularity of access control in the existing technology is solved, and customized knowledge base access permissions and efficient data access are achieved. .
Patent Information
- Application Number
- CN202411310257.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-19
- Publication Date
- 2025-01-10
- Estimated Expiration
- 2044-09-19
AI Technical Summary
When the prior art combines the permission control system with the big model question and answer system, it cannot meet the personalized needs of users. The access control granularity is too coarse, and the permission control strategy cannot be dynamically adjusted, and the knowledge base access permissions cannot be customized according to the user's identity and needs.
By setting up tags for permission control in the plug-in knowledge base, querying based on user questions and selected tags, obtaining highly relevant document paragraphs, and dynamically adjusting permission control policies based on user interaction results, providing customized knowledge base access Permissions.
It realizes personalized permission control, improves user experience, can dynamically adjust permissions according to user needs, improves the efficiency and quality of data access, and ensures the security and effectiveness of information.
Smart Images

Figure CN119293812A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of access control technology, and in particular to an access control method, device and equipment for a large plug-in knowledge base model. Background Art
[0002] In the related technologies, there are requirements for confidentiality and compliance of information within the enterprise, especially in the knowledge base management involving large-scale data or files. At present, the common practice is to use a permission control system to manage data access rights for different users. However, for large-model question-answering systems, it is necessary to provide customized knowledge bases for different users to meet their specific needs.
[0003] The existing technology has many shortcomings when combining the permission control system with the large model question and answer system, including but not limited to: insufficient support for user personalized needs, and the inability to customize knowledge base access rights according to user identity, role or needs; the access control granularity is too coarse and cannot meet the internal enterprise's needs for refined management of the knowledge base for different users; and the inability to dynamically adjust the permission control strategy based on the interaction between the user and the system. Summary of the invention
[0004] The present application provides a method, device, equipment and storage medium for access control of a large plug-in knowledge base model to at least solve one problem in the related art. The technical solution of the present application is as follows:
[0005] According to a first aspect of an embodiment of the present application, a method for access control of a large plug-in knowledge base model is provided, wherein each document in the plug-in knowledge base is provided with a label for permission control, and the method comprises:
[0006] Obtain user questions and identify the intent of the user questions;
[0007] When the intention is to query the external knowledge base, based on the user question and the first tag selected by the user, a query is performed in the knowledge base document set corresponding to the first tag in the external knowledge base to obtain a query result corresponding to the first tag; the first tag is a tag selected from at least one permission tag owned by the user; the document types in the external knowledge base include public documents and domain documents, and the knowledge base document corresponding to the first tag belongs to the public document;
[0008] When the query result corresponding to the first tag does not meet the library query feedback condition, obtaining a second tag and / or a first candidate tag, wherein the second tag includes an unselected field tag in at least one permission tag owned by the user, and the first candidate tag includes a recommended tag obtained according to the user's historical questions and corresponding historical query documents;
[0009] Based on the user question, the second tag and / or the first candidate tag, a query is performed in the knowledge base document set corresponding to the second tag and / or the first candidate tag to obtain the query result corresponding to the second tag and / or the first candidate tag; the knowledge base document corresponding to the second tag belongs to the domain document, and the knowledge base document corresponding to the first candidate tag belongs to the historical query document;
[0010] When the query results corresponding to the second tag and / or the first candidate tag meet the library query feedback conditions, the user is prompted to turn on the second tag and / or the first candidate tag, and the document information corresponding to the second tag and / or the first candidate tag is used by the large model to generate answer information to answer the user question.
[0011] In some implementations, the method further includes:
[0012] When the query result corresponding to the second tag and / or the first candidate tag does not meet the library query feedback condition, based on the user question, a query is performed in all domain documents of the plug-in knowledge base to obtain a super-authority query result;
[0013] When the super-authority query result meets the library query feedback condition, the third tag corresponding to the document in the super-authority query result is obtained, and the user is prompted to apply for permission for the document corresponding to the third tag; the third tag includes a field tag for which the user does not have permission.
[0014] In some implementations, based on the user question and the first tag selected by the user, searching in the knowledge base document set corresponding to the first tag in the plug-in knowledge base to obtain the query result corresponding to the first tag includes:
[0015] Matching the user question with a text paragraph in a knowledge base document set corresponding to the first label to obtain a target document paragraph whose relevance is greater than or equal to a first threshold;
[0016] The target document paragraph is used as the query result corresponding to the first tag.
[0017] In some implementations, different levels of administrators are set for the public document and the domain document, and the administrators of different levels can set different issuing permissions; the method further includes:
[0018] In response to a temporary permission application submitted by the user based on an event ticket, a target administrator level corresponding to the temporary permission application is obtained based on the emergency type and urgency level in the event ticket and the job level of the user;
[0019] The temporary permission application is sent to an administrator of the target administrator level.
[0020] In some implementations, the method further includes:
[0021] Grant the project manager the sharing authority to create a rights sharing group. The sharing authority is used by the project manager to invite team members to join the rights sharing group and to set the scope and validity period of the sharing authority.
[0022] In some implementations, the plug-in knowledge base also includes confidential documents, and the confidential documents in the plug-in knowledge base constitute the confidential knowledge base. When the confidential documents are stored in the plug-in knowledge base, a separate table is created and an authorized person field is added; the method also includes:
[0023] Determining whether to enable the confidential knowledge base;
[0024] The querying in the knowledge base document set corresponding to the first tag in the external knowledge base includes:
[0025] Determine to enable the confidential knowledge base, and perform a query in the knowledge base document set corresponding to the first tag and the confidential knowledge base.
[0026] In some implementations, the method further includes:
[0027] When the intention is to query structured query language SQL table data, obtaining first table information to which the user has authority;
[0028] Based on the first table information and the user question, generate a SQL query statement through the large model; and confirm the SQL query statement with the user;
[0029] Based on the SQL query statement, query the data table corresponding to the first table information to obtain the first table information query result;
[0030] When the query result of the first table does not meet the table query feedback condition, query the data table corresponding to the second table information based on the SQL query statement to obtain the query result of the second table information; the second table information is table information that the user has no authority but is not confidential;
[0031] When the second table query result meets the table query feedback condition, the first table name in the second table information query result is fed back to the user to prompt the user to apply for the data table permission corresponding to the first table name. The data table corresponding to the first table name is used by the big model to generate corresponding answer information in combination with the user question to answer the user question.
[0032] In some implementations, querying the data table corresponding to the second table information based on the SQL query statement includes:
[0033] Acquire a second candidate tag, where the second candidate tag includes a recommended tag obtained according to the user's historical questions and a corresponding historical query data table;
[0034] Based on the SQL query statement, a data table corresponding to the second table information and a data table corresponding to the second candidate label are queried.
[0035] According to a second aspect of an embodiment of the present application, there is provided an access control device for a large model of a plug-in knowledge base, wherein documents in the plug-in knowledge base are all provided with tags for permission control, and the device comprises:
[0036] An intention recognition module, used to obtain user questions and recognize the intention of the user questions;
[0037] A library matching module is used for, when the intention is to query the external knowledge base, based on the user question and the first tag selected by the user, to query in the knowledge base document set corresponding to the first tag in the external knowledge base to obtain the query result corresponding to the first tag; the first tag is a tag selected from at least one permission tag owned by the user; the document types in the external knowledge base include public documents and domain documents, and the knowledge base document corresponding to the first tag belongs to the public documents;
[0038] An information recommendation module, configured to obtain a second tag and / or a first candidate tag when the query result corresponding to the first tag does not meet the library query feedback condition, wherein the second tag includes an unselected field tag in at least one permission tag owned by the user, and the first candidate tag includes a recommended tag obtained according to the user's historical questions and corresponding historical query documents;
[0039] The library matching module is further used to query, based on the user question, the second tag and / or the first candidate tag, in the knowledge base document set corresponding to the second tag and / or the first candidate tag, to obtain the query result corresponding to the second tag and / or the first candidate tag; the knowledge base document corresponding to the second tag belongs to the domain document, and the knowledge base document corresponding to the first candidate tag belongs to the historical query document;
[0040] An information feedback module is used to prompt the user to open the second tag and / or the first candidate tag when the query results corresponding to the second tag and / or the first candidate tag meet the library query feedback conditions, and the document information corresponding to the second tag and / or the first candidate tag is used by the large model to generate answer information to answer the user question.
[0041] In some implementations, the library matching module is further configured to:
[0042] When the query result corresponding to the second tag and / or the first candidate tag does not meet the library query feedback condition, based on the user question, a query is performed in all domain documents of the plug-in knowledge base to obtain a super-authority query result;
[0043] When the super-authority query result meets the library query feedback condition, the third tag corresponding to the document in the super-authority query result is obtained, and the user is prompted to apply for permission for the document corresponding to the third tag; the third tag includes a field tag for which the user does not have permission.
[0044] In some implementations, the library matching module performs a query in the knowledge base document set corresponding to the first tag in the plug-in knowledge base based on the user question and the first tag selected by the user, and obtains a query result corresponding to the first tag, specifically for:
[0045] Matching the user question with the text paragraphs in the knowledge base document set corresponding to the first label to obtain a target document paragraph with a relevance greater than a first threshold;
[0046] The target document paragraph is used as the query result corresponding to the first tag.
[0047] In some implementations, different levels of administrators are set for the public documents and the domain documents, and the administrators of different levels can set different issuing permissions; the device also includes a permission management module, which is used to:
[0048] In response to a temporary permission application submitted by a user based on an event ticket, a target administrator level corresponding to the temporary permission application is obtained based on the emergency type and urgency level in the event ticket and the job level of the user;
[0049] The temporary permission application is sent to an administrator of the target administrator level.
[0050] In some implementations, the rights management module is further used to:
[0051] Grant project managers the authority to create permission-sharing groups so that they can invite team members to join the permission-sharing groups and set the scope and validity period of the sharing permissions.
[0052] In some implementations, the document types in the knowledge base also include confidential documents, and the confidential documents in the knowledge base constitute a confidential knowledge base. When the confidential documents are stored in the knowledge base, a separate table is created and an authorized person field is added; the library matching module is also used to:
[0053] Determining whether to enable the confidential knowledge base;
[0054] The library matching module searches the knowledge base document set corresponding to the first tag in the external knowledge base, specifically for:
[0055] Determine to enable the confidential knowledge base, and perform a query in the knowledge base document set corresponding to the first tag and the confidential knowledge base.
[0056] In some implementations, the library matching module is further configured to:
[0057] When the intention is to query structured query language SQL table data, obtaining first table information to which the user has authority;
[0058] Based on the first table information and the user question, generate a SQL query statement through the large model; and confirm the SQL query statement with the user;
[0059] Based on the SQL query statement, query the data table corresponding to the first table information to obtain the first table information query result;
[0060] When the query result of the first table does not meet the table query feedback condition, query the data table corresponding to the second table information based on the SQL query statement to obtain the query result of the second table information; the second table information is table information that the user has no authority but is not confidential;
[0061] When the second table query result meets the table query feedback condition, the first table name in the second table information query result is fed back to the user to prompt the user to apply for the data table permission corresponding to the first table name. The data table corresponding to the first table name is used by the big model to generate corresponding answer information in combination with the user question to answer the user question.
[0062] In some implementations, the library matching module is further configured to:
[0063] Acquire a second candidate tag, where the second candidate tag includes a recommended tag obtained according to the user's historical questions and a corresponding historical query data table;
[0064] Based on the SQL query statement, a data table corresponding to the second table information and a data table corresponding to the second candidate label are queried.
[0065] According to a third aspect of an embodiment of the present application, an electronic device is provided, comprising: a processor, and a memory communicatively connected to the processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to implement the method described in the first aspect.
[0066] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, characterized in that computer-executable instructions are stored in the computer-readable storage medium, and when the computer-executable instructions are executed by a processor, they are used to implement the method described in the first aspect.
[0067] According to a fifth aspect of an embodiment of the present application, a computer program product is provided, characterized in that it includes a computer program, and when the computer program is executed by a processor, the method described in the first aspect is implemented.
[0068] The technical solution provided by the embodiments of the present application brings at least the following beneficial effects:
[0069] The access control method of the plug-in knowledge base large model of the embodiment of the present application limits the scope of knowledge base query documents through tags, realizes personalized permission control, can provide customized knowledge base access rights according to user needs, and improves user experience. According to the interaction results between the user and the large model system, the scope of knowledge base query documents can be changed to obtain query results, dynamically prompt users to increase the search scope, realize dynamic adjustment of permission control strategies, realize intelligent permission control, improve the efficiency and quality of data access, and ensure the security and effectiveness of information. It is also possible to obtain recommended tags based on user query history, so as to quickly obtain required document information.
[0070] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] The drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present application, and together with the specification are used to explain the principles of the present application, and do not constitute an improper limitation on the present application.
[0072] Figure 1 It is a flowchart of an access control method for a large plug-in knowledge base model according to an embodiment of the present application.
[0073] Figure 2 It is a flowchart of an access control method for a large plug-in knowledge base model according to another embodiment of the present application.
[0074] Figure 3 It is a flowchart of an access control method for a large plug-in knowledge base model according to another embodiment of the present application.
[0075] Figure 4 It is a block diagram of an access control device for a large plug-in knowledge base model according to an embodiment of the present application.
[0076] Figure 5 It is a block diagram of an electronic device provided according to an embodiment of the present application. DETAILED DESCRIPTION
[0077] In order to enable ordinary persons in the art to better understand the technical solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.
[0078] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. 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 attached claims.
[0079] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0080] It should also be noted that the acquisition, transmission, storage, use, and processing of data in the technical solution of this application comply with the relevant provisions of national laws and regulations.
[0081] It should also be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0082] Figure 1 is a flowchart of an access control method for a large plug-in knowledge base model according to an exemplary embodiment. Figure 1 As shown, the access control method of the external knowledge base large model is used in the access control of the external knowledge base large model, and may include steps S101-S105.
[0083] In step S101 , a user question is obtained and the intention of the user question is identified.
[0084] It should be noted that the executor of the access control method of the embodiment of the present application is a large model authority control system.
[0085] It should be noted that the big model in the big model question answering system is an external document knowledge base and an external database. Users can query questions on the document knowledge base through the big model, and can also query questions on the database table through the big model.
[0086] As an implementation method, when a user initiates an inquiry, the permission control system identifies the intention of the user's question through the intention recognition module 401, and determines whether the user wants to query the content of the knowledge base or the SQL (Structured Query Language) table data of the database.
[0087] Exemplarily, the intention of the user's question can be identified through natural language processing technology.
[0088] In step S102, when the intention is to query the external knowledge base, based on the user question and the first tag selected by the user, a query is performed in the knowledge base document set corresponding to the first tag in the external knowledge base to obtain the query result corresponding to the first tag; the first tag is a tag selected from at least one permission tag owned by the user; the document types in the external knowledge base include public documents and domain documents, and the knowledge base document corresponding to the first tag belongs to a public document.
[0089] It should be noted that all documents in the plug-in knowledge base are equipped with tags for permission management, and different tags correspond to different knowledge base document ranges.
[0090] It should be noted that a user may have knowledge base document permissions corresponding to multiple tags at the same time. When answering questions, the user can select the knowledge base document range corresponding to one of the tags to query questions. Before starting a new round of dialogue with the large model question-answering system, the user can select one of the multiple tag permissions he has and then issue a query command.
[0091] That is, when a user inquires about knowledge base content, it will be filtered according to the tags selected by the user in advance, and document paragraph matching will only be performed within the document range selected by the user.
[0092] Exemplarily, the implementation of the large model plug-in document knowledge base may include the following contents:
[0093] 1) Preprocessing and splitting: First, preprocess the document data, including removing irrelevant formats, unifying the encoding, etc. Then, split the document into several paragraphs to facilitate subsequent retrieval and processing.
[0094] 2) Storage method: The split documents will be stored in the vector database for subsequent fast retrieval. The vector database converts the document content into vectors in a high-dimensional space, thereby achieving fast retrieval and similarity calculation.
[0095] 3) Retrieval and answering: When a user asks a question, the big model needs to retrieve the most relevant document fragments from the document knowledge base based on the content of the question. This process usually involves understanding and analyzing the content of the question, as well as matching and sorting the document content. The big model answers the question based on the retrieved document information to ensure the accuracy and relevance of the answer.
[0096] In some embodiments, based on a user question, a query is performed within a knowledge base document set corresponding to a first label to obtain a query result corresponding to the first label, comprising: matching the user question with a text paragraph within the knowledge base document set corresponding to the first label to obtain a target document paragraph whose relevance is greater than a first threshold; and using the target document paragraph as the query result corresponding to the first label.
[0097] If a target document paragraph with a relevance greater than a first threshold is matched, the document to which the target document paragraph belongs is used as context to answer the user's question.
[0098] In some embodiments, while querying within the knowledge base document set corresponding to the first tag, multiple documents corresponding to the user's most recent N historical queries are obtained, and the semantic vectors of the overviews of the multiple documents are averaged and input into a document recommendation model to obtain document information of the recommended document, so that the user can obtain the recommended document or apply for permission to recommend a document; the document recommendation model is obtained through regular training based on the user's historical query records.
[0099] It should be noted that the average processing here can be a direct summation for average processing, or a weighted summation for average processing. The vector corresponding to the document is the semantic vector of the document overview, and the semantic vector can be obtained through the BERT model.
[0100] In some implementations, the feature input of the document recommendation model may also include features such as project name and department. When training the model, without crossing projects (it can also be set to not cross projects and departments at the same time, or more conditions remain unchanged). Assuming the last n query records (M>n>2, M is the preset maximum number of query records), the average value of the previous n-1 times (the weighted average with increasing weights can also be set, and the weight of the most recent one is the largest) is used as one of the inputs, and the most recent one is used as the target value to train the model. K (preset) recommendation results can be taken for model prediction.
[0101] Exemplarily, the user query records are acquired in real time to obtain multiple documents corresponding to the user's most recent five queries, and based on the summarized semantic vectors of the multiple documents, the document that the user currently needs to query is predicted and recommended through a document recommendation model.
[0102] As an implementation method, when the user usage and usage frequency of the large model permission control system of the embodiment of the present application reaches a certain number, the machine learning model or neural network model is regularly trained according to the documents queried by the user in real time, and documents that the user may need are dynamically recommended.
[0103] Therefore, the real-time document recommendation function can help improve the work efficiency of employees, without manually searching or asking others for the names of documents that they still need permissions for, discovering potentially useful data and making full use of the company's data assets. It can predict the documents required by users based on their query history and realize dynamic recommendation of document permissions.
[0104] In step S103, when the query result corresponding to the first tag does not meet the library query feedback condition, a second tag and / or a first candidate tag is obtained, the second tag includes an unselected field tag in at least one authority tag owned by the user, and the first candidate tag includes a recommended tag obtained based on the user's historical questions and corresponding historical query documents.
[0105] In this embodiment, the library query feedback condition is to match and obtain a target document paragraph with a relevance greater than a first threshold. Obtaining a target document paragraph with a relevance greater than the first threshold indicates that the current knowledge base document range has documents that can answer user questions; not meeting the library query feedback condition is not matching and obtaining a target document paragraph with a relevance greater than the first threshold, indicating that the document range corresponding to the current label cannot answer the user question.
[0106] When the query result corresponding to the first tag does not meet the library query feedback condition, the second tag that the user has the authority to select can be obtained, that is, the field tag that the user has the authority to select can be obtained.
[0107] When the query result corresponding to the first tag does not meet the library query feedback condition, a first candidate tag can also be obtained, where the first candidate tag is a recommended tag obtained based on the user's historical questions and the corresponding historical query documents.
[0108] In some embodiments, the document types in the knowledge base include confidential documents, public documents, and domain documents. The knowledge base document corresponding to the first label belongs to the public document, and the knowledge base document corresponding to the second label belongs to the domain document. In some embodiments, different levels of administrators are set for both public documents and domain documents, and administrators of different levels can set different issuing permissions.
[0109] Exemplarily, different levels of administrators are set for non-confidential documents and data tables, such as senior, intermediate, and low-level administrators. Administrators of different levels can set different permissions for issuance. For example, senior administrators can set permanent permissions, intermediate administrators can only set permissions for a maximum of N days, and low-level administrators can only set query permissions M times.
[0110] In some embodiments, the access control method also includes: responding to a temporary permission application submitted by a user based on an event ticket, obtaining a target administrator level corresponding to the temporary permission application based on the type and degree of urgency of the emergency situation in the event ticket and the user's job level; and sending the temporary permission application to an administrator of the target administrator level.
[0111] Therefore, in an emergency, based on the emergency type and severity obtained from the incident ticket, as well as the user's position and level, it is automatically calculated and evaluated to what level of administrator the permission application should be assigned.
[0112] In some embodiments, the access control method further includes: granting the project manager the authority to create a permission sharing group so that the project manager can invite team members to join the permission sharing group and set the scope and validity period of the shared permissions.
[0113] As a result, project managers are allowed to create "permission sharing groups", invite team members to join, and set the scope and validity period of shared permissions to achieve collaborative permissions within the project, greatly saving the operations of issuing and revoking permissions when adding or reducing personnel in the project.
[0114] In some embodiments, confidential documents in the knowledge base constitute a confidential knowledge base. When confidential documents are stored in the knowledge base, a separate table is created and an authority field is added; obtaining the first tag selected by the user also includes determining whether to enable the confidential knowledge base; querying the knowledge base document set corresponding to the first tag in the plug-in knowledge base, including: determining to enable the confidential knowledge base, and querying in the knowledge base document set corresponding to the first tag and the confidential knowledge base.
[0115] Whether to start the confidentiality knowledge base can be determined based on the user's selection operation; or it can be determined based on the user's usage scenario, or it can be determined based on the semantic information of the user's question; or it can be determined based on the security of the hardware environment, such as whether there are security risks such as network attacks.
[0116] Example 1: For different document types, the splitting and storage into vector databases are processed as follows:
[0117] 1) Confidential documents: When splitting and storing confidential documents, a separate table will be created for confidential documents, separate from other documents. At the same time, an authority field will be added, and only administrators can add or delete authorized persons.
[0118] 2) Public documents: After splitting, they are stored normally and set to general tag 0.
[0119] 3) Field documents: After being split and stored, field tags are set separately. Each user will also set corresponding field tags for filtering during retrieval. The permissions of field documents will be set separately by field document administrators and managed separately. Considering that field documents are usually documents with a certain degree of professionalism, users who are not in this field usually do not ask for information related to the document. If they are retrieved together during retrieval, it will increase the retrieval time.
[0120] 4) Keyword extraction: After the above document splitting, keywords are extracted from each document paragraph and stored in a separate field to facilitate subsequent retrieval and matching.
[0121] When the user selects the first tag to query the public documents, if no document paragraph with relevance exceeding the first threshold is matched, the domain recommendation process will be entered through the domain tag to which the user has authority. First, the user's question is matched with the keywords of the document paragraph within the scope of the authorized but unselected document. If there is a document paragraph exceeding the first threshold, the target document paragraph is obtained.
[0122] In step 104, based on the user question, the second tag and / or the first candidate tag, a query is performed in the knowledge base document set corresponding to the second tag and / or the first candidate tag to obtain the query results corresponding to the second tag and / or the first candidate tag; the knowledge base document corresponding to the second tag belongs to the domain document, and the knowledge base document corresponding to the first candidate tag belongs to the historical query document.
[0123] That is to say, when the query result corresponding to the first tag does not meet the library query feedback condition, the second tag that the user has the authority to select can be obtained, that is, the field tag that the user has the authority to select can be obtained, so as to match documents within the document range corresponding to the field tag and obtain the query result corresponding to the second tag. When the query result corresponding to the first tag does not meet the library query feedback condition, the first candidate tag can also be obtained. The first candidate tag is a recommended tag obtained based on the user's historical questions and the corresponding historical query documents. According to the first candidate tag, the user can quickly and accurately obtain the required document through the query history.
[0124] In step S105, when the query results corresponding to the second tag and / or the first candidate tag meet the library query feedback conditions, the user is prompted to turn on the second tag and / or the first candidate tag, and the document information corresponding to the second tag and / or the first candidate tag is used by the large model to generate answer information to answer the user's question.
[0125] That is, after the target document paragraph that meets the requirements is obtained through the second tag for document query, it indicates that the document range corresponding to the second tag can answer the user's question, and prompts the user to open the second tag to obtain the target document paragraph, thereby realizing dynamic adjustment of permission control according to the interaction between the user and the system. After the target document paragraph that meets the requirements is obtained through the first candidate tag for document query, it indicates that the document range corresponding to the first candidate tag can answer the user's question, and prompts the user to open the first candidate tag to obtain the target document paragraph, thereby realizing dynamic adjustment of permission control according to the interaction between the user and the system.
[0126] The access control method of the plug-in knowledge base large model of the embodiment of the present application limits the scope of knowledge base query documents through tags, realizes personalized permission control, and can provide customized knowledge base access rights according to user needs, thereby improving user experience. According to the interaction results between the user and the large model system, the scope of knowledge base query documents can be changed to obtain query results, dynamically prompt users to increase the search scope, realize dynamic adjustment of permission control strategies, realize intelligent permission control, improve the efficiency and quality of data access, and ensure the security and effectiveness of information. It is also possible to obtain recommended tags based on user query history, so as to quickly obtain the required document information. And it is possible to predict the documents required by users based on user query history records, and realize dynamic recommendation of document permissions.
[0127] On the basis of the above embodiment, the following describes a further dynamic permission adjustment strategy when the query result corresponding to the second tag does not meet the library query feedback condition, that is, the following steps are also included after step S104.
[0128] Figure 2 is a flow chart of an access control method for a plug-in knowledge base large model according to another exemplary embodiment. Figure 2 As shown, the access control method of the external knowledge base large model may also include steps S106-S107.
[0129] In step S106, when the query results corresponding to the second tag and / or the first candidate tag do not meet the library query feedback condition, based on the user question, a query is performed in all domain documents of the plug-in knowledge base to obtain a super-authority query result.
[0130] In step S107, when the super-authority query result meets the library query feedback condition, the third tag corresponding to the document in the super-authority query result is obtained, and the user is prompted to apply for the permission of the document corresponding to the third tag; the third tag includes the field tag for which the user does not have permission.
[0131] Take Example 1 for illustration. If the domain tag for which the user has permission has not yet matched a document paragraph with a relevance greater than the first threshold, then the paragraph keywords are matched in all domain documents. If a match is found, the user is informed that documents in a certain domain may be able to answer the user's question. The tag corresponding to the domain is the third tag. The third tag is a domain tag for which the user does not have permission. The user is advised to apply for permission for the domain tag, that is, to apply for permission for documents in the relevant domain.
[0132] By implementing this embodiment, the scope of knowledge base query documents can be further changed according to the interaction results between the user and the large model system, query results can be obtained, and users can be dynamically prompted to apply for corresponding data permissions, thereby dynamically adjusting permission control strategies and realizing intelligent permission control.
[0133] The above embodiment is an explanation of the problem query of the large model plug-in document knowledge base. The following is an explanation of the problem query of the large model plug-in database.
[0134] Figure 3 is a flowchart of an access control method for a large plug-in knowledge base model according to another exemplary embodiment. Figure 3 As shown, the access control method of the external knowledge base large model may include steps S201-S206.
[0135] In step S201, when the intention is to query SQL table data, the first table information for which the user has authority is obtained.
[0136] When the intention is to query SQL table data, it is a database table query, and the first table information that the user has permission to obtain needs to be obtained. Exemplarily, the table information may include but is not limited to the table name, field name, Chinese explanation of the table name, and Chinese explanation of the field name.
[0137] In some embodiments, for SQL data tables in the database, for confidentiality and information leakage prevention, users apply for table permissions through a system such as a data table permission system for permission management, and the permission control system of the big model can be connected to the data table permission system to ensure that users can only access the data tables they have permission to access. The information of the authorized data table is directly transferred to the big model as text, and other unauthorized but non-confidential table information can be stored separately somewhere for use by the big model.
[0138] In one implementation, the first table information to which the user has permission is obtained through a data table permission control system.
[0139] In step S202, based on the first table information and the user question, a SQL query statement is generated through the large model; and the SQL query statement is confirmed with the user.
[0140] In some embodiments, the first table information and user questions are input into the big model to generate SQL query statements.
[0141] In one implementation, the method of confirming the SQL query statement with the user includes: asking the user whether to execute or modify the SQL query statement, and if the user modifies the SQL query statement, determining the modified SQL query statement as the SQL query statement to be executed.
[0142] Exemplarily, the implementation of the large model plug-in database may include the following contents:
[0143] 1) Construct SQL query statement: The large model needs to construct a database query SQL statement based on the content of the user's question. This process usually involves understanding and converting the user's question, as well as matching the database structure and query conditions.
[0144] 2) Execute query: The big model needs to establish a connection with the database and execute the query statement. The query results will be returned to the big model for further processing and display.
[0145] 3) Result processing and presentation: After receiving the query results, the big model will further process them and present them to the user in a user-friendly manner, which may include sorting, filtering, and formatting of the results.
[0146] In step S203, a query is performed on the data table corresponding to the first table information based on the SQL query statement to obtain a query result of the first table information.
[0147] That is, for the data table corresponding to the first table information to which the user has authority, the confirmed SQL query statement is executed to obtain the query result.
[0148] In step S204, when the first table query result does not meet the table query feedback condition, the data table corresponding to the second table information is queried based on the SQL query statement to obtain the second table information query result; the second table information is table information that the user has no authority but is not confidential.
[0149] In some embodiments, the table query feedback condition may be that the query result is not empty. Failure to meet the table query feedback condition means that no data is matched after executing the SQL query statement. When the first table query result is empty, the data table corresponding to the second table information is queried based on the SQL query statement.
[0150] Thus, when a query on a table to which the user has permission does not obtain a matching answer to the user's question, the query continues on a table to which the user has no permission but which is not confidential.
[0151] In some embodiments, the database table corresponding to the second table information is stored separately for the large model to call.
[0152] In step S205, when the second table query result meets the table query feedback condition, the first table name in the second table information query result is fed back to the user so that the user can apply for the data table permission corresponding to the first table name. The data table corresponding to the first table name is used by the large model to generate corresponding answer information in combination with the user question to answer the user question.
[0153] That is to say, the query continues for the table to which the user has no permission but which is not confidential. After obtaining the query results that meet the table query feedback conditions, the table name of the matching result is obtained, and the user is prompted to apply for permission for the table, so as to dynamically adjust the permission control strategy according to the interaction between the user and the large model system.
[0154] It can be understood that if the query based on the information in the first table does not match any data, the big model can match the user question and the table information according to the relevance within the scope allowed by the data table permission system, and feedback the table names with a matching degree greater than a certain threshold to the user, suggesting that the user apply for permission to view these tables.
[0155] In some embodiments, querying the data table corresponding to the second table information based on the SQL query statement includes: obtaining a second candidate tag, the second candidate tag includes a recommended tag obtained based on the user's historical questions and the corresponding historical query data table; querying the data table corresponding to the second table information and the data table corresponding to the second candidate tag based on the SQL query statement. In some embodiments, while querying the data table corresponding to the first table information based on the SQL query statement, multiple data table information corresponding to the user's most recent N historical queries is obtained, and the semantic vectors of the table descriptions of the multiple data tables are averaged and input into the table recommendation model to obtain the table information of the recommended table, so that the user can obtain the recommended table or apply for the permission to recommend the table; the table recommendation model is obtained by regular training based on the user's historical query records.
[0156] It should be noted that the table description of the data table can be directly obtained through the large model or other models, or can be obtained by splicing the table name, field name, and field content.
[0157] Optionally, the input features of the table permission recommendation model may include, but are not limited to: topN historical query access records of users, job roles, departments, and project names.
[0158] This helps improve employee work efficiency, eliminates the need to manually search or ask others for the names of data tables that require permissions, and helps employees discover potentially useful data and make full use of the company's data assets.
[0159] By implementing this embodiment, the query scope of the database table is limited by table information, and personalized permission control is realized. It is possible to provide customized knowledge base access rights according to user needs, thereby improving user experience. The query scope of the database table can be changed according to the interaction results between the user and the large model system, and the query results can be obtained. The user can be dynamically prompted to apply for the corresponding data permissions, and the permission control strategy can be dynamically adjusted to realize intelligent permission control, thereby improving the efficiency and quality of data access, so as to ensure the security and effectiveness of information. It is also possible to predict the table required by the user based on the user's query history records, and realize dynamic recommendation of table permissions.
[0160] As an implementation of the methods shown in the above figures, the present application embodiment also provides an access control device for a large model of a plug-in knowledge base, Figure 4 1 is a block diagram of an access control device for a large plug-in knowledge base model according to an exemplary embodiment. Figure 4 , the device may include: an intention recognition module 401, a library matching module 402, an information recommendation module 403 and an information feedback module 404;
[0161] The intention recognition module 401 is used to obtain the user's question and recognize the intention of the user's question;
[0162] The library matching module 402 is used to query the external knowledge base based on the user question and the first tag selected by the user, and to obtain the query result corresponding to the first tag in the knowledge base document set corresponding to the first tag in the external knowledge base when the intention is to query the external knowledge base; the first tag is a tag selected from at least one permission tag owned by the user; the document types in the external knowledge base include public documents and domain documents, and the knowledge base document corresponding to the first tag belongs to the public document;
[0163] The information recommendation module 403 is used to obtain a second tag and / or a first candidate tag when the query result corresponding to the first tag does not meet the library query feedback condition, the second tag includes a field tag that is not selected in at least one permission tag owned by the user, and the first candidate tag includes a recommended tag obtained according to the user's historical questions and corresponding historical query documents;
[0164] The library matching module 402 is further used to query the knowledge base document set corresponding to the second label and / or the first candidate label based on the user question, the second label and / or the first candidate label, and obtain the query result corresponding to the second label and / or the first candidate label; the knowledge base document corresponding to the second label belongs to the domain document, and the knowledge base document corresponding to the first candidate label belongs to the historical query document;
[0165] The information feedback module 404 is used to prompt the user to open the second tag and / or the first candidate tag when the query result corresponding to the second tag and / or the first candidate tag meets the library query feedback condition, and the document information corresponding to the second tag and / or the first candidate tag is used by the large model to generate answer information to answer the user's question. In some implementations, the library matching module 402 is also used to:
[0166] When the query results corresponding to the second tag and / or the first candidate tag do not meet the library query feedback condition, based on the user's question, a query is performed in all domain documents of the external knowledge base to obtain a super-authority query result;
[0167] When the super-authority query result meets the library query feedback condition, the third tag corresponding to the document in the super-authority query result is obtained, and the user is prompted to apply for the permission of the document corresponding to the third tag; the third tag includes the field tag for which the user does not have permission.
[0168] In some implementations, the library matching module 402 performs a query in a knowledge base document set corresponding to the first label in the external knowledge base based on the user question and the first label selected by the user, and obtains a query result corresponding to the first label, specifically for:
[0169] Matching the user question with the text paragraphs in the knowledge base document set corresponding to the first label to obtain the target document paragraph whose relevance is greater than the first threshold;
[0170] The target document paragraph is used as the query result corresponding to the first label.
[0171] In some implementations, different levels of administrators are set for the public documents and the domain documents, and the administrators of different levels can set different issuing permissions; the device also includes a permission management module 405, which is used to:
[0172] In response to a temporary permission application submitted by a user based on an event ticket, a target administrator level corresponding to the temporary permission application is obtained based on the emergency type and urgency level in the event ticket and the job level of the user;
[0173] The temporary permission application is sent to an administrator of the target administrator level.
[0174] In some implementations, the rights management module 405 is further configured to:
[0175] Grant project managers the authority to create permission-sharing groups so that they can invite team members to join the permission-sharing groups and set the scope and validity period of the sharing permissions.
[0176] In some implementations, the document types in the knowledge base also include confidential documents. The confidential documents in the knowledge base constitute a confidential knowledge base. When the confidential documents are stored in the knowledge base, a separate table is created and an authorized person field is added. The library matching module 402 is also used to:
[0177] Determine whether to enable the confidentiality knowledge base;
[0178] When searching in the knowledge base document set corresponding to the first tag in the external knowledge base, the library matching module 402 is specifically used to:
[0179] Determine to enable the confidential knowledge base, and perform a search in the knowledge base document set corresponding to the first tag and the confidential knowledge base.
[0180] In some implementations, the library matching module 402 is further configured to:
[0181] When the intention is to query the structured query language SQL table data, obtain the first table information that the user has permission to;
[0182] Based on the information in the first table and the user's question, generate an SQL query statement through the large model; and confirm the SQL query statement with the user;
[0183] Query the data table corresponding to the first table information based on the SQL query statement to obtain the query result of the first table information;
[0184] When the query result of the first table does not meet the table query feedback condition, the data table corresponding to the second table information is queried based on the SQL query statement to obtain the query result of the second table information; the second table information is table information that the user has no authority but is not confidential;
[0185] When the second table query result meets the table query feedback condition, the first table name in the second table information query result is fed back to the user to prompt the user to apply for the data table permission corresponding to the first table name. The data table corresponding to the first table name is used by the large model to generate corresponding answer information in combination with the user's question to answer the user's question.
[0186] In some implementations, the library matching module 402 is further configured to:
[0187] Obtaining a second candidate tag, where the second candidate tag includes a recommended tag obtained according to the user's historical questions and a corresponding historical query data table;
[0188] Based on the SQL query statement, the data table corresponding to the second table information and the data table corresponding to the second candidate tag are queried. Regarding the device in the above embodiment, the specific way in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0189] The access control device of the plug-in knowledge base large model of the embodiment of the present application limits the scope of knowledge base query documents through tags to achieve personalized permission control, and can provide customized knowledge base access rights according to user needs, thereby improving user experience. According to the results of the interaction between the user and the large model system, the scope of knowledge base query documents can be changed to obtain query results, and the user can be dynamically prompted to increase the search scope or apply for corresponding data permissions, thereby dynamically adjusting the permission control strategy. The query scope of the database table is limited by table information to achieve personalized permission control, and customized knowledge base access rights can be provided according to user needs, thereby improving user experience. According to the results of the interaction between the user and the large model system, the scope of the database table query can be changed to obtain query results, and the user can be dynamically prompted to apply for corresponding data permissions, thereby dynamically adjusting the permission control strategy. Intelligent permission control is achieved, and the efficiency and quality of data access are improved to ensure the security and effectiveness of information.
[0190] According to an embodiment of the present application, the present application also provides an electronic device and a readable storage medium.
[0191] like Figure 5 , is a block diagram of an electronic device for implementing a method for access control of a large model of a plug-in knowledge base according to an embodiment of the present application. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or required herein.
[0192] like Figure 5 As shown, the electronic device includes: one or more processors 501, a memory 502, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are interconnected using different buses and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the electronic device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In other embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple electronic devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 5 A processor 501 is taken as an example.
[0193] The memory 502 is a non-transitory computer-readable storage medium provided in the present application. The memory stores instructions executable by at least one processor to enable at least one processor to perform the method for access control of the external knowledge base large model provided in the present application. The non-transitory computer-readable storage medium of the present application stores computer instructions, which are used to enable a computer to perform the method for access control of the external knowledge base large model provided in the present application.
[0194] The memory 502 is a non-transient computer-readable storage medium that can be used to store non-transient software programs, non-transient computer executable programs and modules, such as the program instructions / modules corresponding to the method for access control of the plug-in knowledge base large model in the embodiment of the present application (for example, the attached Figure 4 The processor 501 executes various functional applications and data processing of the server by running the non-transient software programs, instructions and modules stored in the memory 502, that is, the method for access control of the external knowledge base large model in the above method embodiment is implemented.
[0195] The memory 502 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created by the use of an electronic device controlled by access to a large model of an external knowledge base, etc. In addition, the memory 502 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory 502 may optionally include a memory remotely arranged relative to the processor 501, and these remote memories may be connected to the electronic device controlled by access to a large model of an external knowledge base via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0196] The electronic device of the method for controlling access to the external knowledge base large model may also include: an input device 503 and an output device 504. The processor 501, the memory 502, the input device 503 and the output device 504 may be connected via a bus or other means. Figure 5 The example of connecting through bus is taken in the following.
[0197] The input device 503 can receive input digital or character information, and generate key signal input related to user settings and function control of the electronic device for access control of the plug-in knowledge base large model, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator rod, one or more mouse buttons, a trackball, a joystick and other input devices. The output device 504 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The display device may include, but is not limited to, a liquid crystal display (LCD), a light emitting diode (LED) display and a plasma display. In some embodiments, the display device may be a touch screen.
[0198] Various implementations of the systems and techniques described herein can be realized in digital electronic circuit systems, integrated circuit systems, dedicated ASICs (application specific integrated circuits), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0199] These computer programs (also referred to as programs, software, software applications, or code) include machine instructions for programmable processors and can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, device, and / or means (e.g., disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.
[0200] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0201] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), the Internet, and a blockchain network.
[0202] A computer system may include clients and servers. Clients and servers are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship to each other.
[0203] In an exemplary embodiment, a computer program product is also provided. When instructions in the computer program product are executed by a processor of an electronic device, the electronic device is enabled to perform the above method.
[0204] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this application can be executed in parallel, sequentially or in different orders, as long as the expected results of the technical solution disclosed in this application can be achieved, and this document is not limited here.
[0205] The above specific implementations do not constitute a limitation on the protection scope of this application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of this application should be included in the protection scope of this application.
Claims
1. A method for controlling access to a large model of a plug-in knowledge base, characterized in that: The documents in the plug-in knowledge base are all provided with tags for permission management and control, and the method includes: Obtain user questions and identify the intent of the user questions; When the intention is to query the external knowledge base, based on the user question and the first tag selected by the user, a query is performed in the knowledge base document set corresponding to the first tag in the external knowledge base to obtain a query result corresponding to the first tag; the first tag is a tag selected from at least one permission tag owned by the user; the document types in the external knowledge base include public documents and domain documents, and the knowledge base document corresponding to the first tag belongs to the public document; When the query result corresponding to the first tag does not meet the library query feedback condition, obtaining a second tag and / or a first candidate tag, wherein the second tag includes an unselected field tag in at least one permission tag owned by the user, and the first candidate tag includes a recommended tag obtained according to the user's historical questions and corresponding historical query documents; Based on the user question, the second tag and / or the first candidate tag, a query is performed in the knowledge base document set corresponding to the second tag and / or the first candidate tag to obtain the query result corresponding to the second tag and / or the first candidate tag; the knowledge base document corresponding to the second tag belongs to the domain document, and the knowledge base document corresponding to the first candidate tag belongs to the historical query document; When the query results corresponding to the second tag and / or the first candidate tag meet the library query feedback conditions, the user is prompted to turn on the second tag and / or the first candidate tag, and the document information corresponding to the second tag and / or the first candidate tag is used by the large model to generate answer information to answer the user question.
2. The method according to claim 1, characterized in that The method further comprises: When the query result corresponding to the second tag and / or the first candidate tag does not meet the library query feedback condition, based on the user question, a query is performed in all domain documents of the plug-in knowledge base to obtain a super-authority query result; When the super-authority query result meets the library query feedback condition, the third tag corresponding to the document in the super-authority query result is obtained, and the user is prompted to apply for permission for the document corresponding to the third tag; the third tag includes a field tag for which the user does not have permission.
3. The method according to claim 1, characterized in that Based on the user question and the first tag selected by the user, searching in the knowledge base document set corresponding to the first tag in the plug-in knowledge base to obtain the query result corresponding to the first tag includes: Matching the user question with a text paragraph in a knowledge base document set corresponding to the first label to obtain a target document paragraph whose relevance is greater than or equal to a first threshold; The target document paragraph is used as the query result corresponding to the first tag.
4. The method according to claim 1, characterized in that: For the public document and the domain document, administrators of different levels are set, and the administrators of different levels can set different issuing permissions; the method further includes: In response to a temporary permission application submitted by the user based on an event ticket, a target administrator level corresponding to the temporary permission application is obtained based on the emergency type and urgency level in the event ticket and the job level of the user; The temporary permission application is sent to an administrator of the target administrator level.
5. The method according to claim 1, characterized in that The method further comprises: Grant the project manager the sharing authority to create a rights sharing group. The sharing authority is used by the project manager to invite team members to join the rights sharing group and to set the scope and validity period of the sharing authority.
6. The method according to claim 1, characterized in that The external knowledge base also includes confidential documents. The confidential documents in the external knowledge base constitute the confidential knowledge base. When the confidential documents are stored in the external knowledge base, a separate table is created and an authorized person field is added; The method further comprises: Determining whether to enable the confidential knowledge base; The querying in the knowledge base document set corresponding to the first tag in the external knowledge base includes: Determine to enable the confidential knowledge base, and perform a query in the knowledge base document set corresponding to the first tag and the confidential knowledge base.
7. The method according to claim 1, characterized in that The method further comprises: When the intention is to query structured query language SQL table data, obtaining first table information to which the user has authority; Based on the first table information and the user question, generate a SQL query statement through the large model; and confirm the SQL query statement with the user; Based on the SQL query statement, query the data table corresponding to the first table information to obtain the first table information query result; When the query result of the first table does not meet the table query feedback condition, query the data table corresponding to the second table information based on the SQL query statement to obtain the query result of the second table information; the second table information is table information that the user has no authority but is not confidential; When the second table query result meets the table query feedback condition, the first table name in the second table information query result is fed back to the user to prompt the user to apply for the data table permission corresponding to the first table name. The data table corresponding to the first table name is used by the big model to generate corresponding answer information in combination with the user question to answer the user question.
8. The method according to claim 7, characterized in that The querying the data table corresponding to the second table information based on the SQL query statement includes: Acquire a second candidate tag, where the second candidate tag includes a recommended tag obtained according to the user's historical questions and a corresponding historical query data table; Based on the SQL query statement, a data table corresponding to the second table information and a data table corresponding to the second candidate label are queried.
9. An access control device for a large model of an external knowledge base, characterized in that: The documents in the plug-in knowledge base are all provided with tags for permission control, and the device includes: An intention recognition module, used to obtain user questions and recognize the intention of the user questions; A library matching module is used for, when the intention is to query the external knowledge base, based on the user question and the first tag selected by the user, to query in the knowledge base document set corresponding to the first tag in the external knowledge base to obtain the query result corresponding to the first tag; the first tag is a tag selected from at least one permission tag owned by the user; the document types in the external knowledge base include public documents and domain documents, and the knowledge base document corresponding to the first tag belongs to the public documents; An information recommendation module, configured to obtain a second tag and / or a first candidate tag when the query result corresponding to the first tag does not meet the library query feedback condition, wherein the second tag includes an unselected field tag in at least one permission tag owned by the user, and the first candidate tag includes a recommended tag obtained according to the user's historical questions and corresponding historical query documents; The library matching module is further used to query, based on the user question, the second tag and / or the first candidate tag, in the knowledge base document set corresponding to the second tag and / or the first candidate tag, to obtain the query result corresponding to the second tag and / or the first candidate tag; the knowledge base document corresponding to the second tag belongs to the domain document, and the knowledge base document corresponding to the first candidate tag belongs to the historical query document; An information feedback module is used to prompt the user to open the second tag and / or the first candidate tag when the query results corresponding to the second tag and / or the first candidate tag meet the library query feedback conditions, and the document information corresponding to the second tag and / or the first candidate tag is used by the large model to generate answer information to answer the user question.
10. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 8 when executed by a processor.
12. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 8 when being executed by a processor.
Citation Information
Patent Citations
Customer service knowledge base query method and device
CN111552818A
Resource access method and device based on user permission, equipment and storage medium
CN115102770A
Document recommendation method and system, terminal and storage medium
CN115630170A
Multi-structured confidential information operation and maintenance supervision system and method
CN115860658A
Intelligent question and answer method and system for industry
CN117520524A
Cited By
Data management method and system for agricultural planning
CN120234466A
Large language model reasoning method, device and equipment and readable storage medium
CN120893580A
Question agent and method for hazardous waste data management
CN121480699A