A multi-chain-based IoT data hierarchical access control method and system

By employing a multi-chain-based hierarchical access control method for IoT data, utilizing a two-level blockchain and a proxy re-encryption mechanism, combined with reputation-based fine-grained access control, the single point of failure and privacy leakage issues in IoT access control are resolved, enabling secure sharing and efficient access to IoT data.

CN117240499BActive Publication Date: 2026-11-10SUZHOU UNIV OF SCI & TECH +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310951001.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-31
Publication Date
2026-11-10
Estimated Expiration
2043-07-31

AI Technical Summary

Technical Problem

Existing IoT access control models suffer from single points of failure and privacy leaks, making it difficult to effectively protect user data security and achieve secure sharing of large-scale IoT data resources.

Method used

A multi-chain-based IoT data hierarchical access control method is adopted. By storing data in a database and index messages in a secondary blockchain, data protection is achieved through a proxy re-encryption mechanism. Combined with a reputation-based fine-grained access control model, the legality of access policies and secure data sharing are realized.

Benefits of technology

It improves the security and reliability of access control, reduces the storage pressure on the main blockchain, increases throughput, and enhances query efficiency and system stability by dynamically adjusting access permissions through a reputation model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117240499B_ABST
    Figure CN117240499B_ABST
Patent Text Reader

Abstract

This invention relates to a multi-chain-based IoT data hierarchical access control method and system. The method includes: an object storing data and storing the data's index message in a secondary blockchain; the object formulating an access policy and sending it to the PAP (Platform Access Provider), and having a third party re-encrypt the index message; the subject submitting an access request to the main blockchain; the PEP (Platform Access Provider) receiving the access request and generating a relevant message, which is then sent to the PDP (Platform Data Provider); the PDP receiving the relevant message, querying the PAP's access policy to determine the validity of the access request; if invalid, sending the result to the PEP; if valid, comparing the PEP's attribute information with the PAP's access policy and sending the decision result to the PEP; the PEP executing the decision result; if the decision is valid, the subject retrieving and decrypting the encrypted data's index message, and then accessing the data in the SQL database through the secondary blockchain to complete the access. This invention effectively protects data privacy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of information security technology, and in particular to a multi-chain-based IoT data hierarchical access control method and system. Background Technology

[0002] With the rapid development of the Internet of Things (IoT), a large number of smart devices and sensors have been connected to networks, boosting the development of smart cities and providing more and more intelligent services for people's lives, such as smart healthcare, smart logistics, and smart transportation. However, the direct access of a large number of heterogeneous IoT devices from different departments and levels makes it difficult to protect user data security and can lead to privacy leaks. Achieving secure sharing of large-scale IoT data resources has become a major challenge. Access control, as one of the key technologies for protecting secure data sharing, can restrict unauthorized access to resources by authorizing users to access critical resources, thus protecting data sharing to a large extent and providing an effective solution for optimizing information security in smart cities. However, traditional access control models use centralized servers for access authorization decisions, which may have drawbacks such as single points of failure and unreliable data transmission. In addition, the design of access control permissions is also prone to vulnerabilities, allowing malicious users to tamper with access permission policies and allow unauthorized access requests to obtain data. Therefore, it is necessary to design a method to effectively solve the single point of failure and privacy leakage problems in access control. Summary of the Invention

[0003] Therefore, the technical problem to be solved by the present invention is to overcome the single point of failure and privacy leakage problems in access control in the prior art.

[0004] To address the aforementioned technical problems, this invention provides a multi-chain-based IoT data hierarchical access control method, comprising:

[0005] Step S1: The resource owner stores the data in the database SQL and stores the index message of the data in the secondary blockchain, wherein the secondary blockchain belongs to the main blockchain;

[0006] Step S2: The resource owner formulates a corresponding access policy based on the privacy sensitivity of the data, sends it to the policy management point (PAP) for storage and management, and performs proxy re-encryption on the index message of the data through a proxy re-encryption mechanism;

[0007] Step S3: The visitor submits an access request to the main blockchain. The policy execution point (PEP) receives the access request and generates a relevant message, which is then sent to the policy decision point (PDP).

[0008] Step S4: The Policy Decision Point (PDP) receives the relevant message, queries the access policy of the Policy Management Point (PAP) to determine whether the visitor's access request is legitimate. If it is illegitimate, the result is sent to the Policy Execution Point (PEP). If it is legitimate, the attribute information of the Policy Information Point (PIP) is compared with the access policy of the Policy Management Point (PAP), and the final decision result is sent to the Policy Execution Point (PEP).

[0009] Step S5: The policy execution point (PEP) executes a decision, which is either permission or denial.

[0010] Step S6: If the policy execution point PEP execution decision result is permission, the visitor retrieves the index message of the encrypted data through the proxy re-encryption mechanism and decrypts it. After decryption, the visitor accesses the data in the database SQL through the secondary blockchain to complete the access to the data resources.

[0011] The policy management point (PAP), policy execution point (PEP), policy decision point (PDP), and policy information point (PIP) constitute the access control model.

[0012] In one embodiment of the present invention, in step S1, the resource owner stores data into a database SQL and stores the index message of the data into a secondary blockchain. The method includes:

[0013] During the storage phase, the resource owner stores the data acquired by the IoT platform into the SQL database. The index message of the data is packaged into a transaction record, which includes the input address, output address, signature, and timestamp.

[0014] The transaction record is sent to the corresponding secondary blockchain, where nodes verify and reach a consensus to determine whether the transaction record is legal and valid.

[0015] Verified and consensus-reached transaction records are added to the latest block of the secondary blockchain, forming an immutable and traceable data index message record.

[0016] In one embodiment of the present invention, step S2 involves performing proxy re-encryption on the index message of the data using a proxy re-encryption mechanism, the method comprising:

[0017] In the proxy re-encryption mechanism, the resource owner uses the index message M of the data with the public key PK. A The ciphertext is obtained after encryption.

[0018] In one embodiment of the present invention, in step S3, the visitor submits an access request to the main blockchain, the policy execution point (PEP) receives the access request and generates a relevant message to send to the policy decision point (PDP), the method comprising:

[0019] During the access control phase, the visitor submits an access request to the main blockchain. The policy execution point (PEP) in the access control model receives the access request, analyzes the visitor's attributes and the attribute information obtained from the policy information point (PIP) to generate an attribute access request (AAR), and sends the attribute access request (AAR) to the policy decision point (PDP). The attribute access request (AAR) is a related message.

[0020] In one embodiment of the present invention, in step S4, the policy decision point (PDP) receives the relevant message, queries the access policy of the policy management point (PAP) to determine whether the visitor's access request is legitimate. If illegitimate, the result is sent to the policy execution point (PEP); if legitimate, the attribute information of the policy information point (PIP) is compared with the access policy of the policy management point (PAP), and finally the decision result is sent to the policy execution point (PEP). The method includes:

[0021] After receiving the attribute access request AAR, the policy decision point PDP initiates an access policy query to the policy management point PAP through a smart contract to determine whether the access request of the visitor is legitimate.

[0022] If the request is invalid, the access request will be terminated and the invalid result will be sent to the policy enforcement point (PEP).

[0023] If valid, the visitor's reputation level is calculated and obtained as a request to the Policy Information Point (PIP) and Policy Management Point (PAP) to obtain the visitor's request attribute information and the resource owner's access policy set. The Policy Decision Point (PDP) compares the visitor's request attribute information with the resource owner's access control policy set and sends the decision result to the Policy Execution Point (PEP), which then executes the decision.

[0024] In one embodiment of the present invention, the formula for the visitor's reputation level is:

[0025]

[0026]

[0027]

[0028]

[0029] Where k represents the total number of visits by the visitor, and the constants p and γ are mainly used to adjust the weights of the three credibility levels among visitors at different visit periods; Current T(u)For the current reputation score, R(s,e) is the cosine similarity between the subject attribute and environmental security, R(o,e) is the cosine similarity between the object attribute and environmental security, R(a,e) is the cosine similarity between the policy operation behavior and environmental security, and α, β, γ are the weight ratios of the attribute weights; History T(u) For historical credibility, t i This represents the access time slice, recording the time period from when a user submits an access request to when the policy is matched and authorization is completed. W t T Indicates the time slice t for access authorization i Weighted values ​​of interactive behaviors; Recommend T(u) To enhance credibility, S i For the i-th accessing device, the corresponding reputation score is: The total number of visits and the number of successful visits are N respectively. S and N T .

[0030] In one embodiment of the present invention, if the policy execution point (PEP) makes a permission decision in step S6, the accessor retrieves the index message of the encrypted data through the proxy re-encryption mechanism and decrypts it. After decryption, the accessor accesses the data in the database SQL through the secondary blockchain, thus completing the access to the data resource. The method includes:

[0031] During the data forwarding phase, when the visitor's decision at the Policy Enforcement Point (PEP) is approved, the visitor, within the re-encryption mechanism, uses their private key SK. B PK with the resource owner's public key A Generate conversion key RK A→B ;

[0032] The agent re-encryption agency retrieves the corresponding ciphertext. Using the transformation key RK A→B ciphertext Transformed into the visitor's private key SK B Encrypted ciphertext After organizing, it is sent to the visitor, who then uses their private key SK. B Decrypt the ciphertext Upon receiving the index message, the subject proceeds according to the ciphertext. The system accesses the main blockchain and secondary blockchain via index messages. The entity then accesses data in the SQL database through the secondary blockchain to complete access to data resources.

[0033] To address the aforementioned technical problems, this invention provides a multi-chain-based IoT data hierarchical access control system, comprising:

[0034] Storage module: Used by resource owners to store data into a database SQL and store the index message of the data into a secondary blockchain, wherein the secondary blockchain belongs to the main blockchain;

[0035] The formulation module is used by resource owners to formulate corresponding access policies based on the privacy sensitivity of the data, send them to the policy management point (PAP) for storage and management, and perform proxy re-encryption on the index messages of the data through a proxy re-encryption mechanism.

[0036] Access Request Module: Used by visitors to submit access requests to the main blockchain. The Policy Execution Point (PEP) receives the access requests and generates relevant messages to send to the Policy Decision Point (PDP).

[0037] Judgment Module: When the Policy Decision Point (PDP) receives the relevant message, it queries the access policy of the Policy Management Point (PAP) to determine whether the visitor's access request is legitimate. If it is illegitimate, the result is sent to the Policy Execution Point (PEP). If it is legitimate, the attribute information of the Policy Information Point (PIP) is compared with the access policy of the Policy Management Point (PAP), and the final decision result is sent to the Policy Execution Point (PEP).

[0038] Decision module: Used for the policy execution point (PEP) to execute decision results, which are either permission or denial;

[0039] Access module: If the policy execution point PEP execution decision result is permitted, the accessor retrieves the index message of the encrypted data through the agent re-encryption mechanism and decrypts it. After decryption, the accessor accesses the data in the database SQL through the secondary blockchain to complete the access to the data resources.

[0040] The policy management point (PAP), policy execution point (PEP), policy decision point (PDP), and policy information point (PIP) constitute the access control model.

[0041] To address the aforementioned technical problems, the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the multi-chain-based IoT data hierarchical access control method described above.

[0042] To address the aforementioned technical problems, the present invention provides a computer-readable storage medium storing a computer program thereon, wherein when the computer program is executed by a processor, it implements the steps of the above-described multi-chain-based IoT data hierarchical access control method.

[0043] The technical solution of the present invention has the following advantages compared with the prior art:

[0044] This invention addresses the issue of secure data sharing among different departments and levels in smart cities by proposing a multi-chain-based hierarchical access control method for IoT data. This method utilizes multiple chains to store relevant data from different organizations and separates sensitive user privacy data. By using Rollup technology, the processing and execution of transactions on the main blockchain are transferred to a secondary blockchain for completion and aggregation, thereby reducing the storage pressure on the main blockchain and increasing throughput, overcoming the drawbacks of single-chain-based IoT data sharing.

[0045] This invention proposes a reputation-based fine-grained access control model, TR-ABAC, specifically tailored to the characteristics of IoT data. Building upon the attribute-based access control model (ABAC), TR-ABAC further refines attribute classification, assigns new reputation levels to users, and grants corresponding access permissions based on these levels. The proposed access control model is implemented using smart contracts, improving the query efficiency of traditional access control and offering enhanced security and reliability. Attached Figure Description

[0046] To make the content of this invention easier to understand, the invention will be further described in detail below with reference to specific embodiments and accompanying drawings.

[0047] Figure 1 This is a flowchart of the method of the present invention;

[0048] Figure 2 This is an architecture diagram based on multiple chains in an embodiment of the present invention;

[0049] Figure 3 This is a framework diagram of the improved attribute-based access control model in this embodiment of the invention;

[0050] Figure 4 This is a graph showing the dynamic changes in the reputation and trust level of the reputation algorithm when a user randomly accesses the same IoT device during 10 different time periods in this embodiment of the invention.

[0051] Figure 5 This is a graph showing the trend of the user's final reputation value after the reputation algorithm in this embodiment of the invention increases the proportion of illegal accesses.

[0052] Figure 6 This is a strategy query test graph showing the time required to complete a query under different numbers of strategy sets in an embodiment of the present invention;

[0053] Figure 7 This is an access request latency test diagram showing the time required to complete an access under different numbers of access requests in an embodiment of the present invention;

[0054] Figure 8 This is a system throughput test graph under different numbers of concurrent requests in an embodiment of the present invention;

[0055] Figure 9 This is a block storage occupancy analysis diagram in an embodiment of the present invention. Detailed Implementation

[0056] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, so that those skilled in the art can better understand and implement the present invention. However, the embodiments described are not intended to limit the present invention.

[0057] Example 1

[0058] Reference Figure 1 As shown, this invention relates to a multi-chain-based IoT data hierarchical access control method, comprising:

[0059] Step S1: The resource owner (object) stores the data in the database SQL and stores the index message of the data in the secondary blockchain, wherein the secondary blockchain belongs to the main blockchain;

[0060] Step S2: The resource owner formulates a corresponding access policy based on the privacy sensitivity of the data, sends it to the policy management point (PAP) for storage and management, and performs proxy re-encryption on the index message of the data through a proxy re-encryption mechanism;

[0061] Step S3: The visitor (subject) submits an access request to the main blockchain. The policy execution point (PEP) receives the access request and generates a relevant message, which is then sent to the policy decision point (PDP).

[0062] Step S4: The Policy Decision Point (PDP) receives the relevant message, queries the access policy of the Policy Management Point (PAP) to determine whether the visitor's access request is legitimate. If it is illegitimate, the result is sent to the Policy Execution Point (PEP). If it is legitimate, the attribute information of the Policy Information Point (PIP) is compared with the access policy of the Policy Management Point (PAP), and the final decision result is sent to the Policy Execution Point (PEP).

[0063] Step S5: The policy execution point (PEP) executes a decision, which is either permission or denial.

[0064] Step S6: If the policy execution point PEP execution decision result is permission, the visitor retrieves the index message of the encrypted data through the proxy re-encryption mechanism and decrypts it. After decryption, the visitor accesses the data in the database SQL through the secondary blockchain to complete the access to the data resources.

[0065] The policy management point (PAP), policy execution point (PEP), policy decision point (PDP), and policy information point (PIP) constitute the access control model (in this embodiment, the access control model is a reputation-based hierarchical access control model, TR-ABAC).

[0066] The following is a detailed description of this embodiment:

[0067] like Figure 2 As shown, the multi-chain architecture of this embodiment includes the following aspects: To ensure data privacy and security, a two-tier blockchain is used to store data from different business departments. This architecture is divided into RIC (Resident information chain), PIC (Property information chain), and GIC (Government information chain) based on the privacy level of the user object. The RIC chain stores resident information and data from home IoT sensors; the PIC chain stores property management personnel information and monitoring and alarm data collected by various IoT sensors; and the GIC chain stores government regulatory information, such as information from property management companies, heating companies, housing and construction bureaus, and public security bureaus. Residents, community property management, and the government use different blockchain systems to ensure the security of internal transactions. Each blockchain obtains different application data, and each node in each blockchain only executes its internal data, allowing control over the data access process and achieving privacy protection for sensitive data.

[0068] like Figure 1 and Figure 3 As shown, this embodiment includes the following steps:

[0069] (1) In the storage phase, data obtained by the object (resource owner) from the IoT platform is stored in the SQL database. The data's index message is packaged into a transaction record, containing information such as input address, output address, signature, and timestamp. Then, the transaction record is sent to the corresponding secondary blockchain, where nodes verify and reach consensus to determine its legality and validity. The verified and consensus-reached transaction record is then added to the latest block of the secondary blockchain, forming an immutable and traceable data index message record. The secondary blockchain is subordinate to the main blockchain. For example, data owned by a resident user is stored in the RIC secondary blockchain.

[0070] (2) The subject formulates corresponding access policies based on the privacy sensitivity of the data and sends them to the policy management point (PAP) for storage and management. To ensure secure data sharing, a proxy re-encryption agency (third-party agency) is used to re-encrypt the resources. The subject uses the public key PK to re-encrypt the resource M (i.e., the index message of the data). A The ciphertext is obtained after encryption.

[0071] (3) Access control phase: The subject (visitor) submits an access request to the main blockchain. The policy execution point (PEP) receives the access request, analyzes the visitor's attributes and the attribute information obtained from the policy information point (PIP) to generate an attribute access request (AAR), and sends the attribute access request (AAR) to the policy decision point (PDP).

[0072] (4) After receiving the attribute access request (AAR), the Policy Decision Point (PDP) initiates a policy information query to the Policy Management Point (PAP) through a smart contract to determine whether the subject's access request is legitimate. If it is illegitimate, the access request is terminated, and the illegitimate result is sent to the Policy Execution Point (PEP). If it is legitimate, the PDP calculates and obtains the visitor's reputation level as a request to the Policy Information Point (PIP) and the Policy Management Point (PAP) to obtain the visitor's request attribute information and the resource owner's access policy set. The Policy Decision Point (PDP) compares the visitor's request attribute information with the resource owner's access control policy set and sends the decision result to the Policy Execution Point (PEP).

[0073] (5) The decision result (permit or deny) is then executed by the strategy execution point PEP.

[0074] (6) Data forwarding phase: If the policy enforcement point (PEP) decision is permissive, the subject (accessor) needs to forward its private key SK. B PK with the public key of the object A Generate conversion key RK A→B The re-encryption agency, acting as a semi-honest agent, retrieved the ciphertext. Use conversion key RK A→B ciphertext The private key SK converted into the subject B Encrypted ciphertext After processing, send it to the main body, which can then use the private key SK. B Decrypting the ciphertext Upon receiving the index message, the subject proceeds according to the ciphertext. The system accesses the main blockchain and secondary blockchains via indexed messages. The entity then accesses data in the SQL database through the secondary blockchain, completing access to data resources. The proxy re-encryption function only plays a key conversion role during data forwarding, achieving secure data sharing without revealing the resource owner's decryption key.

[0075] It should be noted that in this embodiment, the policy management point (PAP), policy execution point (PEP), policy decision point (PDP), and policy information point (PIP) constitute an attribute-based access control model (ABAC). The four elements of the ABAC access control model include subject, object (resource), operation, and environmental constraints (environmental security).

[0076] In this embodiment, the user's reputation level includes the following elements:

[0077] (1) Current Reputation: Each time a user initiates an access request, the blockchain system calculates the correlation R(s,e) between the user's subject attributes and environmental security, the correlation R(o,e) between the object attributes and environmental security, and the correlation R(a,e) between the policy operation behavior and environmental security based on cosine similarity, and generates the current reputation, where e represents environmental security, s represents the subject, o represents the object, and α, β, γ are the weight ratios of the attribute weights. The formula for calculating the current reputation is:

[0078]

[0079] (2) Historical Reputation: When a user first gains access to an information resource, the system generates an initial historical reputation value based on the user's access behavior. As the number of subsequent access requests increases, the user's historical reputation value changes over time. The formula for calculating historical reputation is:

[0080]

[0081] Among them, t i This represents the access time slice, recording the time period from when a user submits an access request to when the policy is matched and authorization is completed. W t T This refers to the time slice t for access authorization. i The weighted value of the interaction behavior. If malicious access occurs, the weighted value W is adjusted. t T This reduction effectively prevents malicious nodes from exploiting the accumulated reputation value of secure operations to manipulate access permissions. If it's the first access, there is no historical reputation value; that is, when n=0, the history value is zero. T(u) =0.

[0082] (3) Recommendation Reputation: User recommendation reputation refers to the reputation a user possesses when accessing data resources of other chains or organizations. It indirectly affects the user's final reputation calculation. For example, when a user accesses sensitive data of another chain or organization, the number of successful accesses directly affects the recommendation reputation, which is of higher or lower quality. This has some reference value for the reputation calculation when a user first accesses an organization. Assuming user u has previously accessed multiple other devices (S1, S2, ..., Sn), the corresponding reputation obtained is... The total number of visits and the number of successful visits are N respectively. S and N T The formula for calculating the reputation score is:

[0083]

[0084] (4) Final Reputation Score: The overall reputation score is calculated as a linear combination of the current reputation score, historical reputation score, and recommended reputation score.

[0085]

[0086] Where k represents the total number of user visits, and the constants p and γ are mainly used to adjust the weights of the three reputation metrics at different visit periods. In the final reputation calculation, Current... T(u) The largest proportion, History T(u) Secondly, Rccommend T(u) Minimum. When k=0, Final T(u) By Current T(u) and Rccommend T(u) Composition, as k increases, History T(u) The weight of each of the three credibility levels also increases accordingly, and the weights of the three credibility levels gradually tend to be balanced.

[0087] (5) Furthermore, this embodiment uses smart contracts in the blockchain to implement access control policy information, policy query, management, and decision-making. Specifically, it is divided into a Policy Information Contract (PIPC), a Policy Management Contract (PAPC), and a Policy Decision Contract (PDPC) to achieve flexibility and fine-grained access control. The Policy Information Contract (PIPC): The PDP node in the access control model is responsible for policy decision-making. It compares the attribute information of the access request with the policy to see if they match and sends the decision result to the PEP. This contract, combined with user reputation calculation, after obtaining an access request, calls the user's previous request records and access records stored on the blockchain to generate the user's history. T(u) and Rccommend T(u) Then calculate the user's Final T(u)Next, it checks if the trust level is not lower than the policy's reputation threshold. If not, the access request is terminated directly. If it is, it compares all attributes to see if they conform to the policy rules. For example, if the access request time is before the policy's access deadline (EndTime), it returns PERMIT; otherwise, it returns DENY. The Policy Management Contract (PAPC) in the access control model sends access control policies related to shared data to the resource owner. It manages access control policy rules and generally includes four functions: addPolicy, deletePolicy, updatePolicy, and queryPolicy. This contract stores access control policy information on the main blockchain, ensuring policy sharing and traceability. Furthermore, the resource owner sets reputation thresholds for policies. For example, policies containing highly private data have higher reputation thresholds. Access is only granted preferentially based on trust level when a user's reputation is not lower than the reputation threshold. The Policy Decision Contract (PDPC) in the access control model is responsible for policy decisions. It compares the access request's attribute information with the policy to see if they match and sends the decision result to the PEP. This contract combines user reputation calculations and, upon receiving an access request, uses relevant data from the user's previous request records and access records stored on the blockchain to generate the user's history. T(u) and Rccommend T(u) Then calculate the user's Final T(u) Next, it checks whether the trust level is not lower than the policy's reputation threshold. If it does not meet the threshold, the access request is terminated directly. If it does meet the threshold, it compares whether all attributes conform to the policy rules. For example, if the access request time is before the policy's access deadline EndTime, then PERMIT is returned; otherwise, DENY is returned.

[0088] This embodiment conducts a dynamic analysis of the reputation-based hierarchical access control model TR-ABAC through experiments, such as... Figure 4 As shown, the trust levels of the TR-ABAC model in this embodiment and the traditional ABAC model at different times are compared. It can be seen that in the traditional ABAC model, the trust level of a user is fixed for each authorization request; a trust level of 2 corresponds to a normal trusted user. The TR-ABAC model in this embodiment divides users into levels based on their reputation. A user's reputation is continuously updated with different access frequencies and behaviors, and their corresponding trust level changes accordingly. This embodiment utilizes the traceability characteristics of blockchain to design the user's Current... T(u) History T(u) and Rccommend T(u)The system then calculates the final reputation score. Changes in the reputation score across different numbers of visits directly impact the dynamic changes in the user's trust level. If a user maintains legitimate access, their reputation score and trust level will increase accordingly.

[0089] This embodiment dynamically analyzes the changing trend of a user's final credit score through experiments, such as... Figure 5 As shown in the figure, this experiment progressively increased the proportion of unauthorized access by users and recorded their final reputation scores. It can be seen that as the number of unauthorized accesses gradually increases, the user's final reputation score shows a significant downward trend. When the unauthorized access proportion reaches 50% and 75%, the user is downgraded to a normal trust level and a malicious level, respectively. This demonstrates that introducing reputation scores into the traditional ABAC model not only allows for dynamic access authorization based on actual circumstances but also effectively reduces unauthorized access behavior by malicious users.

[0090] This embodiment measures system performance through experiments, specifically in terms of access latency testing. Figure 6 and Figure 7 As shown. From Figure 6 As can be seen, the average access latency of the three models gradually increases with the number of access control policies, and the values ​​become increasingly larger. When the number of access control policies is large, the average access latency of TR-ABAC in this embodiment is significantly lower than that of BP-ABAC and TA-RBAC. Because the access control policy of this invention incorporates a reputation threshold, setting pre-standards for objects accessing resources, when a user's final reputation value does not reach the threshold set by the policy, the system directly stops the access, thus further improving the efficiency of policy querying. Figure 7 It can be seen that the time to complete an access request gradually increases with the number of access requests. Compared with the BP-ABAC and TA-RBAC models, the differences among the three are not significant when the number of access requests is small. However, as the number of access requests increases, the average access request latency in this embodiment is much lower than that of the TA-RBAC and BP-ABAC models. This invention calculates user reputation based on attributes and dynamically authorizes access, resulting in higher and more stable access efficiency.

[0091] This invention compares the throughput of the TR-ABAC model and the BP-ABAC model through experiments, such as... Figure 8 As shown, under different numbers of concurrent requests, the system throughput of this invention is higher and more stable than that of the BP-ABAC model, consistently exceeding 400 TPS. Experimental data demonstrates that the access control model of this invention has the advantages of high efficiency, stability, and dynamic flexibility, making it suitable for the secure and efficient sharing of massive, heterogeneous IoT data in smart cities.

[0092] Finally, this invention compares the storage usage of the three single chains and the main blockchain through experiments, such as... Figure 9 As shown, with the same number of transactions, the block size of the main blockchain is smaller than the sum of the block sizes of the three single chains. Because multi-chain systems utilize Rollup technology to perform transaction execution operations on secondary blockchains, the main chain only needs to store the Merkle root data uploaded from the secondary blockchains, reducing storage space and improving system scalability.

[0093] Example 2

[0094] This embodiment provides a multi-chain-based IoT data hierarchical access control system, including:

[0095] Storage module: Used by resource owners to store data into a database SQL and store the index message of the data into a secondary blockchain, wherein the secondary blockchain belongs to the main blockchain;

[0096] The formulation module is used by resource owners to formulate corresponding access policies based on the privacy sensitivity of the data, send them to the policy management point (PAP) for storage and management, and perform proxy re-encryption on the index messages of the data through a proxy re-encryption mechanism.

[0097] Access Request Module: Used by visitors to submit access requests to the main blockchain. The Policy Execution Point (PEP) receives the access requests and generates relevant messages to send to the Policy Decision Point (PDP).

[0098] Judgment Module: When the Policy Decision Point (PDP) receives the relevant message, it queries the access policy of the Policy Management Point (PAP) to determine whether the visitor's access request is legitimate. If it is illegitimate, the result is sent to the Policy Execution Point (PEP). If it is legitimate, the attribute information of the Policy Information Point (PIP) is compared with the access policy of the Policy Management Point (PAP), and the final decision result is sent to the Policy Execution Point (PEP).

[0099] Decision module: Used for the policy execution point (PEP) to execute decision results, which are either permission or denial;

[0100] Access module: If the policy execution point PEP execution decision result is permitted, the accessor retrieves the index message of the encrypted data through the agent re-encryption mechanism and decrypts it. After decryption, the accessor accesses the data in the database SQL through the secondary blockchain to complete the access to the data resources.

[0101] The policy management point (PAP), policy execution point (PEP), policy decision point (PDP), and policy information point (PIP) constitute the access control model.

[0102] Example 3

[0103] This embodiment provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the multi-chain-based IoT data hierarchical access control method described in Embodiment 1.

[0104] Example 4

[0105] This embodiment provides a computer-readable storage medium storing a computer program thereon. When the computer program is executed by a processor, it implements the steps of the multi-chain-based IoT data hierarchical access control method described in Embodiment 1.

[0106] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The solutions in the embodiments of this application can be implemented in various computer languages, such as the object-oriented programming language Java and the interpreted scripting language JavaScript.

[0107] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0108] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0109] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0110] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.

[0111] Obviously, the above embodiments are merely illustrative examples for clear explanation and are not intended to limit the implementation. Those skilled in the art will recognize that other variations or modifications can be made based on the above description. It is neither necessary nor possible to exhaustively list all possible implementations here. However, obvious variations or modifications derived therefrom are still within the scope of protection of this invention.

Claims

1. A multi-chain-based IoT data hierarchical access control method, characterized in that: include: Step S1: The resource owner stores the data in the database and stores the index message of the data in the secondary blockchain, wherein the secondary blockchain belongs to the main blockchain; Step S2: The resource owner formulates a corresponding access policy based on the privacy sensitivity of the data, sends it to the policy management point (PAP) for storage and management, and performs proxy re-encryption on the index message of the data through a proxy re-encryption mechanism; Step S3: The visitor submits an access request to the main blockchain. The policy execution point (PEP) receives the access request and generates a relevant message, which is then sent to the policy decision point (PDP). Step S4: The Policy Decision Point (PDP) receives the relevant message, queries the access policy of the Policy Management Point (PAP) to determine whether the visitor's access request is legitimate. If it is illegitimate, the result is sent to the Policy Execution Point (PEP). If it is legitimate, the attribute information of the Policy Information Point (PIP) is compared with the access policy of the Policy Management Point (PAP), and the final decision result is sent to the Policy Execution Point (PEP). If valid, the visitor's reputation level is calculated and obtained as request information. The visitor's request attribute information and the resource owner's access control policy set are obtained from the Policy Information Point (PIP) and the Policy Management Point (PAP). The Policy Decision Point (PDP) compares the visitor's request attribute information with the resource owner's access control policy set and sends the decision result to the Policy Execution Point (PEP). The PEP then executes the decision. The formula for the visitor's credibility level is: ; ; ; ; in, Represents the total number of visits by visitors, a constant. and Used to adjust the weights of the three credibility levels among visitors at different times of their visit; Based on current credit rating, The cosine similarity between subject attributes and environmental safety. The cosine similarity between object attributes and environmental safety. The cosine similarity between strategic operational behavior and environmental safety. It is the weight ratio of the attribute weights; For historical credibility, This represents the access time slice, recording the time period from when a user submits an access request to when the policy is matched and authorization is completed. Indicates the time slice for access authorization Weighted values ​​of interactive behaviors; To improve credibility, For the first Each accessing device obtains a corresponding reputation level. The total number of visits and the number of successful visits were respectively and ; Step S5: The policy execution point (PEP) executes a decision, which is either permission or denial. Step S6: If the decision of the policy execution point PEP is to grant permission, the visitor retrieves the index message of the encrypted data through the agent re-encryption mechanism and decrypts it. After decryption, the visitor accesses the data in the database through the secondary blockchain to complete the access to the data resources. The policy management point (PAP), policy execution point (PEP), policy decision point (PDP), and policy information point (PIP) constitute the access control model.

2. The multi-chain-based IoT data hierarchical access control method according to claim 1, characterized in that: In step S1, the resource owner stores the data in a database and stores the index message of the data in a secondary blockchain. The method includes: During the storage phase, the resource owner stores the data acquired by the IoT platform into the database. The index message of the data is packaged into a transaction record, which includes an input address, an output address, a signature, and a timestamp. The transaction record is sent to the corresponding secondary blockchain, where nodes verify and reach a consensus to determine whether the transaction record is legal and valid. Verified and consensus-reached transaction records are added to the latest block of the secondary blockchain, forming an immutable and traceable data index message record.

3. The multi-chain-based IoT data hierarchical access control method according to claim 1, characterized in that: In step S2, the index message of the data is re-encrypted by a proxy re-encryption mechanism, the method of which includes: In the proxy re-encryption mechanism, the resource owner will send the index message of the data. Use public key The ciphertext is obtained after encryption. .

4. The IoT data hierarchical access control method based on multi-chain as described in claim 1, characterized in that: In step S3, the visitor submits an access request to the main blockchain. The policy execution point (PEP) receives the access request and generates a relevant message, which is then sent to the policy decision point (PDP). The method includes: During the access control phase, the visitor submits an access request to the main blockchain. The policy execution point (PEP) in the access control model receives the access request, analyzes the visitor's attributes and the attribute information obtained from the policy information point (PIP) to generate an attribute access request (AAR), and sends the attribute access request (AAR) to the policy decision point (PDP). The attribute access request (AAR) is a related message.

5. The multi-chain-based IoT data hierarchical access control method according to claim 4, characterized in that: In step S4, the policy decision point (PDP) receives the relevant message, queries the access policy of the policy management point (PAP) to determine whether the visitor's access request is legitimate. If it is illegitimate, the result is sent to the policy execution point (PEP). The method includes: After receiving the attribute access request AAR, the policy decision point PDP initiates an access policy query to the policy management point PAP through a smart contract to determine whether the access request of the visitor is legitimate. If the request is invalid, the access request will be terminated and the invalid result will be sent to the policy enforcement point (PEP).

6. The multi-chain-based IoT data hierarchical access control method according to claim 3, characterized in that: In step S6, if the policy execution point (PEP) makes a permission decision, the accessor retrieves the index message of the encrypted data through the proxy re-encryption mechanism and decrypts it. After decryption, the accessor accesses the data in the database through the secondary blockchain, thus completing the access to the data resource. The method includes: During the data forwarding phase, when the visitor's policy enforcement point (PEP) decision is approved, the visitor, within the proxy re-encryption mechanism, uses their private key... and the public key of the resource owner Generate conversion key ; The agent re-encryption agency retrieves the corresponding ciphertext. Using the conversion key ciphertext Transformed into the visitor's private key Encrypted ciphertext After organizing, it is sent to the visitor, who then uses their private key. Decrypt the ciphertext Upon receiving the index message, the main body proceeds according to the ciphertext. The system accesses the main blockchain and secondary blockchains via index messages. The entity accesses data in the database through the secondary blockchain, thus completing access to data resources.

7. A multi-chain-based IoT data hierarchical access control system, used to implement the multi-chain-based IoT data hierarchical access control method as described in any one of claims 1 to 6, characterized in that: include: Storage module: Used by resource owners to store data into a database and store the index message of the data into a secondary blockchain, wherein the secondary blockchain belongs to the main blockchain; The formulation module is used by resource owners to formulate corresponding access policies based on the privacy sensitivity of the data, send them to the policy management point (PAP) for storage and management, and perform proxy re-encryption on the index messages of the data through a proxy re-encryption mechanism. Access Request Module: Used by visitors to submit access requests to the main blockchain. The Policy Execution Point (PEP) receives the access requests and generates relevant messages to send to the Policy Decision Point (PDP). Judgment Module: When the Policy Decision Point (PDP) receives the relevant message, it queries the access policy of the Policy Management Point (PAP) to determine whether the visitor's access request is legitimate. If it is illegitimate, the result is sent to the Policy Execution Point (PEP). If it is legitimate, the attribute information of the Policy Information Point (PIP) is compared with the access policy of the Policy Management Point (PAP), and the final decision result is sent to the Policy Execution Point (PEP). Decision module: Used for the policy execution point (PEP) to execute decision results, which are either permission or denial; Access module: If the policy execution point PEP execution decision result is permitted, the visitor retrieves the index message of the encrypted data through the agent re-encryption mechanism and decrypts it. After decryption, the data in the database is accessed through the secondary blockchain to complete the access to the data resources. The policy management point (PAP), policy execution point (PEP), policy decision point (PDP), and policy information point (PIP) constitute the access control model.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, it implements the steps of the multi-chain-based IoT data hierarchical access control method as described in any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the steps of the multi-chain-based IoT data hierarchical access control method as described in any one of claims 1 to 6.