Block chain monitoring system and method based on attribute-based encryption and deep learning

By introducing attribute-based encryption and deep learning technologies into the blockchain system, the shortcomings of blockchain technology in data access control, privacy protection and regulatory compliance are solved, and secure storage, flexible access and intelligent analysis of data are realized.

CN119760746AActive Publication Date: 2025-04-04BEIJING UNIV OF POSTS & TELECOMM
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411870686.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-18
Publication Date
2025-04-04
Estimated Expiration
2044-12-18

AI Technical Summary

Technical Problem

Blockchain technology has shortcomings in data access control, privacy protection, sensitive information leakage risks and regulatory compliance, making it difficult to achieve fine-grained access control and intelligent monitoring.

Method used

A blockchain monitoring system based on attribute-based encryption (ABE) and deep learning is adopted to realize secure storage, flexible access and intelligent analysis of data through user attribute registration, data encryption, storage and on-chain, data retrieval and decryption, and deep learning sensitivity detection.

Benefits of technology

It realizes fine-grained data access control, enhances data privacy protection and security, reduces the risk of sensitive information leakage, and supports intelligent monitoring and compliance management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119760746A_ABST
    Figure CN119760746A_ABST
Patent Text Reader

Abstract

The invention discloses a block chain monitoring system and method based on attribute-based encryption and deep learning, and belongs to the field of information, and the method comprises the steps: providing identity and attribute information for a registration authorization mechanism by a user, and generating a group of private keys; setting an access strategy according to a data access requirement, and encrypting the data by using a private key; converting the data into a ciphertext, uploading the encrypted data and a secret key to a server, and generating a unique identifier for each piece of data; designing a smart contract management data unique identifier uplink process; the user locates target data in the server through the unique identifier, and the user according with the access strategy decrypts the data by using a private key; and the supervisor applies for a secret key to the registration authorization mechanism to decrypt the data, and constructs a multi-sensitive information detection model by using the decrypted data to detect the text sensitive information. According to the method, the flexibility and security of data access are enhanced by utilizing attribute-based encryption, potential sensitive information in the data is effectively detected and identified in combination with a deep learning model, and the integrity and security of data transmission are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of information technology, and specifically relates to a blockchain monitoring system and method based on attribute-based encryption and deep learning. Background Art

[0002] Blockchain technology is a distributed ledger technology with multiple nodes. Various operations may occur on each node, and each node will record all operations on the node in the form of logs. The consensus mechanism of blockchain is mainly manifested in that the collaborating nodes jointly maintain data, each collaborating node has a complete copy of the data, and the data of all collaborating nodes is consistent.

[0003] Attribute-based encryption (ABE) is an encryption technology that controls encryption and decryption operations through a user's attribute set to achieve fine-grained access control. Each user and data is associated with a set of attributes, such as a role or department. When encrypting, the specified access policy determines which attribute combinations can decrypt the data. The user's key is generated based on his or her attributes, and only the key that meets the access policy can decrypt the corresponding data. This approach provides flexible permission management and is suitable for complex permission structures without the need for a central management entity to distribute keys. ABE is widely used in areas such as enterprise data sharing, cloud storage security, and medical data management, and can effectively protect data privacy and security.

[0004] Deep learning technology is a branch of machine learning. It imitates human vision, hearing and brain neuron structure, and uses deep neural network models to learn the intrinsic characteristics and patterns of data, and ultimately achieves the goal of predicting untouched data through learned characteristics and patterns. BERT is a natural language processing pre-training model proposed by Google in 2018. BERT introduces a powerful bidirectional context encoding method, and through large-scale pre-training, it has good performance in natural language processing benchmarks.

[0005] However, the current blockchain technology has the following technical problems:

[0006] 1. Data access control is not flexible enough: Traditional encryption methods usually encrypt data based on the user's identity, which limits fine-grained access control based on user attributes or roles.

[0007] 2. Insufficient privacy protection: When data is shared with third parties, it is difficult to ensure that third parties can only access the information they are authorized to view.

[0008] 3. Risk of sensitive information leakage: Sensitive information may be contained in large-scale unprocessed data. When such data is shared without adequate protection, the risk of data leakage increases.

[0009] 4. Regulatory compliance challenges: It is difficult for regulators to inspect and supervise data without compromising data privacy. Summary of the invention

[0010] In response to the problems existing in the prior art, the present invention provides a blockchain monitoring system and method based on attribute-based encryption and deep learning.

[0011] The technical solution adopted by the present invention to solve the technical problem is as follows:

[0012] The present invention provides a blockchain monitoring method based on attribute-based encryption and deep learning, comprising the following steps:

[0013] The present invention provides a blockchain monitoring method based on attribute-based encryption and deep learning, which specifically includes the following steps:

[0014] (1) User attribute registration;

[0015] The user provides the registration authority with relevant information proving his / her identity and attributes. The registration authority generates a set of private keys that match the user's attributes based on the relevant information for encryption and decryption operations.

[0016] (2) Data encryption;

[0017] Users set a set of access policies based on their data access requirements, and the system uses a private key to encrypt the data;

[0018] (3) Data storage and blockchain;

[0019] Through the system initialization and key generation steps, the data to be stored is converted into ciphertext to ensure that the data content can only be accessed by authorized users; the encrypted data and the encryption key are uploaded to the off-chain cloud storage server; the upload process generates a unique identifier for each piece of data; a smart contract is designed to manage the chain-up process of the data unique identifier; the data unique identifier is recorded on the blockchain;

[0020] (4) Data retrieval and decryption;

[0021] Users locate target data in the off-chain cloud storage server through a unique identifier. The system verifies the user's attributes and permissions to ensure that they comply with the data access policy. Users who comply with the access policy use their private keys to decrypt the data.

[0022] (5) Deep learning sensitivity detection;

[0023] The regulator applies for a secret key from the registration authority to decrypt the data, and uses the decrypted data to build a sensitive information detection model with a multi-level deep learning architecture to detect sensitive information in the text; the detection results are provided to the user or regulator and a corresponding response is made.

[0024] Furthermore, the specific implementation process of the user attribute registration is as follows:

[0025] Assume U = {ATT1, ATT2...ATT n} indicates users ATT1, ATT2...ATT registered in the primary authorization institution n A collection of s, where s represents the supervisory party registered with the primary authority, and P represents i = {v i,1 ,v i,2 ...v i,n}(n i =|P i |) indicates user ATT i All possible attribute values ​​v i,1 ,v i,2 ...v i,n The collection of n i Indicates the maximum number of attribute values; L = {L1, L2, ... L n} represents a set of user attributes, A={A1,A2,...A k} represents an access structure set; where e: G×G→G1 represents a bilinear mapping function, and e represents a bilinear mapping from a multiplicative cyclic group G of order p to a multiplicative cyclic group G1 of order p different from group G; assuming that t and t' represent two different collision-resistant hash functions ({0,1} * ×{0,1} * →Z p ), Z p Represents the ring of integers modulo p, where t is known only to the master authority.

[0026] Furthermore, the specific implementation process of the system initialization and key generation is as follows:

[0027] Based on the implicit security parameter k, the master authority selects a large prime number p, a p-order bilinear group (G, G1), and generates g∈G, h∈G, y∈Z p and t i,j ∈Z p (i∈[1,n],j∈[1,n i ]), the main authorization agency generates a unique identifier UID for the supervisor, and then the main authorization agency calculates Y = e(g, h)y and The master public key MPK and master private key MSK are generated:

[0028] MPK=(e,g,h,Y,T i,j ,(i∈[1,n],j∈[1,n i ]));

[0029] MSK=(y,t i,j ,(i∈[1,n],j∈[1,n i ])).

[0030] Among them, g, h, T i,j are all primary public key parameters, g and h are both generators in group G, Y is the bilinear mapping of generators g and h, T i,j t represents the generator g i,j power, y represents the master private key parameter, t i,j Denotes the natural number field Z modulo p p (i∈[1,n],j∈[1,n i ]) randomly sampled elements, n represents the number of registered users, n i Indicates the maximum number of attribute values ​​of the i-th user.

[0031] Furthermore, the specific implementation process of generating a user private key is as follows:

[0032] Based on the user's attribute list L and the master private key MSK, MA selects a random number r∈Z p And calculate the user's private key SK L :

[0033]

[0034] Among them, h y+r represents the y+r power of the generator h in the group G, y represents the master private key parameter, and r represents the number from the natural number field Z p The random number selected from i,j t represents the generator g i,j Power T i,j r power, t i,j Denotes the natural number field Z modulo p p (i∈[1,n],j∈[1,n i ]) randomly sampled elements, g r represents the generator g in the group G raised to the power of r.

[0035] Furthermore, the specific implementation process of the data encryption is as follows:

[0036] Based on the master public key MPK, plaintext M and access structure A, the user selects a random number s∈Z p And calculate the ciphertext CT:

[0037] C1=MY s

[0038] C2=g s

[0039]

[0040] CT=<C1,C2,C3,A>

[0041] Among them, g, h, T i,j ,Y are the main public key parameters, C1 represents the first part of the ciphertext, which is responsible for decrypting the ciphertext, C2 represents the second part of the ciphertext, and C3 represents the third part of the ciphertext. C2 and C3 are used by the supervisor to calculate part of the plaintext. Y s =e(g,h) ys represents the bilinear map of the generators g and h in the group G, and s represents the map from the natural number field Z p The random number selected from s represents the s-th power of the generator g in the group G, h s represents the generator h in the group G raised to the power of s.

[0042] Furthermore, the specific implementation process of the data decryption is as follows:

[0043] The supervisor sends a request to the off-chain cloud storage server to obtain the ciphertext stored by the current user in the off-chain cloud storage server. The off-chain cloud storage server verifies the token of the supervisor. After successful verification, it retrieves the partial plaintext M' of the user required by the supervisor in the off-chain cloud storage server and sends it to the supervisor. The supervisor receives the partial plaintext M' calculated by the off-chain cloud storage server and combines it with its own token TK UID , a simple exponential operation can complete the decryption, and the regulator successfully obtains the user's entire plaintext M:

[0044]

[0045] Among them, C1 is the first part of the ciphertext, and the superscript q indicates that the regulator generates a token TK UID A random number is selected.

[0046] Furthermore, the token TK UID The specific implementation process of verification and decryption is as follows:

[0047] 1) The regulator selects a random number q∈Z P And the private key SK L and the user's unique identifier UID to generate the token TK UID :

[0048]

[0049] Among them, g, h, T i,j are all master public key parameters, y represents the master private key parameters, V i,j represents the attribute set of user i, h y+r represents the y+r power of the generator h in the group G, where r represents the number from the natural number field Z p The random number selected from i,j t represents the generator g in the group G i,j Power T i,j The rth power, t(UID) represents the user's ID;

[0050] 2) Based on the master public key MPK, ciphertext CT and private key SK L , assuming And AW=A, the off-chain cloud storage server outsources the decryption calculation of the ciphertext and calculates the partial plaintext M':

[0051]

[0052] After calculation, we get Among them, g, h, T i,j Both are master public key parameters, g r represents the rth power of the generator g in the group G, AW represents the attribute set of the registered user, T i,j t represents the generator g in the group G i,j power, y represents the master private key parameter, t i,j Denotes the natural number field Z modulo p p (i∈[1,n],j∈[1,n i ]) randomly sample elements.

[0053] Furthermore, the sensitive information detection model of the multi-level deep learning architecture includes a BERT module, a BiLSTM module and a CRF module; the BERT module, as the basis of the text encoder, encodes the input text sequence through its bidirectional Transformer mechanism and converts it into a high-dimensional word vector; the BiLSTM module combines the forward and backward context information of the text through its bidirectional structure to enhance the detection ability of sensitive words in complex texts; the CRF module finds the optimal label sequence and optimizes the sequence labeling results by modeling the dependency relationship between labels.

[0054] Furthermore, the BERT module includes:

[0055] Input embedding layer: The input sequence is represented by word embedding as (w1,w2w3,w4,w5); where (w4) is replaced by [MASK] for self-supervised learning tasks;

[0056] Transformer encoder: The input embedding is processed through the Transformer encoder;

[0057] The Transformer encoder provides a deep contextual understanding of the input sequence;

[0058] Output layer: Transformer encoder output is (O1, O2 O3, O4, O5);

[0059] Classification layer: The output is processed through a fully connected layer, a GELU activation function and a normalization layer to generate the final prediction result (w'1, w'2, w'3, w'4, w'5).

[0060] Furthermore, the BiLSTM module includes:

[0061] Input layer: Sequence data is divided into multiple time steps and input into the network;

[0062] Forward LSTM layer: forward processing sequence, each time step corresponds to an LSTM unit, and its output depends not only on the current input, but also on the state of the previous time step;

[0063] Backward LSTM layer: processes the sequence in reverse to further extract high-level time series features;

[0064] Output layer: The output passes through a fully connected layer to generate the final prediction result.

[0065] The present invention provides a blockchain monitoring system based on attribute-based encryption and deep learning, which is used to implement the blockchain monitoring method based on attribute-based encryption and deep learning. The system includes: a registration authorization agency, a main authorization agency, a user, a regulator, a blockchain system and an off-chain cloud storage server; the registration authorization agency is responsible for user registration and generating user attributes for authorization; the main authorization agency has a master key and a master public key, and the main authorization agency uses the master key to generate a CP-ABE private key for the user, and restores the encrypted data based on the user attribute authorization; the identity of the user and the regulator is composed of several attributes, and the regulator can apply to decrypt the user's ciphertext and conduct supervision; the blockchain system is a distributed billing system, including several nodes.

[0066] The beneficial effects of the present invention are:

[0067] The present invention provides a blockchain monitoring system and method based on attribute-based encryption (ABE) and deep learning, aiming to achieve secure storage, flexible access and intelligent analysis of data through attribute-based encryption and intelligent detection technology. The present invention provides a complete solution for the storage, access, decryption and detection of blockchain data by combining attribute-based encryption technology and deep learning models, and can achieve comprehensive monitoring of data through intelligent analysis of neural network models.

[0068] Compared with the prior art, the advantages of the present invention are:

[0069] 1. Fine-grained data access control based on attribute-based encryption technology;

[0070] This invention introduces attribute-based encryption (ABE) technology into the blockchain system, greatly enhancing the flexibility and security of data access. By combining user attributes with access policies, the system can perform data encryption and decryption operations based on multi-dimensional attributes such as roles and permissions. This encryption technology not only achieves fine-grained access control, but also avoids the single point of failure problem caused by traditional centralized key management.

[0071] 2. Intelligent sensitive information detection driven by deep learning;

[0072] This invention innovatively combines deep learning models for automatic detection of sensitive information in data, and realizes accurate analysis and detection of text information through multi-layer neural networks such as BERT, BiLSTM and CRF. This architecture uses the context understanding ability of the BERT module, combined with the long short-term memory characteristics of the BiLSTM module and the global sequence optimization ability of the CRF module, to effectively detect and identify potential sensitive information in the data.

[0073] 3. The combination of blockchain and smart contracts ensures data integrity;

[0074] The present invention makes full use of the immutability of blockchain and the automated management characteristics of smart contracts, records the unique identifier of data in the blockchain, and implements data storage, query and verification through smart contracts. Each data access request will be verified and recorded through smart contracts, ensuring the integrity and security of data transmission. BRIEF DESCRIPTION OF THE DRAWINGS

[0075] Figure 1 This is a flow chart of a blockchain monitoring method based on attribute-based encryption and deep learning of the present invention.

[0076] Figure 2 This is the BERT module structure diagram.

[0077] Figure 3 This is the BiLSTM module structure diagram.

[0078] Figure 4 This is the difference between CRF and HMMs. DETAILED DESCRIPTION

[0079] In order to make the solution of the present disclosure clearer and enable those skilled in the art to better understand the technical solution of the invention, the present invention will be further described in detail below with reference to the accompanying drawings.

[0080] In a first aspect, the present invention provides a blockchain monitoring system based on attribute-based encryption and deep learning.

[0081] The present invention provides a blockchain monitoring system based on attribute-based encryption and deep learning, which mainly includes: a registration authority (RA), a master authorization authority (MA), a user, a regulator, a blockchain system and an off-chain cloud storage server (CSP); the registration authority is responsible for user registration and generating user attributes for authorization; the master authorization authority has a master key (MSK) and a master public key (MPK), and the master authorization authority uses the master key to generate a CP-ABE private key for the user, and restores the encrypted data based on the user attribute authorization. The identity of the user and the regulator is composed of several attributes, and the regulator can apply to decrypt the user's ciphertext and conduct supervision; the blockchain system is a distributed billing system, including several nodes. The off-chain cloud storage server is a database that can be used to store user ciphertext data.

[0082] In the second aspect, the present invention provides a blockchain monitoring method based on attribute-based encryption and deep learning, which is mainly implemented by a blockchain monitoring system based on attribute-based encryption and deep learning provided in the first aspect. Figure 1 To illustrate, the method mainly includes the following steps:

[0083] 1. The user first registers the key information with the registration authority;

[0084] 2. After verifying the authenticity and accuracy of the relevant information provided by the user, the registration authority registers the user's attributes and returns the private key to the user and the encryption party;

[0085] 3. The encryption party uses the secret key to encrypt the data, and securely uploads the encrypted data and the encryption key to the off-chain cloud storage server; at the same time, a unique identifier is generated for each piece of data using UUID and stored in the off-chain cloud storage server;

[0086] 4. Design a smart contract to share the unique data identifier on the chain through the smart contract;

[0087] 5. Get the unique data identifier from the smart contract;

[0088] 6. The supervisor applies to the main authorized institution for the decryption key;

[0089] 7. The main authorization agency returns the secret key to the supervisor according to the supervisor's application;

[0090] 8. The supervisor can apply to decrypt the user's ciphertext based on the decryption key and conduct supervision.

[0091] The present invention provides a blockchain monitoring method based on attribute-based encryption and deep learning, and its specific implementation process is as follows:

[0092] Step 1: User attribute registration and data encryption;

[0093] S1.1: User attribute registration;

[0094] When users upload data, they first need to interact with the registration authority. The registration authority is responsible for managing the user's identity information and attribute allocation. The user provides relevant information to prove his or her identity and attributes, such as identity documents, role descriptions, or authority levels. The registration authority registers the user's attributes after verifying the authenticity and accuracy of the relevant information provided by the user.

[0095] The registration authority and the main authority generate a set of attribute private keys that match the user's attributes based on the relevant registration information submitted by the user for encryption and decryption operations. The attribute private keys are unique and secure and are only assigned to verified users. Users need to keep these private keys properly.

[0096] S1.2: Data encryption;

[0097] Users set a set of access policies based on their data access needs. These access policies define which user attribute combinations can access specific data. Access policies can contain multiple user attribute combinations, such as requiring users to have specific roles and permission levels to decrypt the corresponding data. Subsequently, the master public key MPK is registered with the main authorization agency, and the data is encrypted based on the master public key, plaintext, and access structure.

[0098] As an example, the specific implementation process of step one is as follows:

[0099] The attribute-based encryption method mainly includes four steps: user attribute registration, system initialization and key generation, encryption and decryption. The following takes ciphertext policy attribute-based encryption as an example to give the specific process of attribute-based encryption:

[0100] (1) User attribute registration: The registration authority registers the user and generates user attributes for authorization. Assume that U = {ATT1, ATT2...ATT n} indicates users ATT1, ATT2...ATT registered in the primary authorization institution nA collection of s, where s represents the supervisory party registered with the primary authority, and P i = {v i,1 ,v i,2 ...v i,n}(n i =|P i |) indicates user ATT i All possible attribute values ​​v i,1 ,v i,2 ...v i,n The collection of n i Indicates the maximum number of attribute values; L = {L1, L2, ... L n} represents a set of user attributes, A={A1,A2,...A k} represents a set of access structures. Where e: G×G→G1 represents a bilinear mapping function, and e represents a bilinear mapping from a multiplicative cyclic group G of order p to a multiplicative cyclic group G1 of order p different from group G. Assume that t and t' represent two different collision-resistant hash functions ({0,1} * ×{0,1} * →Z p ), Z p Represents the ring of integers modulo p, where t is known only to the master authority.

[0101] (2) System initialization and key generation: The master authorization authority uses the master key to generate a CP-ABE private key for the user and authorizes the recovery of encrypted ciphertext based on user attributes.

[0102] Based on the implicit security parameter k, the master authority selects a large prime number p, a p-order bilinear group (G, G1), and generates g∈G, h∈G, y∈Z p and t i,j ∈Z p (i∈[1,n],j∈[1,n i ]), the main authorization agency generates a unique identifier UID for the supervisor, and then the main authorization agency calculates Y = e(g, h)y and The master public key MPK and master private key MSK are generated:

[0103] MPK=(e,g,h,Y,T i,j ,(i∈[1,n],j∈[1,n i ]));

[0104] MSK=(y,t i,j ,(i∈[1,n],j∈[1,n i ])).

[0105] Among them, g, h, T i,jare all primary public key parameters, g and h are both generators in group G, Y is the bilinear mapping of generators g and h, T i,j t represents the generator g i,j power, y represents the master private key parameter, t i,j Denotes the natural number field Z modulo p p (i∈[1,n],j∈[1,n i ]) randomly sampled elements, n represents the number of registered users, n i Indicates the maximum number of attribute values ​​of the i-th user.

[0106] Based on the user's attribute list L and the master private key MSK, the master authority MA selects a random number r∈Z p And calculate the user's private key SK L :

[0107]

[0108] Among them, h y+r represents the y+r power of the generator h in the group G, y represents the master private key parameter, and r represents the number from the natural number field Z p The random number selected from i,j t represents the generator g i,j Power T i,j r power, t i,j Denotes the natural number field Z modulo p p (i∈[1,n],j∈[1,n i ]) randomly sampled elements, g r represents the generator g in the group G raised to the power of r.

[0109] (3) Encryption: Encrypt(MPK, M, A): Executed by the user, based on the master public key MPK, the plaintext M and the access structure A, a random number s∈Z is selected. p And calculate the ciphertext CT, the specific calculation formula is as follows:

[0110] C1=MY s

[0111] C2=gs

[0112]

[0113] CT=<C1,C2,C3,A>

[0114] Among them, g, h, T i,j ,Y are the main public key parameters, C1 represents the first part of the ciphertext, which is responsible for decrypting the ciphertext, C2 represents the second part of the ciphertext, and C3 represents the third part of the ciphertext. C2 and C3 are used by the supervisor to calculate part of the plaintext. Y s=e(g,h) ys represents the bilinear map of the generators g and h in the group G, and s represents the map from the natural number field Z p The random number selected from s represents the s-th power of the generator g in the group G, h s represents the generator h in the group G raised to the power of s.

[0115] (4) Decryption Decrypt(M', TK): Executed by the supervisor. The supervisor sends a request to the off-chain cloud storage server to obtain the ciphertext stored by the current user in the off-chain cloud storage server. The off-chain cloud storage server verifies the supervisor's token. After successful verification, it retrieves the partial plaintext M' of the user required by the supervisor from the off-chain cloud storage server and sends it to the supervisor. The supervisor receives the partial plaintext M' calculated by the off-chain cloud storage server and combines it with its own token TK UID , a simple exponential operation can complete the decryption, and the supervisor successfully obtains the user's entire plaintext M. The specific calculation formula is as follows:

[0116]

[0117] Among them, C1 is the first part of the ciphertext, and the superscript q indicates that the regulator generates a token TK UID A random number is selected.

[0118] The specific steps for the above token verification and decryption are as follows:

[0119] 1) Token generation TransformKey (SK L ,UID): Executed by the supervisor, based on the user's attribute list L and the master private key MSK, MA selects a random number r∈Z p And calculate the user's private key SK L .

[0120]

[0121] Here g, h, T i,j represents the public key parameters, y represents the private key parameters, V i,j Represents a collection of attributes for a user.

[0122] The regulator chooses a random number q∈Z P And the private key SK L and the user's unique identifier UID to generate the token TK UID , as shown below:

[0123]

[0124] Among them, g, h, T i,jare all master public key parameters, y represents the master private key parameters, V i,j represents the attribute set of user i, h y+r represents the y+r power of the generator h in the group G, where r represents the number from the natural number field Z p The random number selected from i,j t represents the generator g in the group G i,j Power T i,j The rth power, t(UID) represents the user's ID;

[0125] 2) Decrypt'(MPK, CT, SKL): Executed by the off-chain cloud storage server based on the master public key MPK, ciphertext CT and private key SK L , assuming And AW=A, the off-chain cloud storage server outsources the decryption calculation of the ciphertext and calculates the partial plaintext M', as shown below:

[0126]

[0127] After calculation, we get Among them, g, h, T i,j Both are master public key parameters, g r represents the rth power of the generator g in the group G, AW represents the attribute set of the registered user, T i,j t represents the generator g in the group G i,j power, y represents the master private key parameter, t i,j Denotes the natural number field Z modulo p p (i∈[1,n],j∈[1,n i ]) randomly sample elements.

[0128] Step 2: Data storage and uploading to the blockchain;

[0129] S2.1: Prepare the data to be stored and convert the data into ciphertext according to the data encryption method in step 1 to ensure that the data content can only be accessed by authorized users.

[0130] S2.2: The encrypted data and the encryption key are securely uploaded to the off-chain cloud storage server. The upload process uses UUID (Universally Unique Identifier) ​​to generate a unique identifier for each piece of data for subsequent data retrieval and management.

[0131] S2.3: Design a smart contract to manage the process of uploading unique identifiers to the blockchain. Smart contracts must include the functions of recording, querying, and verifying data identifiers. The unique identifier generated by the data in the off-chain cloud storage server is recorded on the blockchain. Due to the characteristics of blockchain such as immutability and transparency, once the record is added, it cannot be tampered with to ensure the integrity and credibility of the data. The process of uploading the identifier to the blockchain is automatically executed by smart contracts to ensure its security. At the same time, the nodes in the blockchain network verify the transactions containing the identifier records to ensure that they comply with the consensus rules of the network.

[0132] Step 3: Data retrieval and decryption;

[0133] S3.1: The user locates the target data in the off-chain cloud storage server through a unique identifier; the system verifies the user's attributes and permissions to ensure that they comply with the data access policy.

[0134] S3.2: Users who meet the access policy can use their attribute private key to decrypt data. Attribute-based encryption ensures that only users with corresponding permissions can successfully decrypt data.

[0135] S3.2: The system provides regulators with special permissions to allow them to decrypt and review all data when necessary to ensure compliance and security.

[0136] Step 4: Deep learning sensitivity detection;

[0137] The regulator applies for a secret key from the main authorization agency to decrypt the data, and uses the decrypted data to build a sensitive information detection model with a multi-level deep learning architecture. It comprehensively utilizes technical modules such as BERT (bidirectional encoder representation), BiLSTM (bidirectional long short-term memory network) and CRF (conditional random field) to achieve accurate detection of sensitive information in the text; the detection results are provided to users or regulators. If the text contains sensitive information, the system will respond accordingly based on the detection results, such as issuing an alarm or restricting access, to ensure that sensitive information is properly handled.

[0138] The sensitive information detection model of the multi-level deep learning architecture is divided into three layers: BERT, BiLSTM, and CRF. From the perspective of model performance, the pre-trained language model of the BERT module greatly improves the ability to identify sensitive information hidden in complex texts through its deep bidirectional context representation. The BiLSTM module further enhances the accurate positioning of sensitive word boundaries by capturing the long-term and short-term dependencies in the previous and next contexts, while the CRF module optimizes the global consistency of sequence annotations and ensures the optimality of the label sequence.

[0139] Among them, the data set used in the present invention is 10,000 sentences related to medical information obtained on the public network through crawlers, including sensitive information such as medical institution information, personal identity information, medical diagnosis information, etc. The collected data is manually annotated with the location of each entity through annotation tools, and is evenly divided into a test set, a validation set, and a training set in a ratio of 7:1:2.

[0140] As an example, the BERT module, as the basis of the text encoder, encodes the input text sequence through its bidirectional Transformer mechanism and converts it into a high-dimensional word vector. The output layer of BERT generates a 768-dimensional word vector representation for each input word. These representations include rich contextual information, providing a basis for subsequent feature extraction.

[0141] The BERT module structure is as follows Figure 2 As shown in the figure. The BERT module relies on the bidirectional self-attention mechanism, which can capture the multi-level semantic features of words in the global context, thereby generating highly context-sensitive word vector representations. The BERT module mainly consists of the following parts:

[0142] 1. Input embedding layer: The input sequence is represented by word embedding as (w1,w2w3,w4,w5). Among them, (w4) is replaced by [MASK] for self-supervised learning tasks.

[0143] 2. Transformer Encoder: The input embedding is processed through the Transformer encoder.

[0144] The Transformer encoder provides a deep contextual understanding of the input sequence.

[0145] 3. Output layer: Transformer encoder output is (O1, O2 O3, O4, O5).

[0146] 4. Classification layer: The output is processed through a fully connected layer, plus the GELU activation function and normalization layer to generate the final prediction results (w'1, w'2, w'3, w'4, w'5).

[0147] By considering the relationship between the adjacent words before and after each word in the sequence, the BERT module is able to construct semantically rich word embeddings, surpassing the limitations of traditional unidirectional language models in capturing the deep semantics of text. The effectiveness of the BERT module stems from its large-scale unsupervised pre-training process, during which the model learns general language representations on a large corpus through masked language modeling and next sentence prediction tasks. Subsequently, the model is adapted to specific sensitive information detection tasks through a supervised fine-tuning step. During the fine-tuning process, the BERT module uses its pre-trained parameters as initialization, and further adjusts the model weights by optimizing the sensitive information recognition objective function, thereby achieving excellent performance in semantic understanding tasks in specific fields. Through this strategy of combining large-scale pre-training with task-oriented fine-tuning, the BERT module is able to achieve efficient detection and accurate recognition of sensitive information in complex contexts.

[0148] As an example, the BiLSTM module, through its bidirectional structure, can combine the forward and backward contextual information of the text, thereby enhancing the detection ability of sensitive words in complex texts. The BiLSTM module combines the forward and backward information flows, maximizes the use of contextual information in the comprehensive representation output at each time step, and provides a richer and more accurate feature basis for subsequent sequence annotation.

[0149] The BiLSTM module structure is as follows Figure 3 As shown. The BiLSTM module mainly consists of the following parts:

[0150] 1. Input layer: The sequence data is divided into multiple time steps and input into the network.

[0151] 2. Forward LSTM layer: forward processing sequence, each time step corresponds to an LSTM unit, and its output depends not only on the current input, but also on the state of the previous time step.

[0152] 3. Backward LSTM layer: processes the sequence in reverse to further extract high-level time series features.

[0153] 4. Output layer: The output passes through a fully connected layer to generate the final prediction result.

[0154] As an enhanced recurrent neural network, the LSTM model captures the implicit long-distance dependencies in text sequences through a bidirectional structure. Its notable feature is that it can process both the forward and backward information of the input sequence. The BiLSTM module is composed of two independent LSTM layers in architecture, namely the forward LSTM layer and the backward LSTM layer, which propagate information along the forward and backward directions of the time series, respectively, and model the multiple dependencies of the input data through parallel computing. This bidirectional structure can effectively make up for the limitations of the unidirectional LSTM in processing asymmetric sequence dependencies, significantly improving the ability to perceive the contextual meaning of words in the sequence, thereby improving the accuracy of sensitive information recognition.

[0155] As an example, the CRF module is used to optimize the sequence tagging results. The role of the CRF module is to find the optimal tag sequence by modeling the dependency between tags. In the present invention, the CRF module is used to identify which category each word belongs to.

[0156] The difference between the CRF module and other models is as follows Figure 4 As shown in the figure, the difference compared to the HMMs (Hidden Markov Model) above is that the CRF module can capture multiple interacting features and dependencies between elements in a longer range in the observation sequence.

[0157] The CRF module builds a description of the relationship between each label in the sequence by learning the interdependence between label sequences, thereby effectively solving the limitations brought by the assumption of independence of labeling at a single time step. The structure of the CRF module enables it to comprehensively consider the relative relationship and constraints of the entire label sequence by defining a global likelihood function on all possible label sequences, thereby achieving the global optimal decision for the sequence output. Therefore, when the CRF module is combined with the features output by the BiLSTM module, it can further utilize the coherence and dependency of the label sequence to ensure the semantic consistency and accuracy of the final labeling result.

[0158] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A blockchain monitoring method based on attribute-based encryption and deep learning, characterized in that: The following steps are involved: (1) User attribute registration; The user provides the registration authority with relevant information proving his / her identity and attributes. The registration authority generates a set of private keys that match the user's attributes based on the relevant information for encryption and decryption operations. (2) Data encryption; Users set a set of access policies based on their data access requirements, and the system uses a private key to encrypt the data; (3) Data storage and blockchain; Through system initialization and key generation steps, the data to be stored is converted into ciphertext to ensure that the data content can only be accessed by authorized users; the encrypted data and the encryption key are uploaded to the off-chain cloud storage server; The upload process generates a unique identifier for each piece of data; Design a smart contract to manage the process of uploading the unique data identifier to the blockchain; record the unique data identifier on the blockchain; (4) Data retrieval and decryption; Users locate target data in the off-chain cloud storage server through a unique identifier. The system verifies the user's attributes and permissions to ensure that they comply with the data access policy. Users who comply with the access policy use their private keys to decrypt the data. (5) Deep learning sensitivity detection; The regulator applies for a secret key from the registration authority to decrypt the data, and uses the decrypted data to build a sensitive information detection model with a multi-level deep learning architecture to detect sensitive information in the text; the detection results are provided to the user or regulator and a corresponding response is made.

2. The blockchain monitoring method based on attribute-based encryption and deep learning according to claim 1 is characterized in that: The specific implementation process of the user attribute registration is as follows: Assume U = {ATT1, ATT2...ATT n } indicates users ATT1, ATT2...ATT registered in the primary authorization institution n A collection of s, where s represents the supervisory party registered with the primary authority, and P i = {v i,1 ,v i,2 ...v i,n }(n i =|P i |) indicates user ATT i All possible attribute values ​​v i,1 ,v i,2 ...v i,n The collection of n i Indicates the maximum number of attribute values; L = {L1, L2, ... L n } represents a set of user attributes, A={A1,A2,...A k } indicates access to a structure collection; Where e:G×G→G1 represents a bilinear mapping function, e represents a bilinear mapping from a multiplicative cyclic group G of order p to a multiplicative cyclic group G1 of order p different from group G; suppose t and t' represent two different collision-resistant hash functions ({0,1} * ×{0,1} * →Z p ), Z p Represents the ring of integers modulo p, where t is known only to the master authority.

3. The blockchain monitoring method based on attribute-based encryption and deep learning according to claim 1 is characterized in that: The specific implementation process of the system initialization and key generation is as follows: Based on the implicit security parameter k, the master authority selects a large prime number p, a p-order bilinear group (G, G1), and generates g∈G, h∈G, y∈Z p and t i,j ∈Z p (i∈[1,n],j∈[1,n i ]), the main authorization agency generates a unique identifier UID for the supervisor, and then the main authorization agency calculates Y = e(g, h) y and The master public key MPK and master private key MSK are generated: MPK=(e,g,h,Y,T i,j ,(i∈[1,n],j∈[1,n i ])); MSK=(y,t i,j ,(i∈[1,n],j∈[1,n i ])). Among them, g, h, T i,j are all primary public key parameters, g and h are both generators in group G, Y is the bilinear mapping of generators g and h, T i,j t represents the generator g i,j power, y represents the master private key parameter, t i,j Denotes the natural number field Z modulo p p (i∈[1,n],j∈[1,n i ]) randomly sampled elements, n represents the number of registered users, n i Indicates the maximum number of attribute values ​​of the i-th user.

4. The blockchain monitoring method based on attribute-based encryption and deep learning according to claim 1 is characterized in that: The specific implementation process of generating the user private key is as follows: Based on the user's attribute list L and the master private key MSK, MA selects a random number r∈Z p And calculate the user's private key SK L : Among them, h y+r represents the y+r power of the generator h in the group G, y represents the master private key parameter, and r represents the number from the natural number field Z p The random number selected from i,j t represents the generator g i,j Power T i,j r power, t i,j Denotes the natural number field Z modulo p p (i∈[1,n],j∈[1,n i ]) randomly sampled elements, g r represents the generator g in the group G raised to the power of r.

5. The blockchain monitoring method based on attribute-based encryption and deep learning according to claim 1 is characterized in that: The specific implementation process of the data encryption is as follows: Based on the master public key MPK, plaintext M and access structure A, the user selects a random number s∈Z p And calculate the ciphertext CT: C1=MY s C2=g s CT=<C1,C2,C3,A> Among them, g, h, T i,j ,Y are the main public key parameters, C1 represents the first part of the ciphertext, which is responsible for decrypting the ciphertext, C2 represents the second part of the ciphertext, and C3 represents the third part of the ciphertext. C2 and C3 are used by the supervisor to calculate part of the plaintext. Y s =e(g,h) ys represents the bilinear map of the generators g and h in the group G, and s represents the map from the natural number field Z p The random number selected from s represents the s-th power of the generator g in the group G, g s represents the generator h in the group G raised to the power of s.

6. The blockchain monitoring method based on attribute-based encryption and deep learning according to claim 1 is characterized in that: The specific implementation process of the data decryption is as follows: The supervisor sends a request to the off-chain cloud storage server to obtain the ciphertext stored by the current user in the off-chain cloud storage server. The off-chain cloud storage server verifies the token of the supervisor. After successful verification, it retrieves the partial plaintext M' of the user required by the supervisor in the off-chain cloud storage server and sends it to the supervisor. The supervisor receives the partial plaintext M' calculated by the off-chain cloud storage server and combines it with its own token TK UID , a simple exponential operation can complete the decryption, and the regulator successfully obtains the user's entire plaintext M: Among them, C1 is the first part of the ciphertext, and the superscript q indicates that the regulator generates a token TK UID A random number is selected.

7. The blockchain monitoring method based on attribute-based encryption and deep learning according to claim 5 is characterized in that: The token TK UID The specific implementation process of verification and decryption is as follows: 1) The regulator selects a random number q∈Z P And the private key SK L and the user's unique identifier UID to generate the token TK UID : Among them, g, h, T i,j are all master public key parameters, y represents the master private key parameters, V i,j represents the attribute set of user i, h y+r represents the y+r power of the generator h in the group G, where r represents the number from the natural number field Z p The random number selected from i,j t represents the generator g in the group G i,j Power T i,j The rth power, t(UID) represents the user's ID; 2) Based on the master public key MPK, ciphertext CT and private key SK L , assuming And AW=A, the off-chain cloud storage server outsources the decryption calculation of the ciphertext and calculates the partial plaintext M': After calculation, we get Among them, g, h, T i,j Both are master public key parameters, g r represents the rth power of the generator g in the group G, AW represents the attribute set of the registered user, T i,j t represents the generator g in the group G i,j power, y represents the master private key parameter, t i,j Denotes the natural number field Z modulo p p (i∈[1,n],j∈[1,n i ]) randomly sample elements.

8. The blockchain monitoring method based on attribute-based encryption and deep learning according to claim 1 is characterized in that: The sensitive information detection model of the multi-level deep learning architecture includes a BERT module, a BiLSTM module and a CRF module; the BERT module, as the basis of the text encoder, encodes the input text sequence through its bidirectional Transformer mechanism and converts it into a high-dimensional word vector; the BiLSTM module combines the forward and backward context information of the text through its bidirectional structure to enhance the detection ability of sensitive words in complex texts; the CRF module finds the optimal label sequence and optimizes the sequence labeling results by modeling the dependency relationship between labels.

9. The blockchain monitoring method based on attribute-based encryption and deep learning according to claim 1 is characterized in that: The BERT module includes: Input embedding layer: The input sequence is represented by word embedding as (w1,w2w3,w4,w5); where (w4) is replaced by [MASK] for self-supervised learning tasks; Transformer encoder: The input embedding is processed through the Transformer encoder; The Transformer encoder provides a deep contextual understanding of the input sequence; Output layer: Transformer encoder output is (O1, O2 O3, O4, O5); Classification layer: The output is processed through a fully connected layer, a GELU activation function and a normalization layer to generate the final prediction result (w'1, w'2, w'3, w'4, w'5); The BiLSTM module includes: Input layer: Sequence data is divided into multiple time steps and input into the network; Forward LSTM layer: forward processing sequence, each time step corresponds to an LSTM unit, and its output depends not only on the current input, but also on the state of the previous time step; Backward LSTM layer: processes the sequence in reverse to further extract high-level time series features; Output layer: The output passes through a fully connected layer to generate the final prediction result.

10. The blockchain monitoring system based on attribute-based encryption and deep learning is characterized by: The system is used to implement the blockchain monitoring method based on attribute-based encryption and deep learning as described in any one of claims 1 to 9, including: a registration authorization agency, a master authorization agency, a user, a regulator, a blockchain system and an off-chain cloud storage server; the registration authorization agency is responsible for user registration and generating user attributes for authorization; the master authorization agency has a master key and a master public key, and the master authorization agency uses the master key to generate a CP-ABE private key for the user, and restores encrypted data based on user attribute authorization; the identity of the user and the regulator is composed of several attributes, and the regulator can apply to decrypt the user's ciphertext and conduct supervision; the blockchain system is a distributed billing system, including several nodes.

Citation Information

Patent Citations

  • Block chain privacy data access control method based on attribute encryption

    CN106503994A

  • Internet of Things ciphertext access control method based on block chain

    CN117081803A

  • SM9-based strategy hidden attribute-based encrypted data retrieval method

    CN118157984A

  • Blockchain privacy data access control method and system

    WO2023226641A1