Security vector retrieval method based on execution path isolation
By generating query authorization contexts and performing admission scoring in index-divided regions, eliminating mismatched regions, and dynamically adjusting retrieval parameters, the problem of execution path isolation for authorization rules in vector databases is solved, thereby improving the system's resistance to attacks and security.
Patent Information
- Application Number
- CN202611327621.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-31
- Publication Date
- 2026-11-06
- Estimated Expiration
- 2046-08-31
AI Technical Summary
Existing vector databases struggle to reliably apply composite authorization rules along the execution path, leading to the exposure of unauthorized regions and failing to effectively defend against continuous probing queries when dynamic policies change.
By generating query authorization contexts, using admission scores to eliminate mismatched indexes and divide regions, and dynamically adjusting retrieval parameters in fine-grained searches, execution path isolation is achieved, ensuring that unauthorized objects do not enter candidate generation and caching, and dynamically defending against probing behavior.
This enhances the system's resistance to attacks, ensures that authorization boundaries are not leaked due to response differences, and maintains retrieval performance, thus achieving dual protection of compliance and security.
Smart Images

Figure CN122838405B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of database technology, and in particular to a secure vector retrieval method based on execution path isolation. Background Technology
[0002] With the widespread adoption of enhanced retrieval generation, enterprise knowledge bases, multimodal question answering, and large-scale model applications, text, images, audio, video, and structured fields can all be encoded into high-dimensional vectors, and high-speed similarity searches can be achieved using near-nearest neighbor indexes. Existing systems generally employ a shared index recall and result filtering processing path in their engineering implementations. This involves first performing recall, expansion, reordering, and caching on the full shared index, and then removing unauthorized results based on user identity, tenant, role, or metadata rules. Existing vector databases' scalar filtering typically remains at the result filtering or bucket-level coarse-screening level, making it difficult to stably apply complex authorization rules such as tenant, security level, organizational domain, purpose, region, timeliness, export restrictions, and policy version to the index execution path. When authorization policies change dynamically, existing systems typically perform compensatory filtering at the application layer, failing to guarantee that the index traversal path itself does not cross unauthorized areas. Faced with continuous probing queries, existing systems lack a unified closed loop that feeds back risk status to the number of probe buckets, expansion budget, recall cap, interpretation granularity, and caching strategies. Summary of the Invention
[0003] To address the existing technical problems, this application provides a secure vector retrieval method based on execution path isolation, which can reduce the leakage of authorization boundaries due to response differences and improve the system's resistance to attacks.
[0004] Firstly, a security vector retrieval method based on execution path isolation is provided, comprising: obtaining a query request; generating a query authorization context based on the query request, the query authorization context including a query vector, a query-side authorization projection code, and a query authorization descriptor; matching the query vector with various index partitioning regions in a database, calculating an admission score corresponding to each index partitioning region, and determining an index region whitelist including multiple candidate index partitioning regions based on the admission scores corresponding to each index partitioning region; obtaining dynamically adjusted retrieval parameters; performing fine-grained search on each candidate index partitioning region in the index region whitelist based on the query authorization context and the retrieval parameters, and determining a result object set including multiple result objects; calculating the security exposure score of each result object in the result object set; and classifying and determining the output of each result object based on the security exposure score of each result object.
[0005] This application generates a query authorization context and uses admission scoring in the coarse screening stage to eliminate mismatched index partitions, preventing unauthorized objects from entering candidate generation and caching. In fine-grained searching, based on the query authorization context and dynamically adjusted retrieval parameters, it performs fine-grained searches on specific objects within each candidate index partition, filtering out qualified result objects. During the search process, retrieval parameters can automatically tighten the probe range, expand the budget, and adjust the output granularity in real time, achieving adaptive defense against probing behavior. Finally, based on the security exposure score of each result object, the output of each result object is determined. This ensures both compliance and security while preventing the leakage of authorization boundaries due to response differences. The entire process truly decentralizes authorization constraints from result filtering to execution path isolation, significantly improving the system's anti-attack capability while maintaining retrieval performance. Attached Figure Description
[0006] Figure 1 This is an application environment diagram of a security vector retrieval method based on execution path isolation in one embodiment; Figure 2 This is a flowchart of a security vector retrieval method based on execution path isolation in one embodiment; Figure 3 This is a flowchart of calculating the admission score corresponding to each index partition region in one embodiment; Figure 4 This is a schematic diagram of a security vector retrieval device based on execution path isolation in one embodiment; Figure 5 This is a schematic diagram of a computing device in one embodiment. Detailed Implementation
[0007] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0008] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the specification of this invention is for the purpose of describing particular embodiments only and is not intended to limit the scope of the invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.
[0009] In the following description, the expression “some embodiments” refers to a subset of all possible embodiments. However, it should be understood that “some embodiments” can be the same subset or different subsets of all possible embodiments and can be combined with each other without conflict.
[0010] See Figure 1In one embodiment, the application environment diagram of the secure vector retrieval method based on execution path isolation includes multiple terminal devices 100 and a computing device 200. The terminal devices 100 can communicate with the computing device 200. The secure vector retrieval method based on execution path isolation provided in this embodiment can be applied to the computing device 200, which communicates with a database. The computing device 200 obtains a query request from the terminal devices 100 and performs a query based on the query request to determine the result object obtained from the query.
[0011] Existing retrieval technologies suffer from the following shortcomings: Although unauthorized objects are filtered during the output stage, they have already impacted candidate generation, similarity calculation, graph traversal, cache reuse, pagination control, and explanatory information generation stages; for graph indexes, unauthorized nodes may act as search springboards in adjacency expansion, allowing attackers to infer the existence and boundaries of sensitive objects through multiple rounds of near-synonymous queries, threshold fine-tuning, candidate size variations, and response latency differences; existing vector database scalar filtering typically remains at the result filtering or bucket-level coarse screening level, making it difficult to stably apply complex authorization rules such as tenant, security level, organizational domain, purpose, region, timeliness, export restrictions, and policy version to the index execution path; when authorization policies change dynamically, existing systems typically perform compensatory filtering at the application layer, failing to guarantee that the index traversal path itself does not traverse unauthorized areas; and when faced with continuous probing queries, existing systems lack a unified closed loop that feeds back risk status to the number of probe buckets, expansion budget, recall cap, explanatory granularity, and caching strategy. To address at least one of the above technical problems, this application proposes a secure vector retrieval method based on execution path isolation.
[0012] Please see Figure 2 This is a flowchart of a security vector retrieval method based on execution path isolation provided in an embodiment of this application. The security vector retrieval method based on execution path isolation is applied in a computing device and includes the following steps: S10. Obtain the query request and generate a query authorization context based on the query request. The query authorization context includes the query vector, the query-side authorization projection code, and the query authorization descriptor.
[0013] In this embodiment, after receiving a query request, the query text, query image, query audio, query video, or structured search conditions in the query request are extracted, and a query vector is generated using the encoding model corresponding to the object entry stage. Simultaneously, based on the identity, role set, tenant set, organization domain set, purpose set, current time, geographical constraints, export action, and policy version of the access subject initiating the query request, a query authorization descriptor is compiled, and a query-side authorization projection code is generated.
[0014] A query authorization descriptor is a structured authorization tuple compiled by a compiler function, consisting of the access subject's identity token information, authorization attributes returned by the authorization center, context data, current time, and the purpose or derived action declared in the query request. The query authorization descriptor is a structured authorization tuple dynamically compiled based on the query request, used to represent the attributes and context data of the access subject initiating the query request within the target authorization space.
[0015] The query-side authorization projection code is a binary code, such as a bitmap or a fixed-length hash value, obtained by projecting the query authorization descriptor onto it using a projection function. The projection function is exactly the same as the function that generates the authorization projection code when the object is added to the database.
[0016] S11. Match the query vector with each index partition region in the database, calculate the admission score corresponding to each index partition region, and determine an index region whitelist including multiple candidate index partition regions based on the admission scores corresponding to each index partition region.
[0017] In this embodiment, the index partitioning regions include clusters, buckets, partitions, subgraphs, etc. The admission score corresponding to the index partitioning region is a comprehensive metric used to measure whether the index partitioning region is worth entering the subsequent fine-grained search, i.e., being selected into the authorization candidate whitelist. The higher the admission score, the more semantically relevant the index partitioning region is to the query vector, and the clear and low-risk internal authorization boundaries should be selected into the whitelist for fine-grained search.
[0018] S12. Obtain dynamically adjusted search parameters.
[0019] In this embodiment, the retrieval parameters represent a set of variable retrieval control variables that are adjusted in real time. These retrieval parameters determine the execution scope, strictness, resource consumption, and information exposure granularity of the query within a time query window, thereby enabling the system to adaptively defend against suspicious or high-risk query behaviors.
[0020] S13. Based on the query authorization context and retrieval parameters, divide each candidate index in the index region whitelist into regions, perform fine-grained search, and determine the result object set including multiple result objects.
[0021] In this embodiment, after obtaining the index region whitelist, the system performs a fine-grained search on specific objects within each candidate index region based on the query authorization context and retrieval parameters. The system then filters out the result objects that meet the criteria. The set of result objects constitutes the final query result.
[0022] S14. Calculate the security exposure score of each result object in the result object set.
[0023] The Security Exposure Score is a quantitative metric used to measure the extent to which a result object is exposed to the accessing subject within the context of the query authorization. Specifically, it measures how securely a result object can be exposed to the user under the current query authorization context and session risk environment. A higher score indicates that the result object is more suitable to be returned in its complete form; a lower score suggests a greater need to restrict the output content, or even to completely conceal its existence.
[0024] S15. Based on the security exposure scores of each result object, output each result object in a categorized manner.
[0025] First, in the coarse screening stage, a large number of index partitions that do not match user authorization are directly excluded from the whitelist through admission scoring, preventing any objects within these partitions from entering subsequent vector calculations or graph traversals. Second, in the fine-grained search, result objects that meet the criteria are filtered. In addition, dynamically adjusted search parameters can tighten the search depth and the number of results in real time based on session risk, further compressing the exposure surface of suspicious paths. This entire mechanism ensures that unauthorized objects will never affect similarity calculation, cache reuse, interpretation information, or response latency, thus achieving "execution path isolation" in both physical and temporal dimensions.
[0026] By generating query authorization contexts and using admission scoring in the coarse screening stage to eliminate mismatched index partitions, unauthorized objects are prevented from entering candidate generation and caching. In fine-grained searching, based on the query authorization context and dynamically adjusted retrieval parameters, a fine-grained search is performed on specific objects within each candidate index partition, filtering out result objects that meet the criteria. During the search process, dynamically adjusted retrieval parameters automatically tighten the probe range, expand the budget, and adjust the output granularity in real time, achieving adaptive defense against probing behavior. Finally, based on the security exposure score of each result object, the output of each result object is determined. This ensures both compliance and security while preventing the leakage of authorization boundaries due to response differences. The entire process truly decentralizes authorization constraints from result filtering to execution path isolation, significantly improving the system's resistance to attacks while maintaining retrieval performance.
[0027] In some embodiments, the method further includes: The database is established in advance; The pre-establishment of the database includes: Retrieve the object content of the object to be imported into the database; Extract the multidimensional authorization attributes of the object to be added to the database, generate the authorization attribute vector of the object to be added to the database, map the authorization attribute vector to the authorization projection code of the object to be added to the database, and generate the integrity summary of the object to be added to the database based on the object identifier of the object to be added to the database, the policy version of the object to be added to the database, and the authorization projection code. Based on the object content, a semantic embedding vector is generated, and the semantic embedding vector, the object identifier, the authorization projection code, the integrity summary, and the policy version are encapsulated into a security vector entry for the object to be added to the database. Based on the security vector entries, the main vector index of the object to be added to the database and the authorized projection index of the object to be added to the database are generated.
[0028] In this embodiment, the object's authorization projection code represents the object's authorization attribute data. Multidimensional authorization attributes include the object's tenant, security level, organizational domain, purpose, validity period, region, export restrictions, and policy version, etc. The tenant identifies the tenant to which the object belongs (e.g., enterprise, department, project team). In authorization determination, the accessible subject's set of accessible tenants must include the tenants required by the object, for multi-tenant isolation. The security level indicates the object's confidentiality level (e.g., public, internal, confidential, top secret). Authorization determination requires the accessible subject's security level to be no lower than the object's security level, for graded security control. The organizational domain is the organizational structure unit to which the object belongs (e.g., R&D department, finance department). The accessible subject's set of accessible organizational domains must include the organizational domain required by the object, implementing access control based on organizational structure. Role visibility refers to the roles (e.g., administrator, ordinary user) that the object is allowed to access. It is usually combined with the organizational domain or tenant, requiring the subject to have at least one allowed role. Purpose refers to the scenarios in which the object is allowed to be used, such as only for summary generation, model training, and data analysis. The accessible subject's set of purposes must include the purposes required by the object to prevent data misuse. The validity period refers to the authorized duration of the object, typically including a start time and an end time. Authorization determination requires the current time to be within the validity period, achieving timeliness control. The geographic region refers to the geographical locations (e.g., country A, country B) where the object is allowed access. The access subject's set of accessible geographic regions must include the regions required by the object to ensure data sovereignty compliance. Export restrictions refer to the level at which the object is allowed to be exported (e.g., export prohibited, summary only, full text export allowed). The access subject's export level must be no lower than the object's requirements to prevent sensitive data leakage. The policy version is the version number of the authorization policy followed by the object. Authorization determination requires that the access subject's policy version strictly match the object's, ensuring that older versions of the object are not accessed incorrectly when the policy changes.
[0029] For objects The normalized authorization attribute vector is: in, Representation Object The security level encoding, Representation Object Tenant location map, Representation Object Organizational domain location map, Representation Object Uses of bitmap Representation Object Validity code, Representation Object Location map of the region Representation Object Export restriction level, Representation Object The strategy version number.
[0030] Further utilizing the authorization projection function, the authorization attribute vector is mapped to an authorization projection code, and an integrity summary associated with the object identifier is generated. Based on the object content, a semantic embedding vector is generated, and the embedding vector, object identifier, authorization attribute vector, authorization projection code, integrity summary, and policy version are encapsulated into security vector entries. A master vector index is constructed based on these security vector entries, and an authorization projection index is constructed simultaneously. When the master vector index is a graph index, authorization projection codes, boundary statistics, and bridging risk factors are maintained for graph nodes. When the master vector index is a clustering or inverted index, authorization coverage, boundary clutter, and policy version mapping tables are maintained for clusters, buckets, or partitions.
[0031] object Authorized projection code for: ,in, Indicates the authorized projection function, These represent the bit encoding functions for the corresponding authorized attributes. Indicates a serial connection operation. This represents the packaging function.
[0032] object Complete summary Represented as: ,in, For cryptographic digest functions, This is an attribute vector summarization function. Used as an object identifier.
[0033] This step belongs to the database preprocessing stage, which is used to complete the access of objects to be added to the database, normalize the authorization attributes, encapsulate the security vector entries, and build the main vector index and the authorization projection index, so as to facilitate efficient subsequent queries.
[0034] In some embodiments, generating a query authorization context based on the query request includes: Obtain the identity token information of the access subject that initiated the query request, the authorization attributes of the access subject, the context data of the query request, and the current time of the query request; call the authorization descriptor compilation function to compile the identity token information, the authorization attributes, the context data, and the current time to obtain the query authorization descriptor, wherein the query authorization descriptor includes the security level, tenant attribute set, organization domain attribute set, purpose attribute set, current time, region attribute set, export restriction level, and policy version number; Obtain the query authorization attribute vector corresponding to the query vector. The query authorization attribute vector includes the security level code, tenant bitmap, organization domain bitmap, purpose bitmap, validity period code, region bitmap, export restriction level, and policy version number. Perform projection encoding on the query authorization attribute vector to obtain the query side authorization projection code.
[0035] In this embodiment, similar to the processing of objects to be added to the database, a query authorization attribute vector is obtained based on the multi-dimensional authorization attributes of the access subject. Then, the query authorization attribute vector is compiled to obtain a query authorization descriptor for the access subject, and a query-side authorization projection code for the access subject is generated. The multi-dimensional authorization attributes of the access subject include identity token information, role set, tenant set, organizational domain set, purpose set, terminal trust level, current time, geographical constraints, export action, and policy version, etc.
[0036] Query Authorization Descriptor ,in Indicates the level of security classification. Represents a set of tenant attributes, Represents the set of organizational domain attributes, Represents a set of usage attributes. Indicates the current time, Represents a set of regional attributes. Indicates the export restriction level, Indicates the policy version number. Query-side authorization projection code. Represented as: , This indicates the authorized projection function.
[0037] For example, after a user logs in, the identity token shows that they are an "administrator" of tenant A. The permission center returns that their security level is capped at 3 (confidential), and their accessible regions include countries A and B. The query request declares the purpose as "summary generation," and the current time is 2025-01-01. Then du=[3,{tenant A},{R&D Department},{summary generation},2025-01-01,{country A,country B},1,2].
[0038] In some embodiments, such as Figure 3 As shown, based on the query vector and the various index partitioning regions in the database, the admission score corresponding to each index partitioning region is calculated, including: S31. For any of the index partition regions, calculate the similarity between the query vector and the center of the index partition region based on the query-side authorization projection code.
[0039] In this embodiment, the index partition region includes multiple objects, each representing a data entry, such as a document, an image, or an audio clip. The center vector corresponding to the center of the index partition region is represented as... Similarity Represents the query vector With the center vector The similarity function between them. Preferably, the similarity function uses cosine similarity, expressed as: , This is a preset value. The centroid vector of an index partition region refers to the centroid or representative vector of all object vectors within that index partition region. It can be calculated during the database construction phase using clustering algorithms (such as k-means, IVF) and is used to quickly assess the semantic relevance of the entire region to the query vector during the coarse screening phase.
[0040] S32. Determine the authorization value of each object in the index partitioning area for the access subject that initiated the query request.
[0041] In this embodiment, the object Access subject Authorization determination function for: .
[0042] in, This is an indicator function. The authorization decision value can be determined based on the authorization decision function. Generally, the authorization decision value is 0 or 1. Authorization decision value A value of 1 indicates the access subject. The authorization attributes fully satisfy the object All authorization requirements have been met, meaning authorization has been granted. Authorization decision value. A value of 0 indicates the access subject. At least one authorization attribute of the object does not satisfy The requirement is that authorization is not granted.
[0043] S33. Determine the boundary margin between each boundary object in the index partitioning region and the access subject.
[0044] Boundary margin is used to quantify the safety margin or proximity of an accessing subject to an object on the authorization boundary. The boundary margin between a boundary object and an accessing subject is used to quantify the proximity of the accessing subject to that boundary object on the authorization boundary. A boundary object in an indexed region refers to a set of critical sample objects with the highest authorization constraint strength, either pre-labeled or dynamically selected in real-time within the indexed region; the boundary object characterizes the authorization boundary position of the entire indexed region relative to the current accessing subject.
[0045] Optionally, determining the boundary margin between each boundary object in the index partitioning region and the access subject includes: For any of the boundary objects, a security level difference margin is determined based on the security level of the boundary object and the security level of the accessing subject; a validity period difference margin is determined based on the validity period code of the boundary object and the current time of the accessing subject; an export restriction difference margin is determined based on the export restriction level of the boundary object and the export restriction level of the accessing subject; a regional coverage margin is determined based on the regional requirement set of the boundary object and the regional attribute set of the accessing subject; the minimum value among the security level difference margin, the validity period difference margin, the export restriction difference margin, and the regional coverage margin is taken as the boundary margin between the boundary object and the accessing subject.
[0046] object With access subject The formula for determining the boundary margin between is as follows: Among them: security level difference margin ,in Indicates the maximum security classification value. Expiry date margin. , This represents the validity period normalization factor. It derives the constraint margin. , Indicates the maximum export level. Geographic coverage margin. , It is a very small preset value.
[0047] when When, the object These are considered boundary objects. Even if a boundary object meets the basic authorization criteria, it is only allowed to enter the controlled summary, approval prompt, or unified empty response process. This represents the boundary margin threshold.
[0048] S34. Based on the authorization judgment value corresponding to each object, determine the authorization coverage rate of the access subject to the index division area.
[0049] In this embodiment, the authorization coverage rate represents the proportion of objects that an accessing subject has the right to access within the indexed partition region. Let the indexed partition region be... The collection of objects is The center vector is Then the access subject Divide the index into regions Authorization coverage for: , express The total number of objects in the dataset.
[0050] S35. Based on the boundary margin between each boundary object and the access subject and the authorization judgment value corresponding to each object, determine the boundary clutter of the index division region.
[0051] In this embodiment, relative to the access subject Index partitioning regions Boundary mixing What is being measured is: within the index partition region In this context, the level of risk posed by unauthorized objects that are very close to the authorized boundary is considered. This is known as boundary complication. for: .
[0052] S36. Determine the matching degree between the query-side authorization projection code and the regional aggregation authorization projection code of the index partitioning area.
[0053] In this embodiment, the matching degree is calculated based on the Jaccard function. Similarity Indicates the query side authorization projection code Divide the region with the index Regional Aggregation Authorization Projection Code The degree of matching between them. , , , These are the weighting coefficients.
[0054] S37. Determine the admission score based on the similarity, the authorization coverage, the boundary clutter, and the matching degree.
[0055] In this embodiment, the index is used to divide the region. Corresponding admission score for: Regional aggregation authorization projection code It is obtained by performing bitwise OR or union operations on the authorization projection codes of all objects within the indexed region.
[0056] In the above embodiments, authorization coverage and matching degree can preemptively exclude index partitions where most objects have no access rights or where authorization projections are severely mismatched. This prevents unauthorized objects from entering subsequent vector distance calculations, graph traversals, or cache reuse, thereby saving resources and eliminating side-channel exposure. The introduction of boundary promiscuity allows the system to identify and reduce the admission score of partitions containing a large number of borderline objects—that is, unauthorized objects close to the authorization boundary—thus reducing the opportunity for attackers to use these partitions as probe springboards at the source. By supporting composite authorization strategies, authorization coverage, promiscuity, and projection bias are all based on multi-dimensional authorization attributes, such as security level, tenant, region, validity period, and export restrictions. This allows for flexible combination of complex strategies without the need to build separate indexes for each strategy dimension. By dividing statistical data within the index region, such as center vector, authorization coverage, and aggregated projection code, there is no need to traverse internal objects, resulting in minimal overhead and no significant impact on query performance.
[0057] In some embodiments, determining the index region whitelist, which includes multiple candidate index partitioning regions, includes: The index partitioning regions with the authorization coverage rate greater than the authorization coverage rate threshold and the admission score greater than the admission score threshold are selected as the candidate index partitioning regions; Based on the multiple candidate indexes, regions are divided, and a whitelist of index regions is generated.
[0058] In this embodiment, only index partitioning regions that meet the following conditions are retained in the authorization candidate whitelist: ,in This represents the authorization coverage threshold. This indicates the admission score threshold.
[0059] In some embodiments, the step of dividing each candidate index in the index region whitelist into regions based on the query authorization context and the retrieval parameters, performing fine-grained search, and determining a set of result objects including multiple result objects includes: The candidate index division region includes candidate graph indexes. For any candidate graph index, the candidate node in the candidate graph index that indicates the authorization judgment value to pass and whose boundary margin is greater than the boundary margin threshold is taken as the entry node. Starting from the entry node, the traversal begins. For the current node being traversed, the node gating traversal score between the current node and the accessing subject is calculated. When the node gating traversal score is greater than the node gating traversal score threshold, the authorization judgment value corresponding to the current node indicates that it has passed, and the boundary margin between the current node and the accessing subject is greater than the boundary margin threshold, the current node is added to the priority queue as a search springboard. The adjacent edges of the current node are then expanded until the candidate graph index is traversed. After all candidate graph indexes have been traversed, nodes with a similarity greater than the similarity threshold to the query vector are selected from the priority queue as result objects.
[0060] In this embodiment, since the partitioned region includes the graph index, the candidate index partitioned region includes the candidate graph index. The current node represents the node currently being traversed, and the node whose neighboring nodes are being determined. For each current node traversed, a node-gated traversal score between the current node and the accessing entity needs to be calculated. For nodes in the graph index... ,node With access subject Node gated traversal scoring for: ,in Represents query vector and node node vectors Similarity between them. Represents a node Boundary margin relative to the access subject. Indicates the query side authorization projection code With nodes Authorized projection code The degree of matching. - This represents the weighting coefficient. Represents a node relative access subject The bridging risks.
[0061] For nodes in the graph index Define its neighborhood as Then the node relative access subject The bridging risks are: , Indicates neighboring nodes. Indicates the access subject For neighboring nodes The authorization determination value. This represents the total number of nodes in the neighborhood.
[0062] Whether the current node can continue to expand depends on the following edge expansion condition: , Indicates the boundary margin threshold. This represents the node gating traversal scoring threshold. When... At that time, node It does not participate in adjacent edge expansion and cannot be used as a springboard for subsequent searches.
[0063] When the extension conditions are met, namely, the node gating traversal score is greater than or equal to the node gating traversal score threshold, the authorization judgment value corresponding to the current node indicates that it has passed, and the boundary margin between the current node and the access subject is greater than or equal to the boundary margin threshold.
[0064] In clustering or inverted index scenarios, reconstruction and fine sorting are performed only on candidates within a bucket that meet the node gating traversal score threshold.
[0065] By introducing triple gating conditions during the traversal process—authorization approval, boundary margin compliance, and node gating traversal score compliance—the system can block the propagation path of unauthorized or high-risk nodes in real time. Specifically, only nodes that simultaneously meet the expansion conditions are allowed to join the priority queue and continue expanding their adjacent edges; otherwise, the node and all its subsequent neighbors will be completely blocked. This method fundamentally eliminates the possibility of attackers using authorized nodes as springboards to gradually explore unauthorized regions, and also prevents edge-prone objects with insufficient boundary margins from being mistakenly used as expansion starting points, thus achieving strict isolation of unauthorized access and unexpansion at the index traversal execution level.
[0066] Furthermore, the priority queue itself, sorted by similarity, ensures that retrieval quality is not severely degraded by authorization filtering, while the dynamic threshold strikes a balance between security and utility. The final output set of results objects to the hierarchical exposure step undergoes strict execution path gating and retains the candidates with the highest semantic relevance, achieving a dual optimization of security and efficiency.
[0067] In some embodiments, obtaining dynamically adjusted retrieval parameters includes: Obtain query monitoring data corresponding to the access subject that initiated the query request. The query monitoring data includes continuous query semantic drift rate, number of retries, threshold perturbation amplitude, candidate size change rate, number of cache anomalies, and burst request intensity. Based on the query monitoring data, calculate the query risk score of the accessing entity; When the query risk score is higher than the query risk score threshold, the retrieval parameters are adjusted, including the number of probe buckets, graph expansion budget, recall cap, and similarity threshold.
[0068] In this embodiment, within the time window Define the access subject. Risk score query for: ,in, In the time window Semantic drift rate of consecutive queries within the scope, In the time window The number of retries within, In the time window The threshold perturbation amplitude within, In the time window Rate of change in candidate size within the range In the time window The number of cache exceptions within the cache. In the time window The intensity of sudden requests within, to These are non-negative weighting coefficients. Semantic drift rate of consecutive queries indicates the degree of change in the query vector direction between consecutive queries (e.g., changes in cosine distance). Low drift indicates high query similarity, while high drift indicates a sudden change in intent. Number of retries indicates the number of times the same or highly similar queries are repeatedly requested within a time window. Threshold perturbation magnitude indicates the magnitude and frequency of adjustments to retrieval parameters in consecutive user requests. Candidate size change rate indicates the variance or magnitude of change in the number of returned results. Cache anomaly count indicates the number of times the cache hit rate fluctuates abnormally (e.g., suddenly decreases or increases). Burst request intensity indicates the degree to which the request rate far exceeds the normal baseline (e.g., a large number of queries in a short period).
[0069] Let the basic number of probe barrels be The basic expansion budget is The basic recall limit is The basic similarity threshold is The adjusted search parameters are: Adjusted number of probe barrels ,in Indicates the minimum number of probe buckets allowed. This represents the floor function. This indicates the number of basic probe barrels. This represents the adjustment factor. The adjusted graph shows the expanded budget. , This indicates the minimum allowed expansion budget. This indicates the basic extended budget. This represents the adjustment factor. The adjusted recall ceiling. , Indicates the minimum allowed number of recalls. Indicates the basic recall limit. This represents the adjustment coefficient. The adjusted similarity threshold. , Indicates the basic similarity threshold. This represents the adjustment coefficient. This indicates the average security level. The average security level of an object is determined based on its security classification and sensitivity level.
[0070] The adjusted probe bucket count can be used to limit the number of buckets / partitions participating in scoring when generating an authorized candidate whitelist for clustering indexing scenarios. The adjusted graph expansion budget is used for fine-grained searching in graph indexing scenarios, controlling the maximum capacity of the priority queue. The adjusted recall cap is used for candidate set filtering after traversal, retrieving only the top K most similar nodes from the priority queue as the result object set. The adjusted similarity threshold is used for node enqueuing or final result filtering, and also affects the final hierarchical output.
[0071] In some embodiments, calculating the security exposure score of each result object in the result object set includes: For any result object, calculate the boundary margin corresponding to the result object; Based on the authorization projection matching degree between the authorization projection code of the result object and the authorization projection code of the query side; Obtain the query risk score of the access subject; Based on the boundary margin corresponding to the result object, the authorized projection matching degree, and the query risk score, a weighted average is performed to determine the security exposure score of the result object.
[0072] In this embodiment, the result object Safety Exposure Score for: .
[0073] Represents the result object Authorization projection code and query side authorization projection code The degree of matching between them. Represents the result object Boundary margin between the accessing entity and the accessing entity. Indicates within the time window Internal access subject The query risk score. Among them, These are non-negative weighting coefficients.
[0074] Optionally, the classification and output of each result object based on its security exposure score includes: For the first result object whose security exposure score is greater than or equal to the first exposure score threshold, output all field contents of the first result object; For the second result object whose safety exposure score is less than the first exposure score threshold but greater than or equal to the second exposure score threshold, the second result object is desensitized before the desensitized second result object is output. For third result objects whose safety exposure scores are less than the second exposure score threshold and greater than or equal to the third exposure score threshold, output the object identifier of the third result object; For fourth result objects whose safety exposure score is less than the third exposure score threshold, prompt the fourth result object to approve or return an empty result.
[0075] according to Based on the size, the resulting objects are divided into four levels: in, This indicates that the full content will be returned. This indicates that a controlled summary is being returned. This indicates that the returned object identifier or approval prompt is being sent. This indicates that a uniform empty response will be returned. This indicates the first exposure threshold. This indicates the second exposure threshold. This represents the third exposure threshold.
[0076] Based on the security exposure score of each object, the output granularity is dynamically determined by considering boundary margin, authorization matching degree, and session risk, thus achieving a fine balance between security and usability. Specifically, high-scoring objects provide complete content to ensure a normal user experience; medium- and low-scoring objects only return anonymized summaries or object identifiers, avoiding the leakage of sensitive information while allowing users to perceive the object's existence and request privilege escalation; extremely low-scoring objects uniformly return empty responses or approval prompts, eliminating the possibility of attackers using response differences for boundary probing. This approach ensures data compliance in high-security scenarios while maximizing the usability and user-friendliness of the retrieval system.
[0077] This application no longer limits authorization control to the retrieval result output stage, but instead constructs an execution-level security retrieval framework that includes pre-projection pruning of authorization, boundary margin gating traversal, risk closed-loop parameter tuning, and hierarchical exposure control. Its core ideas are: standardizing and encoding the security attributes of the source object to generate authorization projection codes, enabling direct mapping of security attributes to the index executable structure; constructing an authorization projection index outside the main vector index to form a quickly identifiable whitelist of authorization candidates for clusters, partitions, buckets, or subgraphs; introducing boundary margins and bridging risks during graph index traversal or bucket expansion stages to prohibit unauthorized nodes from serving as search springboards; performing closed-loop contraction of retrieval parameters based on query behavior risks to reduce the impact of tentative queries on boundary samples and the caching system; and returning the final results hierarchically according to security exposure scores, using policy version-related cache isolation keys.
[0078] Compared with the prior art, one or more embodiments provided in this application have at least the following beneficial effects: The authorization constraints are moved forward from result filtering to candidate admission, entry point selection, path expansion, cache reuse, and exposure control, reducing retrieval execution path leakage; the authorization projection index enables executable mapping of authorization rules at the cluster, bucket, partition, and subgraph levels, reducing irrelevant search space; boundary margin gating traversal prevents boundary nodes and unauthorized nodes from acting as graph search springboards, reducing the risk of existence inference and structure inference; risk closed-loop parameter tuning directly feeds back abnormal query behavior to retrieval parameters and interpretation granularity, suppressing continuous trial-and-error retrieval; and output level control and cache isolation keys reduce cache side-channeling, pagination side-channeling, and interpretation side-channeling.
[0079] In another aspect, this application provides a computer program product, including a computer program that, when executed by a processor, implements the secure vector retrieval method based on execution path isolation according to any embodiment of this application.
[0080] In the computer program product, the optional implementation form of the program module architecture of the computer program that implements each step of the security vector retrieval method based on execution path isolation can be a security vector retrieval device based on execution path isolation.
[0081] Please see Figure 4This application provides a security vector retrieval device based on execution path isolation, comprising: an acquisition module 41, configured to acquire a query request and generate a query authorization context based on the query request, the query authorization context including a query vector, a query-side authorization projection code, and a query authorization descriptor; a determination module 42, configured to match the query vector with various index partitioning regions in a database, calculate an admission score corresponding to each index partitioning region, and, based on the admission scores corresponding to each index partitioning region, the determination module 42 is further configured to determine an index region whitelist including multiple candidate index partitioning regions; the acquisition module 41 is further configured to acquire dynamically adjusted retrieval parameters; the determination module 42 is further configured to perform fine-grained search on each candidate index partitioning region in the index region whitelist based on the query authorization context and the retrieval parameters, and determine a result object set including multiple result objects; the determination module 42 is further configured to calculate the security exposure score of each result object in the result object set; and an output module 43, configured to classify and determine the output of each result object based on the security exposure score of each result object.
[0082] It will be understood by those skilled in the art that Figure 4 The structure of the security vector retrieval device based on execution path isolation does not constitute a limitation on the device itself. Each module can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in hardware or independently of the controller in the computer device, or stored in software in the memory of the computer device, so that the controller can invoke and execute the operations corresponding to each module. In other embodiments, the security vector retrieval device based on execution path isolation may include more or fewer modules than illustrated.
[0083] Please see Figure 5 In another aspect of this application, a computing device 200 is also provided, including a memory 3011 and a processor 3012. The memory 3011 stores a computer program, and when the computer program is executed by the processor, the processor 3012 causes the processor to perform the steps of the secure vector retrieval method based on execution path isolation provided in any of the above embodiments of this application. The computing device 200 may include computing devices (e.g., desktop computers, laptop computers, tablet computers, handheld computers, smart speakers, servers, etc.), mobile phones (e.g., smartphones, cordless phones, etc.), wearable devices (e.g., a pair of smart glasses or a smartwatch) or similar devices, and robotic devices.
[0084] The processor 3012 is the control center, connecting various data points throughout the computer device via various interfaces and lines. It executes software programs and / or modules stored in the memory 3011, and calls data stored in the memory 3011 to perform various functions and process data. Optionally, the processor 3012 may include one or more processing cores; preferably, the processor 3012 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user page, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 3012.
[0085] The memory 3011 can be used to store software programs and modules. The processor 3012 executes various functional applications and data processing by running the software programs and modules stored in the memory 3011. The memory 3011 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 3011 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 3011 may also include a controller to provide the processor 3012 with access to the memory 3011.
[0086] In another aspect, this application also provides a storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the steps of the security vector retrieval method based on execution path isolation provided in any of the above embodiments of this application.
[0087] Those skilled in the art will understand that all or all data flows in the methods provided in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a non-volatile computer-readable storage medium. When executed, the program can include the flows of the embodiments of the methods described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile media. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
[0088] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. The scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A secure vector retrieval method based on execution path isolation, characterized in that, include: A query request is obtained, and a query authorization context is generated based on the query request. The query authorization context includes a query vector, a query-side authorization projection code, and a query authorization descriptor. The query authorization descriptor is a structured authorization tuple dynamically compiled based on the query request, used to characterize the attributes and context data of the access subject that initiates the query request. The query-side authorization projection code is a binary code obtained by projecting the query authorization descriptor using a projection function. The process involves matching the query vector with various index partitions in the database, calculating the admission score for each index partition, and determining a whitelist of index partitions including multiple candidate index partitions based on these admission scores. The matching process includes: for any index partition, calculating the similarity between the query vector and the center of the index partition based on the query-side authorization projection code; determining the authorization judgment value of each object in the index partition for the accessing entity initiating the query request, and determining the boundary margin between each boundary object in the index partition and the accessing entity; determining the authorization coverage of the index partition by the accessing entity based on the authorization judgment value of each object; determining the boundary clutter of the index partition based on the boundary margin between each boundary object and the accessing entity and the authorization judgment value of each object; and determining the matching degree between the query-side authorization projection code and the regional aggregate authorization projection code of the index partition, wherein the regional aggregate authorization projection code is obtained by performing a union operation on the authorization projection codes of all objects in the index partition, and the authorization projection code is obtained based on the authorization attribute data of the objects. Admission scores are determined based on similarity, authorization coverage, boundary clutter, and matching degree. Obtain dynamically adjusted search parameters; Based on the query authorization context and the retrieval parameters, the candidate indexes in the index region whitelist are divided into regions, fine-grained search is performed, and a set of result objects including multiple result objects is determined. Calculate the security exposure score of each result object in the result object set. The security exposure score is a quantitative indicator used to measure the degree to which the result object is exposed to the access subject under the query authorization context. Based on the security exposure score of each result object, the output of each result object is determined by category.
2. The secure vector retrieval method based on execution path isolation as described in claim 1, characterized in that, The method also includes: Pre-establish a database; Pre-establishing a database includes: Retrieve the object content of the object to be imported into the database; Extract the multidimensional authorization attributes of the object to be added to the database, generate the authorization attribute vector of the object to be added to the database, map the authorization attribute vector to the authorization projection code of the object to be added to the database, and generate the integrity summary of the object to be added to the database based on the object identifier, the policy version of the object to be added to the database, and the authorization projection code. Based on the object content, a semantic embedding vector is generated, and the semantic embedding vector, object identifier, authorization projection code, integrity digest and policy version are encapsulated into a security vector entry for the object to be added to the database. Based on the security vector entries, generate the main vector index and the authorized projection index of the objects to be added to the database.
3. The secure vector retrieval method based on execution path isolation as described in claim 1, characterized in that, Based on the query request, the query authorization context is generated as follows: Obtain the identity token information of the access subject initiating the query request, the access subject's authorization attributes, the context data of the query request, and the current time of the query request; call the authorization descriptor compilation function to compile the identity token information, authorization attributes, context data, and current time to obtain the query authorization descriptor, which includes the security level, tenant attribute set, organization domain attribute set, purpose attribute set, current time, region attribute set, export restriction level, and policy version number; Obtain the query authorization attribute vector corresponding to the query vector. The query authorization attribute vector includes the security level code, tenant bitmap, organization domain bitmap, purpose bitmap, validity period code, region bitmap, export restriction level, and policy version number. Perform projection encoding on the query authorization attribute vector to obtain the query side authorization projection code.
4. The secure vector retrieval method based on execution path isolation as described in claim 1, characterized in that, Determining the boundary margin between each boundary object and the access subject in the index partition region includes: For any boundary object, the confidentiality level difference margin is determined based on the confidentiality level of the boundary object and the confidentiality level of the accessing subject; the validity period difference margin is determined based on the validity period code of the boundary object and the current time of the accessing subject; the export restriction difference margin is determined based on the export restriction level of the boundary object and the export restriction level of the accessing subject; the regional coverage margin is determined based on the regional requirement set of the boundary object and the regional attribute set of the accessing subject; the minimum value among the confidentiality level difference margin, validity period difference margin, export restriction difference margin, and regional coverage margin is taken as the boundary margin between the boundary object and the accessing subject.
5. The secure vector retrieval method based on execution path isolation as described in claim 1, characterized in that, The whitelist of index regions, which includes multiple candidate index partitioning regions, includes: Select index partition regions with authorized coverage greater than the authorized coverage threshold and admission score greater than the admission score threshold as candidate index partition regions; A whitelist of index regions is generated by dividing regions based on multiple candidate indexes.
6. The secure vector retrieval method based on execution path isolation as described in claim 1, characterized in that, Based on the query authorization context and the retrieval parameters, the candidate indexes in the index region whitelist are divided into regions, and a fine-grained search is performed to determine a set of result objects including multiple result objects, including: The candidate index partitioning region includes candidate graph indexes. For any candidate graph index, the candidate node in the candidate graph index that indicates the authorization decision value to pass and whose boundary margin is greater than the boundary margin threshold is taken as the entry node. Starting from the entry node, the traversal begins. For the current node being traversed, the node gating traversal score between the current node and the accessing entity is calculated. If the node gating traversal score is greater than or equal to the node gating traversal score threshold, the authorization judgment value corresponding to the current node indicates that it has passed, and the boundary margin between the current node and the accessing entity is greater than or equal to the boundary margin threshold, the current node is added to the priority queue as a search springboard. The adjacent edges of the current node are then expanded until the candidate graph index is traversed. After all candidate graph indexes have been traversed, nodes with a similarity greater than the similarity threshold to the query vector are selected from the priority queue as result objects.
7. The secure vector retrieval method based on execution path isolation as described in claim 1, characterized in that, The dynamically adjusted search parameters include: Obtain query monitoring data corresponding to the access subject that initiated the query request. The query monitoring data includes continuous query semantic drift rate, number of retries, threshold perturbation amplitude, candidate size change rate, number of cache anomalies, and burst request intensity. Based on query monitoring data, calculate the query risk score for the accessing entity; When the query risk score is higher than the query risk score threshold, adjust the search parameters, including the number of probe buckets, graph expansion budget, recall cap, and similarity threshold.
8. The secure vector retrieval method based on execution path isolation as described in claim 1, characterized in that, The security exposure score of each result object in the result object set includes: For any result object, calculate the boundary margin corresponding to the result object; The degree of authorization projection matching between the authorization projection code of the calculated result object and the authorization projection code of the query side; Obtain the query risk score of the access subject; Based on the boundary margin, authorized projection matching degree, and query risk score of the result object, a weighted average is performed to determine the security exposure score of the result object.
9. The secure vector retrieval method based on execution path isolation as described in claim 1, characterized in that, Based on the security exposure scores of each result object, the results objects are categorized and output, including: For the first result object whose security exposure score is greater than or equal to the first exposure score threshold, output all field contents of the first result object; For the second result object whose safety exposure score is less than the first exposure score threshold but greater than or equal to the second exposure score threshold, the second result object is desensitized before being output. For third result objects whose safety exposure scores are less than the second exposure score threshold and greater than or equal to the third exposure score threshold, output the object identifier of the third result object; For fourth result objects whose safety exposure score is less than the third exposure score threshold, prompt the fourth result object to need approval or return an empty result.
Citation Information
Patent Citations
Intelligent search engine system and method based on NLP and vector hybrid retrieval
CN121029791A
Data grading authorization method based on strategy label
CN122310558A
