Block chain-based power data privacy protection method
By using the binary tree structure to generate a mapped password sequence in user login information, the risks existing in existing key encryption methods are solved, the security of user information and the overall security of the system are improved, and the privacy protection of power data is ensured.
Patent Information
- Application Number
- CN202411085015.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-08
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2044-08-08
AI Technical Summary
The existing key encryption methods are risky in the storage and management of user login information, which can easily lead to user information leakage and security threats, especially when the server is illegally accessed.
By creating binary trees related to uppercase English letters, lowercase English letters and numbers, and generating mapped password sequences in combination with characters in the registered password, and only the converted mapped password sequence is stored in the system, depending on the depth, number of layers and direction of the binary tree , increasing the randomness and complexity of passwords and reducing key dependence.
It improves the storage security of registered passwords, enhances the protection of user information, ensures that only authorized users can access power data, and improves the overall security of the system.
Smart Images

Figure CN119203206A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data protection technology, and in particular to a power data privacy protection method based on blockchain. Background Art
[0002] At present, with the rapid increase in the amount of power data, the traditional centralized management model can no longer meet the needs of efficient and secure data management. Therefore, the use of advanced blockchain technology to split power data and store it in multiple cloud servers has become an effective means to ensure data integrity and traceability. At the same time, in order to better manage and control user access to data and improve security and convenience, a unified resource management platform has been built. The platform not only has efficient data indexing and retrieval functions, but also can monitor data access rights in real time. By setting a unified login authentication, the management of power data is more convenient, ensuring that every data interaction is authorized and encrypted. However, this puts forward higher requirements on the storage security of authentication information of the unified resource management platform, especially in the encryption of user login information. The existing key encryption method has certain risks. At present, the user login information is encrypted in the form of a key. This encryption method requires the encrypted user information and the corresponding encryption key to be stored on the server. This practice undoubtedly increases the risk of user login information leakage, because once the key is leaked or the server is illegally accessed, the encrypted user information may be cracked, thereby threatening the user's information security; In order to solve the above problems, the present invention proposes a solution. Summary of the invention
[0003] The purpose of the present invention is to provide a blockchain-based power data privacy protection method to solve the problems raised in the above background technology.
[0004] The purpose of the present invention can be achieved through the following technical solutions: A method for protecting power data privacy based on blockchain, comprising the following steps: Step 1: The registration unit obtains the registration information entered by the current pre-registered user, the registration information including the registration name and registration password; Step 2: The account management unit creates binary trees related to uppercase English letters, lowercase English letters and numbers according to 26 uppercase and lowercase English letters and 10 numbers 0, 1, ..., 9; Step 3: After receiving the registration information typed by the current pre-registered user, the account management unit extracts the account password carried therein, and generates a mapping password sequence for the current pre-registered user according to the uppercase and lowercase English letters and numeric characters that constitute the account password and the binary tree related to uppercase English letters, lowercase English letters and numbers in accordance with the preset privacy management rules.
[0005] Furthermore, after completing step 3, you need to complete the following steps: The account management unit stores the account name carried in the registration information keyed in by the current pre-registered user together with the mapped password sequence of the current pre-registered user as the authentication account information of the current pre-registered user.
[0006] Furthermore, the login unit obtains the login information entered by the current pre-logged-in user, the login information including the login name and login password, and the account management unit authenticates the login information entered by the current pre-logged-in user. After the authentication is passed, the resource management unit opens data permissions to the current pre-logged-in user, allowing him to operate the power data of the current pre-logged-in user stored in several cloud servers.
[0007] Furthermore, the steps of creating binary trees related to uppercase English letters, lowercase English letters and numbers are as follows: S11: Create a binary tree related to uppercase English letters according to a preset uppercase creation rule. The uppercase creation rule is as follows: S111: Use the newNode() function to create 26 new nodes in sequence, and each new node is mapped to the uppercase English characters A, B, ..., Z in the order in which it is created; S112: The new node mapped to A is used as the root node, and the new nodes mapped to B and C are used as the left and right child nodes of the root node respectively; S113: Then D and E are respectively used as the left and right child nodes of the new node mapped to B, and F and G are respectively used as the left and right child nodes of the new node mapped to C; S114: Then, H and I are respectively used as the left and right child nodes of the new node mapped to D, J and K are respectively used as the left and right child nodes of the new node mapped to E, L and M are respectively used as the left and right child nodes of the new node mapped to F, and N and O are respectively used as the left and right child nodes of the new node mapped to G; S115: Finally, P and Q are used as the left and right child nodes of the new node mapped to H, R and S are used as the left and right child nodes of the new node mapped to I, T and U are used as the left and right child nodes of the new node mapped to J, V and W are used as the left and right child nodes of the new node mapped to K, X and Y are used as the left and right child nodes of the new node mapped to L, and Z is used as the left child node of the new node mapped to M. After the creation is completed, a binary tree related to uppercase English letters is obtained; S12: Creating a binary tree related to lowercase English letters according to a preset lowercase creation rule; S13: Create a binary tree related to numbers according to a preset number creation rule, the number creation rule is as follows: S131: Use the newNode() function to create 10 new nodes in sequence, and each new node is mapped to the digital characters 0, 1, ..., 9 in the order in which it is created; S132: The new node mapped to 0 is used as the root node, and the new nodes mapped to 1 and 2 are used as the left and right child nodes of the root node respectively; S133: Then 3 and 4 are respectively used as the left and right child nodes of the new node mapped to 1, and 5 and 6 are respectively used as the left and right child nodes of the new node mapped to 2; S134: Finally, 7 and 8 are respectively used as the left and right child nodes of the new node mapped to 5, and 9 is used as the left child node of the new node mapped to 6. After the creation is completed, a binary tree related to the numbers is obtained.
[0008] Beneficial effects of the present invention: (1) The present invention obtains registration information by setting a registration unit, and the account management unit generates a corresponding mapping password sequence according to the registration password in the registration information. In this process, a binary tree related to uppercase English letters, lowercase English letters and numbers is created, and each uppercase letter, lowercase letter and number character contained in the registration password is combined to provide a unique mapping code for each character. In this way, the registration password is not stored in plain text in the system, and the conversion of the registration password depends on the conversion logic and does not need to rely on specific data, such as keys. Therefore, the storage of the registration password only needs to store the converted mapping password sequence and does not need to store the remaining data, making the storage of the registration password in the system more secure, further ensuring the privacy of the user's power data; (2) The present invention combines a binary tree structure to obtain the mapping codes of uppercase and lowercase English letters in the registration password. The process only depends on the depth, number of layers and direction of the new nodes corresponding to the uppercase and lowercase English letters in the registration password in the binary tree. Combined with the characteristics of the binary tree, different characters may have consistent mapping codes. Even if the password is leaked, the third party cannot infer the conversion logic of the mapping code through the leaked password. In the process of obtaining the mapping code of the digital characters in the registration password, the difference between the two numbers is used as the positioning feature after the binary tree rotation, which strengthens the strong correlation of the numbers in the registration password. The positioning process of each digital character is based on the characteristics of its own character combined with the rotation of the original binary tree. This method not only increases the randomness and complexity of the mapping code, but also improves the security of the entire password system. (3) The present invention sets a login unit to obtain the corresponding login information of the user during the user login process, and the account management unit performs authentication and comparison on it. Only after the comparison is passed will the corresponding power data operation permission be opened to the user. This process not only improves the security of the system, but also ensures that only authorized users can access sensitive data. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] The present invention will be further described below in conjunction with the accompanying drawings.
[0010] Figure 1 It is a flow chart of securely storing the registration information of a registered user according to the present invention; Figure 2 It is a system block diagram of the present invention. DETAILED DESCRIPTION
[0011] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0012] like Figure 1 , 2 As shown, a power data privacy protection method based on blockchain includes a registration and login module and a unified resource management platform; A registration and login module is used for trusted users to register and log in to the unified resource management platform. The registration and login module includes a registration unit and a login unit; A registration unit, used for a user to register an account on a unified resource management platform. The registration unit obtains the registration information entered by the current pre-registered user and transmits it to the unified resource management platform. The registration information includes a registration name and a registration password. In this embodiment, the registration password is composed of uppercase and lowercase letters and numbers, and the number of digits is between 14 and 16; A unified resource management platform, used to securely manage the power data of trusted users, including an account management unit and a resource management unit; After receiving the registration information entered by the current pre-registered user, the unified resource management platform transmits it to the account management unit; After receiving the transmitted registration information of the current pre-registered user, the account management unit securely stores the registration information according to the preset privacy management rules. The privacy management rules are as follows: S11: Create a binary tree related to uppercase English letters according to a preset uppercase creation rule. The uppercase creation rule is as follows: S111: Use the newNode() function to create 26 new nodes in sequence, and each new node is mapped to the uppercase English characters A, B, ..., Z in the order in which it is created; S112: The new node mapped to A is used as the root node, and the new nodes mapped to B and C are used as the left and right child nodes of the root node respectively; S113: Then D and E are respectively used as the left and right child nodes of the new node mapped to B, and F and G are respectively used as the left and right child nodes of the new node mapped to C; S114: Then, H and I are respectively used as the left and right child nodes of the new node mapped to D, J and K are respectively used as the left and right child nodes of the new node mapped to E, L and M are respectively used as the left and right child nodes of the new node mapped to F, and N and O are respectively used as the left and right child nodes of the new node mapped to G; S115: Finally, P and Q are used as the left and right child nodes of the new node mapped to H, R and S are used as the left and right child nodes of the new node mapped to I, T and U are used as the left and right child nodes of the new node mapped to J, V and W are used as the left and right child nodes of the new node mapped to K, X and Y are used as the left and right child nodes of the new node mapped to L, and Z is used as the left child node of the new node mapped to M; After the creation is completed, a binary tree related to uppercase English letters is obtained. At this time, all new nodes of the binary tree are read by layer-order traversal, and the reading order is the new nodes mapped to A, B, ..., Z; S12: Create a binary tree related to lowercase English letters according to the preset lowercase creation rule. The lowercase creation rule is as follows: S121: Use the newNode() function to create 26 new nodes in sequence, and each new node is mapped to lowercase English characters a, b, ..., z in the order in which it is created; S122: The new node mapped to a is used as the root node, and the new nodes mapped to b and c are used as the left and right child nodes of the root node respectively; S123: Then d and e are respectively used as the left and right child nodes of the new node mapped to b, and f and g are respectively used as the left and right child nodes of the new node mapped to c; S124: Then, h and i are respectively used as the left and right child nodes of the new node mapped to d, j and k are respectively used as the left and right child nodes of the new node mapped to e, l and m are respectively used as the left and right child nodes of the new node mapped to f, and n and o are respectively used as the left and right child nodes of the new node mapped to g; S125: Finally, p and q are respectively used as the left and right child nodes of the new node mapped to h, r and s are respectively used as the left and right child nodes of the new node mapped to i, t and u are respectively used as the left and right child nodes of the new node mapped to j, v and w are respectively used as the left and right child nodes of the new node mapped to k, x and y are respectively used as the left and right child nodes of the new node mapped to l, and z is used as the left child node of the new node mapped to m; After the creation is completed, a binary tree related to lowercase English letters is obtained. At this time, all new nodes of the binary tree are read by level-order traversal, and the reading order is the new nodes mapped to a, b, ..., z; S13: Create a binary tree related to numbers according to a preset number creation rule, the number creation rule is as follows: S131: Use the newNode() function to create 10 new nodes in sequence, and each new node is mapped to the digital characters 0, 1, ..., 9 in the order in which it is created; S132: The new node mapped to 0 is used as the root node, and the new nodes mapped to 1 and 2 are used as the left and right child nodes of the root node respectively; S133: Then 3 and 4 are respectively used as the left and right child nodes of the new node mapped to 1, and 5 and 6 are respectively used as the left and right child nodes of the new node mapped to 2; S134: Finally, 7 and 8 are respectively used as the left and right child nodes of the new node mapped to 5, and 9 is used as the left child node of the new node mapped to 6; After the creation is completed, a binary tree related to the number is obtained. At this time, all new nodes of the binary tree are read by layer-order traversal, and the reading order is the new nodes mapped to 0, 1, ..., 9; S14: according to the order in which the characters in the registration password are typed, all the uppercase English letters in the registration password are marked as A1, A2, ..., Aa, all the lowercase English letters in the registration password are marked as B1, B2, ..., Bb, and all the numeric characters in the registration password are marked as C1, C2, ..., Cc, where a, b, and c in the marking are the total number of uppercase English letters, lowercase English letters, and numeric characters in the registration password respectively; S15: Calculate and obtain mapping codes of uppercase English letters A1, A2, ..., Aa according to a preset letter calculation rule. The letter calculation rule is as follows: S151: traverse the binary tree related to uppercase English letters, obtain a new node mapped to the uppercase English letter A1, and determine the left and right child nodes of the new node; If the new node is the left child of a new node, the binary number 10 is used as the direction string of the new node, otherwise the binary number 11 is used as the direction string of the new node; The binary numbers 10 and 11 are used to assist the computer to distinguish the left and right child nodes in the binary tree related to uppercase English letters; S152: Obtain the number of layers D1 and the depth E1 of the new node in the binary tree, calculate and obtain the position feature value F1 of the new node using the formula F1=D1×E1, perform binary conversion on F1, and obtain the position string of the new node; S153: Concatenate the direction string and the position string of the new node to obtain a mapping code of the uppercase English letter, wherein the direction string is placed first and the position string is placed second during the concatenation process; S154: According to S151 to S153, the mapping codes of the uppercase English letters A2, ..., Aa are calculated in sequence; S16: According to S15, the mapping codes of the lowercase English letters B1, B2, ..., Bb are calculated in sequence, wherein the process of calculating the mapping codes of the lowercase English letters is to traverse the binary tree related to the lowercase English letters; When obtaining new nodes mapped to lowercase English letters B1, B2, ..., Bb from the binary tree and determining the left and right child nodes thereof, if the new node is the left child of a certain new node, the binary number 00 is used as the direction string of the new node, otherwise the binary number 01 is used as the direction string of the new node; S17: Calculate and obtain mapping codes of digital characters C1, C2, ..., Cc according to a preset digital calculation rule. The digital calculation rule is as follows: S171: Traverse the binary tree related to numbers, obtain the layer number G1 and depth H1 of the new node mapped to the numeric character C1 from it, calculate and obtain the position feature value I1 of the new node using the formula I1 = G1 × H1, and perform binary conversion on I1 to obtain the mapping code of the numeric character C1; S172: Compare the sizes of C1 and C2, and obtain the mapping code of the numeric character C2 based on the comparison result: S21: If C1 ≥ C2, first calculate and obtain the rotation feature record value J1 of the binary tree based on the numeric character C2 using the formula J1 = C1 - C2; Then perform several rotations on the binary tree to obtain the binary tree based on the numeric character C2 until the new node mapped to the numeric character C2 serves as the root node of the binary tree, and record the number of rotations K1 at this time; Obtain the layer number G2 and depth H2 of the new node mapped to the rotation feature record value J1 in the binary tree based on the numeric character C2 at this time, calculate and obtain the position feature value I2 of the new node using the formula I2 = G2 × H2, splice I2 and K1, and perform binary conversion on the spliced result to obtain the mapping code of the numeric character C2; S22: If C1 < C2, first calculate and obtain the rotation feature record value J1 of the binary tree based on the numeric character C2 using the formula J1 = C2 - C1; Then perform several rotations on the binary tree to obtain the binary tree based on the numeric character C2 until the new node mapped to the numeric character C2 serves as the root node of the binary tree, and record the number of rotations K1 at this time; Obtain the layer number G2 and depth H2 of the new node mapped to the rotation feature record value J1 in the binary tree based on the numeric character C2 at this time, calculate and obtain the position feature value I2 of the new node using the formula I2 = G2 × H2, splice I2 and K1, and perform binary conversion on the spliced result to obtain the mapping code of the numeric character C2; S173: According to S172, compare the sizes of C1 and C3, C1 and C4,..., C1 and Cc in sequence, and obtain the mapping codes of the numeric characters C3, C4,..., Cc based on the comparison results correspondingly. It should be noted here that when rotating to obtain the binary tree based on the corresponding numeric character after comparison, it is based on the initial binary tree, that is, all rotations are performed according to the binary tree related to numbers; S18: Splice the mapping codes of each character in the registration password in the order of input of each character to obtain the mapping password sequence of the current pre-registered user; The account management unit securely stores the registration name and mapping password sequence of the current pre-registered user as the authentication account information of the pre-registered user; After the current pre-login user enters the login information, the login unit obtains it and transmits it to the unified resource management platform. The login information includes the login name and login password; After receiving the transmitted login information, the unified resource management platform extracts the login password contained therein and generates a mapping password sequence of the trusted user according to the preset privacy management rules; Then, a login name is extracted from the login information, and a mapping password sequence corresponding to a registration name consistent with the login name is obtained from the account management unit according to the login name, and the mapping password sequence is compared with the mapping password sequence of the trusted user for consistency. If the comparison is successful, an authentication pass instruction is generated and transmitted to the resource management unit; After receiving the transmitted authentication instruction, the resource management unit opens data permissions to the pre-logged-in user, allowing the pre-logged-in user to operate the power data of the trusted user stored in several cloud servers, and the operation types include viewing, adding, deleting, modifying, etc.; In the description of the specification, the description with reference to the terms "one embodiment", "example", "specific example", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0013] The above contents are merely examples and explanations of the present invention. Those skilled in the art may make various modifications or additions to the specific embodiments described or replace them in a similar manner. As long as they do not deviate from the invention or exceed the scope defined by the claims, they shall all fall within the protection scope of the present invention.
[0014] The above is a detailed description of an embodiment of the present invention, but the content is only a preferred embodiment of the present invention and cannot be considered to limit the scope of implementation of the present invention. All equivalent changes and improvements made within the scope of the present invention should still fall within the scope of the patent coverage of the present invention.
Claims
1. A method for protecting power data privacy based on blockchain, characterized in that: The following steps are involved: Step 1: The registration unit obtains the registration information entered by the current pre-registered user, the registration information including the registration name and registration password; Step 2: The account management unit creates binary trees related to uppercase English letters, lowercase English letters and numbers according to 26 uppercase and lowercase English letters and 10 numbers 0, 1, ..., 9; Step 3: After receiving the registration information typed by the current pre-registered user, the account management unit extracts the account password carried therein, and generates a mapping password sequence for the current pre-registered user according to the uppercase and lowercase English letters and numeric characters that constitute the account password and the binary tree related to uppercase English letters, lowercase English letters and numbers in accordance with the preset privacy management rules.
2. According to a blockchain-based power data privacy protection method according to claim 1, it is characterized in that: The registration password consists of uppercase and lowercase letters and numbers, and the character length is 14 to 16 characters.
3. According to a blockchain-based power data privacy protection method according to claim 1, it is characterized in that: After completing step 3, you need to complete the following steps: The account management unit stores the account name carried in the registration information keyed in by the current pre-registered user together with the mapped password sequence of the current pre-registered user as the authentication account information of the current pre-registered user.
4. According to a blockchain-based power data privacy protection method according to claim 1, it is characterized in that: The login unit obtains the login information entered by the current pre-logged-in user, the login information including the login name and login password. The account management unit authenticates the login information entered by the current pre-logged-in user. After the authentication is passed, the resource management unit opens data permissions to the current pre-logged-in user, allowing him to operate the power data of the current pre-logged-in user stored in several cloud servers.
5. According to a blockchain-based power data privacy protection method according to claim 1, it is characterized in that: The steps to create binary trees for uppercase English letters, lowercase English letters, and numbers are as follows: S11: Create a binary tree related to uppercase English letters according to a preset uppercase creation rule. The uppercase creation rule is as follows: S111: Use the newNode() function to create 26 new nodes in sequence, and each new node is mapped to the uppercase English characters A, B, ..., Z in the order in which it is created; S112: The new node mapped to A is used as the root node, and the new nodes mapped to B and C are used as the left and right child nodes of the root node respectively; S113: Then D and E are respectively used as the left and right child nodes of the new node mapped to B, and F and G are respectively used as the left and right child nodes of the new node mapped to C; S114: Then, H and I are respectively used as the left and right child nodes of the new node mapped to D, J and K are respectively used as the left and right child nodes of the new node mapped to E, L and M are respectively used as the left and right child nodes of the new node mapped to F, and N and O are respectively used as the left and right child nodes of the new node mapped to G; S115: Finally, P and Q are used as the left and right child nodes of the new node mapped to H, R and S are used as the left and right child nodes of the new node mapped to I, T and U are used as the left and right child nodes of the new node mapped to J, V and W are used as the left and right child nodes of the new node mapped to K, X and Y are used as the left and right child nodes of the new node mapped to L, and Z is used as the left child node of the new node mapped to M. After the creation is completed, a binary tree related to uppercase English letters is obtained; S12: Creating a binary tree related to lowercase English letters according to a preset lowercase creation rule; S13: Create a binary tree related to numbers according to a preset number creation rule, the number creation rule is as follows: S131: Use the newNode() function to create 10 new nodes in sequence, and each new node is mapped to the digital characters 0, 1, ..., 9 in the order in which it is created; S132: The new node mapped to 0 is used as the root node, and the new nodes mapped to 1 and 2 are used as the left and right child nodes of the root node respectively; S133: Then 3 and 4 are respectively used as the left and right child nodes of the new node mapped to 1, and 5 and 6 are respectively used as the left and right child nodes of the new node mapped to 2; S134: Finally, 7 and 8 are respectively used as the left and right child nodes of the new node mapped to 5, and 9 is used as the left child node of the new node mapped to 6. After the creation is completed, a binary tree related to the numbers is obtained.
6. According to a blockchain-based power data privacy protection method according to claim 1, it is characterized in that: The privacy management rules for generating the mapped password sequence of the current pre-registered user are as follows: S14: according to the order in which the characters in the registration password are typed, all the uppercase English letters in the registration password are marked as A1, A2, ..., Aa, all the lowercase English letters in the registration password are marked as B1, B2, ..., Bb, and all the numeric characters in the registration password are marked as C1, C2, ..., Cc, where a, b, and c in the marking are the total number of uppercase English letters, lowercase English letters, and numeric characters in the registration password respectively; S15: Calculate and obtain mapping codes of uppercase English letters A1, A2, ..., Aa according to a preset letter calculation rule. The letter calculation rule is as follows: S151: traverse the binary tree related to uppercase English letters, obtain a new node mapped to the uppercase English letter A1, and determine the left and right child nodes: if the new node is the left child of a new node, use the binary number 10 as the direction string of the new node, otherwise use the binary number 11 as the direction string of the new node; S152: Obtain the number of layers D1 and the depth E1 of the new node in the binary tree, calculate and obtain the position feature value F1 of the new node using the formula F1=D1×E1, perform binary conversion on F1, and obtain the position string of the new node; S153: concatenating the direction string and the position string of the new node to obtain a mapping code of the uppercase English letter, wherein the direction string is placed first and the position string is placed second during the concatenation process; S154: Calculate and obtain the mapping codes of capital English letters A2, ..., Aa in sequence according to S151 to S153; S16: Calculate and obtain the mapping codes of lowercase English letters B1, B2, ..., Bb in sequence according to S15, where in the process of calculating the mapping codes of lowercase English letters, the binary tree related to lowercase English letters is traversed; And when respectively obtaining new nodes mapped to lowercase English letters B1, B2, ..., Bb from the binary tree and determining their left and right child nodes, if the new node is the left child node of a certain new node, then use the binary number 00 as the direction string of the new node, otherwise use the binary number 01 as the direction string of the new node; S17: Calculate and obtain the mapping codes of numeric characters C1, C2, ..., Cc according to the preset numeric calculation rules; S18: Concatenate the mapping codes of each character in the registration password in the order of each character input to obtain the mapping password sequence of the current pre-registered user.
7. According to a blockchain-based power data privacy protection method according to claim 6, it is characterized in that: The numeric calculation rules for calculating and obtaining the mapping codes of numeric characters C1, C2, ..., Cc are as follows: S171: Traverse the binary tree related to numbers, obtain the layer number G1 and depth H1 of the new node mapped to numeric character C1 from it, calculate and obtain the position feature value I1 of the new node using the formula I1 = G1 × H1, and perform binary conversion on I1 to obtain the mapping code of numeric character C1; S172: Compare the magnitudes of C1 and C2, and obtain the mapping code of numeric character C2 based on the comparison result: S21: If C1 ≥ C2, first calculate and obtain the rotation feature record value J1 of the binary tree based on numeric character C2 using the formula J1 = C1 - C2; Then perform several rotations on the binary tree to obtain the binary tree based on numeric character C2 until the new node mapped to numeric character C2 becomes the root node of the binary tree, and record the number of rotations K1 at this time; Obtain the layer number G2 and depth H2 of the new node mapped to the rotation feature record value J1 in the binary tree based on numeric character C2 at this time, calculate and obtain the position feature value I2 of the new node using the formula I2 = G2 × H2, concatenate I2 and K1, and perform binary conversion on the concatenated result to obtain the mapping code of numeric character C2; S22: If C1 < C2, first calculate and obtain the rotation feature record value J1 of the binary tree based on numeric character C2 using the formula J1 = C2 - C1; Then perform several rotations on the binary tree to obtain the binary tree based on numeric character C2 until the new node mapped to numeric character C2 becomes the root node of the binary tree, and record the number of rotations K1 at this time; Obtain the layer number G2 and depth H2 of the new node mapped to the rotation feature record value J1 in the binary tree based on numeric character C2 at this time, calculate and obtain the position feature value I2 of the new node using the formula I2 = G2 × H2, concatenate I2 and K1, and perform binary conversion on the concatenated result to obtain the mapping code of numeric character C2; S173: According to S172, C1 and C3, C1 and C4, ..., C1 and Cc are compared in order, and mapping codes of the digital characters C3, C4, ..., Cc are obtained based on the comparison results.
8. According to a blockchain-based power data privacy protection method according to claim 7, it is characterized in that: In the above S173, when the binary tree based on the corresponding digital characters is obtained by rotation after the size comparison, the rotation is based on the binary tree related to the numbers.
Citation Information
Patent Citations
Data encryption method, data decryption method, data encryption device, data decryption device, and data encryption and decryption system
CN108075879A
Method and a system applied to sensitive information desensitization of an email address
CN109829335A
Mobile Web login password encryption method based on random image scheme
CN114329415A
Method for performing single access to user name, master password and secondary password for e.g. motor vehicle navigation application, involves using master and secondary passwords for access to respective first and second applications
DE102012008277A1
User authentication system
JP2022052398A
