Method for access control of legal consultation data

By constructing a legal data dependency graph and implementing dynamic access control, the problem of inaccurate permission allocation in existing technologies is solved, enabling refined access control of legal consultation data and reducing the risk of sensitive data leakage.

CN120974537BActive Publication Date: 2026-01-23BEIJING POWER LAW INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511115834.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-11
Publication Date
2026-01-23
Estimated Expiration
2045-08-11

AI Technical Summary

Technical Problem

Existing technologies lack structured analysis of data reference relationships in the field of data security, resulting in inaccurate permission allocation, difficulty in reflecting the importance and scarcity of data in specific business scenarios, and increased risk of sensitive data leakage.

Method used

By identifying data nodes in legal consultation data, a legal data dependency graph is constructed, permissions are passed along directed links, and dynamic access control is performed by combining the cost score of node content scarcity and user information budget, generating access decision signals.

Benefits of technology

It achieves precise access control, reduces the risk of sensitive data being improperly obtained, improves the granularity of access control and the multi-dimensionality of protection, and balances data security and resource allocation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120974537B_ABST
    Figure CN120974537B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of data security, in particular to a legal consultation data access control method, comprising the following steps: identifying legal documents, evidence lists and party entities in each piece of legal consultation data as data nodes. The present application structures the reference relationship between data by identifying and constructing legal data dependency graph for legal documents, evidence lists and party entities, enables dynamic removal by layer-by-layer transmission along the directed link and combining the blocking marker in the authority transmission process, thereby avoiding unauthorized diffusion. By splitting the legal consultation data content into independent vocabulary units and combining global and local feature calculation node content scarcity cost score, the data value and access decision are directly associated, and the information budget quota comparison is introduced at the same time of authority judgment, ensuring that the access behavior not only meets the authority condition, but also meets the information cost constraint.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application relates to the technical field of data security, and in particular to an access control method for legal consultation data. BACKGROUND

[0002] The technical field of data security covers protection measures for data in the whole life cycle process of collection, transmission, storage, processing and sharing, aiming to prevent unauthorized access, tampering, leakage, loss or abuse of data.

[0003] Although the prior art covers the protection of the whole life cycle of data collection, transmission, storage, processing and sharing, in actual operation, it often controls access rights with static strategies, and lacks structured analysis of the reference relationship between data. When facing a data set associated with multiple nodes, static permission allocation is easy to cause the permission range to be too wide or too narrow, resulting in the situation that sensitive information is indirectly accessed or the information required by the business is blocked. At the same time, the data value measurement of the prior art is mostly based on uniform level division, which is difficult to reflect the importance and scarcity of different data in specific business scenarios, resulting in the possibility that high-value data may be frequently called under low-cost conditions, increasing the risk of leakage. Therefore, improvement is needed. SUMMARY

[0004] The purpose of the application is to solve the shortcomings in the prior art and provide an access control method for legal consultation data.

[0005] In order to achieve the above purpose, the application adopts the following technical scheme, an access control method for legal consultation data, comprising the following steps:

[0006] Identify the legal documents, evidence lists and party entities in each piece of legal consultation data as data nodes, analyze the content of each data node to locate the reference relationship to other data nodes, and construct a legal data dependency graph;

[0007] Based on the initial access authorization of the user to the target root node, traverse along the directed link of the legal data dependency graph, pass the authorization from the source node to the directly referenced target node, generate a tentative permission set, retrieve a preset permission blocking marker list, remove any node entry with a blocking marker in the tentative permission set, and generate a cascading user access matrix;

[0008] For each data node in the legal data dependency graph, the legal consultation data content is split into independent vocabulary units, the node content scarcity cost score is calculated, all node content scarcity cost scores are paired with node identifiers, and a data information cost ledger is established;

[0009] Receiving a user's access request for a target data node, querying the user's access right to the node from the cascaded user access matrix, obtaining an access right confirmation result, extracting the node content scarcity cost score of the node from the data information cost ledger, comparing the node content scarcity cost score with the user's current information budget quota, and when the access right confirmation result is positive and the information budget quota is not less than the cost score, deducting the corresponding information budget quota, and generating an access ruling signal indicating permission or rejection.

[0010] Preferably, the obtaining step of the legal data dependency graph is:

[0011] Identifying the legal documents, evidence lists, and party entities in each legal consultation data, scanning the legal document titles, evidence list numbers, and party entity name fields one by one, locating the start and end positions of the corresponding text and extracting the unique number, text range, and source identifier, merging the three types of entries, and binding a uniform node identifier and node type identifier to each entry, and generating data nodes;

[0012] According to the data nodes, read the text character sequence and meta-field character sequence of the data nodes one by one, compare the target number and target name according to the reference trigger word table and number pattern, check whether the target node identifier exists, record the source node identifier and the target node identifier, and mark the direction attribute and the offset of the reference position, remove duplicate entries, and keep the position annotation of the first occurrence, and generate node link pairs;

[0013] Aggregate data nodes and node link pairs, establish a structure with data nodes as node sets and node link pairs as directed edge sets, write node identifiers, node type identifiers, edge direction attributes, and reference position offsets, complete connectivity verification, and remove self-loop structures to form a legal data dependency graph.

[0014] Preferably, the obtaining step of the provisional right set is:

[0015] Based on the initial access authorization of the user to the target root node, parse the user identifier, target root node identifier, authorization type, authorization range, and authorization time limit, read the directed links in the legal data dependency graph starting from the target root node identifier, and take out the target node identifier in the order of direction and record the source node identifier, target node identifier, path depth, and reference position offset, and transfer each authorization from the source node identifier to the directly referenced target node identifier and merge similar items to generate a provisional right set.

[0016] Preferably, the obtaining step of the cascaded user access matrix is:

[0017] According to the tentative permission set, a permission blocking marker list is loaded, and the target node identifier, the authorization type, and the authorization range in the tentative permission set are compared with the node identifier, the blocking type, and the blocking range in the permission blocking marker list one by one, a hit entry is marked and removed, an unhit entry is kept unchanged in terms of the source node identifier, the target node identifier, the path depth, and the reference location offset, and a tentative permission set with removed blocking markers is formed;

[0018] According to the tentative permission set with removed blocking markers, a row-column index is established according to the user identifier and the target node identifier, the authorization type, the authorization range, the authorization time limit, the path depth, and the reference location offset are written into corresponding cell attributes, zero permission placeholders are written into cells without entries, and the row-column index is kept complete, and a cascaded user access matrix is generated.

[0019] Preferably, the step of obtaining the node content scarcity cost score comprises:

[0020] For each data node in the legal data dependency graph, a complete character sequence of legal consultation data content is extracted, the complete character sequence is divided into independent lexical units according to spaces and punctuation delimiters, punctuation and meaningless stop words are removed, the number of occurrences of each lexical unit, the total number of words of the data node, and the number of word species are recorded, and a list of occurrence node numbers of each lexical unit in all data nodes is established to generate a lexical frequency detail.

[0021] According to the lexical frequency detail, the node content scarcity cost score is calculated.

[0022] Preferably, the step of obtaining the data information cost ledger comprises:

[0023] According to the node content scarcity cost score, the node identifier of each data node and the corresponding node content scarcity cost score are paired according to a fixed field structure, the uniqueness of the node identifier in the pairing is maintained, and a data information cost ledger is generated.

[0024] Preferably, the step of obtaining the access permission confirmation result comprises:

[0025] An access request of a user to a target data node is received, the user identifier, the target data node identifier, and the request time are parsed, the authorization type, the authorization range, and the authorization time limit are read from the cascaded user access matrix according to the user identifier and the target data node identifier, it is checked that the request time is within the authorization time limit, the authorization type covers the read operation, and the authorization range covers the target data node identifier, and an access permission confirmation result is generated.

[0026] Preferably, the step of obtaining the access ruling signal comprises:

[0027] According to the access permission confirmation result, the node content scarcity cost score is extracted from the data information cost account book according to the target data node identifier, the current information budget quota is read from the user side account record, the current information budget quota is compared with the node content scarcity cost score, and the comparison result is combined with the access permission confirmation result to generate an access settlement condition result;

[0028] According to the access settlement condition result, if the access permission confirmation result is positive and the current information budget quota is not less than the node content scarcity cost score, the current information budget quota equal to the node content scarcity cost score is deducted from the user side account record and the deduction serial number is recorded, otherwise the current information budget quota remains unchanged and the reason for rejection is recorded, and an access decision signal is generated.

[0029] Compared with the prior art, the advantages and positive effects of the present application are:

[0030] The present application identifies legal documents, evidence lists and parties, and constructs a legal data dependency graph, so that the reference relationship between data is structured and expressed. In the process of permission transfer, it can be transferred layer by layer along the directed link and combined with the blocking mark to realize dynamic rejection, so as to avoid unauthorized diffusion. By splitting the legal consultation data content into independent vocabulary units, combining global and local feature calculation, and calculating the node content scarcity cost score, the data value and access decision are directly related, the information budget quota is introduced for comparison at the same time of permission judgment, and it is ensured that the access behavior not only meets the permission condition, but also meets the information cost constraint. This processing logic based on data structuring, permission cascading control, content scarcity quantification and budget quota linkage makes the access control not only accurately reflect the sensitivity of data, but also make dynamic decisions combined with user resource conditions, improves the fine degree of access control and the multidimensionality of protection, effectively reduces the risk of sensitive data being improperly obtained, and balances between data security and resource allocation. BRIEF DESCRIPTION OF DRAWINGS

[0031] Figure 1 The present application is a step schematic diagram. DETAILED DESCRIPTION

[0032] In order to make the purpose, technical scheme and advantages of the present application clearer, the present application will be further described in detail below in combination with the drawings and examples. It should be understood that the specific examples described herein are only used to explain the present application, and are not used to limit the present application.

[0033] Please refer to Figure 1 The present application provides a technical scheme, an access control method for legal consultation data, comprising the following steps:

[0034] Identify the legal documents, evidence lists and party entities in each legal consultation data as data nodes, analyze the content of each data node to locate the reference relationship to other data nodes, and build a legal data dependency graph;

[0035] Based on the initial access authorization of the user to the target root node, traverse along the directed link of the legal data dependency graph, pass the authorization from the source node to the directly referenced target node, generate a tentative permission set, retrieve a pre-set permission blocking marker list, remove any node entry with a blocking marker in the tentative permission set, and generate a cascading user access matrix;

[0036] For each data node in the legal data dependency graph, split the legal consultation data content into independent vocabulary units, calculate the node content scarcity cost score, pair all node content scarcity cost scores with node identifiers, and establish a data information cost ledger;

[0037] Receive the user's access request for the target data node, query the user's permission for the node from the cascading user access matrix, obtain the access permission confirmation result, and extract the node content scarcity cost score from the data information cost ledger. Compare the node content scarcity cost score with the user's current information budget quota, and when the access permission confirmation result is positive and the information budget quota is not less than the cost score, deduct the corresponding information budget quota, and generate an access decision signal indicating permission or rejection.

[0038] The acquisition steps of the legal data dependency graph are:

[0039] Identify the legal documents, evidence lists and party entities in each legal consultation data, scan the legal document title, evidence list number and party entity name field one by one, locate the start and end positions of the corresponding text and extract the unique number, text range and source identifier, combine the three types of entries, and bind a unified node identifier and node type identifier to each entry, and generate a data node;

[0040] According to the data node, read the text character sequence and meta-field character sequence of the data node one by one, compare the target number and target name according to the reference trigger word table and number pattern, check whether the target node identifier exists, record the source node identifier and target node identifier, and mark the direction attribute and the offset of the reference position, remove duplicate entries and keep the first occurrence position mark, and generate a node link pair;

[0041] Aggregate data nodes and node link pairs to establish a structure with data nodes as node sets and node link pairs as directed edge sets, write node identifiers, node type identifiers, edge direction attributes and reference position offsets, complete connectivity verification, and eliminate self-loop structures to form a legal data dependency graph.

[0042] Specifically, first, the legal documents, evidence lists and party entities contained in each legal consultation data are identified. Specifically, the system will load a preset document type keyword list, which is compiled by legal experts according to common document types in laws and regulations, containing at least 50 keywords such as “civil complaint”, “answer”, “appeal”, “judgment”, “ruling”, “evidence list”, “party information table”, etc. The system reads each electronic document in the legal consultation data one by one, scans the first 500 characters of the document content to match the keyword list, and if a match is found, the document is classified as a legal document. Subsequently, the system applies a regular expression-based evidence number recognition pattern, which includes multiple formats such as patterns for matching “evidence one” and “evidence two” evidence[one two three four five six seven eight nine hundred thousand million], and patterns for matching “evidence 2-1” and “evidence 3” evidence\d+(-\d+)? The system scans the evidence references identified as “evidence list” or appearing in the text with this pattern to extract evidence list items. For the identification of party entities, the system uses a list containing more than 500 common surnames and combines with context trigger words such as “plaintiff:”, “defendant:”, “applicant:”, “appeal person:”, etc. to locate and extract the names of the parties in the document. After preliminary classification, the system performs fine processing on each identified item. When scanning the legal document title, evidence list number or party entity name field, it records the starting and ending character offset in the source file to form the text range. At the same time, a unique number is generated for each item using the UUID version 4 algorithm to ensure global uniqueness. In addition, the system also records the source identification of each item, i.e. the original file name or database record primary key where it is located. Next, the three types of identified items, i.e. legal documents, evidence lists and party entities, are collected into a unified data structure, and a system-level unified node identifier is bound to each item. The identifier is composed of “case ID_type prefix_sequence number”, for example “AJ2023001_DOC_001”, where the type prefix “DOC” represents a legal document, “EVD” represents evidence, and “PTY” represents a party. At the same time, each item is assigned a clear node type identifier, for example, legal documents are type 1, evidence lists are type 2, and party entities are type 3. Through the above process of identification, positioning, extraction and binding, a structured data node set is finally generated.

[0043] Based on the set of structured data nodes generated in the previous step, the system initiates the process of discovering link relationships. It processes each data node one by one, reads the complete sequence of text characters in it as well as the character sequences of meta-fields such as file name and creation date. In order to identify the reference relationships between nodes, the system loads a predefined "reference trigger word list", which is compiled by legal document writing experts and contains more than 100 high-frequency reference indicator words such as "see details", "refer to", "according to", "allege", "argue", "submitted", "presented", etc. At the same time, the system also loads a set of "numbering patterns", which are a group of regular expressions used to match specific node types. For example, the pattern for matching case numbers is (\d{4})[\p{Han}]+?Chu Zi Di \d+ Hao, and the pattern for matching evidence numbers is Evidence \s*[\d一二三四五六七八九十]+. The system takes each data node as the "source node" and scans its text content. First, it uses the reference trigger word list to locate potential reference statements, and then applies the numbering pattern or directly matches the party name in the adjacent area of this statement (for example, within the range of looking backward 50 characters) to find the "target reference" to other nodes. When a potential target reference is found, for example, "see details of Evidence Three" is found in the text of Node A, the system extracts "Evidence Three" as the target identifier and queries all data nodes to verify whether there is a "target node" whose node type is evidence and its original text or number is "Evidence Three". If it exists, it is considered that a valid reference is discovered. The system immediately records the node identifier of the source node and the node identifier of the target node, forming the basic information of a link. At the same time, the system will accurately mark the direction attribute of this link, that is, from the source node to the target node, and record the offset of the reference position, that is, the starting character position of the text "see details of Evidence Three" in the sequence of text characters of the source node A. To ensure the simplicity and uniqueness of the link, after processing all references of a source node, the system will perform deduplication on the generated links. Specifically, for all links pointing from the same source node to the same target node, the system only retains the entry with the smallest reference position offset, that is, only records the position where this reference relationship first appears in the text, and the remaining duplicate reference entries are discarded. After traversing, matching, verifying and deduplicating all data nodes, a list consisting of a series of node link pairs is finally generated.

[0044] The data node set and node link pair list generated by the preceding step are aggregated to build a complete graph structured data model, which takes data nodes as the node set of the graph and node link pairs as the directed edge set of the graph. In a specific implementation, the system stores the graph in the form of an adjacency list, creates a hash table with node identifiers as keys, and each key corresponds to a value containing two parts: one part is the attribute information of the node, such as node type identifier, original text range, source identifier, etc., and the other part is a list for storing all directed edges starting from the node, each edge records the target node identifier it points to and the reference position offset as an edge attribute. After completing the preliminary graph structure establishment, the system performs connectivity verification, which aims to find isolated parts in the data to evaluate the completeness of the case data. The verification process uses a breadth-first search algorithm to start from all nodes identified as case core documents (such as "indictment" and "judgment"), traverse all nodes reachable through directed links, and mark them. After the traversal is complete, all unmarked nodes in the system are considered isolated nodes or belong to a disconnected connected component unrelated to the core documents. The information of these isolated nodes will be recorded in a verification report for further manual checking, but the nodes themselves and their related links are retained in the graph by default. Next, the system performs self-loop structure removal, which traverses all node link pairs to check if there is a case where the source node identifier and the target node identifier are exactly the same, i.e., a node references itself, such as a document named "evidence list" writing "see the evidence list for details" in the content. Such self-loop links are usually redundant for dependency analysis, so all identified self-loop links are removed from the node link pair list to ensure that there are no direct loops from a node to itself in the graph. Through aggregation, verification, and purification, a legal data dependency graph with clear structure, no redundant self-loops, and connectivity verification is finally formed.

[0045] The acquisition step of the provisional permission set is:

[0046] Based on the user's initial access authorization to the target root node, the user identifier, target root node identifier, authorization type, authorization range, and authorization time limit are parsed, the directed links in the legal data dependency graph starting from the target root node identifier are read, the target node identifiers are taken out layer by layer in the directed order and the source node identifier, target node identifier, path depth, and reference position offset are recorded, each authorization is passed from the source node identifier to the directly referenced target node identifier and the same items are merged to generate a provisional permission set.

[0047] Specifically, based on the user's initial access authorization to the target root node, the system first performs structured parsing of the authorization request. This authorization information is typically submitted in JSON format or a similar data structure. For example, a request might be {"user_id":"U001","root_node_id":}

[0048] "CASE2023-001_DOC_001","auth_type":"Read","auth_scope":

[0049] The system extracts the user identifier "U001", target root node identifier "CASE2023-001_DOC_001", authorization type "Read" (options include "Read", "Comment", "Annotate"), authorization scope "FullContent" (options include "FullContent" and "MetadataOnly"), and authorization duration "3600" (indicating that the authorization is valid for 3600 seconds from the current time) from the given target root node identifier. Then, the system initiates a breadth-first search traversal process, starting from the given target root node identifier, and performs a layer-by-layer transfer of permissions in the legal data dependency graph. This process initializes a queue and adds an initial tuple containing the target root node identifier and a path depth of 0 to the queue. Simultaneously, an empty set of visited nodes is created to prevent loops during graph traversal. After the traversal begins, the system associates the initial authorization information (user identifier, authorization type, authorization scope, authorization duration) with the root node itself as the permission set. The system merges the first record. Then, as long as the queue is not empty, the system retrieves a source node for processing. It reads all outgoing directed links of that source node in the legal data dependency graph. For each target node pointed to by a link, the system checks if it already exists in the visited node set. If not, it adds the target node to the visited set and generates a new permission record. This record inherits the authorization type, scope, and duration of the source node, and explicitly records the source node's identifier, the current target node's identifier, the path depth (1 greater than the source node's path depth), and the offset of the reference position obtained from the edge attributes in the graph. The target node, along with its new path depth information, is then added to the queue for further processing. This process repeats until the queue is empty, all reachable nodes have been visited, and the transferred permissions have been granted. Finally, the system merges all permission records generated during this process. Specifically, for multiple permission records of the same user and the same target node (potentially due to multiple paths), the system only retains the record with the smallest path depth and discards other records with longer paths, ultimately forming a provisional permission set.

[0050] The obtaining step of the cascading user access matrix is:

[0051] According to the tentative permission set, load the permission blocking marker list, compare the target node identifier, authorization type and authorization range in the tentative permission set with the node identifier, blocking type and blocking range in the permission blocking marker list one by one, mark the hit entries and remove the hit entries, keep the non-hit entries and maintain the source node identifier, target node identifier, path depth and reference position offset unchanged, and form the tentative permission set with the removed blocking markers;

[0052] According to the tentative permission set with the removed blocking markers, establish row and column indexes according to the user identifier and the target node identifier, write the authorization type, authorization range, authorization time limit, path depth and reference position offset into the corresponding cell attributes, write zero permission placeholders into the cells without entries and keep the row and column indexes complete, and generate the cascading user access matrix.

[0053] Specifically, according to the tentative permission set generated in the previous step, the system loads the permission blocking marker list pre-configured by the data security administrator or the legal compliance officer, which is based on the organization's internal data classification and grading standards and relevant laws and regulations (for example, regulations on personal information protection, protection of minors or state secrets), and its essence is a rule set stored as a database table or a configuration file. Each rule contains three core fields: node identifier pattern, blocking type and blocking range. Among them, the node identifier pattern supports exact match and wildcard match, for example,

[0054] "EVIDENCE_CONFIDENTIAL_003" is an exact match, while "PARTY_MINOR_*" uses a star as a wildcard to match all party data nodes tagged as minors, the block type defines the operation to be blocked, such as "Read", "Write", or "All", and the block scope defines the granularity of the block, such as "FullContent", "MetadataOnly", or "All". The system then processes each permission entry in the tentative permission set one by one, and matches it against each rule in the list of permission blocking markers. For a permission record in the tentative permission set, its target node identifier, authorization type, and authorization scope are compared with the node identifier pattern, block type, and block scope in the blocking rule. A permission entry is considered a hit of the blocking rule if the three dimensions match simultaneously. Specifically, the node identifier matching follows the principle of "exact match first, wildcard supplement second", i.e., first check if there is an identical identifier, and if not, check if it matches the wildcard pattern. The matching logic for authorization type and block type is: if the block type is "All", or the block type is identical to the authorization type, it is considered a match. The matching logic for authorization scope and block scope is similar. Once a permission entry successfully matches any blocking rule, the entry is immediately marked as "hit" and removed from the set to be processed, and the system no longer performs subsequent blocking rule comparisons on it. Conversely, if a permission entry does not match any rule after traversing the entire list of permission blocking markers, the entry is considered "miss" and is retained, and its original information, including source node identifier, target node identifier, path depth, and reference location offset, remains unchanged. After this filtering process, all retained missed entries collectively form the tentative permission set with blocked permission markers removed.

[0055] According to the set of tentative permissions with the blocking marks removed, the system begins to construct the final access control structure, i.e. the cascading user access matrix. First, the system scans the input set of tentative permissions with the blocking marks removed, and extracts all unique user identifiers and all unique target node identifiers. These two sets of unique identifiers will be used as the row index and column index of the matrix, respectively. For example, if the set involves 3 users (U1, U2, U3) and 100 data nodes (N1 to N100), a logical matrix of 3 rows and 100 columns will be constructed. In physical implementation, this is usually a two-dimensional array or a hash table nested hash table structure. To ensure the integrity of the matrix, the system fills a predefined zero permission placeholder into each cell when initializing the matrix. This placeholder is a structured data object, and all its attributes are set to default values representing "no permission". For example, a zero permission placeholder can be defined as {"authorization type": "None", "authorization scope": "None", "authorization validity": 0, "path depth": -1, "reference position offset": -1}. This ensures that any query to any cell in the matrix returns a valid and consistent permission state. Next, the system iterates through each valid permission record in the set of tentative permissions with the blocking marks removed. For each record, the system parses its user identifier and target node identifier, and uses them as coordinates to locate the unique cell in the matrix. Then, the system encapsulates the authorization type, authorization scope, authorization validity, path depth, and reference position offset in the record into a new data object, and writes this object into the located cell, thereby overwriting the original zero permission placeholder. Since the previous step of merging identical items ensures that each "user-target node" pair in the set of tentative permissions with the blocking marks removed is unique, no conflicts will occur when filling the matrix. When all permission records have been processed, the matrix filling is complete, and the final cascading user access matrix is generated.

[0056] The step of obtaining the node content scarcity cost score is:

[0057] For each data node in the legal data dependency graph, the complete character sequence of the legal consultation data content is extracted, and is divided into independent lexical units according to space and punctuation delimiters. Punctuation and meaningless stop words are removed. The number of occurrences of each lexical unit, the total number of words of the data node, and the number of word species are recorded. A list of node numbers in which each lexical unit appears in all data nodes is established for each lexical unit, and a word frequency detail is generated.

[0058] According to the word frequency detail, the node content scarcity cost score is calculated, and the calculation formula is:

[0059]

[0060] Among them, C k is the node content scarcity cost score of the k-th data node, n k,i is the occurrence times of the i-th lexical unit in the k-th data node, L k is the total number of words in the k-th data node, r k is the number of word types in the k-th data node, N is the total number of all data nodes, d i is the number of data nodes containing the i-th lexical unit, and i is the summation counting subscript.

[0061] Specifically, for each data node in the legal data dependency graph, the system first accesses the storage location of the node and extracts the complete character sequence of the legal consultation data content it contains, which includes the text of the main body and the text content of metadata fields such as file name, author, and creation date. Subsequently, the system executes a text preprocessing process. The first step is word segmentation. The system uses a predefined list of punctuation delimiters, which covers common Chinese and English punctuation, such as ",", ".", ";", ":", "?", "!", ",", ".", ";", ":", "?", "!" etc., and combines whitespace characters such as spaces, line breaks, and tab characters to split the complete character sequence into a preliminary list of lexical units. Then, the system loads a stop word list specific to the legal domain for filtering. This stop word list consists of two parts: one part is common Chinese stop words, containing more than 1,200 words, such as "de", "le", "zai", "shi", "wei", etc.; the other part is words specific to the legal domain with low information content, screened and sorted by legal experts, containing approximately 300 words, such as "hereby", "to this end", "found after hearing", etc. The system compares each word in the list of lexical units obtained after word segmentation with this stop word list, and at the same time removes all entries of pure punctuation symbols, retaining the valid lexical units that do not appear in the stop word list. After the filtering is completed, for each data node, the system initializes an empty hash table to count the word frequencies, traverses the list of valid lexical units of the node, and accumulates the occurrence times of each lexical unit. After the traversal ends, this hash table records the occurrence times of each lexical unit in the node (i.e., n k,i ), the total number of words in the data node is obtained by accumulating the occurrence times of all lexical units (i.e., L k ), and the number of word types in the node is obtained by counting the number of keys in the hash table (i.e., r kWhile processing all individual nodes, the system maintains a global inverted index structure, which is also a hash table. The key is each unique lexical unit in the entire corpus, and the value is a list that records the node identifiers of all data nodes containing that lexical unit. Through this global structure, the system can query the list of node numbers in which each lexical unit appears in all data nodes. Finally, the system integrates the word frequency statistics of each node (the number of occurrences of each word, the total number of words, and the number of word types) with the document frequency information obtained from the global inverted index to generate a structured word frequency detail.

[0062] formula: The advantage of the formula lies in the introduction of a third key factor. This factor measures the concentration of word distribution within a node, where a word appears n times in a document. k,i The more, relative to the total document length L k The ratio L k / n k,i The smaller the value of the factor, the smaller the value of the high-frequency words. This balances the weight of high-frequency words and prevents a few high-frequency words from excessively dominating the cost score of the entire node. This formula integrates the internal importance of words (by n). k,i (reflected), global scarcity (by) (reflected) and internal concentration (by) This design incorporates three dimensions to more accurately identify data nodes that contain highly concentrated, professional keywords that are rare in the entire case database. For example, an expert opinion containing rare technical terms that appear multiple times will receive a higher cost score than an ordinary document that only vaguely mentions the term. This design allows the cost score to more accurately reflect the information acquisition cost required to access the node.

[0063] r k The number of words in the k-th data node is the number of unique valid word units in the data node. This parameter is directly obtained from the word frequency details generated in the previous step, by counting the unique entries in the word frequency statistics table of the specified node k. For example, after processing the node "DOC-A1", the word frequency details show that it contains a total of 235 different words such as "contract", "breach of contract", and "compensation". Therefore, the number of words in the k-th data node is r. k The value is 235.

[0064] n k,iLet n be the frequency of the i-th word unit in the k-th data node. This parameter is also directly read from the word frequency details. It reflects the importance of a specific word within a single data node. For example, in the word frequency details of node "DOC-A1", the word "default" (corresponding to index i=1) is recorded as occurring 15 times. k,1 The value is 15.

[0065] L k The total word count for the k-th data node refers to the sum of valid word units contained in the node after word segmentation and stop word removal. This parameter is calculated by accumulating the occurrence counts of all words in node k in the word frequency details (i.e., ...). Calculations show that, for example, if the total number of occurrences of all words in the word frequency details of node "DOC-A1" is 1800, then the L of this node... k The value is 1800.

[0066] N is the total number of all data nodes. This is a global parameter that represents the sum of all nodes managed in the current legal data dependency graph, including all legal documents, evidence lists, and party entities. This value is obtained by counting the set of nodes in the legal data dependency graph. For example, in a case containing 150 legal documents, 320 pieces of evidence, and 30 party entities, the value of N is 150 + 320 + 30 = 500.

[0067] d i The number of data nodes containing the i-th lexical unit is obtained from the global inverted index portion of the lexical frequency details. This parameter reflects the prevalence of a specific word in the entire dataset; the smaller the value, the rarer the word. For example, querying the word "default" in the global inverted index returns a list containing 25 node identifiers, indicating that the word "default" appears in 25 out of all 500 data nodes. Therefore, for the word "default," its corresponding d... i The value is 25.

[0068] Calculation process:

[0069] Based on the word frequency details, calculate the node content scarcity cost score C1 for node “DOC-A1” (i.e., k=1). The parameters of this node have been determined as follows: number of words r1=235, total number of words L1=1800, and total number of nodes in the system N=500.

[0070] Let's take two vocabulary units in this node as an example for calculation:

[0071] Vocabulary 1: “Breach of contract” (i=1), which appears n times. 1,1 =15, the number of data nodes containing this word d1=25.

[0072] Vocabulary 2: "evidence" (i = 2), the number of occurrences n 1,2 = 40, the number of data nodes containing the word d2 = 300.

[0073] First, calculate the contribution value of the word "breach" to C1:

[0074]

[0075] Next, calculate the contribution value of the word "evidence" to C1:

[0076]

[0077] Finally, sum up the contribution values of all 235 words in node "DOC-A1" to get the final node content scarcity cost score C1 of the node:

[0078]

[0079] C1 = 218.998 + 150.186 + …;

[0080] After calculating the contribution values of all 235 words, the final score is accumulated to be, for example, 6854.72.

[0081] The result shows that the node content scarcity cost score of node "DOC-A1" is 6854.72, which is a relatively high score. This score itself is a quantitative indicator for subsequent access control decisions. The system will preset a cost score level range based on statistical analysis of a large number of cost scores calculated from historical case data, taking the 25% and 75% quantile points of the distribution as thresholds. For example, set 0-2000 as low cost, 2000-8000 as medium cost, and 8000 or above as high cost. Therefore, a score of 6854.72 means that accessing node "DOC-A1" is a medium level of information cost.

[0082] The acquisition steps of the data information cost ledger are:

[0083] According to the node content scarcity cost score, pair each data node's node identifier with the corresponding node content scarcity cost score in a fixed field structure, maintain the uniqueness of the node identifier in the pairing, and generate a data information cost ledger.

[0084] Specifically, according to the node content scarcity cost score of each node calculated in the previous step, the system performs the data information cost ledger generation process, the core of this process is to pair each data node's unique identifier with its corresponding cost score deterministically, and store it in a persistent, easy-to-query format. Specifically, the system will create a new database table or a key-value storage instance as the carrier of the data information cost ledger. If a database table is used, its structure will be predefined to contain two fields: the first field is named "node_identifier" and is of variable-length string type, and is set as the primary key, used to store the unique node identifier of each data node, such as "CASE2023-001_DOC_001". The primary key constraint ensures the uniqueness of each node identifier in the ledger, eliminating the possibility of duplicate records; the second field is named "cost_score" and is of double-precision floating-point type, used to store the calculated node content scarcity cost score, such as 6854.72. This field allows the storage of high-precision calculation results. Subsequently, the system iterates through all data nodes that have calculated cost scores. For each node, the system extracts its node identifier and corresponding node content scarcity cost score, and inserts these two values as a new record into the data information cost ledger database table. This insertion operation is atomic, and the system will execute it one by one until all node cost scores are successfully recorded. The entire process is automated and does not require human intervention. The final data information cost ledger constitutes a complete cost directory covering all nodes in the legal data dependency graph, providing direct and fast cost query basis for subsequent access decisions.

[0085] The access permission confirmation result acquisition step is:

[0086] Receiving a user's access request for a target data node, parsing the user identifier, target data node identifier, and request time, reading the authorization type, authorization range, and authorization time limit from the cascaded user access matrix according to the user identifier and target data node identifier, verifying that the request time is within the authorization time limit, the authorization type covers the read operation, and the authorization range covers the target data node identifier, and generating an access permission confirmation result.

[0087] Specifically, after receiving the user's access request for the target data node, the system immediately parses the request. The request is usually structured data containing key parameters, such as a JSON object {"user_id": "U001", "node_id": "CASE2023-001_DOC_001", "request_time": "2023-10-10T10:10:10Z"}.

[0088] "U001","node_id":"CASE2023-001_DOC_001","request_time":

[0089] "1678886400"}, from which the user identifier "U001", the target data node identifier "CASE2023-001_DOC_001" and the request time in UNIX timestamp format "1678886400" are extracted, then the system uses the extracted user identifier and target data node identifier as row and column indexes to directly query in the cascaded user access matrix, locates to the unique cell, and reads the authorization attributes stored in the cell, including the authorization type, the authorization scope and the authorization time limit, for example, the query result is {"authorization type": "Read", "authorization scope": "FullContent", "authorization time limit": 1678890000}, then the system performs a series of strict verification logic, first, the timeliness verification, compares the request time 1678886400 with the authorization time limit (here the expiration timestamp) 1678890000, since the request time is earlier than the expiration time, this verification passes, second, the authorization type verification, the system compares the user's implicit "read operation" request with a predefined permission coverage table, which defines that both "Comment" and "Annotate" types contain "Read" permission, in this case, the authorization type in the matrix is "Read", which directly meets the request, the verification passes, and finally the authorization scope verification, the system confirms that the authorization scope in the matrix is "FullContent", which can completely cover the user's access request for the entire data node content, the verification passes, since all verification items pass successfully, the system finally generates a positive access permission confirmation result.

[0090] The access decision signal acquisition step is:

[0091] According to the access permission confirmation result, the node content scarcity cost score is extracted from the data information cost ledger according to the target data node identifier, and the current information budget quota is read from the user side account record, the current information budget quota is compared with the node content scarcity cost score, and the comparison result is combined with the access permission confirmation result to generate an access settlement condition result;

[0092] According to the access settlement condition result, if the access permission confirmation result is positive and the current information budget quota is not less than the node content scarcity cost score, the current information budget quota equal to the node content scarcity cost score is deducted from the user side account record and the deduction serial number is recorded, otherwise the current information budget quota remains unchanged and the reason for rejection is recorded, and an access decision signal is generated.

[0093] Specifically, according to the positive access permission confirmation result generated in the previous step, the system starts the settlement process of access cost and budget. First, the target data node identifier "CASE2023-001_DOC_001" contained in the access request is used to perform an accurate search in the data information cost ledger, which is a key-value storage with node identifier as the key. The query operation directly returns the node content scarcity cost score associated with the node. For example, the query returns a score of 6854.72. At the same time, the system accesses the independent user-side account record according to the user identifier "U001" in the request. The record stores the user's state information, including the current information budget quota. The system reads the user's current information budget quota from the record, which is, for example, 10000.00. Next, the system performs a core comparison operation to compare the user's current information budget quota 10000.00 with the node content scarcity cost score 6854.72 to determine whether the user's budget is sufficient to pay for the cost of this access. In this case, 10000.00 is not less than 6854.72, so the comparison result is positive. Finally, the system performs a logical AND operation on the positive budget comparison result and the previously obtained positive access permission confirmation result. Since both conditions are positive, the system finally generates an access settlement condition result containing both permission confirmation and budget confirmation information.

[0094] According to the access settlement condition result, the system performs the final access decision and accounting processing. The system first checks the two Boolean flags in the access settlement condition result, namely the permission confirmation result and the budget confirmation result. In this case, both flags are positive, meeting the sufficient condition for granting access, i.e., the access permission confirmation result is positive and the current information budget quota is not less than the node content scarcity cost score. Therefore, the system triggers the accounting deduction operation, reducing the user "U001"'s current information budget quota from 10000.00 to 3145.28 in the user-side account record. At the same time, to ensure the traceability of the operation, the system generates a globally unique deduction serial number, such as "f47ac10b-58cc-4372-a567-0e02b2c3d479" generated by the UUID version 4 algorithm, and records the details of this deduction, including the user identifier, node identifier, deduction amount, balance after deduction, and timestamp, in the transaction log together with the serial number. If the budget is insufficient under other circumstances, the system will skip the deduction step, keeping the current information budget quota unchanged, and record the specific rejection reason, such as "current information budget quota is insufficient", in the rejection log. After completing the above condition judgment and corresponding operation, the system finally generates an access decision signal indicating permission and passes it to the data service layer, which presents the requested data node content to the user.

[0095] The above merely describes the preferred embodiments of the present application, but is not intended to limit the present application in other forms. Any person skilled in the art can make changes or modifications to the above disclosed technical contents into equivalent embodiments with equivalent changes, and apply to other fields. However, any simple modification, equivalent change and modification made to the above embodiments according to the technical essence of the present application without departing from the technical solution content of the present application still belongs to the protection scope of the present application technical solution.

Claims

1. A method for access control of legal consultation data, characterized in that, Includes the following steps: Identify legal documents, evidence lists, and parties involved in each legal consultation data as data nodes, analyze the content of each data node to locate the reference relationship to other data nodes, and construct a legal data dependency graph; Based on the user's initial access authorization to the target root node, the system traverses along the directed links of the legal data dependency graph, passing the authorization from the source node to the directly referenced target node, generating a provisional permission set, retrieving a preset permission blocking flag list, removing any node entry with a blocking flag from the provisional permission set, and generating a cascading user access matrix. For each data node in the legal data dependency graph, the legal consultation data content is broken down into independent vocabulary units, the node content scarcity cost score is calculated, and the node content scarcity cost scores of all nodes are paired with node identifiers to establish a data information cost ledger. The system receives user access requests to target data nodes, queries user permissions for nodes from the cascaded user access matrix, obtains access permission confirmation results, extracts node content scarcity cost scores from the data information cost ledger, compares node content scarcity cost scores with user current information budget quotas, and deducts the corresponding information budget quotas when the access permission confirmation result is positive and the information budget quota is not less than the cost score, generating an access decision signal indicating permission. The steps for obtaining the legal data dependency graph are as follows: Identify the legal documents, evidence lists, and parties in each legal consultation data set. Scan the legal document title, evidence list number, and party name fields one by one to locate the start and end positions of the corresponding text and extract the unique number, text range, and source identifier. Merge the three types of entries and bind a unified node identifier and node type identifier to each entry to generate data nodes. Based on the data nodes, read the text character sequence and meta field character sequence of each data node one by one, compare the target number and target name according to the reference trigger word list and numbering pattern, verify whether the target node identifier exists, record the source node identifier and target node identifier, and mark the direction attribute and the offset of the reference position, remove duplicate entries, retain the position mark of the first appearance, and generate node link pairs. Aggregate data nodes and node link pairs to establish a structure with data nodes as the node set and node link pairs as the directed edge set. Write node identifiers, node type identifiers, edge direction attributes and offsets of reference positions to complete connectivity verification, remove self-loop structures, and form a legal data dependency graph. The steps for obtaining the node content scarcity cost score are as follows: For each data node in the legal data dependency graph, extract the complete character sequence of the legal consultation data content, divide it into independent word units according to spaces and punctuation separators, remove punctuation and meaningless stop words, record the occurrence frequency of each word unit, the total number of words in the data node, and the number of word types, and at the same time, establish a list of occurrence node numbers of each word unit in all data nodes to generate word frequency details. Based on the vocabulary frequency details, the cost score for node content scarcity is calculated using the following formula: ; in, For the first The cost score of the scarcity of content in each data node. For the first The data node in the nth data node The number of times each word unit appears, For the first The total number of words in each data node For the first The number of words in each data node. The total number of all data nodes. For including the first The number of data nodes per vocabulary unit The subscript is used for summation.

2. The access control method for legal consultation data according to claim 1, characterized in that, The steps for obtaining the set of provisional permissions are as follows: Based on the user's initial access authorization to the target root node, the user identifier, target root node identifier, authorization type, authorization scope, and authorization validity period are parsed. The directed links in the legal data dependency graph starting from the target root node identifier are read. The target node identifier is extracted layer by layer in a directed order, and the source node identifier, target node identifier, path depth, and reference position offset are recorded. Each authorization is passed from the source node identifier to the directly referenced target node identifier and similar items are merged to generate a provisional permission set.

3. The access control method for legal consultation data according to claim 1, characterized in that, The steps for obtaining the cascading user access matrix are as follows: Based on the provisional permission set, load the permission blocking flag list, compare the target node identifier, authorization type and authorization scope in the provisional permission set with the node identifier, blocking type and blocking scope in the permission blocking flag list, mark the hit entries and remove the hit entries, retain the non-hit entries and keep the source node identifier, target node identifier, path depth and reference position offset unchanged, to form a provisional permission set with blocking flags removed. Based on the provisional permission set with the blocking markers removed, row and column indexes are established according to user identifiers and target node identifiers. The authorization type, authorization scope, authorization duration, path depth, and reference position offset are written into the corresponding cell attributes. For cells with no entries, zero permission placeholders are written while maintaining the integrity of the row and column indexes, thus generating a cascading user access matrix.

4. The access control method for legal consultation data according to claim 1, characterized in that, The steps for obtaining the data information cost ledger are as follows: Based on the node content scarcity cost score, the node identifier of each data node is paired with the corresponding node content scarcity cost score according to a fixed field structure to maintain the uniqueness of the node identifier in the pairing and generate a data information cost ledger.

5. The access control method for legal consultation data according to claim 1, characterized in that, The steps for obtaining the access permission confirmation result are as follows: Receive user access requests to target data nodes, parse user identifier, target data node identifier and request time, read authorization type, authorization scope and authorization validity from cascaded user access matrix according to user identifier and target data node identifier, verify that request time is within authorization validity and authorization type covers read operation and authorization scope covers target data node identifier, and generate access permission confirmation result.

6. The access control method for legal consultation data according to claim 1, characterized in that, The steps for obtaining the access decision signal are as follows: Based on the access permission confirmation result, extract the node content scarcity cost score from the data information cost ledger according to the target data node identifier, and at the same time read the current information budget quota from the user-side account record. Compare the current information budget quota with the node content scarcity cost score and merge the comparison conclusion with the access permission confirmation result to generate the access settlement condition result. Based on the access settlement conditions, if the access permission confirmation result is positive and the current information budget quota is not less than the node content scarcity cost score, then the current information budget quota equal to the node content scarcity cost score is deducted from the user's account and the deduction serial number is recorded. Otherwise, the current information budget quota remains unchanged and the reason for rejection is recorded, and an access decision signal is generated.

Citation Information

Patent Citations

  • Data security and privacy management method and system based on block chain technology

    CN120234830A

  • Digital space full-flow encryption transmission system and method

    CN120342792A