A hierarchical knowledge retrieval access control method and system with dual-track permission isolation of knowledge base and source file
By setting the access permissions of the knowledge base and source files to an independent dual-track system in the knowledge retrieval system and establishing a dual-track permission mapping matrix, orthogonal isolation and separate control of knowledge fragment and source file permissions are achieved, solving the problem of chaotic permission decision logic in existing technologies and improving the security of hierarchical knowledge retrieval.
Patent Information
- Application Number
- CN202611312492.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-27
- Publication Date
- 2026-11-27
AI Technical Summary
In existing knowledge retrieval systems, the access permissions for knowledge bases and source files adopt a single permission level, which results in the access permissions of knowledge fragments and source files being coupled together, making it impossible to achieve independent hierarchical control. This leads to chaotic permission decision-making logic, and sensitive information may be obtained by unauthorized users through cross-domain references of knowledge fragments.
Access permissions for the knowledge base and source files are set to a dual-track system that is independent of each other. By establishing a dual-track permission mapping matrix between knowledge fragments and source files, and performing step-by-step verification in two independent permission domains, it is ensured that users can only access the content they are authorized to view. Furthermore, the source tracing and step-by-step verification mechanism prevents the unauthorized access of sensitive information across domains.
It achieves orthogonal isolation and separate control of knowledge fragment and source file permissions, avoids decision conflicts, ensures data security, prevents unauthorized access to sensitive information, and significantly improves the security of hierarchical knowledge retrieval.
Smart Images

Figure CN123179372A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data security access control technology, and in particular to a hierarchical knowledge retrieval access control method and system with dual-track permission isolation between the knowledge base and source files. Background Technology
[0002] Currently, in existing knowledge retrieval systems, knowledge bases are typically formed by extracting, slicing, and structuring content from source files. Users obtain knowledge fragments through the knowledge base and can further access the corresponding source files according to their permissions. However, in existing knowledge retrieval access control methods, the knowledge base and source files are usually included in a unified permission domain, and a single permission level is used to authorize users. This results in the access permissions of knowledge fragments and source files being coupled together, making it impossible to achieve independent hierarchical control. Since knowledge fragments may originate from source files with different security levels, a single permission model cannot simultaneously satisfy the dual access constraints on knowledge content and original files, which can easily lead to confusion in permission decision logic. Some systems have attempted to set up separate access control lists on the knowledge base side, but they have ignored the source association between knowledge fragments and source files and cannot perform orthogonal and independent hierarchical permission verification on the knowledge base domain and the source file domain. As a result, sensitive information may be obtained by unauthorized users through cross-domain references of knowledge fragments. Therefore, in order to overcome the above-mentioned defects, the present invention provides a hierarchical knowledge retrieval access control method and system with dual-track permission isolation between the knowledge base and the source file. Summary of the Invention
[0003] This invention provides a hierarchical knowledge retrieval access control method and system with dual-track permission isolation between the knowledge base and source files. By setting the access permissions of the knowledge base and source files to an independent dual-track system, orthogonal isolation and separate control of permissions are achieved. When a user searches, the knowledge fragment carrying the complete source path is first identified, and the corresponding source file is located in reverse. Then, a dual-track permission mapping matrix between the knowledge fragment and the source file is established. Based on the dual-track permission mapping matrix, the user's permissions are checked step-by-step in two independent permission domains. Finally, only the content that the user is authorized to view is returned. This effectively decouples the permission binding relationship between the knowledge fragment content and the source file, avoids decision conflicts caused by a single permission model, ensures data security, and guarantees that only data content within the corresponding permission scope can be accessed. Simultaneously, through source tracing and step-by-step verification mechanisms, sensitive information is prevented from being obtained without authorization due to cross-domain references, significantly improving the security of hierarchical knowledge retrieval.
[0004] This invention provides a hierarchical knowledge retrieval access control method with dual-track permission isolation between the knowledge base and source files, including: Step 1: Collect user search results and determine user access permissions; Step 2: Input the search content into the knowledge base for matching, output the knowledge fragment with source traceability chain, and locate the corresponding target source file based on the source traceability chain of the knowledge fragment; Step 3: Construct a dual-track permission mapping matrix between knowledge fragments and target source files; Step 4: Based on the dual-track permission mapping matrix of knowledge fragments and target source files, perform hierarchical permission verification on user access permissions in the knowledge base permission domain and the source file permission domain. The knowledge base permission domain and the source file permission domain are orthogonal and independent. Step 5: Based on the permission verification results, output the knowledge that is accessible within the user's permission scope.
[0005] Preferably, a hierarchical knowledge retrieval access control method with dual-track permission isolation between the knowledge base and source files includes, in step 1, collecting user search content and determining user access permissions, including: Receive search query information input by the user, and determine the user's search content based on the search query information; Collect user access feature set, which includes user identity identifier, organizational level, security level of current access terminal, network environment type and real-time behavior confidence level; The effective permission vector of a user in this retrieval session is determined based on the access feature set; The effective permission vector includes a first permission level of the knowledge base domain and a second permission level of the source file domain, and the first permission level and the second permission level are orthogonal and independent.
[0006] Preferably, a hierarchical knowledge retrieval access control method with dual-track permission isolation between the knowledge base and source files determines the effective permission vector of a user in the current retrieval session based on an access feature set, including: Based on the user's identity and organizational hierarchy, the basic permission levels for the user's knowledge base domain and source file domain are determined in the preset permission management library; The security level of the access terminal, the network environment type, and the real-time behavior confidence level are discretized into a three-dimensional risk matrix, and the comprehensive risk value under the current access characteristics is determined based on the three-dimensional risk matrix. The user's current session risk level is determined based on the comprehensive risk value; The basic permission level is adjusted based on the user's current session risk level, generating the adjusted knowledge base domain permission level and source file domain permission level, and the adjusted knowledge base domain permission level and source file domain permission level are used as the effective permission vector.
[0007] Preferably, a hierarchical knowledge retrieval access control method with dual-track permission isolation between the knowledge base and the source file includes, in step 2, inputting the retrieval content into the knowledge base for matching, outputting a knowledge fragment with a source traceability chain, and locating the corresponding target source file based on the source traceability chain of the knowledge fragment, including: The search results are segmented into words to obtain several word elements. Each word element is labeled with an entity type to obtain an entity type label. At the same time, the word elements and entity type labels are vectorized to generate word vectors. The word vectors are then combined according to the input order of the search results to generate search feature vectors. Calculate the similarity between the retrieved feature vector and the stored feature vectors of each knowledge fragment pre-stored in the knowledge base, and obtain a similarity score; Obtain at least one knowledge fragment with a similarity score equal to or greater than a preset matching threshold; Extract a pre-embedded source identifier sequence from the metadata of each knowledge fragment, wherein the source identifier sequence constitutes the source tracing chain of the knowledge fragment; Based on the source tracing chain, locate the target source file corresponding to the knowledge fragment in the source file end.
[0008] Preferably, in a hierarchical knowledge retrieval access control method with dual-track permission isolation between the knowledge base and the source file, step 3 involves constructing a dual-track permission mapping matrix between knowledge fragments and target source files, including: The source tracing chain of each knowledge fragment is analyzed to determine the storage path of the unique target source file corresponding to the knowledge fragment; Based on the source tracing chain, a dynamic mapping relationship is constructed between knowledge fragments and target source files to obtain a set of knowledge fragments. and each knowledge fragment The corresponding target source file is denoted as , Let i represent the i-th knowledge fragment, i=1,2,...,n; and let n be the set of all distinct target source files. Where n represents the total number of knowledge fragments; m represents the total number of different target source files, and Each knowledge fragment Originating from a single target source file ,and If two different knowledge fragments and If the storage paths of the corresponding target source files are the same, then ; Let j represent the j-th knowledge segment, where j = 1, 2, ..., n; Represents the j-th knowledge fragment The corresponding target source file, ; For each knowledge fragment Assign baseline knowledge base domain permission levels Assign a baseline source file domain permission level to each distinct target source file, and record the target source file... The permission level is And satisfy the condition that for any two knowledge fragments , ,like The corresponding source files have the same permission level; based on the dynamic mapping relationship, a dual-track permission vector is constructed for the i-th knowledge fragment and the target source file. ; knowledge fragments With the target source file As a row index identifier, the dual-track permission vector As row elements, construct a dual-track permission mapping matrix M of knowledge fragments and target source files; ; in, This indicates the baseline knowledge base domain permission level corresponding to the nth knowledge fragment; This represents the baseline source file domain permission level corresponding to the nth knowledge fragment.
[0009] Preferably, in a hierarchical knowledge retrieval access control method with dual-track permission isolation between the knowledge base and source files, step 4 involves performing hierarchical permission verification on user access permissions in both the knowledge base permission domain and the source file permission domain, based on the knowledge fragment-target source file dual-track permission mapping matrix. This includes: Determine the user's effective permission vector based on user access permissions. ,in, Indicates the user's permission level in the knowledge base domain; Indicates the user's permission level in the source file domain; Based on the dual-track permission mapping matrix of knowledge fragment and target source file, read the dual-track permission requirements corresponding to the current knowledge fragment. ;in, This indicates the baseline knowledge base domain permission level required for the current knowledge fragment; This indicates the baseline source file domain permission level required by the target source file; Judge separately Whether it is valid and Is it valid? like If the condition is met, the user is deemed to have permission to access the knowledge fragment; otherwise, the user does not have permission to access the knowledge fragment. like If the condition is met, the user is deemed to have permission to access the target source file corresponding to the knowledge fragment; otherwise, the user does not have permission to access the target source file corresponding to the knowledge fragment.
[0010] Preferably, a hierarchical knowledge retrieval access control method with dual-track permission isolation between the knowledge base and source files further includes: determining whether the knowledge base is being updated, specifically: The knowledge base's work logs are accessed at a preset period, and the access results are used to determine whether there are users with knowledge base access rights but no source file access rights who send sharing requests to the knowledge base. If the knowledge base exists, it is determined that it needs to be updated, and the file to be shared is determined based on the sharing request; A sharing link request is sent to the source file based on the file to be shared. After the source file receives a response that the request has been approved, the file to be shared is referenced in the knowledge base based on the source file access permissions of the user who can access the file to be shared. At the same time, based on the citation results, a citation link between the file to be shared and the corresponding knowledge fragment is constructed in the knowledge base, and based on the construction results, the access permission range of the knowledge base to the corresponding knowledge fragment is used as the baseline permission range. Based on the baseline permission scope, the access permission limit scope of the file to be shared is consistently corrected, and based on the correction result, the reference link between the file to be shared and the corresponding knowledge fragment is authorized and applied, thus completing the update of the knowledge base; If the knowledge base does not exist, it is determined that no update is needed.
[0011] Preferably, in a hierarchical knowledge retrieval access control method with dual-track permission isolation between the knowledge base and source files, step 4, after performing hierarchical permission verification on user access permissions in the knowledge base permission domain and the source file permission domain, further includes: locking the target content based on the permission verification results, retrieving the corresponding hierarchical permission table to match the user permission level, summarizing the corresponding visible content, and outputting it after semantic sorting and concatenation. Specifically: Obtain the hierarchical permission verification results for user access permissions, and read the hierarchical permission verification results. When it is determined that the user meets the access permissions in the knowledge base permission domain or the source file permission domain, lock the target knowledge fragment or target source file accessed by the user. There is at least one target knowledge fragment or target source file. Extract the identity identifier of the target knowledge fragment or the target source file, and retrieve the knowledge fragment hierarchical permission table corresponding to the target knowledge fragment or the file paragraph hierarchical permission table corresponding to the target source file from the preset permission database based on the identity identifier; Data traversal is performed on the knowledge fragment hierarchical permission table or the file paragraph hierarchical permission table to determine the permission levels existing in the knowledge fragment hierarchical permission table or the key indicators for level division between adjacent permission levels and the limited values of the indicators. Among them, the permission level corresponds one-to-one with the visible content fragments in the knowledge fragment and the visible paragraphs in the source file. Based on the key indicators of the level classification, the same indicator parameters are extracted for user access permissions, and the corresponding target indicator limit values are determined based on the same indicator parameter extraction results. Match the target indicator limit value with the indicator limit value corresponding to the key indicator of the level division between adjacent permission levels, and determine the highest permission level that the user has in the knowledge fragment level permission table or file paragraph level permission table based on the matching result, and summarize the target visible content fragments or target visible paragraphs corresponding to the highest permission level and the permission levels below. Semantic parsing of user search content is performed to determine the retrieval logical sequence nodes corresponding to the user search content, and the summarized target visible content fragments or target visible paragraphs are sorted based on the logical sequence nodes; Based on the sorting results, the system splices the visible content fragments or paragraphs of the target, and then uses the splicing results to complete the global scheduling and management of the user's searched content.
[0012] Preferably, in a hierarchical knowledge retrieval access control method with dual-track permission isolation between the knowledge base and source files, step 5 outputs the accessible knowledge within the user's permission scope based on the permission verification result, including: Obtain the hierarchical permission verification results for user access permissions, and extract the user's access permission identifiers for each knowledge fragment in the knowledge base permission domain and the access permission identifiers for each target source file in the source file permission domain from the hierarchical permission verification results. Based on the access permission identifier, the corresponding knowledge fragment and target source file are located, and the located knowledge fragment and target source file are output to the user terminal.
[0013] This invention provides a hierarchical knowledge retrieval and access control system with dual-track permission isolation between the knowledge base and source files, comprising: The search content and permission determination module is used to collect user search content and determine user access permissions; The content matching module is used to input the searched content into the knowledge base for matching, output knowledge fragments with source traceability chains, and locate the corresponding target source file based on the source traceability chains of the knowledge fragments; The dual-track permission mapping module is used to construct a dual-track permission mapping matrix between knowledge fragments and target source files; The permission verification module is used to perform hierarchical permission verification of user access permissions in the knowledge base permission domain and the source file permission domain based on the dual-track permission mapping matrix of knowledge fragment-target source file. The knowledge base permission domain and the source file permission domain are orthogonal and independent. The data output module is used to output the accessible knowledge within the user's permission scope based on the permission verification results.
[0014] Compared with the prior art, the beneficial effects of the present invention are as follows: By setting the access permissions of the knowledge base and source files to an independent dual-track system, orthogonal isolation and separate control of permissions are achieved. When a user searches, the knowledge fragment carrying the complete source path is first identified and the corresponding source file is located in reverse. Then, a dual-track permission mapping matrix between the knowledge fragment and the source file is established. According to the dual-track permission mapping matrix, the user's permissions are checked step by step in two independent permission domains. Finally, only the content that the user is allowed to view is returned. This effectively decouples the permission binding relationship between the knowledge fragment content and the source file, avoids decision conflicts caused by a single permission model, ensures data security and ensures that only data content within the corresponding permission scope can be accessed. At the same time, through source tracing and step-by-step verification mechanisms, sensitive information is prevented from being obtained beyond authorization due to cross-domain references, which significantly improves the security of hierarchical knowledge retrieval.
[0015] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in this application.
[0016] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0017] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1 This is a flowchart of a hierarchical knowledge retrieval access control method with dual-track permission isolation between the knowledge base and source files, as described in an embodiment of the present invention. Figure 2 This is a flowchart of step 2 in a hierarchical knowledge retrieval access control method with dual-track permission isolation between the knowledge base and source files, as described in an embodiment of the present invention. Figure 3 This is a structural diagram of a hierarchical knowledge retrieval and access control system with dual-track permission isolation between the knowledge base and source files, as described in an embodiment of the present invention. Detailed Implementation
[0018] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.
[0019] Example 1: This example provides a hierarchical knowledge retrieval access control method with dual-track permission isolation between the knowledge base and source files, such as... Figure 1 As shown, it includes: Step 1: Collect user search results and determine user access permissions; Step 2: Input the search content into the knowledge base for matching, output the knowledge fragment with source traceability chain, and locate the corresponding target source file based on the source traceability chain of the knowledge fragment; Step 3: Construct a dual-track permission mapping matrix between knowledge fragments and target source files; Step 4: Based on the dual-track permission mapping matrix of knowledge fragments and target source files, perform hierarchical permission verification on user access permissions in the knowledge base permission domain and the source file permission domain. The knowledge base permission domain and the source file permission domain are orthogonal and independent. Step 5: Based on the permission verification results, output the knowledge that is accessible within the user's permission scope.
[0020] In this embodiment, the dual-track permission isolation between the knowledge base and the source file refers to setting the access control permissions of the knowledge base and the access control permissions of the source file as two independent permission domains. The two operate orthogonally in terms of permission level, verification logic and authorization strategy, without interfering with each other.
[0021] In this embodiment, a knowledge fragment refers to an information block with independent semantic units formed by extracting, slicing, or structuring the content of a source file, such as a piece of text, a paragraph, or a knowledge point summary.
[0022] In this embodiment, the source traceability chain refers to a set of source identifier sequences embedded in the metadata of the knowledge fragment. This sequence points sequentially to the source file from which the knowledge fragment originates and its location path set within the source file, used to uniquely trace the original source of the knowledge fragment.
[0023] In this embodiment, the target source file refers to the source file that corresponds to the knowledge fragment and contains the original content of the knowledge fragment, such as the original document, database record, or multimedia file.
[0024] In this embodiment, the knowledge fragment-target source file dual-track permission mapping matrix refers to a matrix structure used to record the association between the required permission levels of each knowledge fragment and its corresponding target source file. It can simultaneously store the permission requirements of the knowledge base permission domain and the permission requirements of the source file permission domain, and supports independent dual-track queries.
[0025] In this embodiment, the knowledge base permission domain refers to an independent permission system set for knowledge fragments stored in the knowledge base, which is used to define the access level of users to knowledge fragments.
[0026] In this embodiment, the source file permission domain refers to an independent permission system set for the original files stored on the source file side, which is used to define the user's access level to the source file. The source file permission domain and the knowledge base permission domain are orthogonal and independent.
[0027] In this embodiment, hierarchical permission verification refers to verifying whether the user's current permissions meet the requirements under the permission level limitation standards of the knowledge base and the source file, respectively, in the knowledge base permission domain and the source file permission domain.
[0028] The working principle and beneficial effects of the above technical solution are as follows: By setting the access permissions of the knowledge base and the source files to an independent dual-track system, orthogonal isolation and separate control of permissions are achieved. When a user searches, the knowledge fragment carrying the complete source path is first identified and the corresponding source file is located in reverse. Then, a dual-track permission mapping matrix between the knowledge fragment and the source file is established. According to the dual-track permission mapping matrix, the user's permissions are checked step by step in two independent permission domains. Finally, only the content that the user is allowed to view is returned. This effectively decouples the permission binding relationship between the knowledge fragment content and the source file, avoids decision conflicts caused by a single permission model, ensures data security and ensures that only data content within the corresponding permission scope can be accessed. At the same time, through the source tracing and step-by-step verification mechanism, sensitive information is prevented from being obtained beyond authorization due to cross-domain references, which significantly improves the security of hierarchical knowledge retrieval.
[0029] Example 2: Based on Example 1, this example provides a hierarchical knowledge retrieval access control method with dual-track permission isolation between the knowledge base and source files. In step 1, the user's search content is collected, and the user's access permissions are determined, including: Receive search query information input by the user, and determine the user's search content based on the search query information; Collect user access feature set, which includes user identity identifier, organizational level, security level of current access terminal, network environment type and real-time behavior confidence level; The effective permission vector of a user in this retrieval session is determined based on the access feature set; The effective permission vector includes a first permission level of the knowledge base domain and a second permission level of the source file domain, and the first permission level and the second permission level are orthogonal and independent.
[0030] In this embodiment, the access feature set refers to the collection of multi-dimensional user attributes, including user identity, organizational level, security level of the current access terminal, network environment type, and real-time behavior confidence level, which is used to comprehensively evaluate the access environment and behavior status of the user's current session.
[0031] The working principle and beneficial effects of the above technical solution are as follows: by collecting multi-dimensional access feature sets to determine the user's effective permission vector, and setting the permission levels of the knowledge base domain and the source file domain to orthogonal independence, it can more comprehensively and dynamically reflect the user's actual access risks; the orthogonal independence design allows the system to implement differentiated permission control for knowledge fragment output and source file access, avoiding excessive restriction of normal retrieval of another domain due to overly strict permissions in one domain, thus improving the flexibility and granularity of permission management.
[0032] Example 3: Based on Example 2, this example provides a hierarchical knowledge retrieval access control method with dual-track permission isolation between the knowledge base and source files. It determines the effective permission vector of a user in the current retrieval session based on an access feature set, including: Based on the user's identity and organizational hierarchy, the basic permission levels for the user's knowledge base domain and source file domain are determined in the preset permission management library; The security level of the access terminal, the network environment type, and the real-time behavior confidence level are discretized into a three-dimensional risk matrix, and the comprehensive risk value under the current access characteristics is determined based on the three-dimensional risk matrix. The user's current session risk level is determined based on the comprehensive risk value; The basic permission level is adjusted based on the user's current session risk level, generating the adjusted knowledge base domain permission level and source file domain permission level, and the adjusted knowledge base domain permission level and source file domain permission level are used as the effective permission vector.
[0033] In this embodiment, the security level of the access terminal, the network environment type, and the real-time behavior confidence level are discretized into a three-dimensional risk matrix. The comprehensive risk value under the current access characteristics is determined based on the three-dimensional risk matrix. Specifically, the three dimensions of the current access terminal's security level, network environment type, and real-time behavior confidence level are discretized into high, medium, and low levels, respectively, constructing a 3×3×3 three-dimensional risk matrix. Each cell in the matrix is pre-set with an integer score between 0 and 100 to characterize the comprehensive risk level under that dimension combination. For example, the three dimensions and levels of the three-dimensional risk matrix are as follows: Dimension 1: Endpoint security level; Levels: High (compliant company devices), Medium (personal devices but registered), Low (unknown / non-compliant devices); Dimension 2: Network environment type; Level: Low risk (internal network / VPN), Medium risk (trusted external network such as partner's leased line), High risk (public Wi-Fi / unknown network); Dimension 3: Real-time behavior confidence; Levels: High (normal search), Medium (multiple searches for sensitive words within a short period of time), Low (triggered security alert); Each cell in the three-dimensional risk matrix is pre-filled with a risk score from 0 to 100 (the pre-set risk scores are based on empirical assessments of the degree of security threat to system access from combinations of dimensions). For example, some cell values are as follows: In practical applications, the current user's risk profile is: terminal compliance (high), access via public Wi-Fi (high risk), normal behavior (high) → the comprehensive risk score obtained from the matrix is 40. If the thresholds are set as: 0~39 = low risk, 40~69 = medium risk, 70~100 = high risk → a score of 40 falls under medium risk. The comprehensive risk score refers to the quantitative risk score obtained by querying the three-dimensional risk matrix, reflecting the combination of current access characteristics.
[0034] In this embodiment, the basic permission level is adjusted according to the user's current session risk level. Specifically, if the risk level is low, the permissions of both domains remain unchanged; if the risk level is medium, the permissions of the knowledge base domain are reduced by one level and the permissions of the source file domain are reduced by two levels (reflecting that the source file domain is more sensitive to risk); if the risk level is high, the permissions of both domains are reduced to the minimum guaranteed level.
[0035] In this embodiment, the preset permission management library refers to a database or policy table that is pre-configured and stores the mapping relationship between user identity identifiers, organizational levels and corresponding permission levels, and is used to query the user's basic permissions.
[0036] In this embodiment, the basic permission level is an initial permission level obtained by matching the user's identity identifier and organizational level in a preset permission management database, which corresponds to the knowledge base domain and the source file domain, respectively.
[0037] In this embodiment, the session risk level refers to the qualitative risk level determined based on the preset threshold range into which the comprehensive risk value falls, such as low risk, medium risk, and high risk.
[0038] In this embodiment, the effective permission vector refers to the actual combination of user permissions used in this retrieval session, which is finally determined after session risk level adjustment and includes two independent components: knowledge base domain permission level and source file domain permission level.
[0039] The working principle and beneficial effects of the above technical solution are as follows: It dynamically assesses user session risks through a three-dimensional risk matrix and adjusts static basic permissions in real time to generate an adaptive effective permission vector. Compared to a fixed permission mode, it can automatically reduce permissions in high-risk scenarios to lower the risk of leakage, while ensuring normal retrieval efficiency in low-risk scenarios. Simultaneously, permissions for the knowledge base domain and the source file domain are adjusted independently, achieving a balance between security and availability.
[0040] Example 4: Based on Example 1, this example provides a hierarchical knowledge retrieval access control method with dual-track permission isolation between the knowledge base and source files, such as... Figure 2 As shown, in step 2, the search content is input into the knowledge base for matching, and a knowledge fragment with a source traceability chain is output. Based on the source traceability chain of the knowledge fragment, the corresponding target source file is located, including: Step 201: Perform word segmentation on the search content to obtain several word elements, and label each word element with an entity type to obtain entity type labels. At the same time, perform vector transformation on the word elements and entity type labels to generate word vectors, and combine the word vectors according to the input order of the search content to generate search feature vectors. Step 202: Calculate the similarity between the retrieved feature vector and the stored feature vectors of each knowledge fragment pre-stored in the knowledge base, and obtain the similarity score; Step 203: Obtain at least one knowledge fragment whose similarity score is equal to or greater than the preset matching threshold; Step 204: Extract the pre-embedded source identifier sequence from the metadata of each knowledge fragment, wherein the source identifier sequence constitutes the source tracing chain of the knowledge fragment; Step 205: Based on the source tracing chain, locate the target source file corresponding to the knowledge fragment in the source file end.
[0041] In this embodiment, a lexical unit refers to the basic linguistic unit obtained after the retrieval content is segmented into its smallest granularity, and an entity type label refers to the result of labeling the entity category described by each lexical unit. For example, if the user inputs the retrieval content as "modification record of database access control configuration file", the word segmentation results in the lexical units "database", "access control", "configuration file", "of", and "modification record"; among them, "database" is labeled as "data source type", "access control" is labeled as "security mechanism", "configuration file" is labeled as "file type", "of" is labeled as "auxiliary word", and "modification record" is labeled as "operation log". The basis for entity type labeling is as follows: a pre-built entity type dictionary and a context rule matching table. The dictionary pre-stores the mapping relationship between multiple lexical units and their corresponding entity types, and the rule matching table defines the logic for inferring entity types based on contextual features such as prefixes and suffixes, and neighboring words. For example, for the lexical unit "database", the dictionary maps "database" to "data source type"; for the lexical unit "configuration file", the dictionary maps it to "file type"; if a lexical unit is not included in the dictionary, rule inference is performed based on the lexical units before and after it, such as labeling the lexical unit "modify" followed by "record" as "operation type".
[0042] In this embodiment, vector transformation is performed on lexical units and entity type labels to generate word vectors. Specifically, each lexical unit is converted into a basic numerical vector. For example, the lexical unit "database" is mapped into a three-dimensional basic vector [0.2, -0.5, 0.8] through word embedding. At the same time, the corresponding entity type label is converted into a type encoding vector (that is, the entity type label "data source type" for the lexical unit "database" is mapped into a two-dimensional type vector [0, 1] through one-hot encoding). Then, the basic numerical vector and the type encoding vector are concatenated to obtain [0.2, -0.5, 0.8, 0, 1], so as to obtain a final vector that can simultaneously represent the semantics of lexical units and the category information of entities. This final vector is called a word vector.
[0043] In this embodiment, when combining word vectors according to the input order of the search content, the word vectors corresponding to each word element in the search content are arranged sequentially according to the order in which the word elements appear in the original search content and then connected end to end to form a higher-dimensional combined vector, which is called the search feature vector. For example, if the search content is "database access control", the word segmentation results in the word element sequence "database" and "access control"; where the word vector of "database" is [0.1,0.2,0.3] and the word vector of "access control" is [0.4,0.5,0.6], then the search feature vector generated after combining according to the input order is [0.1,0.2,0.3,0.4,0.5,0.6].
[0044] In this embodiment, calculating the similarity between the retrieved feature vector and the stored feature vectors of each knowledge segment pre-stored in the knowledge base to obtain a similarity score includes: To avoid calculating the retrieved feature vector and the stored feature vectors of each knowledge segment pre-stored in the knowledge base one by one, which would lead to increased computation, reduced computational efficiency, and response latency, the specific execution process is as follows to reduce computational overhead: The storage feature vectors of each pre-stored knowledge fragment are processed to obtain the maximum value in each storage feature vector and determine the position of the maximum value in the storage feature vector. At the same time, it is determined whether the maximum value is unique. The maximum values with the same position and the same maximum value uniqueness are grouped together, and a group identifier is added to the corresponding storage feature vector (when adding the group identifier, if the maximum value is not unique, the position of the first occurrence of the maximum value is recorded). The group identifiers are summarized to generate a vector filtering set. The retrieval feature vectors are analyzed to determine the target location of the maximum value and the uniqueness of the maximum value, generating analysis results. The analysis results are then input into the vector filtering set and matched with each group identifier. Based on the matching results, the stored feature vectors with the same group identifiers are extracted as the set of stored feature vectors to be calculated. The similarity score is obtained by calculating the similarity between the retrieved feature vector and each stored feature vector in the set of stored feature vectors to be calculated according to the following formula. ;in, This indicates the similarity score; This indicates the retrieval of feature vectors; This represents the stored feature vector in the set of stored feature vectors to be computed; It is the dot product; Indicates the magnitude of the retrieved feature vector; This represents the magnitude of the stored feature vectors in the set of stored feature vectors to be calculated.
[0045] In the above example of group identifier analysis, the knowledge base stores the following three stored feature vectors: The maximum value is 0.6, and it appears at the 6th position. Furthermore, the maximum value of 0.6 is stored in the feature vector. Since it is unique, the feature vector will be stored. Add a group identifier (6, unique); The maximum value is 0.5, and it appears in both the 1st and 6th positions, meaning the maximum value is not unique. Therefore, the group identifier bit is set to 1. The group identifier is (1, not unique). The maximum value is 0.6, and it appears in the 6th position. Furthermore, the maximum value of 0.6 is stored in the feature vector. Since it is unique, the feature vector will be stored. Add a group identifier (6, unique); For retrieving feature vectors Analysis revealed that the maximum value was 0.6, which appeared at the 6th position in the retrieval feature vector Q and was unique. Therefore, the group identifier of Q was (6, unique). Thus, the group identifier of Q was combined with the three stored feature vectors. , , Perform matching and extract , As a vector selection set.
[0046] In this embodiment, the preset matching threshold refers to a pre-set similarity score threshold. Only knowledge fragments with a similarity score that reaches or exceeds this value will be retained. For example, if the threshold is set to 0.75, fragments with a score of 0.85 will be retained, and fragments with a score of 0.70 will be discarded.
[0047] In this embodiment, the source identifier sequence refers to a set of ordered identifier information pre-embedded in the metadata of the knowledge fragment. For example, the source identifier sequence can be "report.docx, page 3, paragraph 2", where "report.docx" represents the source file name, "page 3" represents the page number, and "paragraph 2" represents the specific paragraph position.
[0048] The working principle and beneficial effects of the above technical solution are as follows: By splitting and semantically annotating the input content and converting it into a numerical vector, the similarity between the input and existing knowledge fragments is quickly calculated using vectorized indexing. Knowledge fragments that meet the similarity criteria are then selected. Subsequently, preset source tracking information is extracted from the accompanying records of each knowledge fragment, and the original electronic file is accurately located based on this information. This ensures that a reliable correspondence is established between the retrieved knowledge and the original source while maintaining matching accuracy, providing a clear traceability basis for subsequent fine-grained access control.
[0049] Example 5: Based on Example 1, this example provides a hierarchical knowledge retrieval access control method with dual-track permission isolation between the knowledge base and source files. In step 3, a dual-track permission mapping matrix between knowledge fragments and target source files is constructed, including: The source tracing chain of each knowledge fragment is analyzed to determine the storage path of the unique target source file corresponding to the knowledge fragment; Based on the source tracing chain, a dynamic mapping relationship is constructed between knowledge fragments and target source files to obtain a set of knowledge fragments. and each knowledge fragment The corresponding target source file is denoted as , Let i represent the i-th knowledge fragment, i=1,2,...,n; and let n be the set of all distinct target source files. Where n represents the total number of knowledge fragments; m represents the total number of different target source files, and Each knowledge fragment Originating from a single target source file ,and If two different knowledge fragments and If the storage paths of the corresponding target source files are the same, then ; Let j represent the j-th knowledge segment, where j = 1, 2, ..., n; Represents the j-th knowledge fragment The corresponding target source file, ; For each knowledge fragment Assign baseline knowledge base domain permission levels Assign a baseline source file domain permission level to each distinct target source file, and record the target source file... The permission level is And satisfy the condition that for any two knowledge fragments , ,like The corresponding source files have the same permission level; based on the dynamic mapping relationship, a dual-track permission vector is constructed for the i-th knowledge fragment and the target source file. ; knowledge fragments With the target source file As a row index identifier, the dual-track permission vector As row elements, construct a dual-track permission mapping matrix M of knowledge fragments and target source files; ; in, This indicates the baseline knowledge base domain permission level corresponding to the nth knowledge fragment; This represents the baseline source file domain permission level corresponding to the nth knowledge fragment.
[0050] In this embodiment, based on the knowledge fragment-target source file dual-track permission mapping matrix M, the mapping relationship of the i-th row is determined as follows: ,in, and The knowledge fragments are stored independently and there are no pre-defined numerical constraints between them. This establishes a dual-track permission mapping matrix M for knowledge fragments and target source files. A hash index table for keys, used when retrieving any knowledge fragment. When determining the baseline permission level, the system locates the i-th row of the knowledge fragment-target source file dual-track permission mapping matrix M using the hash index table and extracts the corresponding... , This serves as the baseline permission level for knowledge fragments and their corresponding target source files.
[0051] In this embodiment, the dynamic mapping relationship refers to the rule of determining the corresponding unique original file for each knowledge fragment in real time based on its own source tracing chain. For example, if the source tracing chain of knowledge fragment A points to file X, then the mapping relationship binds A to X; if the source tracing chain points to file Y, then A is bound to Y.
[0052] In this embodiment, the dual-track permission vector refers to a vector composed of two independent dimensions of permission levels. One dimension corresponds to the access requirements of the knowledge fragment itself, and the other dimension corresponds to the access requirements of the original file. For example, (3,2) represents that the knowledge fragment requires level 3 and the original file requires level 2.
[0053] In this embodiment, the knowledge fragment-target source file dual-track permission mapping matrix is a two-dimensional table that arranges each knowledge fragment, its corresponding original file, and two independent permission levels in rows. For example, the first row of the matrix may be written as "Fragment 1, File A, Level 3, Level 2".
[0054] In this embodiment, the baseline knowledge base domain permission level refers to the minimum level value pre-set for each knowledge fragment to determine whether a user has the right to read the fragment. For example, level 3 means that only users with knowledge base domain permissions of level 3 or higher can view the fragment.
[0055] In this embodiment, the baseline source file domain permission level refers to the lowest level value pre-set for each original file to determine whether a user has the right to access the file. For example, level 2 means that only users with source file domain permissions of level 2 or higher can open or download the file.
[0056] The working principle and beneficial effects of the above technical solution are as follows: By parsing the source tracing information carried by each knowledge fragment, a one-to-one dynamic correspondence between the knowledge fragment and the original file is automatically established. Based on this correspondence, different permission levels are independently assigned to each knowledge fragment and the original file. Finally, all information is integrated into a dual-track permission mapping matrix. This ensures that multiple knowledge fragments corresponding to the same original file share the same file-level permission requirements, avoiding inconsistent permissions or redundant configurations. At the same time, the permission control of knowledge retrieval and file access is decoupled, so that when performing cross-dimensional permission verification on users, it is only necessary to look up the corresponding row in the table to quickly obtain two independent permission bases. Thus, fine-grained and highly consistent layered security control is achieved without increasing system complexity.
[0057] Example 6: Based on Example 1, this example provides a hierarchical knowledge retrieval access control method with dual-track permission isolation between the knowledge base and source files. In step 4, based on the dual-track permission mapping matrix of knowledge fragments and target source files, hierarchical permission verification is performed on user access permissions in the knowledge base permission domain and the source file permission domain, including: Determine the user's effective permission vector based on user access permissions. ,in, Indicates the user's permission level in the knowledge base domain; Indicates the user's permission level in the source file domain; Based on the dual-track permission mapping matrix of knowledge fragment and target source file, read the dual-track permission requirements corresponding to the current knowledge fragment. ;in, This indicates the baseline knowledge base domain permission level required for the current knowledge fragment; This indicates the baseline source file domain permission level required by the target source file; Judge separately Whether it is valid and Is it valid? like If the condition is met, the user is deemed to have permission to access the knowledge fragment; otherwise, the user does not have permission to access the knowledge fragment. like If the condition is met, the user is deemed to have permission to access the target source file corresponding to the knowledge fragment; otherwise, the user does not have permission to access the target source file corresponding to the knowledge fragment.
[0058] In this embodiment, the output of the knowledge fragment content and the access permission determination of the corresponding target source file are independent of each other and are executed separately.
[0059] In this embodiment, the output of the knowledge fragment content and the access permission determination of the corresponding target source file are independent of each other and are executed separately.
[0060] In this embodiment, the effective permission vector refers to a two-dimensional ordered pair composed of the user's permission level in the knowledge base domain and the user's permission level in the source file domain. It is used to characterize the user's access capabilities in two independent dimensions in the current retrieval session. For example, a user's effective permission vector of (3, 2) indicates that the user's level in the knowledge base domain is 3 and the level in the source file domain is 2.
[0061] In this embodiment, the dual-track permission requirement refers to a two-dimensional ordered pair consisting of the baseline knowledge base domain permission level required by the current knowledge fragment and the baseline source file domain permission level required by the target source file corresponding to the knowledge fragment. It is used to characterize the minimum level conditions that must be met to access the knowledge fragment and its source file. For example, the dual-track permission requirement (3, 1) means that the knowledge base domain level must be no less than 3 and the source file domain level must be no less than 1.
[0062] In this embodiment, the baseline knowledge base domain permission level refers to the minimum level threshold that is pre-set for each knowledge fragment, and the user's permission level in the domain must reach or exceed the value in order to obtain the qualification to access the knowledge fragment.
[0063] In this embodiment, the baseline source file domain permission level refers to the minimum level threshold that is pre-set for each target source file, and the user's permission level in the domain must reach or exceed the value in order to obtain the access qualification for the source file. For example, if the baseline source file domain permission level of a certain source file is 2, then only users with source file domain permissions of 2 or above can view the file.
[0064] The working principle and beneficial effects of the above technical solution are as follows: By representing the user's permission level in the knowledge base domain and the source file domain as independent vectors, and representing the permission requirements of the knowledge fragment and its source file as corresponding dual-track vectors, the user's access qualifications to the knowledge fragment and source file are independently determined by comparing whether the user's level in the two domains is not lower than the required level. This achieves orthogonal verification of dual-domain permissions, avoids decision conflicts caused by single-level coupling, and has intuitive judgment logic and high computational efficiency, which can accurately distinguish the different access capabilities of users to knowledge content and original files.
[0065] Example 7: Based on Example 6, this example provides a hierarchical knowledge retrieval access control method with dual-track permission isolation between the knowledge base and source files, and further includes: performing update judgment on the knowledge base, specifically: The knowledge base's work logs are accessed at a preset period, and the access results are used to determine whether there are users with knowledge base access rights but no source file access rights who send sharing requests to the knowledge base. If the knowledge base exists, it is determined that it needs to be updated, and the file to be shared is determined based on the sharing request; A sharing link request is sent to the source file based on the file to be shared. After the source file receives a response that the request has been approved, the file to be shared is referenced in the knowledge base based on the source file access permissions of the user who can access the file to be shared. At the same time, based on the citation results, a citation link between the file to be shared and the corresponding knowledge fragment is constructed in the knowledge base, and based on the construction results, the access permission range of the knowledge base to the corresponding knowledge fragment is used as the baseline permission range. Based on the baseline permission scope, the access permission limit scope of the file to be shared is consistently corrected, and based on the correction result, the reference link between the file to be shared and the corresponding knowledge fragment is authorized and applied, thus completing the update of the knowledge base; If the knowledge base does not exist, it is determined that no update is needed.
[0066] In this embodiment, the preset period refers to the time interval configured by the system, such as every 24 hours or once a week, to periodically trigger the inspection operation on the knowledge base work log.
[0067] In this embodiment, the work log refers to the log file automatically recorded by the knowledge base system that reflects the user's various operations on the knowledge base. It includes at least the user's identity, operation type, operation time, and operation content. Its main purpose is to identify whether the user has initiated a sharing request.
[0068] In this embodiment, a sharing request refers to an operation instruction issued by a user to the knowledge base system, requesting that a source file or its corresponding knowledge fragment be shared with other users or the user themselves. It usually includes the identification information of the file to be shared.
[0069] In this embodiment, the file to be shared refers to the original file specified in the sharing request that the user wants to import into the knowledge base from the source file, such as a technical document or data table that is not publicly available in the knowledge base.
[0070] In this embodiment, a shared link request refers to an interactive message sent by the knowledge base system to the source file end based on the information of the file to be shared, requesting permission to reference the file, including the file identifier, the identity of the requester, and the purpose of the reference.
[0071] In this embodiment, referencing the knowledge base refers to the operation whereby, after authorization and consent are granted on the source file side, the knowledge base system gains access and includes the content or reference path of the file to be shared within the scope of knowledge base management. This could be done by establishing a virtual pointer to the file or caching its metadata in the knowledge base.
[0072] In this embodiment, the reference link refers to the logical connection established in the knowledge base to associate the correspondence between the file to be shared and the existing knowledge fragments. This link enables the corresponding source file to be located directly through the knowledge fragment.
[0073] In this embodiment, the baseline permission range refers to the range of access permission levels set by the knowledge base for existing knowledge fragments. For example, users must meet the permissions set by the knowledge base to view the knowledge fragment. This permission range serves as a reference standard for subsequent modification of source file permissions.
[0074] In this embodiment, consistency correction refers to the process of adjusting the access permission range of the source file domain of the file to be shared to match the baseline permission range of the knowledge base. For example, if a knowledge fragment requires a user with permission A to access it, then the access permission of the corresponding source file is also set to permission A, thereby eliminating the permission difference between the two tracks.
[0075] In this embodiment, authorization taking effect means that after the permission consistency correction is completed, the reference link between the file to be shared and the corresponding knowledge fragment is officially enabled, so that the user can normally access the file and its knowledge fragment according to the corrected dual-track permissions.
[0076] The working principle and beneficial effects of the above technical solution are as follows: By periodically checking the work log, it proactively detects situations where permissions are inconsistent between the knowledge base and the source file. That is, if a user only has access to the knowledge base but initiates a sharing request for the source file, after confirming the existence of this situation, it automatically sends an authorization request to the source file. After the source file confirms the authorization, the file to be shared is referenced in the knowledge base and an interconnected link is established. At the same time, the permission requirements on the source file side are consistently corrected with reference to the permission requirements of the original knowledge fragments on the knowledge base side. Ultimately, the dual-track permissions remain aligned in the sharing scenario, realizing dynamic coordination of permissions between the knowledge base and the source file. This avoids sharing failures caused by missing or conflicting permissions and improves the security and operability of cross-domain resource referencing.
[0077] Example 8: Based on Example 1, this example provides a hierarchical knowledge retrieval access control method with dual-track permission isolation between the knowledge base and source files. In step 4, after performing hierarchical permission verification on user access permissions in the knowledge base permission domain and the source file permission domain, it further includes: locking the target content based on the permission verification result, retrieving the corresponding hierarchical permission table to match the user permission level, summarizing the corresponding visible content, and outputting it after semantic sorting. Specifically: Obtain the hierarchical permission verification results for user access permissions, and read the hierarchical permission verification results. When it is determined that the user meets the access permissions in the knowledge base permission domain or the source file permission domain, lock the target knowledge fragment or target source file accessed by the user. There is at least one target knowledge fragment or target source file. Extract the identity identifier of the target knowledge fragment or the target source file, and retrieve the knowledge fragment hierarchical permission table corresponding to the target knowledge fragment or the file paragraph hierarchical permission table corresponding to the target source file from the preset permission database based on the identity identifier; Data traversal is performed on the knowledge fragment hierarchical permission table or the file paragraph hierarchical permission table to determine the permission levels existing in the knowledge fragment hierarchical permission table or the key indicators for level division between adjacent permission levels and the limited values of the indicators. Among them, the permission level corresponds one-to-one with the visible content fragments in the knowledge fragment and the visible paragraphs in the source file. Based on the key indicators of the level classification, the same indicator parameters are extracted for user access permissions, and the corresponding target indicator limit values are determined based on the same indicator parameter extraction results. Match the target indicator limit value with the indicator limit value corresponding to the key indicator of the level division between adjacent permission levels, and determine the highest permission level that the user has in the knowledge fragment level permission table or file paragraph level permission table based on the matching result, and summarize the target visible content fragments or target visible paragraphs corresponding to the highest permission level and the permission levels below. Semantic parsing of user search content is performed to determine the retrieval logical sequence nodes corresponding to the user search content, and the summarized target visible content fragments or target visible paragraphs are sorted based on the logical sequence nodes; Based on the sorting results, the system splices the visible content fragments or paragraphs of the target, and then uses the splicing results to complete the global scheduling and management of the user's searched content.
[0078] In this embodiment, the knowledge fragment hierarchical permission table refers to a data structure that is set in advance in the knowledge base for each knowledge fragment, recording the correspondence between different permission levels and visible content fragments. For example, when the permission level is 1, only the summary paragraph is visible, and when the permission level is 2, the full text is visible.
[0079] In this embodiment, the file paragraph hierarchical permission table refers to a data structure that is set in advance on the source file side for each source file, recording the correspondence between different permission levels and visible paragraphs in the file. For example, in a technical document, ordinary users can only see the overview paragraph, while advanced users can only see the experimental data paragraph.
[0080] In this embodiment, the key indicators for classifying levels refer to the specific judgment criteria parameters used to distinguish between two adjacent permission levels, such as using the user's security level value, department level number, or job level score as the classification standard.
[0081] In this embodiment, the limit value of the indicator refers to the specific numerical range or threshold corresponding to the key indicator of each level. For example, when the key indicator is the security level, the limit value of level 3 means that one can enter the level only if one reaches or exceeds level 3.
[0082] In this embodiment, a visible content fragment refers to one or more consecutive semantic units within a knowledge fragment that are authorized to be visible according to the user's permission level, such as a sentence, a paragraph, or a chapter within the knowledge fragment.
[0083] In this embodiment, a visible paragraph refers to one or more paragraphs in the source file that are authorized to be visible according to the user's permission level, such as paragraphs 2 to 4 in the original document.
[0084] In this embodiment, the retrieval logical sequence node refers to the logical sequence point extracted after semantic analysis of the user's input retrieval content. This sequence point reflects the order in which information is presented in the user's intent. For example, if the user searches for "introduce the principle first and then give examples", then two logical sequence nodes, the principle node and the example node, are parsed out.
[0085] In this embodiment, the target visible content fragment or target visible paragraph refers to all visible content fragments or visible paragraphs that can be accessed by the user, which are summarized according to the user's highest permission level. For example, a user with permission level 2 can see the content corresponding to level 1 and level 2.
[0086] In this embodiment, extracting parameters of the same indicator refers to extracting parameter values with the same name or type as the key indicator of the level classification from the feature set of user access permissions. For example, when the key indicator is the security level, the user's security level value is extracted from the user permission vector.
[0087] In this embodiment, content splicing refers to the process of connecting and combining multiple target visible content fragments or target visible paragraphs after sorting according to the order of the retrieval logic sequence nodes into a complete and continuous output content. For example, when a user searches for "the principle and application of a certain technology", the system will sequentially splice the visible paragraphs related to the principle with the visible paragraphs related to the example to form a coherent response text.
[0088] The working principle and beneficial effects of the above technical solution are as follows: After completing the dual-track permission verification, further fine-grained content-level control is applied to the knowledge or source files that the user can actually access. By locking the target resources that the user has the right to access, the pre-set content visibility table divided by permission level is retrieved. The criteria for dividing each level and its numerical boundaries are obtained through iteration. The user's own permissions are matched with these numerical boundaries to determine the highest level that the user can see and all content fragments or paragraphs below that level. At the same time, semantic parsing of the user's search intent is performed, and the accessible content is reordered and spliced according to the search logic. Ultimately, personalized content organization and output for different users are achieved, breaking through the limitation of traditional permission control that can only control the overall visibility of resources. Different authorization for different paragraphs or fragments within the same resource is realized, significantly improving the accuracy and flexibility of knowledge retrieval.
[0089] Example 9: Based on Example 1, this example provides a hierarchical knowledge retrieval access control method with dual-track permission isolation between the knowledge base and source files. In step 5, based on the permission verification result, the accessible knowledge within the user's permission range is output, including: Obtain the hierarchical permission verification results for user access permissions, and extract the user's access permission identifiers for each knowledge fragment in the knowledge base permission domain and the access permission identifiers for each target source file in the source file permission domain from the hierarchical permission verification results. Based on the access permission identifier, the corresponding knowledge fragment and target source file are located, and the located knowledge fragment and target source file are output to the user terminal.
[0090] In this embodiment, the access permission identifier refers to a Boolean or enumerated flag generated during the hierarchical permission verification process to mark whether a user has access rights to a specific knowledge fragment or a specific target source file. For example, flag 1 indicates that the user has the right to access, and flag 0 indicates that the user does not have the right to access.
[0091] In this embodiment, location refers to the process of finding and determining the specific storage location of the corresponding knowledge fragment or target source file in the knowledge base or source file storage system based on the resource index information carried by the access permission identifier.
[0092] In this embodiment, the user terminal refers to the terminal device or application interface used by the user to initiate a search query, which is used to receive and display the accessible knowledge output by the system.
[0093] The working principle and beneficial effects of the above technical solution are as follows: by extracting the access permission identifiers of each of the two domains from the hierarchical verification results, the knowledge fragments and source files that the user is allowed to view are accurately located based on the identifiers and then output together, thus avoiding secondary verification or repeated queries and improving the response efficiency after permission determination.
[0094] Example 10: This example provides a hierarchical knowledge retrieval and access control system with dual-track permission isolation between the knowledge base and source files, such as... Figure 3 As shown, it includes: The search content and permission determination module is used to collect user search content and determine user access permissions; The content matching module is used to input the searched content into the knowledge base for matching, output knowledge fragments with source traceability chains, and locate the corresponding target source file based on the source traceability chains of the knowledge fragments; The dual-track permission mapping module is used to construct a dual-track permission mapping matrix between knowledge fragments and target source files; The permission verification module is used to perform hierarchical permission verification of user access permissions in the knowledge base permission domain and the source file permission domain based on the dual-track permission mapping matrix of knowledge fragment-target source file. The knowledge base permission domain and the source file permission domain are orthogonal and independent. The data output module is used to output the accessible knowledge within the user's permission scope based on the permission verification results.
[0095] The working principle and beneficial effects of the above technical solution are as follows: By setting the access permissions of the knowledge base and the source files to an independent dual-track system, orthogonal isolation and separate control of permissions are achieved. When a user searches, the knowledge fragment carrying the complete source path is first identified and the corresponding source file is located in reverse. Then, a dual-track permission mapping matrix between the knowledge fragment and the source file is established. According to the dual-track permission mapping matrix, the user's permissions are checked step by step in two independent permission domains. Finally, only the content that the user is allowed to view is returned. This effectively decouples the permission binding relationship between the knowledge fragment content and the source file, avoids decision conflicts caused by a single permission model, ensures data security and ensures that only data content within the corresponding permission scope can be accessed. At the same time, through the source tracing and step-by-step verification mechanism, sensitive information is prevented from being obtained beyond authorization due to cross-domain references, which significantly improves the security of hierarchical knowledge retrieval.
[0096] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. A hierarchical knowledge retrieval access control method with dual-track permission isolation between the knowledge base and source files, characterized in that, include: Step 1: Collect user search results and determine user access permissions; Step 2: Input the search content into the knowledge base for matching, output the knowledge fragment with source traceability chain, and locate the corresponding target source file based on the source traceability chain of the knowledge fragment; Step 3: Construct a dual-track permission mapping matrix between knowledge fragments and target source files; Step 4: Based on the dual-track permission mapping matrix of knowledge fragments and target source files, perform hierarchical permission verification on user access permissions in the knowledge base permission domain and the source file permission domain. The knowledge base permission domain and the source file permission domain are orthogonal and independent. Step 5: Based on the permission verification results, output the knowledge that is accessible within the user's permission scope.
2. The hierarchical knowledge retrieval access control method with dual-track permission isolation between the knowledge base and source files as described in claim 1, characterized in that, In step 1, the user's search content is collected, and user access permissions are determined, including: Receive search query information input by the user and determine the user's search content based on the search query information; Collect user access feature sets, which include user identity identifier, organizational level, security level of the current access terminal, network environment type, and real-time behavior confidence level; The effective permission vector of a user in this retrieval session is determined based on the access feature set; The effective permission vector includes a first permission level of the knowledge base domain and a second permission level of the source file domain, and the first permission level and the second permission level are orthogonal and independent.
3. The hierarchical knowledge retrieval access control method with dual-track permission isolation between the knowledge base and source files as described in claim 2, characterized in that, The effective permission vector of a user in this retrieval session is determined based on the access feature set, including: Based on the user's identity and organizational hierarchy, the basic permission levels for the user's knowledge base domain and source file domain are determined in the preset permission management library; The security level of the access terminal, the network environment type, and the real-time behavior confidence level are discretized into a three-dimensional risk matrix, and the comprehensive risk value under the current access characteristics is determined based on the three-dimensional risk matrix. The user's current session risk level is determined based on the comprehensive risk value; The basic permission level is adjusted based on the user's current session risk level, generating the adjusted knowledge base domain permission level and source file domain permission level, and the adjusted knowledge base domain permission level and source file domain permission level are used as the effective permission vector.
4. The hierarchical knowledge retrieval access control method with dual-track permission isolation between the knowledge base and source files as described in claim 1, characterized in that, In step 2, the search results are input into the knowledge base for matching, and knowledge fragments with source tracing chains are output. Based on the source tracing chains of the knowledge fragments, the corresponding target source files are located, including: The search results are segmented into words to obtain several word elements. Each word element is labeled with an entity type to obtain an entity type label. At the same time, the word elements and entity type labels are vectorized to generate word vectors. The word vectors are then combined according to the input order of the search results to generate search feature vectors. Calculate the similarity between the retrieved feature vector and the stored feature vectors of each knowledge fragment pre-stored in the knowledge base, and obtain a similarity score; Obtain at least one knowledge fragment with a similarity score equal to or greater than a preset matching threshold; Extract a pre-embedded source identifier sequence from the metadata of each knowledge fragment, wherein the source identifier sequence constitutes the source tracing chain of the knowledge fragment; Based on the source tracing chain, locate the target source file corresponding to the knowledge fragment in the source file end.
5. The hierarchical knowledge retrieval access control method with dual-track permission isolation between the knowledge base and source files as described in claim 1, characterized in that, In step 3, a dual-track permission mapping matrix of knowledge fragments and target source files is constructed, including: The source tracing chain of each knowledge fragment is analyzed to determine the storage path of the unique target source file corresponding to the knowledge fragment; Based on the source tracing chain, a dynamic mapping relationship is constructed between knowledge fragments and target source files to obtain a set of knowledge fragments. and each knowledge fragment The corresponding target source file is denoted as , Let i represent the i-th knowledge fragment, i=1,2,...,n; and let n be the set of all distinct target source files. Where n represents the total number of knowledge fragments; m represents the total number of different target source files, and Each knowledge fragment Originating from a single target source file ,and If two different knowledge fragments and If the storage paths of the corresponding target source files are the same, then ; Let j represent the j-th knowledge segment, where j = 1, 2, ..., n; Represents the j-th knowledge fragment The corresponding target source file, ; For each knowledge fragment Assign baseline knowledge base domain permission levels Assign a baseline source file domain permission level to each distinct target source file, and record the target source file... The permission level is And satisfy the condition that for any two knowledge fragments , ,like The corresponding source files have the same permission level; based on the dynamic mapping relationship, a dual-track permission vector is constructed for the i-th knowledge fragment and the target source file. knowledge fragments With the target source file As a row index identifier, the dual-track permission vector As row elements, construct a dual-track permission mapping matrix M of knowledge fragments and target source files; ; in, This indicates the baseline knowledge base domain permission level corresponding to the nth knowledge fragment; This represents the baseline source file domain permission level corresponding to the nth knowledge fragment.
6. The hierarchical knowledge retrieval access control method with dual-track permission isolation between the knowledge base and source files as described in claim 1, characterized in that, In step 4, based on the dual-track permission mapping matrix of knowledge fragments and target source files, hierarchical permission verification is performed on user access permissions in both the knowledge base permission domain and the source file permission domain, including: Determine the user's effective permission vector based on user access permissions. ,in, Indicates the user's permission level in the knowledge base domain; Indicates the user's permission level in the source file domain; Based on the dual-track permission mapping matrix of knowledge fragment and target source file, read the dual-track permission requirements corresponding to the current knowledge fragment. ;in, This indicates the baseline knowledge base domain permission level required for the current knowledge fragment; This indicates the baseline source file domain permission level required by the target source file; Judge separately Whether it is valid and Is it valid? like If the condition is met, the user is deemed to have permission to access the knowledge fragment; otherwise, the user does not have permission to access the knowledge fragment. like If the condition is met, the user is deemed to have permission to access the target source file corresponding to the knowledge fragment; otherwise, the user does not have permission to access the target source file corresponding to the knowledge fragment.
7. The hierarchical knowledge retrieval access control method with dual-track permission isolation between the knowledge base and source files as described in claim 6, characterized in that, This also includes: making judgments on updating the knowledge base, specifically: The knowledge base's work logs are accessed at a preset period, and the access results are used to determine whether there are users with knowledge base access rights but no source file access rights who send sharing requests to the knowledge base. If the knowledge base exists, it is determined that it needs to be updated, and the file to be shared is determined based on the sharing request; A sharing link request is sent to the source file based on the file to be shared. After the source file receives a response that the request has been approved, the file to be shared is referenced in the knowledge base based on the source file access permissions of the user who can access the file to be shared. At the same time, based on the citation results, a citation link between the file to be shared and the corresponding knowledge fragment is constructed in the knowledge base, and based on the construction results, the access permission range of the knowledge base to the corresponding knowledge fragment is used as the baseline permission range. Based on the baseline permission scope, the access permission limit scope of the file to be shared is consistently corrected, and based on the correction result, the reference link between the file to be shared and the corresponding knowledge fragment is authorized and applied, thus completing the update of the knowledge base; If the knowledge base does not exist, it is determined that no update is needed.
8. The hierarchical knowledge retrieval access control method with dual-track permission isolation between the knowledge base and source files as described in claim 1, characterized in that, Step 4, after performing hierarchical permission checks on user access permissions in the knowledge base permission domain and the source file permission domain, also includes: locking the target content based on the permission check results, retrieving the corresponding hierarchical permission table to match the user permission level, summarizing the corresponding visible content, sorting it semantically, concatenating it, and outputting it. Specifically: Obtain the hierarchical permission verification results for user access permissions, and read the hierarchical permission verification results. When it is determined that the user meets the access permissions in the knowledge base permission domain or the source file permission domain, lock the target knowledge fragment or target source file accessed by the user. There is at least one target knowledge fragment or target source file. Extract the identity identifier of the target knowledge fragment or the target source file, and retrieve the knowledge fragment hierarchical permission table corresponding to the target knowledge fragment or the file paragraph hierarchical permission table corresponding to the target source file from the preset permission database based on the identity identifier; Data traversal is performed on the knowledge fragment hierarchical permission table or the file paragraph hierarchical permission table to determine the permission levels existing in the knowledge fragment hierarchical permission table or the key indicators for level division between adjacent permission levels and the limited values of the indicators. Among them, the permission level corresponds one-to-one with the visible content fragments in the knowledge fragment and the visible paragraphs in the source file. Based on the key indicators of the level classification, the same indicator parameters are extracted for user access permissions, and the corresponding target indicator limit values are determined based on the same indicator parameter extraction results. Match the target indicator limit value with the indicator limit value corresponding to the key indicator of the level division between adjacent permission levels, and determine the highest permission level that the user has in the knowledge fragment level permission table or file paragraph level permission table based on the matching result, and summarize the target visible content fragments or target visible paragraphs corresponding to the highest permission level and the permission levels below. Semantic parsing of user search content is performed to determine the retrieval logical sequence nodes corresponding to the user search content, and the summarized target visible content fragments or target visible paragraphs are sorted based on the logical sequence nodes; Based on the sorting results, the system splices the visible content fragments or paragraphs of the target, and then uses the splicing results to complete the global scheduling and management of the user's searched content.
9. The hierarchical knowledge retrieval access control method with dual-track permission isolation between the knowledge base and source files as described in claim 1, characterized in that, In step 5, based on the permission verification results, the accessible knowledge within the user's permission scope is output, including: Obtain the hierarchical permission verification results for user access permissions, and extract the user's access permission identifiers for each knowledge fragment in the knowledge base permission domain and the access permission identifiers for each target source file in the source file permission domain from the hierarchical permission verification results. Based on the access permission identifier, the corresponding knowledge fragment and target source file are located, and the located knowledge fragment and target source file are output to the user terminal.
10. A hierarchical knowledge retrieval and access control system with dual-track permission isolation between the knowledge base and source files, characterized in that, include: The content search and permission determination module is used to collect user search results and determine user access permissions. The content matching module is used to input the searched content into the knowledge base for matching, output knowledge fragments with source traceability chains, and locate the corresponding target source file based on the source traceability chains of the knowledge fragments; The dual-track permission mapping module is used to construct a dual-track permission mapping matrix between knowledge fragments and target source files; The permission verification module is used to perform hierarchical permission verification of user access permissions in the knowledge base permission domain and the source file permission domain based on the dual-track permission mapping matrix of knowledge fragment-target source file. The knowledge base permission domain and the source file permission domain are orthogonal and independent. The data output module is used to output the accessible knowledge within the user's permission scope based on the permission verification results.
