Data sharing system based on block chain
By generating hash indexes and performing weighted sorting in the data sharing system, judging the compliance of behavioral trajectories, and dynamically updating certificate status, fine-grained permission control is achieved, solving the problems of misauthorization and response timeliness in existing technologies, and improving the security and responsiveness of data sharing.
Patent Information
- Application Number
- CN202510778678.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-11
- Publication Date
- 2025-09-05
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing technologies lack fine-grained permission control during multi-party data sharing, resulting in mis-authorization or missed authorization. Access certificate status changes rely on manual verification, affecting response timeliness and consistency, making it difficult to achieve dynamic permission adjustment.
A hash index is generated through the field path hash index module, and weight sorting is performed in combination with the permission entry sorting module. The path compliance judgment module judges the compliance of the behavior trajectory. The certificate status update and verification module updates the certificate status. The joint permission confirmation module performs joint judgment to achieve dynamic permission allocation.
It improves the security, reliability and real-time response capabilities of data sharing, enhances the granularity and dynamic adjustment capabilities of permission management, and ensures the traceability of access operations.
Smart Images

Figure CN120596484A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a data sharing system based on blockchain. Background Art
[0002] The field of data processing technology encompasses operations such as the collection, transmission, storage, analysis, conversion, and management of raw data to achieve the effective utilization and scheduling of data resources. The core content of this technology includes structured and unstructured data processing, data mining, data cleaning, data fusion, and data security assurance.
[0003] The blockchain-based data sharing system refers to a system architecture that leverages the characteristics of blockchain to enable trusted exchange and sharing of data among multiple parties. It focuses on specific technical issues such as data storage, access control, and sharing behavior traceability. The system records multi-party data in hashed form on the blockchain and integrates smart contracts to dynamically define data sharing permissions and configure call rules.
[0004] In multi-party data sharing, existing technologies typically only implement static permission control for overall data access behavior, lacking in-depth identification and dynamic analysis of field-level paths. This can lead to mis-authorization or missed authorization in fine-grained permission control scenarios. For example, when an enterprise needs to access specific sub-field data, the lack of precise path modeling can lead to misjudgment of similar field paths, resulting in unclear data access boundaries. Permission indexes often use a coarse-grained static configuration model that fails to reflect the actual weighting of access frequency and node depth. This results in frequently called nodes being prioritized or critical nodes being left unprotected. Furthermore, the use of behavioral traces is limited to recording, lacking a compliance analysis process for responsibility numbers and access paths, making it difficult to promptly detect responsibility violations or path jumps. Furthermore, access certificate status changes often rely on manual verification or periodic polling, failing to implement immediate adjustments based on behavioral deviations, impacting the timeliness and consistency of data access responses. Most access authorizations lack a combined judgment criteria based on historical behavior traces, making it difficult to perform comprehensive decisions based on multiple factors, reducing the intelligence and adaptability of access management policies. Summary of the Invention
[0005] The purpose of this invention is to solve the shortcomings of the existing technology and propose a data sharing system based on blockchain.
[0006] In order to achieve the above objectives, the present invention adopts the following technical solutions: A data sharing system based on blockchain includes: The field path hash index module obtains the field information in the enterprise data sharing call request through the blockchain node, generates a hash index for the field path chain in the field information, and builds an on-chain permission index table; The permission entry sorting module obtains the path structure of the field requested by the enterprise and the permission index table on the chain, performs field access permission entry matching and weight sorting, and obtains the field access permission entry priority sequence; The path compliance judgment module refers to the field access permission entry priority sequence to judge the compliance of the execution responsibility path of the behavior track record field in the enterprise access certificate, and obtains the responsibility path deviation judgment result; The certificate status update and verification module updates the enterprise access certificate status based on the responsibility path offset judgment result and constructs a verification path node set, judges the consistency of the timestamp sequence in the verification path node set, and obtains a consistency comparison label; The joint permission confirmation module performs a joint determination operation on the access rights of the field requested by the enterprise based on the consistency comparison tag and the field access permission entry priority sequence, allocates an access authorization identifier based on the determination result, and obtains the enterprise data sharing result.
[0007] As a further solution of the present invention, the on-chain permission index table includes the field path hash value, the caller address index, and the permission node number; the field access permission entry priority sequence includes the node weight value, the node sequence label, and the access frequency record; the responsibility path offset judgment result includes the path offset mark, the responsibility number anomaly point, and the behavior trajectory difference point; the consistency comparison label includes the node timestamp sequence parameter, the node sequence consistency identifier, and the task responsibility timing label; the enterprise data sharing result is specifically the field access authorization identifier, the authorization field number, and the call request response record.
[0008] As a further solution of the present invention, the field path hash index module includes: The field extraction submodule obtains the field information in the enterprise data sharing call request through the blockchain node, collects the node labels and bit sequence values of each level in the field path chain, constructs the field path chain table structure, obtains all node label sequences and corresponding bit sequence numbers in the field path chain table structure, and generates a field node combination sequence; The path structure encoding submodule concatenates and encodes each node label and the bit sequence number based on the field node combination sequence to form a complete path key string, uses the caller address as a salted key, concatenates the path key string with the key, and generates a salted path key group; The index generation submodule performs SHA-256 hash processing on the salted path key value group, obtains the path hash value, calls the field path structure corresponding to the path hash value and the caller address, constructs a mapping key value pair between the field path and the address, and generates an on-chain permission index table.
[0009] As a further solution of the present invention, the permission entry sorting module includes: The path node parsing submodule obtains the path structure of the field requested by the enterprise, extracts the labels of the first and last nodes in the field path sequence, as well as the hierarchical depth information and call frequency records of each node in the path, and generates a path node parameter set; The permission matching calculation submodule searches for the hash index entries corresponding to the first and last node labels in the on-chain permission index table based on the path node parameter set, performs standardized combination processing on the node level depth and access frequency parameters, and generates a node permission weight factor set; The entry sorting and scoring submodule calls the node authority weight factor set, calculates the node weight score through the PageRank algorithm, arranges all field path nodes in sequence according to the scoring results, and generates a field access authority entry priority sequence.
[0010] As a further solution of the present invention, the path compliance judgment module includes: The behavior trajectory extraction submodule obtains the behavior trajectory chain recorded in the enterprise access certificate structure based on the field access permission entry priority sequence, collects the access data label, task responsibility number and corresponding timestamp of each record in the behavior trajectory, and generates a behavior trajectory field set; The responsibility chain segment construction submodule matches the tail field tag in the field path structure with the data tag in the behavior record based on the behavior trajectory field set, extracts the corresponding task responsibility number and timestamp, and pairs the hierarchical depth of each node in the path with the corresponding responsibility time sequence to generate a responsibility chain segment combination sequence; The path deviation determination submodule compares the sequential changes of the responsibility numbers of the responsibility chain segment combination sequence with the node level progressive relationship to determine whether there is a situation where the level order is skipped or the responsibility is reversed, and obtains the responsibility path deviation determination result.
[0011] As a further solution of the present invention, the certificate status update and verification module includes: The status tag adjustment submodule obtains the current status tag in the enterprise access certificate according to the responsibility path offset judgment result, determines whether there is an offset mark, and if so, replaces the original status tag with the verifying status mark to generate an updated status tag; The verification path construction submodule extracts the updated status labels of all levels in the field path structure, combines them with all task responsibility numbers in the behavior track field set, and generates a verification path node set; The sequential consistency judgment submodule compares the time stamp sequence of each node in the verification path node set, analyzes whether there is a time logic inversion or repeated records, outputs a time series matching status mark, and obtains a consistency comparison label.
[0012] As a further solution of the present invention, the joint authority confirmation module includes: The parameter summary preparation submodule calls each node number and corresponding weight in the field access permission entry priority sequence, combines the time sequence judgment result in the consistency comparison tag, and pairs the two sets of parameters with the field nodes to generate a node permission joint parameter set; The matching score calculation submodule calculates the matching score between the weight value of each node in the node permission joint parameter set and the sequence label, compares the statistical score result with the access authorization threshold, identifies the field node number whose score exceeds the threshold, and generates a set of authorization candidate fields; The access authorization allocation submodule pairs and binds each field node number in the set with the corresponding call requester address based on the authorization candidate field set, writes the field access authorization identification record to the blockchain, and outputs the enterprise data sharing result, which is used for on-chain confirmation and authorization record writing of field-level access rights, serving as the official access credential of the call requester enterprise to the specified data field in the blockchain network, and is used as the authority basis for data reading, processing or forwarding operations.
[0013] Compared with the prior art, the advantages and positive effects of the present invention are: In this invention, by extracting the multi-level structure of the field path chain from data sharing call requests, salting and hashing the information based on the caller's address, and performing a hashing process, unique mapping of the field path is achieved, effectively avoiding field identification ambiguity and path conflicts, and ensuring the precise location of sharing operations. By using path structure parsing and access frequency normalization, combined with a scoring mechanism to establish a field entry weight sequence, field access entries can be sorted according to actual frequency of use and structural hierarchy, improving authorization decision efficiency. By extracting task responsibility numbers and timestamps from access behavior traces, establishing responsibility chain segments, and comparing them with the field path structure for hierarchical and temporal consistency, this can effectively identify abnormal changes in responsibility paths and enhance compliance judgment capabilities. By comparing field node weights with access sequence labels and combining the consistency results of responsibility temporal sequences, a joint scoring is performed. Authorization field sets can be automatically generated based on scoring thresholds, enabling dynamic permission allocation and on-chain writing of access certificates, improving the security, reliability, and real-time responsiveness of data sharing. The linkage mechanism between data access authorization and behavior trajectory verification enhances the traceability of access operations, while also improving the granularity and dynamic adjustment capabilities of permission management in multi-party collaborative environments, providing strong support for complex sharing scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 is a system flow chart of the present invention; Figure 2 This is a flow chart of the field path hash index module of the present invention; Figure 3 This is a flow chart of the permission entry sorting module of the present invention; Figure 4 This is a flow chart of the path compliance judgment module of the present invention; Figure 5 This is a flow chart of the certificate status update and verification module of the present invention; Figure 6 This is a flow chart of the joint authority confirmation module of the present invention. DETAILED DESCRIPTION
[0015] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0016] In the description of the present invention, it should be understood that the terms "length," "width," "up," "down," "front," "back," "left," "right," "vertical," "horizontal," "top," "bottom," "inside," "outside," and the like, indicating positions or relationships, are based on the positions or relationships shown in the accompanying drawings and are intended only to facilitate the description of the present invention and simplify the description. They do not indicate or imply that the devices or elements referred to must have a specific orientation, be constructed, or operate in a specific orientation. Therefore, they should not be construed as limiting the present invention. Furthermore, in the description of the present invention, "plurality" means two or more, unless otherwise expressly and specifically defined.
[0017] See also Figure 1 , a data sharing system based on blockchain includes: The field path hash index module obtains the field information in the enterprise data sharing call request through the blockchain node, generates a hash index for the field path chain in the field information, and builds an on-chain permission index table; The permission entry sorting module obtains the path structure of the field requested by the enterprise and the on-chain permission index table, performs field access permission entry matching and weight sorting, and obtains the field access permission entry priority sequence; The path compliance judgment module refers to the field access permission entry priority sequence to judge the compliance of the responsibility path executed by the behavior track record field in the enterprise access certificate, and obtains the responsibility path deviation judgment result; The certificate status update and verification module updates the enterprise access certificate status based on the responsibility path offset judgment result and constructs a verification path node set. It determines the consistency of the timestamp sequence in the verification path node set and obtains a consistency comparison label. The joint permission confirmation module performs a joint determination operation on the access rights of the fields requested by the enterprise based on the consistency comparison tag and the field access rights entry priority sequence, assigns an access authorization identifier based on the determination result, and obtains the enterprise data sharing result; The on-chain permission index table includes the field path hash value, the caller address index, and the permission node number. The field access permission entry priority sequence includes the node weight value, the node sequence label, and the access frequency record. The responsibility path offset judgment result includes the path offset mark, the responsibility number anomaly point, and the behavior trajectory difference point. The consistency comparison label includes the node timestamp sequence parameter, the node sequence consistency identifier, and the task responsibility timing label. The enterprise data sharing result is specifically the field access authorization identifier, the authorization field number, and the call request response record.
[0018] See also Figure 2 , the field path hash index module includes: The field extraction submodule obtains the field information in the enterprise data sharing call request through the blockchain node, collects the node labels and bit sequence values of each level in the field path chain, constructs the field path chain table structure, obtains all node label sequences and corresponding bit sequence numbers in the field path chain table structure, and generates a field node combination sequence; Obtain the field information in the enterprise data sharing call request recorded by the blockchain node. For each request transaction, extract the caller address, data object identifier and its field access path information from the transaction structure one by one. The field path chain is usually presented in the form of a hierarchical structure. For example, if an enterprise calls the "contract data → customer information → ID number" field, the path will be parsed into a three-level node label sequence, which is "contract data", "customer information" and "ID number" in sequence. The system records the level number of each level node, and the number increases step by step starting from 0. For the above example, the node label sequence is [contract data, customer information, ID number ], the sequence of bit numbers is [0, 1, 2]. The system combines and concatenates the node labels and their bit numbers to generate a field path linked list structure. After further expansion, the node pair combination consisting of each node label and bit sequence is obtained as [Contract Data-0, Customer Information-1, ID Number-2]. Based on this, the label and number in each pair are concatenated using the connector “—” to generate a formatted representation. The result of the combination is [Contract Data-0 | Customer Information-1 | ID Number-2]. The formatted sequence is then merged into an overall sequence according to the node order, that is, the field node combination sequence "Contract Data-0 | Customer Information-1 | ID Number-2".
[0019] The path structure encoding submodule concatenates and encodes each node label and the bit sequence number based on the field node combination sequence to form a complete path key string. It uses the caller address as the salt key and concatenates the path key string with the key to generate a salted path key group. When calling a field node combination sequence, the system traverses each node item in the sequence, concatenates its original format according to the "node label plus level number" to generate a key-value substring, and obtains the caller address information in the call request on this basis. For example, when the caller address is "address A81B", this address is used as the salt key in the subsequent mixed splicing operation, and the entire combination sequence is concatenated with the salt key to form a salted path key-value group. This operation actually constructs the following string: "Contract data-0 | Customer information-1 | ID number-2 | Address A81B". To increase irreversibility, this group of strings is used as the input source for subsequent hash calculations, further preventing different callers from accessing the same field path and merging them into the same index item, thereby ensuring the caller uniqueness of the index mapping. During the string concatenation process, the original field path structure must be complete and correct, and the caller address format must be a full-length 42-bit hexadecimal string.
[0020] The index generation submodule performs SHA-256 hashing on the salted path key value group, obtains the path hash value, calls the field path structure corresponding to the path hash value and the caller address, constructs a mapping key-value pair between the field path and the address, and generates an on-chain permission index table; Receive the salted path key-value group generated by the path structure encoding submodule, perform a 256-bit secure hash algorithm processing operation on the string, and pass the string into the hash function in byte stream form to generate a 64-bit hexadecimal hash value. For example, the hash result generated by the above path string is "hash value XYZ123". The system then performs index key processing on the hash value and establishes a mapping key-value pair with its caller address "address A81B". The key-value pair structure is stored in the form of "path hash value corresponding to caller address and field path" and mounted in the on-chain permission mapping table structure for rapid completion of field path positioning in the subsequent permission judgment stage, and completion of the mapping relationship registration between the field path and the calling subject in the blockchain data structure. This structure is the on-chain permission index table, which is used to synchronize the basic data index entry for verifying the legitimacy of the field permission path between different nodes.
[0021] See also Figure 3 , the permission entry sorting module includes: The path node parsing submodule obtains the path structure of the field requested by the enterprise, extracts the labels of the first and last nodes in the field path sequence, as well as the hierarchical depth information and call frequency records of each node in the path, and generates a path node parameter set; After obtaining the path structure of the field requested by the enterprise, the system first expands the path sequence according to the field call level, identifies each field node level by level, and extracts its node label and level information. For example, if an enterprise requests to access the "project data → budget information → approval number" field, the path structure will be extracted as a node sequence [project data, budget information, approval number], and its corresponding level depths are 0, 1, and 2 respectively. Then the system retrieves the number of access records of the enterprise to each of the above nodes within 30 days from the on-chain behavior record database. Assuming that the corresponding access frequencies are 12 times, 24 times, and 6 times respectively, the access frequency record can be obtained as [12, 2 4, 6], the system combines the above two sequences as the basis of path node parameters, which respectively represent the label, level and access frequency information of each node. The path node parameter set consists of three parts, namely the field node label list [project data, budget information, approval number], the field node level depth value [0, 1, 2], and the field node access frequency value [12, 24, 6]. All data are derived from the actual call request log and behavior access record table, and do not involve external historical data references. The entire node parsing process is centered on the field request path, supplemented by the time window behavior frequency to construct a data set and generate a path node parameter set.
[0022] The permission matching calculation submodule searches for the hash index entries corresponding to the first and last node labels in the on-chain permission index table based on the path node parameter set, performs a standardized combination of the node level depth and access frequency parameters, and generates a node permission weight factor set; After calling the path node parameter set generated above, the first node "project data" and the last node "approval number" two field nodes are identified. The system retrieves the permission mapping entry that matches the path from the on-chain permission index table, and determines whether there is an authorization record for the path by querying the matching index hash value. If so, the preset permission weight factor structure of the node corresponding to the path is further read. On this basis, the hierarchical depth value and access frequency value of each node are standardized. The hierarchical depth value adopts the maximum value normalization method, that is, the hierarchical value of each node is divided by the maximum hierarchical value 2 in the path, and the standardized hierarchical value is [0.0, 0.5, 1.0]. The access frequency value adopts logarithmic scaling, which is calculated by taking the logarithm and dividing it by the maximum logarithmic value, that is, calculating respectively. 、 、 , and then divided by the maximum value 1.38 to obtain the standardized access frequency value [0.78, 1.00, 0.56]. The two standardized parameter values are aligned according to the node position and merged into a vector form, and the input factor set of each node is obtained as [(0.0, 0.78), (0.5, 1.00), (1.0, 0.56)]. This data set is the node authority weight factor set.
[0023] The entry ranking and scoring submodule calls the node permission weight factor set, calculates the node weight score through the PageRank algorithm, and arranges all field path nodes in order according to the scoring results to generate the field access permission entry priority sequence; Call the node permission weight factor set, treat each node in the field path as a vertex in the graph structure, and construct directed edges between nodes to reflect the access path order. For example, in the field path "project data → budget information → approval number", there are two directed edges, namely "project data points to budget information" and "budget information points to approval number". The graph structure is defined as , where the vertex set , corresponding to three nodes, edge set , representing the continuous hierarchical connections in the field path, setting the damping coefficient This parameter is used to control the random jump ratio. According to the PageRank scoring model, the node score is calculated using the following formula: ; in, :Indicates the In the round of iteration The score of each node is expressed in relative weight scores. The initial score value is uniformly set to 1, and the updated value is obtained through iterative calculation. This value is used to determine the ranking position of the node in the authority judgment of the path. The higher the score, the later the node appears but the greater its influence on the authority evaluation. : Represents the damping coefficient, which is used to model the proportion of "random jump" behavior. The commonly used fixed value is , which is derived from the recommended value in the Google PageRank paper, indicating that 85% of the score is obtained by graph structure conduction and 15% by uniform distribution. This coefficient is set to be a constant and does not depend on the data. : Indicates the total number of field nodes in the diagram, that is, the number of all hierarchical nodes contained in the field path, which is directly parsed by the request path structure. For example, in "Project Data → Budget Information → Approval Number", the total number of field nodes is , which is a directly countable term and does not require calculation. :Indicates all pointing nodes The field node set, that is, the set of all predecessor nodes in the access path. This value comes from the structural order in the field path. By traversing the field path from back to front, you can get the incoming edge relationship of each node, such as the approval number node of Budget information node . : Indicates a node The initial value of the score in the previous iteration is set to 1, and it is continuously updated by the formula iteration results. The values are stored in a memory variable array, and the previous round value is overwritten after each round of update. : Indicates a node The out-degree, i.e. the number of directed edges from this node, is directly inferred from the linear structure of the field path. For example, in the path "project data → budget information → approval number", the project data node Out-degree is 1, approval number node There is no outgoing edge, and the out-degree is 0.
[0024] Initialize the score vector to 1 for each node, that is, , now for the first round of iteration Expand calculation: Node 1 (project data) has no incoming edges, so: ; Node 2 (budget information) has an incoming edge from node 1: ; The incoming edge of node 3 (approval number) comes from node 2: .
[0025] According to the above calculations, the node scores after the first round of iteration are: Project data node scoring , budget information node score , approval number node score Continuing iterations will further stabilize the scoring, but preliminary scoring results indicate that the Project Data node, as the starting node and without incoming edges, has a much lower score than other nodes. Therefore, its access entry priority is the lowest in the node permission priority sorting. The system sorts the weights of the nodes in descending order of score, outputting a sorted sequence of [Budget Information Node, Approval Number Node, Project Data Node], which serves as the field access permission entry priority sequence. This sequence is used as the basis for the priority matching of field entries during subsequent permission link verification.
[0026] See also Figure 4 ,The path compliance judgment module includes: The behavior trajectory extraction submodule obtains the behavior trajectory chain recorded in the enterprise access certificate structure based on the field access permission entry priority sequence, collects the access data label, task responsibility number and corresponding timestamp of each record in the behavior trajectory, and generates a behavior trajectory field set; Based on the field access permission entry priority sequence, the behavior trajectory chain recorded in the access certificate structure of the calling party's enterprise is extracted. First, the field traversal operation is performed on the behavior record structure of the access certificate to filter out the behavior record entries that have structural overlap with the current request field path. Each behavior record must contain three items: access data label, task responsibility number and timestamp. The system calls the behavior record time dimension sorting function to arrange all records in ascending order of time to ensure that the order between behavior fragments is not disordered. For example, the behavior sequence recorded in an access certificate is: access data label "project data", responsibility number "D01", timestamp "2024-08-0109:13:24", access data label "budget information", responsibility number "D03", timestamp "2024-08-01 09:20:35", access data label "approval number", responsibility number "D02", timestamp "2024-08-0109:23:50", the system matches the above access data labels in the field path structure according to the field path structure to see if they exist in this access field path structure. If all three are matched, the corresponding task responsibility numbers and timestamps are extracted into two independent sequences respectively, and form a behavior record field set, among which the task responsibility number set is [D01, D03, D02], the timestamp set is [09:13:24, 09:20:35, 09:23:50], and the access data label set is [project data, budget information, approval number]. The three sets are combined to form a structured data field set, which is used for subsequent responsibility structure chain segment identification operations. The output result is a behavior trajectory field set.
[0027] The responsibility chain segment construction submodule matches the tail field tag in the field path structure with the data tag in the behavior record based on the behavior trajectory field set, extracts the corresponding task responsibility number and timestamp, and pairs the hierarchical depth of each node in the path with the corresponding responsibility time sequence to generate a responsibility chain segment combination sequence; After calling the behavior track field set, the system locates the data tag with the same name in the behavior record according to the tail field tag "approval number" in the field path structure, and extracts the task responsibility number and timestamp corresponding to the field if the match is successful, as the end mark of the behavior chain segment. Then the system traverses all the records in the behavior track field set, compares the data tag in each record with the label name of the hierarchical node in the field path, and constructs a node responsibility mapping relationship table based on the hierarchical depth of the field node and the timestamp of the behavior record. For example, the hierarchical depth of the node "project data" is 0, and its corresponding timestamp is 09:13:24, which constitutes a pairing item (0, 09:13:24), and the node "budget" The "Information" level is 1, corresponding to the time 09:20:35; the "Approval Number" node is level 2, corresponding to the time 09:23:50. The system organizes these three sets of information into a one-to-one paired chain element sequence in the form of [(0, D01, 09:13:24), (1, D03, 09:20:35), (2, D02, 09:23:50)]. Each element in this structure represents the structural position (level value), responsibility code, and operation timestamp of a field node, thus forming a responsibility chain segment combination sequence. This sequence will be used to identify whether there are abnormal access situations such as authority responsibility traversal and level reversal in the access process. The output result is the responsibility chain segment combination sequence.
[0028] The path deviation determination submodule compares the sequential changes of the responsibility numbers in the responsibility chain segment combination sequence with the node hierarchical progressive relationship to determine whether there is a situation where the hierarchical order is skipped or the responsibility is reversed, and obtains the responsibility path deviation determination result; Call the responsibility chain segment combination sequence and perform a sequential consistency comparison operation on each chain segment element. The system uses the node level value as the vertical axis sequence number and the timestamp absolute time value as the horizontal axis variable to perform level progression and time increment logic judgment on each node in the same responsibility sequence. If a node has a higher level value than the previous node, but its corresponding timestamp is earlier than the previous node, that is, time logic reverse behavior occurs, it is judged as "responsibility reverse". For example, in the example, the time increment relationship between node (2, D02, 09:23:50) and node (1, D03, 09:20:35) is reasonable. Continue to judge the node (1, D03, 09:20:35) and node (0, D01, 09:13:24), and there is no exception. If there are (1, D03, 09:20:35), (2, D04, 09:15:10) In the case of this type of sequence error, the system will extract the corresponding responsibility code and abnormal point level number, and set the responsibility path sequence consistency threshold to "completely increasing", that is, the timestamp corresponding to any level value must satisfy the absolute increasing relationship, otherwise the offset mark will be triggered. The system calculates the offset value according to the position difference. If the number of offset nodes exceeds the threshold of 1, the output result is marked as "responsibility path offset exists". The offset type, occurrence node and jump direction are recorded in the result item, and the output result is the responsibility path offset judgment result.
[0029] See also Figure 5 , the certificate status update and verification module includes: The status label adjustment submodule obtains the current status label in the enterprise access certificate based on the responsibility path offset judgment result, and determines whether there is an offset mark. If so, the original status label is replaced with the verifying status mark to generate an updated status label; When the responsibility path offset judgment result is called, the system first parses the offset judgment flag field to determine whether its identifier value is in the "offset established" state. If it is established, the state update process begins. The system then extracts the original state tag field in the access certificate structure. This field is usually set to "passing state" at the initial stage of the call chain execution, indicating that the current certificate has normal access rights. If the offset flag is detected to be established, the state field is replaced, and the original value "passing state" is updated to "verifying", indicating that the current access path needs to enter the verification process. The original state change record is written to the access certificate historical state sequence. The storage structure record is recorded as a tuple (previous state value, next state value, change time) for subsequent state recovery tracking. At the same time, the trigger node information is added to the updated state tag, indicating the node name and corresponding timestamp that triggered the offset, forming a structured state tag information item. For example, if the offset occurs in the field node "budget information" at the time "2024-08-01 09:20:35", the updated state tag is: state identifier "verifying", trigger field "budget information", trigger time "2024-08-01 09:20:35", and the result output is the updated status label.
[0030] The verification path construction submodule extracts the updated status labels of all levels in the field path structure, combines them with all task responsibility numbers in the behavior trajectory field set, and generates a verification path node set; Call the field path structure and the updated status label. First, extract the label names of all hierarchical nodes in the field path structure, and generate a field node sequence according to its original path order. For example, if the path structure is "project data → budget information → approval number", the field node sequence is [project data, budget information, approval number]. Then the system extracts all task responsibility numbers from the behavior trajectory field set and constructs a task responsibility sequence, such as [D01, D03, D02]. The system combines nodes and responsibilities one by one to generate a combined node structure. Each combined node item contains the field name, responsibility number and status label. The trigger time recorded in the combination form is (field name, responsibility number, status identifier). If the number of field nodes is consistent with the number of task responsibility numbers, they are paired in order of index position to generate a complete verification path node set. For example, the combination result is [(project data, D01, verification in progress), (budget information, D03, verification in progress), (approval number, D02, verification in progress)], and the system appends the timestamp recorded in the behavior trajectory to each combination node, expanding it into a four-tuple structure. The complete form is (field name, responsibility number, verification status, timestamp). The integrated output structure is the verification path node set.
[0031] The sequential consistency judgment submodule compares the timestamp sequence of each node in the verification path node set, analyzes whether there is a time logical inversion or duplicate record, outputs the time series matching status mark, and obtains the consistency comparison label; Call the validation path node set, extract the timestamp field in each combination node and build a time series array, then extract the timestamp of each node according to the hierarchical order in the field path to form a time index column, set the field node levels in the path structure to be the first-level node, the second-level node and the third-level node, and the corresponding timestamps are recorded as 、 、 ,in: Indicates the operation time recorded by the first-layer node in the behavior trajectory, Indicates the operation time of the corresponding task responsibility of the second-layer node, Indicates the access time of the third-layer node. The three together constitute the time series of the path order. The system judges the size relationship of the timestamps from low to high according to the layer sequence number, using the judgment formula: , where the symbol "<" indicates that the absolute time is earlier than. The system performs calculations with the timestamp precision to the second unit. For example, when the node times are "09:13:24", "09:20:35", and "09:23:50", the total seconds converted to time are 33194, 33635, and 33830 seconds respectively. The calculation determines whether the following condition is met: 33194<33635<33830. If so, it indicates that the time logic is in normal order. If the system finds that the timestamp of any field node is earlier than the timestamp of the node in the previous level, for example, the time of the third-level field "Approval Number" is "09:12:50", and the converted second value is 33370 seconds, which is earlier than the 33380 seconds of the second-level field "Budget Information", then the node will be recorded as a reversed node. The system marks the node field name, level number, corresponding time value and the time difference of its predecessor node. If the reversed time difference exceeds the set error tolerance, for example, the error limit is set to 30 seconds, the reversed order is determined to be a structural abnormality. The system counts the number of reversed nodes. If the number is ≥1, the comparison status is output as "reversed order exists", otherwise it is output as "sequence is consistent". The generated comparison label structure contains: sequence determination result, abnormal node field, corresponding time difference and verification path field name sequence. This structure is the consistency comparison label.
[0032] See also Figure 6 ,The joint authority confirmation module includes: The parameter summary preparation submodule calls each node number and corresponding weight in the field access permission entry priority sequence, combines the time sequence judgment results in the consistency comparison label, and pairs the two sets of parameters with field nodes to generate a node permission joint parameter set; Each node number in the priority sequence of the field access permission entry is called with its corresponding weight value. The weight value is the dimensionless ratio generated in the previous PageRank scoring stage. For example, the corresponding number of the field node "project data" is N1, with a weight value of 0.05, "budget information" is N2, with a weight value of 0.90, and "approval number" is N3, with a weight value of 0.90. Then the system calls the time sequence status recorded in the consistency comparison label to extract the sequence label value, which is used to indicate the time sequence legitimacy of each field node in the access chain. The sequence label is a Boolean judgment result, such as [sequential, sequential, reverse], which respectively represents the behavior sequence verification status of the three field nodes. The system performs a one-to-one pairing operation on the above two parameter sets using the node number as the key index. The pairing format is a triple (Ni, weight value, sequence label), that is, node number, corresponding score, and sequence judgment result, and obtains the data structure [(N1, 0.05, sequential), (N2, 0.90, sequential), (N3, 0.90, in reverse order)] and uniformly encoded into a joint structure array, which constitutes the output item of this step, namely the node authority joint parameter set.
[0033] The matching score calculation submodule calculates the matching score between the weight value and the sequence label of each node in the node permission joint parameter set, compares the statistical score result with the access authorization threshold, identifies the field node number whose score exceeds the threshold, and generates a set of authorization candidate fields; Call the node authority joint parameter set to perform structured scoring operations on each field node. The system introduces three types of normalized parameters for weighted processing, which are the PageRank scoring results , Sequential label credibility factor , node structure importance weight To avoid inconsistent operation dimensions, the system normalizes all parameters to interval, and uses a multi-factor weighted calculation model to evaluate the permission matching degree of field nodes in the joint permission chain, and constructs the scoring function as follows: ; The parameters are described as follows: : The sequential number of the field nodes in the field path structure, starting from the path starting point with number 1 and incrementing from top to bottom along the path structure. The system automatically generates this number based on the node sequence of the field path chain. It is a structural sequential value and does not require additional calculation. :Field node is the first in PageRank iteration The scores generated by the round have been calculated in the previous steps. The system will normalize the scores of all field nodes, that is, each score is divided by the maximum score in the path. The normalized range is , between, the acquisition method is: Step 1: Execute PageRank iteration until it stabilizes and obtain the original score; Step 2: Calculate ,in . : The sequential label quantization value obtained by the field node in the sequential consistency comparison, which is a numerical mapping of Boolean logic: If the node timestamp order is consistent with the field path structure order, then ; If there is a reverse order, then ; The system generates tags based on the order comparison and writes them directly into the matching parameter set. : The node structure importance weight is calculated by the hierarchical position in the field path: , : The level number of the current node in the field path, starting from 0; : The maximum level number in the field path. The system counts it in the field path structure and it is a fixed-length value. Therefore, ,The higher the value, the closer the node is to the top of the path and the higher the structural weight.
[0034] Let "budget information" be the second-layer node. , the order label is normal, then , its level , the maximum level , from which we get: , bring into the scoring function calculation: , if the node "approval number" is the last node , its rating , the order is reverse, , the level is 2, then: , the matching score is: , the scoring results need to be consistent with the dynamic access authorization threshold For comparison, the threshold value is dynamically adjusted by the field node level, and its calculation function is as follows: ; in: : Field node Dynamic authorization threshold value, used for scoring Compare and determine whether authorization is allowed; : Basic threshold value, the system default setting is 0.60, which is a global configuration parameter. It is set according to the organization's internal access control requirements and does not change with the field structure; : Structural adjustment coefficient, set by the system to 0.20. This value indicates the intensity of dynamic corrections made to the authorization threshold due to the field path structure position. It can be set within a reasonable range (e.g., 0.1-0.3) based on historical policy comparisons. and : Definition and They are the level number of the field node and the maximum level number of the path, respectively, and are both automatically obtained from the node index in the path structure.
[0035] Take the node "Budget Information" level 1 as an example: , approval number node level 2: , compare the matching score with the authorization threshold one by one: Node "Budget Information": , meet the authorization conditions; node "Approval Number": , does not meet the authorization conditions. Therefore, the system identifies the authorization candidate field number set as containing only the node "Budget Information", and this result is the authorization candidate field set.
[0036] The access authorization allocation submodule pairs and binds each field node number in the set with the corresponding call requester address based on the set of authorization candidate fields, writes the field access authorization identification record to the blockchain, and outputs the enterprise data sharing result. This is used for on-chain confirmation of field-level access rights and writing of authorization records. It serves as the official access credential for the call requester enterprise to the specified data field in the blockchain network and is used as the basis for the permission of data reading, processing or forwarding operations; The authorization candidate field set is called, and the node number of each field in the set is structurally paired with the corresponding call requester address. The system first identifies the field path label name corresponding to each field node number, and retrieves the unique address identifier of the caller enterprise in the current transaction in the on-chain enterprise identity management record. For example, the caller address is "address A81B", the node number is N2, and the corresponding field label is "budget information". The system constructs a field node authorization binding structure with the format of (field label, node number, requester address, current block height). Then the system extracts the transaction timestamp corresponding to the current operation, such as "2024-08-01 09:25:00", and uses it as the operation time information written to the block, which together with the field binding structure constitutes the authorization identification data unit. Each authorization unit is packaged and synchronously written to the on-chain access rights status tree. This structure also includes an authorization index hash uniquely binding the caller to the field. The authorization hash is calculated using the following rules: the field label, node number, caller address, and transaction timestamp are concatenated into a plaintext string and hashed with the SHA-256 function to generate a fixed-length authorization hash identifier. For example, the input "budget information|N2|address A81B|2024-08-01 09:25:00" produces the authorization hash "a9cd3f1...", which serves as the unique primary key for the authorization credential in the on-chain structure. The system then writes this authorization hash, along with the original authorization record, to the authorization area of the access certificate field node and marks it as "Status: Authorized" within the certificate. If an enterprise initiates an access request and subsequently reads or processes the "Budget Information" field, the validator will use this authorization identifier to verify the access path's permissions and match the record. The output structure data item records a detailed set of all authorized field node numbers, their access identifiers, authorized transaction hashes, and binding addresses, which is the enterprise data sharing result. It will serve as the authorization basis and access verification source for subsequent data field operations in the blockchain network.
[0037] The above are merely preferred embodiments of the present invention and do not limit the present invention in any other form. Any technician familiar with the profession may use the technical content disclosed above to change or modify it into an equivalent embodiment with equivalent changes and apply it to other fields. However, any simple modification, equivalent change and modification made to the above embodiment based on the technical essence of the present invention without departing from the content of the technical solution of the present invention shall still fall within the scope of protection of the technical solution of the present invention.
Claims
1. A data sharing system based on blockchain, characterized in that: The system comprises: The field path hash index module obtains the field information in the enterprise data sharing call request through the blockchain node, generates a hash index for the field path chain in the field information, and builds an on-chain permission index table; The permission entry sorting module obtains the path structure of the field requested by the enterprise and the permission index table on the chain, performs field access permission entry matching and weight sorting, and obtains the field access permission entry priority sequence; The path compliance judgment module refers to the field access permission entry priority sequence to judge the compliance of the execution responsibility path of the behavior track record field in the enterprise access certificate, and obtains the responsibility path deviation judgment result; The certificate status update and verification module updates the enterprise access certificate status based on the responsibility path offset judgment result and constructs a verification path node set, judges the consistency of the timestamp sequence in the verification path node set, and obtains a consistency comparison label; The joint permission confirmation module performs a joint determination operation on the access rights of the field requested by the enterprise based on the consistency comparison tag and the field access permission entry priority sequence, allocates an access authorization identifier based on the determination result, and obtains the enterprise data sharing result.
2. The data sharing system based on blockchain according to claim 1 is characterized in that: The on-chain permission index table includes the field path hash value, the caller address index, and the permission node number; the field access permission entry priority sequence includes the node weight value, the node sequence label, and the access frequency record; the responsibility path offset judgment result includes the path offset mark, the responsibility number anomaly point, and the behavior trajectory difference point; the consistency comparison label includes the node timestamp sequence parameter, the node sequence consistency identifier, and the task responsibility timing label; the enterprise data sharing result is specifically the field access authorization identifier, the authorization field number, and the call request response record.
3. The blockchain-based data sharing system according to claim 1, characterized in that: The field path hash index module includes: The field extraction submodule obtains the field information in the enterprise data sharing call request through the blockchain node, collects the node labels and bit sequence values of each level in the field path chain, constructs the field path chain table structure, obtains all node label sequences and corresponding bit sequence numbers in the field path chain table structure, and generates a field node combination sequence; The path structure encoding submodule concatenates and encodes each node label and the bit sequence number based on the field node combination sequence to form a complete path key string, uses the caller address as a salted key, concatenates the path key string with the key, and generates a salted path key group; The index generation submodule performs SHA-256 hash processing on the salted path key value group, obtains the path hash value, calls the field path structure corresponding to the path hash value and the caller address, constructs a mapping key value pair between the field path and the address, and generates an on-chain permission index table.
4. The data sharing system based on blockchain according to claim 3 is characterized in that: The permission entry sorting module includes: The path node parsing submodule obtains the path structure of the field requested by the enterprise, extracts the labels of the first and last nodes in the field path sequence, as well as the hierarchical depth information and call frequency records of each node in the path, and generates a path node parameter set; The permission matching calculation submodule searches for the hash index entries corresponding to the first and last node labels in the on-chain permission index table based on the path node parameter set, performs standardized combination processing on the node level depth and access frequency parameters, and generates a node permission weight factor set; The entry sorting and scoring submodule calls the node authority weight factor set, calculates the node weight score through the PageRank algorithm, arranges all field path nodes in sequence according to the scoring results, and generates a field access authority entry priority sequence.
5. The blockchain-based data sharing system according to claim 4 is characterized in that: The path compliance judgment module includes: The behavior trajectory extraction submodule obtains the behavior trajectory chain recorded in the enterprise access certificate structure based on the field access permission entry priority sequence, collects the access data label, task responsibility number and corresponding timestamp of each record in the behavior trajectory, and generates a behavior trajectory field set; The responsibility chain segment construction submodule matches the tail field tag in the field path structure with the data tag in the behavior record based on the behavior trajectory field set, extracts the corresponding task responsibility number and timestamp, and pairs the hierarchical depth of each node in the path with the corresponding responsibility time sequence to generate a responsibility chain segment combination sequence; The path deviation determination submodule compares the sequential changes of the responsibility numbers of the responsibility chain segment combination sequence with the node level progressive relationship to determine whether there is a situation where the level order is skipped or the responsibility is reversed, and obtains the responsibility path deviation determination result.
6. The data sharing system based on blockchain according to claim 5 is characterized in that: The certificate status update and verification module includes: The status tag adjustment submodule obtains the current status tag in the enterprise access certificate according to the responsibility path offset judgment result, determines whether there is an offset mark, and if so, replaces the original status tag with the verifying status mark to generate an updated status tag; The verification path construction submodule extracts the updated status labels of all levels in the field path structure, combines them with all task responsibility numbers in the behavior track field set, and generates a verification path node set; The sequential consistency judgment submodule compares the time stamp sequence of each node in the verification path node set, analyzes whether there is a time logic inversion or repeated records, outputs a time series matching status mark, and obtains a consistency comparison label.
7. The blockchain-based data sharing system according to claim 6, characterized in that: The joint authority confirmation module includes: The parameter summary preparation submodule calls each node number and corresponding weight in the field access permission entry priority sequence, combines the time sequence judgment result in the consistency comparison tag, and pairs the two sets of parameters with the field nodes to generate a node permission joint parameter set; The matching score calculation submodule calculates the matching score between the weight value of each node in the node permission joint parameter set and the sequence label, compares the statistical score result with the access authorization threshold, identifies the field node number whose score exceeds the threshold, and generates a set of authorization candidate fields; The access authorization allocation submodule pairs and binds each field node number in the set with the corresponding call requester address based on the authorization candidate field set, writes the field access authorization identification record to the blockchain, and outputs the enterprise data sharing result, which is used for on-chain confirmation and authorization record writing of field-level access rights, serving as the official access credential of the call requester enterprise to the specified data field in the blockchain network, and is used as the authority basis for data reading, processing or forwarding operations.
Citation Information
Cited By
Medical archive security optimization query system based on block chain
CN120910318A
A blockchain-based medical record security optimization query system
CN120910318B
Data access management method and system based on block chain
CN121077791A
Voice instruction analysis method and device of command hall and command hall system
CN121191500A
Voice instruction analysis method and device for command hall and command hall system
CN121191500B