Block chain data privacy protection system
By introducing a multi-parameter nonlinear segmented mapping mechanism and random seed control, combined with AES symmetric encryption algorithm, the problems of simple encryption algorithms and centralized storage of key management in traditional blockchain privacy protection technology are solved, efficient and secure data privacy protection is achieved, and blockchain performance and scalability are improved.
Patent Information
- Application Number
- CN202510080323.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-16
- Publication Date
- 2025-05-13
AI Technical Summary
Traditional blockchain privacy protection technology has the simplicity of encryption algorithms, lacks randomness and complexity, and is vulnerable to attacks; centralized storage of encryption key management methods and lacks distributed storage mechanisms; traditional privacy protection solutions have high computing and storage overhead, affecting blockchain performance and scalability.
A multi-parameter nonlinear segmented mapping mechanism and random seed control are introduced to generate complex nonlinear mapping control parameters, build a nonlinear mapping function to process the data, generate a mask matrix and store it distributedly, and data encryption and decryption are combined with AES symmetric encryption algorithm.
It significantly improves the complexity and cracking resistance of the encryption process, enhances the security and attack resistance of data privacy protection, reduces the computing and storage pressure of blockchain networks, and improves blockchain performance and scalability.
Smart Images

Figure CN119989411A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of blockchain technology, and in particular to a blockchain data privacy protection system. Background Art
[0002] With the widespread application of blockchain technology, more and more sensitive data is stored and transmitted on the blockchain. However, the openness and transparency of the blockchain itself makes the data on the chain face the risk of privacy leakage. Traditional blockchain privacy protection technology mainly relies on methods such as zero-knowledge proof and homomorphic encryption, but these methods have great challenges in computing performance, encryption and decryption speed, and storage efficiency. For example, although zero-knowledge proof can ensure transaction privacy, its computing and storage overhead is large, which affects the performance and scalability of the blockchain. Therefore, how to improve the performance and data storage efficiency of the blockchain network while ensuring data privacy is a difficult problem facing current technology.
[0003] The above blockchain privacy protection technologies have the following problems: First, traditional encryption algorithms such as AES and SHA-256 are relatively simple in the encryption process, lack sufficient randomness and complexity, and are vulnerable to brute force or reverse engineering attacks; second, the encryption keys are stored centrally, lacking a flexible distributed storage mechanism. When a single blockchain node is attacked or the key is leaked, it may lead to a comprehensive data leak; finally, although traditional privacy protection schemes (such as homomorphic encryption and zero-knowledge proof) can provide strong privacy protection, they have great challenges in computing and storage overhead, affecting the performance and scalability of the blockchain. Therefore, how to enhance the anti-attack ability of privacy protection through more complex and random encryption mechanisms has become an urgent problem to be solved in the field of blockchain privacy protection. Summary of the invention
[0004] The present invention provides a blockchain data privacy protection system to solve the problems that traditional encryption algorithms such as AES and SHA-256 are relatively simple in the encryption process, lack sufficient randomness and complexity, and are susceptible to brute force cracking or reverse engineering attacks; the encryption key management method is centralized and stored, lacks a flexible distributed storage mechanism, and when a single blockchain node is attacked or the key is leaked, it may lead to comprehensive data leakage; although traditional privacy protection schemes (such as homomorphic encryption and zero-knowledge proof) can provide strong privacy protection, there are great challenges in computing and storage overhead, which affects the performance and scalability of the blockchain.
[0005] A blockchain data privacy protection system of the present invention specifically includes the following technical solutions:
[0006] A blockchain data privacy protection method comprises the following steps:
[0007] S1: Receive and preprocess the original transaction data to generate data vectors and random seeds; introduce a multi-parameter nonlinear segmented mapping mechanism to process the random seeds and generate nonlinear mapping control parameters; based on the nonlinear mapping control parameters, construct a nonlinear mapping function, perform nonlinear mapping processing on the data vector, and generate a mapping data vector;
[0008] S2: Based on the mapped data vector, a mask matrix is constructed; the mask matrix elements are used as keys to encrypt the original transaction data; a mask matrix distributed storage mechanism is introduced to divide the mask matrix into sub-matrices and store them; the original transaction data is decrypted by restoring the mask matrix.
[0009] Preferably, the S1 specifically includes:
[0010] The preprocessing includes two parts. One part is to perform standardization, hashing and data vectorization on the original transaction data to generate a data vector; the other part is to generate a random seed by combining the timestamp of the current block and the hash value of the previous block.
[0011] Preferably, the S1 specifically includes:
[0012] A multi-parameter nonlinear segmented mapping mechanism is introduced. The random seed is segmented by cutting the bit sequence of the random seed, and the nonlinear mapping control parameters are generated by combining bit operations. The nonlinear mapping control parameters include mapping ratio parameters, exponent adjustment parameters and offset adjustment parameters.
[0013] Preferably, the S1 specifically includes:
[0014] Based on the nonlinear mapping control parameters, a nonlinear mapping function is constructed; each data point in the data vector is subjected to nonlinear mapping processing by the nonlinear mapping function to obtain a mapping data vector; the formula of the nonlinear mapping function is as follows:
[0015]
[0016] Wherein, f is a nonlinear mapping function; f(x) is the mapping value generated by nonlinear mapping of the input data point x; x is the input data point of the nonlinear mapping function, which comes from the data vector; α is the mapping ratio parameter; β is the exponential adjustment parameter; and γ is the offset adjustment parameter.
[0017] Preferably, the S2 specifically includes:
[0018] Based on the mapping data vector, the mask matrix is constructed by combining the mapping scale parameter, the exponent adjustment parameter and the offset adjustment parameter; the calculation formula of the mask matrix elements is as follows:
[0019]
[0020] Among them, m ij is the mask matrix element, which represents the element value of the i-th row and j-th column in the mask matrix; i is the row index of the mask matrix; j is the column index of the mask matrix; f(d i ) is the input data point d i The mapping value obtained by nonlinear mapping; d i is the i-th data point in the data vector; k is the counting variable in the summation, indicating the index of the data point; n is the dimension of the data vector; d k is the kth data point of the data vector; α is the mapping scale parameter; β is the exponential adjustment parameter; γ is the offset adjustment parameter; d j is the jth data point in the data vector.
[0021] Preferably, the S2 specifically includes:
[0022] Based on the data points of the data vector, a mask matrix element is randomly selected from the elements of the corresponding row of the mask matrix as the key, and the original transaction data is encrypted to obtain encrypted data; the randomly selected column index value is recorded, and the column index value and the encrypted data are packaged and stored.
[0023] Preferably, the S2 specifically includes:
[0024] A mask matrix distributed storage mechanism is introduced to divide the mask matrix into sub-matrices and distribute them to blockchain nodes for storage. When data decryption is required, the mask matrix is restored from each blockchain node. Based on the column index value stored packaged with the encrypted data, the mask matrix element is selected from the restored mask matrix as the key, and the encrypted data is decrypted using the same symmetric decryption algorithm as that used for encryption to restore the original transaction data.
[0025] A blockchain data privacy protection system includes the following parts:
[0026] Data preprocessing module, nonlinear mapping parameter generation module, nonlinear mapping function module, mask matrix generation module, data encryption module, mask matrix distribution storage module, data decryption module;
[0027] The data preprocessing module preprocesses the original transaction data. The preprocessing includes two parts: one part is to perform standardization, hashing and data vectorization on the original transaction data to generate and output data vectors; the other part is to generate and output random seeds; the data preprocessing module is connected to the nonlinear mapping parameter generation module and the nonlinear mapping function module by means of data transmission;
[0028] The nonlinear mapping parameter generation module receives a random seed, introduces a multi-parameter nonlinear segmented mapping mechanism, performs segmented processing on the random seed by cutting the bit sequence of the random seed, generates and outputs a nonlinear mapping control parameter; the nonlinear mapping parameter generation module is connected to the nonlinear mapping function module and the mask matrix generation module by means of data transmission;
[0029] The nonlinear mapping function module receives the data vector and the nonlinear mapping control parameter; based on the nonlinear mapping control parameter, constructs a nonlinear mapping function, performs nonlinear mapping processing on the data vector, obtains the mapped data vector and outputs it; the nonlinear mapping function module is connected to the mask matrix generation module by means of data transmission;
[0030] The mask matrix generation module receives the mapping data vector and the nonlinear mapping control parameter; generates and outputs the mask matrix based on the mapping data vector; the mask matrix generation module is connected to the mask matrix distribution storage module and the data encryption module by means of data transmission;
[0031] The data encryption module receives the mask matrix, uses the elements in the mask matrix as keys, adopts the AES symmetric encryption algorithm to encrypt the original transaction data, generates encrypted data, and stores and transmits the encrypted data; the data encryption module is connected to the data decryption module by means of data transmission;
[0032] The mask matrix distribution storage module receives the mask matrix, divides the mask matrix into sub-matrices, and performs distributed storage; the mask matrix distribution storage module is connected to the data decryption module by means of data transmission;
[0033] The data decryption module is responsible for collecting distributed and stored sub-matrices from blockchain nodes and splicing them into a complete mask matrix; using the elements in the spliced mask matrix as the key, decrypting the encrypted data through the AES symmetric encryption algorithm to restore the original transaction data.
[0034] The beneficial effects of the technical solution of the present invention are:
[0035] 1. The present invention significantly improves the complexity and unpredictability of the encryption process by introducing a nonlinear segmented mapping mechanism and random seed control, thereby enhancing the anti-cracking ability of data privacy protection. Compared with traditional linear or simple mapping methods, the present invention adopts complex mathematical operations such as logarithms, exponential decay and power operations to make the generation of nonlinear mapping control parameters more random, effectively avoiding the vulnerabilities of a single mode, ensuring the security of transaction data in the blockchain, and effectively preventing attackers from using known algorithm modes to crack, so as to provide stronger data protection.
[0036] 2. By introducing a mask matrix distributed storage mechanism, the present invention further improves the privacy and security of data. The mask matrix is divided and stored on multiple blockchain nodes, preventing the potential security risks caused by centralized storage. Even if a blockchain node is attacked or leaked, the attacker cannot obtain the complete mask matrix, and thus cannot restore the original transaction data. The mask matrix distributed storage method can reduce the risks brought by blockchain node attacks in the blockchain network to a certain extent and improve the level of data privacy protection.
[0037] 3. The technical solution of the present invention combines the AES symmetric encryption algorithm with complex nonlinear mapping technology to ensure the stability and efficiency of the encryption process. By generating a random mask matrix and encrypting the transaction data, the security of the transaction data during storage and transmission is ensured to prevent unauthorized access and potential attacks. Whether it is stored on the chain or in cross-chain transmission, it can effectively protect user privacy information and ensure that data in the blockchain environment is not leaked. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 This is a structural diagram of a blockchain data privacy protection system according to the present invention;
[0039] Figure 2 This is a flow chart of a blockchain data privacy protection method described in the present invention. DETAILED DESCRIPTION
[0040] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined purpose of the invention, the technical scheme in the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0041] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0042] The following is a detailed description of a specific scheme of a blockchain data privacy protection system provided by the present invention in conjunction with the accompanying drawings.
[0043] Refer to the attached Figure 1 , which shows a block chain data privacy protection system structure diagram provided by an embodiment of the present invention, the system includes the following parts:
[0044] Data preprocessing module, nonlinear mapping parameter generation module, nonlinear mapping function module, mask matrix generation module, data encryption module, mask matrix distribution storage module, data decryption module;
[0045] The data preprocessing module preprocesses the original transaction data. The preprocessing includes two parts: one part is to perform standardization, hashing and data vectorization on the original transaction data to generate and output data vectors; the other part is to generate and output random seeds; the data preprocessing module is connected to the nonlinear mapping parameter generation module and the nonlinear mapping function module by means of data transmission;
[0046] The nonlinear mapping parameter generation module receives a random seed, introduces a multi-parameter nonlinear segmented mapping mechanism, divides the random seed into three segments according to a fixed length by cutting the bit sequence of the random seed, and then performs calculations to generate and output nonlinear mapping control parameters; the nonlinear mapping parameter generation module is connected to the nonlinear mapping function module and the mask matrix generation module by means of data transmission;
[0047] The nonlinear mapping function module receives the data vector and the nonlinear mapping control parameter; based on the nonlinear mapping control parameter, constructs a nonlinear mapping function, performs nonlinear mapping processing on the data vector, obtains the mapped data vector and outputs it; the nonlinear mapping function module is connected to the mask matrix generation module by means of data transmission;
[0048] The mask matrix generation module receives the mapping data vector and the nonlinear mapping control parameter; generates and outputs the mask matrix based on the mapping data vector; the mask matrix generation module is connected to the mask matrix distribution storage module and the data encryption module by means of data transmission;
[0049] The data encryption module receives the mask matrix, uses the elements in the mask matrix as keys, adopts the AES symmetric encryption algorithm to encrypt the original transaction data, generates encrypted data, and stores the encrypted data on the blockchain or transmits it over the network; the data encryption module is connected to the data decryption module by means of data transmission;
[0050] The mask matrix distribution storage module receives the mask matrix, divides the mask matrix into multiple sub-matrices, and distributes and stores them on multiple blockchain nodes to enhance data security; the mask matrix can be divided by row or by column according to storage requirements (such as the number of blockchain nodes, security requirements, etc.), and the divided sub-matrices are stored on different blockchain nodes respectively; the mask matrix distribution storage module is connected to the data decryption module by means of data transmission;
[0051] The data decryption module is responsible for collecting distributed and stored sub-matrices from blockchain nodes and splicing them into a complete mask matrix; using the elements in the spliced mask matrix as the key, decrypting the encrypted data through the AES symmetric encryption algorithm to restore the original transaction data.
[0052] Refer to the attached Figure 2 , which shows a flow chart of a blockchain data privacy protection method provided by an embodiment of the present invention, the method comprising the following steps:
[0053] S1: Receive and preprocess the original transaction data to generate data vectors and random seeds; introduce a multi-parameter nonlinear segmented mapping mechanism to process the random seeds and generate nonlinear mapping control parameters; based on the nonlinear mapping control parameters, construct a nonlinear mapping function, perform nonlinear mapping processing on the data vector, and generate a mapping data vector;
[0054] First, receive the original transaction data from the user, including the transaction amount, timestamp, sender and receiver addresses, etc.; then preprocess the original transaction data. The preprocessing includes two parts. One part is to standardize, hash, and vectorize the original transaction data to generate a data vector; the other part is to generate a random seed. Specifically, the original transaction data in different formats are standardized through standardization, such as converting the timestamp into a unified global standard time format, and converting the amount into the same currency unit to obtain the standardized original transaction data; based on the standardized original transaction data, hash processing is used to protect sensitive user information, such as hashing and encrypting the sender and receiver addresses through the SHA-256 hash algorithm to ensure that user privacy information will not be directly exposed on the blockchain, and the hashed original transaction data is obtained; through data vectorization, the hashed original transaction data is converted into a vector form to obtain the preprocessed transaction data; the preprocessed transaction data is represented in vector form as Where D is the data vector, d1, d2, ..., d n is the data point, n is the dimension of the data vector, and T is the transposed sign;
[0055] Get the timestamp of the current block and the hash value of the previous block, add the timestamp of the current block to the hash value of the previous block, and input them into the SHA-256 hash algorithm for encryption to generate a random seed; the random seed is a 256-bit bit sequence generated by the hash algorithm, which is used to provide randomness and unpredictability for the data privacy protection process. The above preprocessing process is a prior art and will not be described in detail here.
[0056] The embodiment of the present invention introduces a multi-parameter nonlinear segmented mapping mechanism to process random seeds; specifically, the bit sequence of the random seed is cut according to a fixed length, divided into three segments and then processed, and the generated parameters (mapping ratio parameter, exponent adjustment parameter, offset adjustment parameter) are used as nonlinear mapping control parameters for subsequent construction of a nonlinear mapping function.
[0057] The mapping scale parameter formula is as follows:
[0058]
[0059] Among them, α is the mapping ratio parameter, which is generated by the first 86 bits of the random seed through calculation, and is used to increase the randomness and unpredictability of the encryption process; C α is a constant factor of the mapping scale parameter α, which is used to adjust the numerical range of the mapping scale parameter and is set according to the specific implementation scenario; S is a random seed, which is a 256-bit bit sequence; int(·) is an operation to convert a bit sequence into a decimal integer; S[0:85] represents the first 86-bit bit sequence of the random seed S; is an exponential decay term, which is used to control the numerical range of the mapping scale parameter;
[0060] The formula for index adjustment parameters is as follows:
[0061]
[0062] Where β is the exponential adjustment parameter; C β It is a constant factor of the exponential adjustment parameter β, which is used to adjust the numerical range of the exponential adjustment parameter and is set according to the specific implementation scenario; S[86:171] represents the bit sequence of the random seed from the 86th to the 171th bit;
[0063] The offset adjustment parameter formula is as follows:
[0064]
[0065] Among them, γ is the offset adjustment parameter, which is used to introduce an offset in the encryption process to increase randomness and unpredictability; C γ It is a constant factor of the offset adjustment parameter γ, which is used to adjust the numerical range of the offset adjustment parameter and is set according to the specific implementation scenario; S[172:255] represents the bit sequence of the random seed from the 172th to the 255th bit;
[0066] By segmenting the random seed and combining it with bit operations to generate mapping ratio parameters, exponential adjustment parameters, and offset adjustment parameters, the complexity and unpredictability of data processing in the encryption process are increased. Compared with traditional linear or simple mapping methods, the multi-parameter nonlinear segmented mapping mechanism introduces mathematical operations such as logarithms, exponential decay, fractions, and power operations, so that the nonlinear mapping control parameters retain the nonlinear characteristics and can control the range of values through flexible constant adjustment, ensuring the randomness, crack resistance, and numerical stability of encryption, and can more effectively resist data leakage and attacks. By segmenting the bit sequence of the random seed, it is ensured that each nonlinear mapping control parameter is independently generated, further improving the security and uniqueness of the encryption process.
[0067] The nonlinear mapping function is constructed using the above nonlinear mapping control parameters to ensure the complexity and randomness of the mapping process and improve the anti-cracking ability of privacy protection;
[0068] The nonlinear mapping function formula is as follows:
[0069]
[0070] Where f is a nonlinear mapping function; f(x) is the mapping value generated by nonlinear mapping of the input data point x; x is the input data point of the nonlinear mapping function, which is derived from the data vector D= data points in; α is the mapping ratio parameter, which is a nonlinear mapping control parameter generated by a random seed and is used to control the ratio of data points in the nonlinear mapping function; β is the exponential adjustment parameter, which is a nonlinear mapping control parameter generated by a random seed; γ is the offset adjustment parameter, which is a nonlinear mapping control parameter generated by a random seed and is used to increase the offset of the data to enhance randomness; α·x·log(1+x 2 ) is used to enhance the nonlinear amplification effect of input data points; e -β·x Used to perform exponential decay on the input data points to control the amplitude of the input data points;
[0071] Using nonlinear mapping function formula to transform data vector After the data points in are processed by nonlinear mapping, the mapping data vector is obtained. where f(d1), f(d2), ..., f(d n ) is the mapped value.
[0072] S2: Based on the mapped data vector, a mask matrix is constructed; the mask matrix elements are used as keys to encrypt the original transaction data; a mask matrix distributed storage mechanism is introduced to divide the mask matrix into sub-matrices and store them; the original transaction data is decrypted by restoring the mask matrix.
[0073] Based on the mapping data vector, a mask matrix M is constructed to encrypt the original transaction data. The elements of the mask matrix are generated through a nonlinear mapping function, combined with mapping ratio parameters, exponential adjustment parameters, and offset adjustment parameters to ensure the complexity and randomness of the encryption process. The mask matrix elements are used as keys to encrypt the original transaction data through the AES symmetric encryption algorithm to ensure the privacy and security of the transaction data when it is stored on the blockchain, preventing unauthorized access and attacks.
[0074] The mask matrix elements are calculated as follows:
[0075]
[0076] Among them, m ij is the mask matrix element, which represents the element value of the i-th row and j-th column in the mask matrix; i is the row index of the mask matrix; j is the column index of the mask matrix; f(d i ) is the input data point d i The mapping value obtained by nonlinear mapping; d i is the i-th data point in the data vector; k is the counting variable in the summation, indicating the index of the data point; n is the dimension of the data vector, indicating the total number of data points; d k is the kth data point of the data vector; α is the mapping scale parameter, which is generated by a random seed; β is the exponential adjustment parameter, which is generated by a random seed; γ is the offset adjustment parameter, which is generated by a random seed; d j is the,th data point of the data vector;
[0077] Based on the i-th data point d of the data vector i , randomly select a mask matrix element m from the i-th row of the mask matrix ij As the key of the AES symmetric encryption algorithm, the original transaction data is encrypted to obtain encrypted data, which can be stored on the blockchain or transmitted over the network. The random selection mechanism is selected according to the specific implementation scenario, and the randomly selected column index value j is recorded, and the column index value and the encrypted data are packaged and stored. The symmetric encryption algorithm is a prior art and will not be described in detail here.
[0078] In order to enhance data security, the embodiment of the present invention introduces a mask matrix distribution storage mechanism, which splits the mask matrix into multiple sub-matrices and distributes them to blockchain nodes for storage, further enhancing data security. When data decryption is required, the complete mask matrix is restored from each blockchain node for decryption. The mask matrix distribution storage mechanism avoids potential security risks caused by the centralized storage of the mask matrix, and prevents the attacker from obtaining the complete mask matrix when a single blockchain node storing the mask matrix is leaked or attacked;
[0079] Specifically, after generating the complete mask matrix M, the mask matrix is first divided into several sub-matrices by row or column, and each sub-matrix stores different parts of the mask matrix elements. The specific division method can be set according to the number of blockchain nodes or security requirements. For example, the mask matrix is distributed to 3 blockchain nodes, and the mask matrix is divided into three sub-matrices M1, M2 and M3 by column, each sub-matrix contains several columns of mask matrix elements; after dividing the mask matrix, the sub-matrices are stored in the blockchain nodes respectively. Each blockchain node only stores the corresponding sub-matrix, ensuring that even if a blockchain node is attacked or leaked, the attacker cannot obtain the complete mask matrix through a single blockchain node, and thus cannot crack the original transaction data, thereby improving the security of data privacy.
[0080] When the original transaction data needs to be restored, the stored sub-matrices are collected from each blockchain node and spliced to restore the complete mask matrix. The splicing process is performed according to the division method during storage; for example, the mask matrix is divided by column division, and the splicing process splices the sub-matrices in column order to restore the complete mask matrix.
[0081] The distributed storage mechanism of the mask matrix ensures the security and privacy of the data. The complete mask matrix can only be restored after all sub-matrices are collected and spliced. Even if an attacker obtains the data of some sub-matrices or individual blockchain nodes, he cannot decrypt the entire transaction data, which effectively enhances the anti-attack and data protection capabilities of privacy protection;
[0082] Finally, using the column index value packaged with the encrypted data, select the mask matrix element from the restored mask matrix as the key, and use the same symmetric decryption algorithm as encryption, that is, the AES symmetric decryption algorithm, to decrypt the encrypted data and restore the original transaction data for further analysis, transaction verification, risk assessment or other business needs.
[0083] In summary, a blockchain data privacy protection system is completed.
[0084] The order of the embodiments of the invention is for description only and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0085] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
[0086] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that the technical solutions described in the above embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention.
Claims
1. A blockchain data privacy protection method, characterized in that: The following steps are involved: S1: Receive and preprocess the original transaction data to generate data vectors and random seeds; introduce a multi-parameter nonlinear segmented mapping mechanism to process the random seeds and generate nonlinear mapping control parameters; based on the nonlinear mapping control parameters, construct a nonlinear mapping function, perform nonlinear mapping processing on the data vector, and generate a mapping data vector; S2: construct a mask matrix based on the mapped data vector; The mask matrix elements are used as keys to encrypt the original transaction data. A mask matrix distributed storage mechanism is introduced to divide the mask matrix into sub-matrices and store them. By restoring the mask matrix, the original transaction data is decrypted.
2. A blockchain data privacy protection method according to claim 1, characterized in that: The S1 specifically includes: The preprocessing includes two parts. One part is to perform standardization, hashing and data vectorization on the original transaction data to generate a data vector; the other part is to generate a random seed by combining the timestamp of the current block and the hash value of the previous block.
3. A blockchain data privacy protection method according to claim 2, characterized in that: The S1 specifically includes: A multi-parameter nonlinear segmented mapping mechanism is introduced. The random seed is segmented by cutting the bit sequence of the random seed, and the nonlinear mapping control parameters are generated by combining bit operations. The nonlinear mapping control parameters include mapping ratio parameters, exponential adjustment parameters and offset adjustment parameters.
4. A blockchain data privacy protection method according to claim 3, characterized in that: The S1 specifically includes: Based on the nonlinear mapping control parameters, a nonlinear mapping function is constructed; each data point in the data vector is subjected to nonlinear mapping processing by the nonlinear mapping function to obtain a mapping data vector; the formula of the nonlinear mapping function is as follows: Wherein, f is a nonlinear mapping function; f(x) is the mapping value generated by nonlinear mapping of the input data point x; x is the input data point of the nonlinear mapping function, which comes from the data vector; α is the mapping ratio parameter; β is the exponential adjustment parameter; and γ is the offset adjustment parameter.
5. A blockchain data privacy protection method according to claim 4, characterized in that: The S2 specifically includes: Based on the mapping data vector, the mask matrix is constructed by combining the mapping scale parameter, the exponent adjustment parameter and the offset adjustment parameter; the calculation formula of the mask matrix elements is as follows: Among them, m ij is the mask matrix element, which represents the element value of the i-th row and j-th column in the mask matrix; i is the row index of the mask matrix; j is the column index of the mask matrix; f(d i ) is the input data point d i The mapping value obtained by nonlinear mapping; d i is the i-th data point in the data vector; k is the counting variable in the summation, indicating the index of the data point; n is the dimension of the data vector; d k is the kth data point of the data vector; α is the mapping scale parameter; β is the exponential adjustment parameter; γ is the offset adjustment parameter; d j is the jth data point in the data vector.
6. A blockchain data privacy protection method according to claim 5, characterized in that: The S2 specifically includes: Based on the data points of the data vector, a mask matrix element is randomly selected from the elements of the corresponding row of the mask matrix as the key, and the original transaction data is encrypted to obtain encrypted data; the randomly selected column index value is recorded, and the column index value and the encrypted data are packaged and stored.
7. A blockchain data privacy protection method according to claim 6, characterized in that: The S2 specifically includes: A mask matrix distributed storage mechanism is introduced to divide the mask matrix into sub-matrices and distribute them to blockchain nodes for storage. When data decryption is required, the mask matrix is restored from each blockchain node. Based on the column index value stored packaged with the encrypted data, the mask matrix element is selected from the restored mask matrix as the key, and the encrypted data is decrypted using the same symmetric decryption algorithm as that used for encryption to restore the original transaction data.
8. A blockchain data privacy protection system, applied to a blockchain data privacy protection method as claimed in claim 1, characterized in that: Includes the following sections: Data preprocessing module, nonlinear mapping parameter generation module, nonlinear mapping function module, mask matrix generation module, data encryption module, mask matrix distribution storage module, data decryption module; The data preprocessing module preprocesses the original transaction data. The preprocessing includes two parts: one is to perform standardization, hashing and data vectorization on the original transaction data to generate and output data vectors; the other is to generate and output random seeds; The data preprocessing module is connected with the nonlinear mapping parameter generation module and the nonlinear mapping function module by means of data transmission; The nonlinear mapping parameter generation module receives a random seed, introduces a multi-parameter nonlinear segmented mapping mechanism, performs segmented processing on the random seed by cutting the bit sequence of the random seed, generates and outputs a nonlinear mapping control parameter; the nonlinear mapping parameter generation module is connected to the nonlinear mapping function module and the mask matrix generation module by means of data transmission; The nonlinear mapping function module receives a data vector and a nonlinear mapping control parameter; based on the nonlinear mapping control parameter, constructs a nonlinear mapping function, performs nonlinear mapping processing on the data vector, obtains a mapping data vector and outputs it; The nonlinear mapping function module is connected with the mask matrix generation module through data transmission; The mask matrix generation module receives a mapping data vector and a nonlinear mapping control parameter; generates a mask matrix based on the mapping data vector and outputs the mask matrix; The mask matrix generation module is connected with the mask matrix distribution storage module and the data encryption module by means of data transmission; The data encryption module receives the mask matrix, uses the elements in the mask matrix as keys, adopts the AES symmetric encryption algorithm to encrypt the original transaction data, generates encrypted data, and stores and transmits the encrypted data; The data encryption module is connected to the data decryption module by means of data transmission; The mask matrix distribution storage module receives the mask matrix, divides the mask matrix into sub-matrices, and performs distributed storage; the mask matrix distribution storage module is connected to the data decryption module by means of data transmission; The data decryption module is responsible for collecting distributed and stored sub-matrices from blockchain nodes and splicing them into a complete mask matrix; using the elements in the spliced mask matrix as the key, decrypting the encrypted data through the AES symmetric encryption algorithm to restore the original transaction data.