Blockchain monitoring system and method based on attribute-based encryption and deep learning
By using attribute-based encryption and deep learning models, this approach addresses the challenges of inflexible data access control, insufficient privacy protection, and regulatory compliance in blockchain technology. It enables secure data storage, flexible access, and intelligent analysis, thereby enhancing data access security and regulatory compliance.
Patent Information
- Application Number
- CN202411870686.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2044-12-18
AI Technical Summary
Existing blockchain technologies suffer from inflexible data access controls, inadequate privacy protection, a high risk of sensitive information leakage, and difficulty in achieving regulatory compliance.
By combining attribute-based encryption technology with a deep learning model, fine-grained access control and intelligent sensitive information detection are achieved through user attribute registration, data encryption, storage and on-chaining, and deep learning-based sensitive information detection.
It enables secure data storage, flexible access, and intelligent analysis, enhancing the security and regulatory compliance of data access and ensuring the integrity and privacy protection of data transmission.
Smart Images

Figure CN119760746B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application 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
[0002] Blockchain technology is a distributed ledger technology, which has multiple nodes, and various operations can occur on each node. Each node records all operations on the node in the form of a log. The consensus mechanism of the blockchain mainly shows that the nodes of the collaboration party maintain the data together, each node of the collaboration party has a complete data, and the data of all nodes of the collaboration party is consistent.
[0003] Attribute-based encryption (ABE) is an encryption technology that controls encryption and decryption operations through a user's attribute set, achieving fine-grained access control. Each user and data is associated with a set of attributes, such as roles or departments. When encrypting, the specified access policy determines which attribute combinations can decrypt the data. The user's key is generated based on its attributes, and only the key that meets the access policy can decrypt the corresponding data. This method provides flexible permission management and is suitable for complex permission structures without the need for a central management entity to distribute keys. ABE has wide applications in 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 that simulates human vision and hearing and brain neuron structure, learns the internal characteristics and rules of data through deep neural network models, and ultimately achieves the purpose of predicting data that has not been contacted by the machine through the learned characteristics and rules. BERT is a natural language processing pre-training model proposed by Google in 2018. BERT introduces a powerful bidirectional context encoding method and has good performance in natural language processing benchmark tests through large-scale pre-training.
[0005] However, the current blockchain technology has the following technical problems:
[0006] 1. Inflexible data access control: Traditional encryption methods usually encrypt data based on the identity of the user, 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 the third parties can only access the information they are authorized to view.
[0008] 3. Risk of sensitive information leakage: Large-scale data that has not been processed may contain sensitive information, and when such data is shared without adequate protection, it increases the risk of data leakage.
[0009] 4. Regulatory compliance challenges: Regulatory agencies have difficulty inspecting and regulating data without compromising data privacy. SUMMARY
[0010] To solve the problems in the prior art, the application provides a blockchain monitoring system and method based on attribute-based encryption and deep learning.
[0011] The technical solution adopted by the application to solve the technical problems is as follows:
[0012] The application provides a blockchain monitoring method based on attribute-based encryption and deep learning, comprising the following steps:
[0013] The application provides a blockchain monitoring method based on attribute-based encryption and deep learning, comprising the following steps:
[0014] (1) User attribute registration;
[0015] The user provides relevant information proving his identity and attributes to the registration and authorization agency, and the registration and authorization agency generates a set of private keys matching the user's attributes according to the relevant information for encryption and decryption operations;
[0016] (2) Data encryption;
[0017] The user sets a set of access policies according to his data access requirements, and the system uses the private key to encrypt the data;
[0018] (3) Data storage and chain;
[0019] Through the system initialization and key generation steps, the data to be stored is converted into ciphertext to ensure that only authorized users can access the data content; the encrypted data and the encryption keys are uploaded to the off-chain cloud storage server; the uploading process generates a unique identifier for each piece of data; an intelligent contract is designed to manage the on-chain process of the data unique identifier; the data unique identifier is recorded on the blockchain;
[0020] (4) Data retrieval and decryption;
[0021] The user locates the target data in the off-chain cloud storage server through the unique identifier, and the system verifies the user's attributes and permissions to ensure that they meet the data access policy; the user who meets the access policy uses the private key to decrypt the data;
[0022] (5) Deep learning sensitivity detection;
[0023] The supervisory party decrypts the data by applying for a secret key from the registration authority, and constructs a sensitive information detection model of a multi-level deep learning architecture by using the decrypted data to detect sensitive information in the text; the detection result is provided to the user or the supervisory party and a corresponding response is performed.
[0024] Further, the specific implementation process of the user attribute registration is as follows:
[0025] Suppose U={ATT1,ATT2...ATT n} represents a set of users ATT1,ATT2...ATT n registered at the main authority, and s represents a supervisory party registered at the main authority, and P i ={v i,1 ,v i,2 ...v i,n}(n i =|P i |) represents a set of all possible attribute values v i ,v i,1 ...v i,2 of the user ATT i,n , and n i represents the maximum number of attribute values; L={L1,L2,...L n} represents a set of attribute groups of the user, and A={A1,A2,...A k} represents a set of access structures; wherein e:G×G→G1 represents a bilinear mapping function, e represents a bilinear mapping from a multiplicative cyclic group G of prime order p to a multiplicative cyclic group G1 of prime order p, which is different from the group G; suppose t and t' represent two different anti-collision hash functions ({0,1} * ×{0,1} * →Z p ), Z p represents a ring of integers modulo p, and only the main authority knows t.
[0026] Further, the specific implementation process of the system initialization and key generation is as follows:
[0027] Based on the implicit security parameter k, the main authority selects a large prime number p, a bilinear group (G, G1) of order p, generates g∈G, h∈G, y∈Z p and t i,j ∈Z p (i∈[1,n],j∈[1,n i ]), the main authority generates a unique identifier UID for the supervisory party, and then the main authority calculates Y=e(g,h)y and The main public key MPK and the main 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] where g, h, T i,j are master public key parameters, g and h represent generators in group G, Y represents a bilinear mapping of generators g and h, T i,j represents t i,j power of generator g, y represents a master private key parameter, t i,j represents a randomly sampled element from natural number field Z p (i∈[1,n],j∈[1,n i ]), n represents the number of registered users, n i represents the maximum number of attribute values of the i-th user.
[0031] Further, the specific implementation process of generating a user private key is as follows:
[0032] Based on the attribute list L of the user and the master private key MSK, MA selects a random number r∈Z p and calculates the user private key SK L :
[0033]
[0034] where h y+r represents y+r power of generator h in group G, y represents a master private key parameter, r represents a random number selected from natural number field Z p , D i,j represents r power of t i,j power of generator g T i,j , t i,j represents a randomly sampled element from natural number field Z p (i∈[1,n],j∈[1,n i ]), g r represents r power of generator g in group G.
[0035] Further, the specific implementation process of the data encryption is as follows:
[0036] Based on the master public key MPK, the plaintext M and the access structure A, the user selects a random number s∈Z p and calculates the ciphertext CT:
[0037] C1 = MY s
[0038] C2 = g s
[0039]
[0040] CT = <C1, C2, C3, A>
[0041] where g, h, T i,j , Y are master public key parameters, C1 represents the first part of the ciphertext, responsible for decrypting the ciphertext, C2 represents the second part of the ciphertext, C3 represents the third part of the ciphertext, C2 and C3 are used for the supervisory party to calculate part of the plaintext, Y s = e(g, h) ys represents the bilinear mapping of the generator g and h in the group G, s represents a random number selected from the natural number domain Z p , g s represents the s-th power of the generator g in the group G, h s represents the s-th power of the generator h in the group G.
[0042] Further, the specific implementation process of the data decryption is as follows:
[0043] The supervisory party 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 supervisory party, retrieves the part of the plaintext M' of the user required by the supervisory party in the off-chain cloud storage server and sends it to the supervisory party, and the supervisory party receives the part of the plaintext M' calculated by the off-chain cloud storage server and combines its own token TK UID , performs a simple exponential operation to complete the decryption, and the supervisory party successfully obtains the entire plaintext M of the user:
[0044]
[0045] where C1 is the first part of the ciphertext, and the superscript q represents a random number selected by the supervisory party to generate the token TK UID .
[0046] Further, the specific implementation process of the token TK UID verification and decryption is as follows:
[0047] 1) The supervisory party selects a random number q∈Z P , a private key SK L and a unique identifier UID of the user to generate a token TK UID :
[0048]
[0049] Among them, g,h,T i,j Both are master public key parameters, y represents the master private key parameter, and V i,j h represents the set of attributes of user i. y+r Let y+r be the power of the generator h in group G, where r represents the number from the natural number field Z. p The random number selected from D i,j t represents the generator g in group G. i,j Power T i,j The r-th power, t(UID) represents the user's identifier;
[0050] 2) Based on the master public key MPK, ciphertext CT, and private key SK L Assuming Furthermore, AW = A, and the off-chain cloud storage server performs outsourced decryption calculations on the ciphertext and calculates a portion of the plaintext M':
[0051]
[0052] Calculations yielded Among them, g,h,T i,j All are primary public key parameters, g r Let g be the generator g raised to the power of r in group G, AW be the attribute set of the registered user, and T be the generator g raised to the power of r. i,j t represents the generator g in group G. i,j The power of , y represents the master private key parameter, t i,j Represents the natural number field Z modulo p. p (i∈[1,n],j∈[1,n i ]) Randomly sampled elements.
[0053] Furthermore, the sensitive information detection model of the multi-layered deep learning architecture includes a BERT module, a BiLSTM module, and a CRF module. The BERT module, as the foundation of the text encoder, encodes the input text sequence through its bidirectional Transformer mechanism, converting it into high-dimensional word vectors. The BiLSTM module, through its bidirectional structure, combines forward and backward contextual information of the text to enhance the detection capability of sensitive words in complex texts. The CRF module, by modeling the dependencies between labels, finds the optimal label sequence and optimizes the sequence labeling results.
[0054] Furthermore, the BERT module includes:
[0055] Input embedding layer: The input sequence is represented by word embeddings as (w1, w2, w3, w4, w5); where (w4) is replaced with [MASK] for self-supervised learning tasks;
[0056] Transformer encoder: input embeddings are processed by a Transformer encoder;
[0057] The Transformer encoder has a deep contextual understanding of the input sequence;
[0058] Output layer: the output of the Transformer encoder is (O1, O2, O3, O4, O5);
[0059] Classification layer: the output is processed by a fully connected layer, plus a GELU activation function and a normalization layer, to generate the final prediction results (w'1, w'2, w'3, w'4, w'5).
[0060] Further, the BiLSTM module includes:
[0061] Input layer: the sequence data is divided into multiple time steps and input into the network;
[0062] Forward LSTM layer: the sequence is processed in the forward direction, and each time step corresponds to an LSTM unit, whose output depends not only on the current input but also on the state of the previous time step;
[0063] Backward LSTM layer: the sequence is processed in the reverse direction, further extracting high-level time sequence features;
[0064] Output layer: the output is processed by a fully connected layer to generate the final prediction results.
[0065] The application provides a blockchain monitoring system based on attribute-based encryption and deep learning, which is used for realizing the blockchain monitoring method based on attribute-based encryption and deep learning, and the system comprises a registration authorization agency, a main authorization agency, a use user, a supervision party, a blockchain system and an off-chain cloud storage server; the registration authorization agency is responsible for user registration and generates user attributes for authorization; the main authorization agency has a main key and a main public key, and the main authorization agency generates a CP-ABE private key for the user by using the main key, and recovers encrypted data based on user attribute authorization; the identity of the use user and the supervision party is composed of a plurality of attributes, the supervision party can apply for decrypting the ciphertext of the user and supervising; the blockchain system is a distributed accounting system and comprises a plurality of nodes.
[0066] The application has the beneficial effects that:
[0067] The application provides a blockchain monitoring system and method based on attribute-based encryption (ABE) and deep learning, aiming to realize secure storage, flexible access and intelligent analysis of data through attribute-based encryption and intelligent detection technology.
[0068] Compared with the prior art, the application has the following advantages:
[0069] 1. Fine-grained data access control based on attribute-based encryption technology;
[0070] The application introduces attribute-based encryption (ABE) technology into the blockchain system, greatly enhancing the flexibility and security of data access. Through the combination of user attributes and access policies, the system can perform data encryption and decryption operations based on roles, permissions and other multi-dimensional attributes. This encryption technology not only realizes fine-grained access control, but also avoids the single point failure problem caused by traditional centralized key management.
[0071] 2. Intelligent sensitive information detection driven by deep learning;
[0072] The application innovatively combines deep learning models for automatic detection of data sensitive information, and realizes accurate analysis and detection of text information through multi-layer neural networks such as BERT, BiLSTM and CRF. This architecture utilizes the context understanding ability of the BERT module, combines the long and short term memory characteristics of the BiLSTM module and the global sequence optimization ability of the CRF module, and can effectively detect and identify potential sensitive information in the data.
[0073] 3. The combination of blockchain and smart contract ensures data integrity;
[0074] The application makes full use of the non-tamperability of the blockchain and the automatic management characteristics of the smart contract, records the unique identifier of the data in the blockchain, and realizes the storage, query and verification of the data through the smart contract. Each data access request will be verified and recorded by the smart contract, ensuring the integrity and security of data transmission. BRIEF DESCRIPTION OF DRAWINGS
[0075] Figure 1 A flowchart of a blockchain monitoring method based on attribute-based encryption and deep learning.
[0076] Figure 2 A BERT module structure diagram.
[0077] Figure 3 A BiLSTM module structure diagram.
[0078] Figure 4 Figure for distinguishing CRF from HMMs. DETAILED DESCRIPTION
[0079] In order to make the scheme of the present disclosure more clear, and the technical personnel in the art better understand the technical scheme of the application, the application will be further described in detail below in conjunction with the drawings.
[0080] In a first aspect, the present application provides a blockchain monitoring system based on attribute-based encryption and deep learning.
[0081] The blockchain monitoring system based on attribute-based encryption and deep learning provided by the present application mainly comprises a registration authority (RA), a master authority (MA), a user, a supervisor, 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 authority has a master key (MSK) and a master public key (MPK). The master authority generates a CP-ABE private key for the user using the master key, and recovers the encrypted data based on the user attribute authorization. The identity of the user and the supervisor is composed of several attributes. The supervisor can apply for decrypting the user's ciphertext and perform supervision. The blockchain system is a distributed accounting system comprising a plurality of nodes. The off-chain cloud storage server is a database that can be used to store user ciphertext data.
[0082] In a second aspect, the present application provides a blockchain monitoring method based on attribute-based encryption and deep learning, which is mainly implemented by using the blockchain monitoring system based on attribute-based encryption and deep learning provided in the first aspect. See Figure 1 The method mainly comprises the following steps:
[0083] 1. The user first registers the secret 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 attributes and returns the private key to the user and the encryption party;
[0085] 3. The encryption party encrypts the data using the secret key, and securely uploads the encrypted data and the key used for encryption 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. An intelligent contract is designed, and the data unique identifier is shared through the intelligent contract;
[0087] 5. The data unique identifier is obtained from the intelligent contract;
[0088] 6. The supervisor applies for a decryption key to the master authority;
[0089] 7. The master authority returns the secret key to the regulator upon the regulator's request;
[0090] 8. The regulator can apply for decryption of the user's ciphertext according to the decryption key, and perform supervision.
[0091] A blockchain supervision method based on attribute-based encryption and deep learning, and the specific implementation process is as follows:
[0092] Step one, user attribute registration and data encryption;
[0093] S1.1: User attribute registration;
[0094] When uploading data, the user first needs 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 identity and attributes, such as identity documents, role descriptions or permission levels; the registration authority verifies the authenticity and accuracy of the information provided by the user, and then registers the user's attributes.
[0095] The registration authority and the master authority generate a set of attribute private keys matching the user's attributes based on the user's submitted registration information, which are used for encryption and decryption operations. The attribute private key is unique and secure, and is only assigned to verified users, who need to properly save these private keys.
[0096] S1.2: Data encryption;
[0097] The user sets a set of access policies according to his data access requirements. These access policies define which combination of user attributes can access specific data. Access policies can include multiple combinations of user attributes, such as requiring users to have specific roles and permission levels to decrypt corresponding data. Then, register with the master authority to get the master public key MPK, and encrypt the data 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 of user attribute registration, system initialization and key generation, encryption and decryption. The following is an example of ciphertext policy attribute-based encryption to give the specific process of attribute-based encryption:
[0100] (1) User attribute registration: The registration authority registers the user and generates the user's attribute for authorization. Assume that U = {ATT1, ATT2...ATT n} represents the user ATT1, ATT2...ATT nThe set, denoted by s, represents the regulator registered with the main authorizing body, and P represents the regulator. 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 set of n i This represents the maximum number of attribute values; L = {L1, L2, ... L} n} represents a set of user attributes, A = {A1, A2, ..., A} k} represents the set of access structures. Here, e: G×G→G1 represents a bilinear mapping function, where e represents a bilinear mapping from a multiplicative cyclic group G of order p to a multiplicative cyclic group G1 of order p, distinct from group G. Assume t and t' represent two distinct collision-resistant hash functions ({0,1}). * ×{0,1} * →Z p Z p t represents the integer ring modulo p, which is known only to the main authorizing body.
[0101] (2) System initialization and key generation: The main authorizing body 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 main authorizing body selects a large prime number p, a bilinear group of order p (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 primary authorizing body generates a unique identifier (UID) for the regulator, and then calculates Y = e(g, h)y and The master public key MPK and master private key MSK were 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 master public key parameters, g and h represent generators in group G, Y represents a bilinear mapping of generators g and h, T i,j represents t i,j power of generator g, y represents master private key parameter, t i,j represents a natural number field Z p (i∈[1,n],j∈[1,n i ]) randomly sampled elements, n represents the number of registered users, n i represents the maximum number of attribute values of the i-th user.
[0106] Based on the attribute list L of the user and the master private key MSK, the master authority MA selects a random number r∈Z p and calculates the user private key SK L :
[0107]
[0108] wherein h y+r represents y+r power of generator h in group G, y represents master private key parameter, r represents a random number selected from the natural number field Z p , D i,j represents t i,j power of r power of T i,j , t i,j represents a natural number field Z p (i∈[1,n],j∈[1,n i ]) randomly sampled elements, g r represents r power of generator g in group G.
[0109] (3) Encryption: Encrypt(MPK, M, A): performed by the user, based on the master public key MPK, plaintext M and access structure A, a random number s∈Z p is selected and the ciphertext CT is calculated, and the specific calculation formula is as follows:
[0110] C1=MY s
[0111] C2=gs
[0112]
[0113] CT=<C1,C2,C3,A>
[0114] wherein g, h, T i,j , Y are master public key parameters, C1 represents the first part of the ciphertext, responsible for decrypting the ciphertext, C2 represents the second part of the ciphertext, C3 represents the third part of the ciphertext, C2 and C3 are used for the regulator to calculate part of the plaintext, Y s=e(g,h) ys Let s denote a bilinear mapping from the generators g and h in a group G, and let s denote a mapping from the natural number field Z. p The random number selected from g s h represents the power of s for the generator g in group G. s Let s represent the generator h raised to the power of s in group G.
[0115] (4) Decrypt(M', TK): This is executed by the regulator. The regulator sends a request to the off-chain cloud storage server to retrieve the ciphertext of the current user stored there. The off-chain cloud storage server verifies the regulator's token. Upon successful verification, it retrieves the required portion of the user's plaintext M' from the off-chain cloud storage server and sends it to the regulator. After receiving the calculated portion of plaintext M' from the off-chain cloud storage server, the regulator combines it with its own token TK. UID Decryption can be completed with a simple exponential operation, and the regulator successfully obtains the user's entire plaintext M. The specific calculation formula is as follows:
[0116]
[0117] C1 is the first part of the ciphertext, and the superscript 'q' indicates that the regulator generated the token TK. UID Select a random number.
[0118] The specific steps for token verification and decryption are as follows:
[0119] 1) Token generation TransformKey(SK) L UID): Executed by the regulator, based on the user's attribute list L and 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 V represents the public key parameter, y represents the private key parameter, and V represents the public key parameter. i,j This represents the user's set of attributes.
[0122] The regulator selects a random number q∈Z P and private key SK L A token TK is generated using the user's unique identifier (UID). UID As shown below:
[0123]
[0124] Among them, g,h,T i,jBoth are master public key parameters, y represents the master private key parameter, and V i,j h represents the set of attributes of user i. y+r Let y+r be the power of the generator h in group G, where r represents the number from the natural number field Z. p The random number selected from D i,j t represents the generator g in group G. i,j Power T i,j The r-th power, t(UID) represents the user's identifier;
[0125] 2) Decrypt(MPK, CT, SKL): Executed by an off-chain cloud storage server, based on the master public key MPK, ciphertext CT, and private key SK. L Assuming Furthermore, AW = A. The off-chain cloud storage server performs outsourced decryption calculations on the ciphertext and calculates a portion of the plaintext M', as shown below:
[0126]
[0127] Calculated Among them, g,h,T i,j All are primary public key parameters, g r Let g be the generator g raised to the power of r in group G, AW be the attribute set of the registered user, and T be the generator g raised to the power of r. i,j t represents the generator g in group G. i,j The power of , y represents the master private key parameter, t i,j Represents the natural number field Z modulo p. p (i∈[1,n],j∈[1,n i ]) Randomly sampled elements.
[0128] Step 2: Data storage and on-chain processing;
[0129] S2.1: Prepare the data to be stored, and convert the data into ciphertext according to the data encryption method in step one to ensure that the data content can only be accessed by authorized users.
[0130] S2.2: Securely upload the encrypted data and the encryption key to the off-chain cloud storage server. During the upload process, a UUID (Universally Unique Identifier) is used 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 on-chain process of data unique identifiers. The smart contract needs to include data identifier recording, querying, and verification functions. Record the unique identifier generated by the data in the off-chain cloud storage server on the blockchain. Due to the characteristics of the blockchain, such as immutability and transparency, once the record is added, it cannot be tampered with, ensuring the integrity and credibility of the data. The on-chain process of the identifier is automatically executed through the smart contract, ensuring its security, while the nodes in the blockchain network verify the transaction containing the identifier record to ensure that it meets the network's consensus rules.
[0132] Step three, data retrieval and decryption;
[0133] S3.1: Users locate target data in off-chain cloud storage servers through unique identifiers; the system verifies the user's attributes and permissions to ensure they meet the data access policy.
[0134] S3.2: Users who meet the access policy can decrypt the data using their attribute private keys. Attribute-based encryption methods ensure that only users with the appropriate permissions can successfully decrypt.
[0135] S3.2: The system provides special permissions for regulators to decrypt and review all data if necessary, ensuring compliance and security.
[0136] Step four, deep learning sensitivity detection;
[0137] The regulator decrypts the data by applying for a secret key from the main authorization agency and uses the decrypted data to build a multi-level deep learning architecture sensitive information detection model, which comprehensively utilizes BERT (Bidirectional Encoder Representations), BiLSTM (Bidirectional Long Short-Term Memory Network), and CRF (Conditional Random Field) technology modules to accurately detect sensitive information in text; the detection results are provided to users or regulators, and if the text contains sensitive information, the system responds accordingly, such as alerting or limiting access, ensuring that sensitive information is properly handled.
[0138] Among them, the multi-level deep learning architecture sensitive information detection model is divided into BERT, BiLSTM and CRF three layers. From the perspective of model performance, the pre-training language model of the BERT module greatly improves the recognition ability of implicit sensitive information in complex text through its deep bidirectional context representation. The BiLSTM module further strengthens the accurate positioning of sensitive word boundaries by capturing long and short-term dependencies in the context before and after, while the CRF module optimizes the global consistency of sequence labeling, ensuring the optimality of the label sequence.
[0139] Among them, the data set used by the application is 10000 related sentences of medical information obtained on the public network through a crawler, including medical institution information, personal identity information, medical diagnosis information and other sensitive information. The collected data is manually labeled by labeling tools for each entity position, and is evenly divided into a test set, a verification set and a training set according to a ratio of 7:1:2.
[0140] As an example, the BERT module is used as the basis of the text encoder, and through its bidirectional Transformer mechanism, the input text sequence is encoded and converted into a high-dimensional word vector. The output layer of BERT generates a 768-dimensional word vector representation for each input word, which includes rich context information and provides a basis for subsequent feature extraction.
[0141] The structure of the BERT module is shown in Figure 2 The BERT module relies on a bidirectional self-attention mechanism and can capture multi-level semantic features of words in a global context to generate 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 (w1, w2, w3, w4, w5). Where (w4) is replaced by [MASK] for self-supervised learning tasks.
[0143] 2. Transformer encoder: input embedding is processed by the Transformer encoder.
[0144] The Transformer encoder performs deep context understanding on the input sequence.
[0145] 3. Output layer: the output of the Transformer encoder is (O1, O2, O3, O4, O5).
[0146] 4. Classification layer: the output is processed by a fully connected layer, plus a GELU activation function and a normalization layer to generate the final prediction result (w'1, w'2, w'3, w'4, w'5).
[0147] BERT module is able to build semantic-rich word embeddings by considering the mutual relationship between the neighboring words before and after each word in the sequence, thus overcoming the limitations of traditional unidirectional language models in capturing deep semantic information. 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 the masked language modeling and next sentence prediction tasks. Subsequently, the model adapts to specific sensitive information detection tasks through a supervised fine-tuning step. During the fine-tuning process, the BERT module initializes its pre-trained parameters and further adjusts the model weights by optimizing the sensitive information identification objective function, thus achieving excellent performance in specific semantic understanding tasks. Through this strategy of combining large-scale pre-training and task-oriented fine-tuning, the BERT module is able to efficiently detect and accurately identify sensitive information in complex contexts.
[0148] As an example, the BiLSTM module is able to combine forward and backward contextual information through its bidirectional structure, thus enhancing the detection capability of sensitive words in complex texts. The BiLSTM module combines forward and backward information flow, maximizes the utilization of contextual information in the comprehensive representation output at each time step, and provides a more rich and accurate feature basis for subsequent sequence labeling.
[0149] The BiLSTM module structure is shown in Figure 3 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: Process the sequence in the forward direction, each time step corresponds to an LSTM unit, whose output depends not only on the current input but also on the state of the previous time step.
[0152] 3. Backward LSTM layer: Process the sequence in the reverse direction, further extract high-level time sequence features.
[0153] 4. Output layer: Output through a fully connected layer to generate the final prediction result.
[0154] As an enhanced recurrent neural network, LSTM model captures the long-distance dependencies in the text sequence through a bidirectional structure, and its significant feature is that it can process the forward and backward information of the input sequence simultaneously. The BiLSTM module is composed of two independent LSTM layers, namely the forward LSTM layer and the backward LSTM layer, which propagate information along the positive direction and the reverse direction of the time sequence 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 improve the perception of the context meaning of the words in the sequence, and thus improve the accuracy of sensitive information recognition.
[0155] As an example, the CRF module is used to optimize the sequence labeling results. The role of the CRF module is to find the optimal label sequence by modeling the dependencies between labels. In the present application, the CRF module is used to identify which category each word belongs to.
[0156] The difference between the CRF module and other models is shown in Figure 4 Compared with the HMMs (Hidden Markov Model) above, the CRF module can capture multiple interacting features and dependencies between elements in a longer range of observation sequences.
[0157] The CRF module establishes a description of the relationship between each annotation in the sequence by learning the mutual dependency between label sequences, thereby effectively solving the limitations brought by the independent assumption of single time step annotation. The structure of the CRF module enables it to define a global likelihood function on all possible label sequences, comprehensively consider the relative relationship and constraint conditions of the entire label sequence, and then realize the global optimal decision of the sequence output. Therefore, when combining the features output by the BiLSTM module, the CRF module can further utilize the continuity and dependency of the label sequence to ensure the semantic consistency and accuracy of the final annotation results.
[0158] The above only describes the preferred embodiments of the present application, and it should be noted that for those skilled in the art, without departing from the principles of the present application, several improvements and refinements can be made, and these improvements and refinements should also be considered as the protection scope of the present application.
Claims
1. A blockchain monitoring method based on attribute-based encryption and deep learning, characterized in that, The method comprises the following steps: (1) User attribute registration; The user provides relevant information proving his / her identity and attributes to the registration authority, and the registration authority generates a set of private keys matching the user's attributes according to the relevant information, which are used for encryption and decryption operations; The specific implementation process of generating user private keys is as follows: Based on the attribute list L of the user and the master secret key MSK, MA selects a random number r e Z p and calculates the user's secret key SK L : Among them, h y+r Let y+r be the power of the generator h in group G, where y represents the master private key parameter and r represents the power of the generator h in the natural number field Z. p The random number selected from D i,j t represents the generator g i,j Power T i,j r to the power of t i,j Represents the natural number field Z modulo p. p (i∈[1,n],j∈[1,n i ]) Randomly sampled elements, g r Let g be the power of r of the generator g in group G; (2) Data encryption; The user sets a set of access strategies according to his / her data access requirements, and the system uses private keys to encrypt the data; The specific implementation process of data encryption is as follows: Based on the master public key MPK, the plaintext M and the access structure A, the user selects a random number s∈Z p and calculates the ciphertext CT: C1 = MY s C2 = g s CT = <C1, C2, C3, A> wherein g, h, T i,j Y are master public key parameters, C1 represents the first part of the ciphertext, responsible for decrypting the ciphertext, C2 represents the second part of the ciphertext, C3 represents the third part of the ciphertext, C2 and C3 are used for the regulatory party to calculate part of the plaintext, Y s = e(g, h) ys represents a bilinear mapping of the generators g and h in the group G, s represents a random number selected from the natural number domain Z p g s represents the s-th power of the generator g in the group G, h s represents the s-th power of the generator h in the group G; (3) Data storage and on-chain; 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 keys used for encryption are uploaded to an off-chain cloud storage server; a unique identifier is generated for each piece of data during the uploading process; an intelligent contract is designed to manage the on-chain process of the data unique identifier; and the data unique identifier is recorded on the blockchain; (4) Data retrieval and decryption; The user locates the target data in the off-chain cloud storage server through the unique identifier, and the system verifies the user's attributes and permissions to ensure that they meet the data access strategy; the user who meets the access strategy uses the private key to decrypt the data; The specific implementation process of data decryption is as follows: The regulator sends a request to the off-chain storage server to retrieve the encrypted data of the current user stored there. The off-chain storage server verifies the regulator's token. Upon successful verification, it retrieves the required portion of the user's plaintext M' from the off-chain storage server and sends it to the regulator. The regulator receives the calculated portion of plaintext M' from the off-chain storage server and combines it with its own token TK. UID Decryption can be completed with a simple exponential operation, and the regulator successfully obtains the user's entire plaintext M: wherein C1 is a first part of the ciphertext, and the upper index q indicates that the supervisory party generates the token TK UID a selected random number; Token TK UID The specific implementation process of the verification and decryption of the token TK is as follows: 1) The regulator chooses a random number q e Z P and a private key SK L and a user's unique identifier UID to generate a token TK UID : Among them, g,h,T i,j Both are master public key parameters, y represents the master private key parameter, and V i,j h represents the set of attributes of user i. y+r Let y+r be the power of the generator h in group G, where r represents the number from the natural number field Z. p The random number selected from D i,j t represents the generator g in group G. i,j Power T i,j The r-th power, t(UID) represents the user's identifier; 2) based on the master public key MPK, the ciphertext CT and the private key SK L , assume and AW = A, the off-chain cloud storage server performs outsourcing decryption computation on the ciphertext and computes the partial plaintext M': After calculation, it is obtained that wherein g, h, T i,j are main public key parameters, g r represents r-th power of the generator g in the group G, AW represents an attribute set of a registered user, T i,j represents t i,j -th power of the generator g in the group G, y represents a main private key parameter, t i,j represents a natural number domain Z p from modulo p, and (i∈[1, n], j∈[1, n i ]) are randomly sampled elements; (5) Deep learning sensitivity detection; The supervisor applies for the key to the registration authority to decrypt the data, and uses the decrypted data to construct a multi-level deep learning architecture sensitive information detection model to detect sensitive information in the text; the detection results are provided to the user or the supervisor and corresponding responses are made. 2.The attribute-based encryption and deep learning based blockchain monitoring method of claim 1, wherein, The specific implementation process of the user attribute registration is as follows: Let U = {ATT1, ATT2...ATT n} denote the set of users ATT1, ATT2...ATT n registered with the main authority, let s denote the regulator registered with the main authority, let P i = {v i,1 ,v i,2 ...v i,n} (n i = |P i |) denote the set of all possible attribute values v i ,v i,1 ...v i,2 for a user ATT i,n , n i denote the maximum number of attribute values; let L = {L1, L2,...L n} denote the set of attribute sets for a user, and let A = {A1, A2,...A k} denote the set of access structures. where e: G x G→ G1represents a bilinear mapping function, e represents a bilinear mapping from a multiplicative cyclic group G of prime order p to a multiplicative cyclic group G1of prime order p that is distinct from the group G; let 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, only the main authority knows t. 3.The attribute-based encryption and deep learning based blockchain monitoring method of claim 1, wherein, The specific implementation process of the system initialization and key generation is as follows: Based on the implicit security parameter k, the main licensing authority selects a large prime number p, a p-order bilinear group (G, G1), generates g e G, h e G, y e Z p and t i,j e Z p (i e [1, n], j e [1, n i ]) The main licensing authority generates a unique identifier UID for the supervisor, and then the main licensing authority calculates Y = e(g, h)y and The main public key MPK and the main private key MSK are generated: MPK = (e, g, h, Y, T i,j , (i e [1, n], j e [1, n i ])) ; MSK = (y, t i,j ,(i∈[1,n],j∈[1,n i ])) wherein g, h, T i,j are main public key parameters, g and h represent generators in a group G, Y represents a bilinear mapping of the generators g and h, T i,j represents t i,j power of the generator g, and y represents a main private key parameter, t i,j represents a natural number domain Z p from modulo p, (i∈[1, n], j∈[1, n i ]) randomly sampled elements, n represents the number of registered users, n i represents the maximum number of attribute values of the i th user. 4.The attribute-based encryption and deep learning based blockchain monitoring method of claim 1, wherein, The multi-level deep learning architecture sensitive information detection model comprises a BERT module, a BiLSTM module and a CRF module; the BERT module serves as the basis of the text encoder, and through its bidirectional Transformer mechanism, it encodes the input text sequence and converts it into a high-dimensional word vector; the BiLSTM module enhances the detection capability of sensitive words in complex text by combining the forward and backward context information of the text through its bidirectional structure; and the CRF module finds the optimal label sequence by modeling the dependency relationship between the labels to optimize the sequence labeling result. 5.The attribute-based encryption and deep learning based blockchain monitoring method of claim 1, wherein, The BERT module comprises: Input embedding layer: the input sequence is represented by word embedding as (w1, w2, w3, w4, w5); wherein (w4) is replaced with [MASK] for a self-supervised learning task; Transformer encoder: the input embedding is processed by the Transformer encoder; The Transformer encoder performs deep context understanding on the input sequence; Output layer: the output of the Transformer encoder is (O1, O2, O3, O4, O5); Classification layer: the output is processed by 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 comprises: Input layer: sequence data is divided into multiple time steps and input into the network; Forward LSTM layer: forward processing of the sequence, each time step corresponds to an LSTM unit, and the output thereof depends not only on the current input but also on the state of the previous time step; Backward LSTM layer: reverse processing of the sequence, further extracting high-level time sequence features; Output layer: output through a fully connected layer to generate the final prediction result.
6. A blockchain monitoring system based on attribute-based encryption and deep learning, characterized in that, The system is used for implementing the blockchain monitoring method based on attribute-based encryption and deep learning in any one of claims 1-5, comprising a registration authority, a main authority, a user, a supervisor, a blockchain system and an off-chain cloud storage server; the registration authority is responsible for user registration and generating user attributes for authorization; the main authority has a main key and a main public key, and the main authority uses the main key to generate a CP-ABE private key for the user, and authorizes the recovery of encrypted data based on the user attributes; the identity of the user and the supervisor is composed of a plurality of attributes, and the supervisor can apply for decrypting the ciphertext of the user and performing supervision; the blockchain system is a distributed accounting system comprising a plurality of 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