Data processing method, device, equipment and storage medium for financial system

By using smart contracts and homomorphic encryption technology in the financial system, the problem of user asset information being publicly visible on the blockchain is solved, the privacy protection of property information is achieved, and the security and transparency of account operations are ensured.

CN111859409BActive Publication Date: 2024-11-26北京熠智科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010287297.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-04-14
Publication Date
2024-11-26
Estimated Expiration
2040-04-14

AI Technical Summary

Technical Problem

Although the blockchain smart contract technology based on Ethereum in the existing financial system ensures transparency and immutability, the contract variables are publicly visible to everyone, resulting in the leakage of user privacy information and lack of effective privacy protection solutions.

Method used

Smart contracts are used to link user asset information, and when asset information changes, homomorphic encryption and zero-knowledge proof technology can be used to achieve encryption protection of user asset information to ensure the privacy of account operations.

Benefits of technology

On the basis of ensuring basic account operations, privacy protection of user key property information is achieved, ensuring the security and transparency of asset information, and avoiding information leakage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111859409B_ABST
    Figure CN111859409B_ABST
Patent Text Reader

Abstract

The present application discloses a data processing method, device, equipment, and storage medium for a financial system, wherein the method includes using a smart contract to put user asset information in the financial system on the chain, wherein the user asset information includes at least one of the following: current account balance, income; when the user asset information changes through a trigger operation, the user asset information is encrypted based on the smart contract, wherein the trigger operation refers to an operation on the user's assets. This application solves the problem of achieving privacy protection of key user property information on the basis of ensuring basic account operations. It is achieved that encryption technology is used to achieve a high level of security protection of user privacy on the basis of realizing the basic functions of the financial system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of blockchain, and specifically, to a data processing method, device, equipment, and storage medium for a financial system. Background Art

[0002] Financial system, including salary payment, financial management, investment management, etc.

[0003] The blockchain smart contract technology based on Ethereum ensures the transparency and immutability of the entire execution process of the financial system, but at the same time the values ​​of all contract variables are publicly visible to everyone, which can easily lead to the leakage of user privacy information.

[0004] With regard to the relevant technologies, there is no effective solution yet on how to achieve privacy protection of users' key property information while ensuring basic account operations. Summary of the invention

[0005] The main purpose of this application is to provide a data processing method, device, equipment, and storage medium for a financial system to solve the problem of protecting the privacy of user key property information while ensuring basic account operations.

[0006] In order to achieve the above objective, according to a first aspect of the present application, a data processing method for a financial system is provided.

[0007] The data processing method for a financial system according to the present application includes: using a smart contract to put user asset information in a financial system on a chain, wherein the user asset information includes at least one of the following: current account balance, income; when the user asset information changes due to a trigger operation, encrypting the user asset information based on the smart contract, wherein the trigger operation refers to an operation performed on user assets.

[0008] Furthermore, when the user asset information changes through a triggering operation, the user asset information is encrypted based on the smart contract, including: when the user asset information changes through an income payment operation, the current account balance ciphertext and the income ciphertext are homomorphically encrypted based on the homomorphic encryption method in the smart contract.

[0009] Furthermore, when the user asset information changes through a triggering operation, the user asset information is encrypted based on the smart contract, including: when the user asset information changes through a real-time balance query operation, the current balance is obtained on the chain based on the smart contract, and the current balance is decrypted off-chain through a private key held by the user.

[0010] Furthermore, when the user asset information changes through a triggering operation, the user asset information is encrypted based on the smart contract, including: when the user asset information changes through a withdrawal operation, a zero-knowledge proof is generated based on a private key held by the user, and the correctness of the zero-knowledge proof is verified based on the smart contract; when the correctness verification of the zero-knowledge proof is passed, a transfer operation is executed.

[0011] In order to achieve the above objective, according to a second aspect of the present application, a data processing device for a financial system is provided.

[0012] The data processing device for a financial system according to the present application includes: an on-chain module, used to use a smart contract to put user asset information in the financial system on the chain, wherein the user asset information includes at least one of the following: current account balance, income; an encryption module, used to encrypt the user asset information based on the smart contract when the user asset information changes due to a trigger operation, wherein the trigger operation refers to an operation performed on the user assets.

[0013] Furthermore, the encryption module is used to homomorphically encrypt the current account balance ciphertext and the income ciphertext based on the homomorphic encryption method in the smart contract when the user asset information changes through the income payment operation.

[0014] Furthermore, the encryption module is used to obtain the current balance on the chain based on the smart contract when the user asset information changes through a real-time balance query operation, and to decrypt the current balance off-chain through a private key held by the user.

[0015] Furthermore, the encryption module is used to generate a zero-knowledge proof based on the private key held by the user when the user asset information changes through a withdrawal operation, and to verify the correctness of the zero-knowledge proof based on the smart contract; and to execute the transfer operation when the correctness verification of the zero-knowledge proof is passed.

[0016] In order to achieve the above objective, according to a third aspect of the present application, an electronic device is provided.

[0017] The electronic device according to the present application includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps of the method for measuring the value of a blockchain account address are implemented.

[0018] In order to achieve the above-mentioned purpose, according to a fourth aspect of the present application, a computer-readable storage medium is provided.

[0019] According to the computer-readable storage medium of the present application, a computer program is stored thereon, and when the computer program is executed by a processor, the steps of the method for measuring the value of a blockchain account address are implemented.

[0020] In the data processing method, device, equipment, and storage medium for the financial system in the embodiment of the present application, a smart contract is first used to put the user asset information in the financial system on the chain. Thereafter, when the user asset information changes due to a triggering operation, the user asset information is encrypted based on the smart contract, thereby achieving the technical effect of protecting the privacy of the user's key property information based on the encryption of the user asset information while ensuring the security of the account, thereby solving the technical problem of how to achieve privacy protection of the user's key property information while ensuring basic account operations. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The drawings constituting a part of this application are used to provide a further understanding of this application, so that other features, purposes and advantages of this application become more obvious. The schematic embodiment drawings and their descriptions of this application are used to explain this application and do not constitute an improper limitation on this application. In the drawings:

[0022] Figure 1 is a flow chart of a data processing method for a financial system according to an embodiment of the present application;

[0023] Figure 2 is a schematic diagram of the structure of a data processing device for a financial system according to an embodiment of the present application;

[0024] Figure 3 It is a schematic diagram of the device structure according to an embodiment of the present application. DETAILED DESCRIPTION

[0025] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0026] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0027] In the present application, the terms "upper", "lower", "left", "right", "front", "back", "top", "bottom", "inner", "outer", "middle", "vertical", "horizontal", "lateral", "longitudinal" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the drawings. These terms are mainly used to better describe the present application and its embodiments, and are not used to limit the indicated devices, elements or components to have a specific orientation, or to be constructed and operated in a specific orientation.

[0028] In addition, some of the above terms may be used to express other meanings in addition to indicating orientation or positional relationship. For example, the term "on" may also be used to express a certain dependency or connection relationship in some cases. For those of ordinary skill in the art, the specific meanings of these terms in this application can be understood according to specific circumstances.

[0029] In addition, the terms "installed", "set", "provided with", "connected", "connected", and "socketed" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral structure; it can be a mechanical connection, or an electrical connection; it can be a direct connection, or an indirect connection through an intermediate medium, or it can be an internal connection between two devices, elements, or components. For those of ordinary skill in the art, the specific meanings of the above terms in this application can be understood according to specific circumstances.

[0030] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0031] This application provides a data processing method for a financial system. The use of homomorphic encryption technology in the financial system can obtain the value of the original data or generate zero-knowledge proof based only on the user's private key. Various operations can be performed at any time without tracing historical records on the chain, ensuring real-time performance.

[0032] like Figure 1As shown, the method includes the following steps S101 to S103:

[0033] Step S101, using smart contracts to put user asset information in the financial system on the chain, wherein the user asset information includes at least one of the following: current account balance, income.

[0034] Blockchain smart contracts can make the financial system open, transparent and tamper-proof.

[0035] It should be noted that the user asset information mainly includes the current account balance and income, but is not specifically limited in this application.

[0036] Step S102, when the user asset information is changed by a trigger operation, encrypting the user asset information based on the smart contract, wherein the trigger operation refers to an operation performed on the user assets.

[0037] Encrypting the privacy in the user's asset information mainly includes: using discrete logarithms to homomorphically encrypt private data and using the user's private key to generate range proofs in real time. For example, in the financial system, the user's current account balance and income are private data, which are stored in an encrypted manner on the blockchain.

[0038] From the above description, it can be seen that the present application achieves the following technical effects:

[0039] Through the above method, the user asset information in the financial system is first uploaded to the chain using a smart contract. Then, when the user asset information changes due to a triggering operation, the user asset information is encrypted based on the smart contract. This ensures the privacy of the user's key property information based on the encryption of the user's asset information while ensuring the security of the account. This solves the technical problem of how to protect the privacy of the user's key property information while ensuring basic account operations.

[0040] This application adopts a discrete logarithm encryption scheme, a generator g of a discrete logarithm group modulo p, and the following operations are all performed modulo p. Among them, the user private key x, the user public key h = g^x.

[0041] Basic group operation functions, including binary exponentiation operation, inverse operation, etc., are not specifically limited in this application.

[0042] In the specific implementation, the encryption of asset m is implemented in Algorithm 1, and the decryption process of ciphertext (C, D) is implemented in Algorithm 2.

[0043]

[0044] It should be noted that, in order to achieve plaintext addition homomorphism, compared with directly encrypting m, in the embodiment of the present application, g is encrypted. m Perform traditional discrete logarithm encryption, and then use a specific algorithm to pass g if m is not large. m Restore m.

[0045] According to an embodiment of the present application, as a preference in this embodiment, when the user asset information changes through a triggering operation, the user asset information is encrypted based on the smart contract, including: when the user asset information changes through an income payment operation, the current account balance ciphertext and the income ciphertext are homomorphically encrypted based on the homomorphic encryption method in the smart contract.

[0046] When the income distribution operation is executed, the current account balance ciphertext and the income ciphertext are homomorphically calculated through homomorphic encryption technology.

[0047] It should be noted that homomorphic encryption technology is a well-known technology in the art and is not specifically limited in this application.

[0048] In the specific implementation, the initial balance b and income s are set in Algorithms 3 and 4 respectively, so as to directly transmit the ciphertext to the chain.

[0049]

[0050] According to an embodiment of the present application, as a preference in this embodiment, when the user asset information changes through a triggering operation, the user asset information is encrypted based on the smart contract, including: when the user asset information changes through a real-time balance query operation, the current balance is obtained on the chain based on the smart contract, and the current balance is decrypted off-chain through a private key held by the user.

[0051] When performing a real-time balance query, the user obtains the current balance on the chain and decrypts the current balance through the private key off the chain. At the same time, people who do not have the private key cannot decrypt and obtain the information.

[0052] In the specific implementation, the process of issuing funds on the chain is realized in Algorithm 5, which is completed through homomorphic encryption operations, and the process of users checking their balances off the chain is realized in Algorithm 6, which is achieved by decrypting the balance ciphertext with the user's private key.

[0053]

[0054] According to an embodiment of the present application, as a preference in this embodiment, when the user asset information changes through a triggering operation, the user asset information is encrypted based on the smart contract, including: when the user asset information changes through a withdrawal operation, a zero-knowledge proof is generated based on a private key held by the user, and the correctness of the zero-knowledge proof is verified based on the smart contract; when the correctness verification of the zero-knowledge proof is passed, a transfer operation is performed.

[0055] Smart contracts can support users to perform various operations including withdrawals in real time without tracing historical data. When executing a withdrawal operation, the user enters the withdrawal amount and generates a zero-knowledge proof based on his or her private key to prove that the current account balance is not less than the amount to be withdrawn, without exposing the plaintext balance and the user's private key.

[0056] It should be noted that the correctness of the zero-knowledge proof also needs to be judged on the smart contract chain. If the verification passes, the transfer operation will be executed.

[0057] In the specific implementation, in Algorithm 7, it is the main function of withdrawal, which includes the call of two functions, namely, generating proof and verifying proof, as well as the implementation of the deduction and transfer process.

[0058]

[0059] The generation process of the above zero-knowledge proof is given in Algorithm 8: In order to prove that the plaintext s encrypted by (C, D) belongs to 0 to 2 to the power of 32. Note that S belongs to 0 to 2 to the power of 32 if and only if the binary split of s is within 32 bits, the original ciphertext is homomorphically split into 32 groups of new ciphertexts, each of which is an encryption of a certain bit of the binary split of s. At the same time, call the function that generates a specific set proof for each new ciphertext, that is, prove (C i , D i ) is either 0 or 2 to the power of i. A zero-knowledge proof contains all the above-mentioned specific set proofs, and its length is constant.

[0060] In addition, it is also necessary to verify the zero-knowledge proof in Algorithm 8. It is also necessary to generate a specific set proof through a private key and verify the specific set proof at the same time, which will not be repeated in the embodiments of this application.

[0061]

[0062] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0063] According to an embodiment of the present application, a data processing device for a financial system for implementing the above method is also provided, the device comprising:

[0064] The on-chain module 10 is used to use smart contracts to put the user asset information in the financial system on the chain, wherein the user asset information includes at least one of the following: current account balance, income;

[0065] The encryption module 11 is used to encrypt the user asset information based on the smart contract when the user asset information is changed by a trigger operation, wherein the trigger operation refers to an operation performed on the user assets.

[0066] In the chain module 10 of the embodiment of the present application, the financial system can be made open, transparent and tamper-proof through the blockchain smart contract.

[0067] It should be noted that the user asset information mainly includes the current account balance and income, but is not specifically limited in this application.

[0068] The encryption module 11 of the embodiment of the present application encrypts the privacy in the user asset information, mainly including: a method of homomorphically encrypting the privacy data using discrete logarithms and a method of generating range proofs in real time using the user's private key. For example, in the financial system, the user's current account balance and income are private data, which are all stored in the blockchain in an encrypted manner.

[0069] Through the above module, the user asset information in the financial system is first uploaded to the chain using a smart contract. Then, when the user asset information changes due to a triggering operation, the user asset information is encrypted based on the smart contract. This ensures the privacy of the user's key property information based on the encryption of the user's asset information while ensuring the security of the account. This solves the technical problem of how to protect the privacy of the user's key property information while ensuring basic account operations.

[0070] According to an embodiment of the present application, as a preference in this embodiment, the encryption module 11 is used to homomorphically encrypt the current account balance ciphertext and the income ciphertext based on the homomorphic encryption method in the smart contract when the user asset information changes through an income payment operation.

[0071] When the income distribution operation is executed, the current account balance ciphertext and the income ciphertext are homomorphically calculated through homomorphic encryption technology.

[0072] It should be noted that homomorphic encryption technology is a well-known technology in the art and is not specifically limited in this application.

[0073] In the specific implementation, the initial balance b and income s are set in Algorithms 3 and 4 respectively, so as to directly transmit the ciphertext to the chain.

[0074]

[0075] According to an embodiment of the present application, as a preference in this embodiment, the encryption module 11 is used to obtain the current balance on the chain based on the smart contract when the user asset information changes through a real-time balance query operation, and to decrypt the current balance off-chain through a private key held by the user.

[0076] When performing a real-time balance query, the user obtains the current balance on the chain and decrypts the current balance through the private key off the chain. At the same time, people who do not have the private key cannot decrypt and obtain the information.

[0077] In the specific implementation, the process of issuing funds on the chain is realized in Algorithm 5, which is completed through homomorphic encryption operations, and the process of users checking their balances off the chain is realized in Algorithm 6, which is achieved by decrypting the balance ciphertext with the user's private key.

[0078]

[0079] According to an embodiment of the present application, as a preference in this embodiment, the encryption module 11 is used to generate a zero-knowledge proof based on a private key held by a user when the user asset information changes through a withdrawal operation, and to verify the correctness of the zero-knowledge proof based on the smart contract; and to execute a transfer operation when the correctness verification of the zero-knowledge proof is passed.

[0080] When performing a withdrawal operation, the user enters the withdrawal amount and generates a zero-knowledge proof based on his or her private key to prove that the current account balance is not less than the amount to be withdrawn, without exposing the plaintext balance and the user's private key.

[0081] It should be noted that the correctness of the zero-knowledge proof also needs to be judged on the smart contract chain. If the verification passes, the transfer operation will be executed.

[0082] In the specific implementation, in Algorithm 7, it is the main function of withdrawal, which includes the call of two functions, namely, generating proof and verifying proof, as well as the implementation of the deduction and transfer process.

[0083]

[0084] The generation process of the above zero-knowledge proof is given in Algorithm 8: In order to prove that the plaintext s encrypted by (C, D) belongs to 0 to 2 to the power of 32. Note that S belongs to 0 to 2 to the power of 32 if and only if the binary split of s is within 32 bits, the original ciphertext is homomorphically split into 32 groups of new ciphertexts, each of which is an encryption of a certain bit of the binary split of s. At the same time, call the function that generates a specific set proof for each new ciphertext, that is, prove (C i , D i ) is either 0 or 2 to the power of i. A zero-knowledge proof contains all the above-mentioned specific set proofs, and its length is constant.

[0085] In addition, it is also necessary to verify the zero-knowledge proof in Algorithm 8. It is also necessary to generate a specific set proof through a private key and verify the specific set proof at the same time, which will not be repeated in the embodiments of this application.

[0086]

[0087] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. In this way, the present application is not limited to any specific combination of hardware and software.

[0088] The present application also provides a computer device. Figure 3 As shown, the computer device 20 may include: at least one processor 201, such as a CPU, at least one network interface 204, a user interface 203, a memory 205, at least one communication bus 202, and optionally, a display screen 206. The communication bus 202 is used to realize the connection and communication between these components. The user interface 203 may include a touch screen, a keyboard or a mouse, etc. The network interface 204 may optionally include a standard wired interface, a wireless interface (such as a WI-FI interface), and a communication connection with a server may be established through the network interface 204. The memory 205 may be a high-speed RAM memory, or a non-volatile memory (non-volatile memory), such as at least one disk storage. The memory 205 includes the flash in the embodiment of the present invention. The memory 205 may optionally be at least one storage system located away from the aforementioned processor 201. As Figure 3As shown, the memory 205 as a computer storage medium may include an operating system, a network communication module, a user interface module, and program instructions.

[0089] It should be noted that the network interface 204 can be connected to a receiver, a transmitter or other communication modules, and other communication modules may include but are not limited to WiFi modules, Bluetooth modules, etc. It can be understood that the computer device in the embodiment of the present invention may also include a receiver, a transmitter and other communication modules.

[0090] The processor 201 may be used to call the program instructions stored in the memory 205 and enable the computer device 20 to perform the following operations:

[0091] Smart contracts are used to put user asset information in the financial system on the chain, where the user asset information includes at least one of the following: current account balance, income;

[0092] In the case where the user asset information is changed by a trigger operation, the user asset information is encrypted based on the smart contract, wherein the trigger operation refers to an operation performed on the user assets.

[0093] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A data processing method for a financial system, It is characterized in that include: Smart contracts are used to put user asset information in the financial system on the chain, where the user asset information includes at least one of the following: current account balance, income; When the user asset information changes through a trigger operation, the user asset information is encrypted based on the smart contract; when the user asset information changes through an income payment operation, the current account balance ciphertext and the income ciphertext are homomorphically encrypted based on the homomorphic encryption method in the smart contract, wherein the trigger operation refers to an operation performed on user assets.

2. The method according to claim 1, It is characterized in that When the user asset information changes through a triggering operation, encrypting the user asset information based on the smart contract includes: In the case where the user asset information changes through an income distribution operation, the current account balance ciphertext and the income ciphertext are homomorphically encrypted based on the homomorphic encryption method in the smart contract.

3. The method according to claim 1, It is characterized in that When the user asset information changes through a triggering operation, encrypting the user asset information based on the smart contract includes: When the user asset information changes through a real-time balance query operation, the current account balance is obtained on the chain based on the smart contract, and the current balance is decrypted off-chain using a private key held by the user.

4. The method according to claim 1, It is characterized in that When the user asset information changes through a triggering operation, encrypting the user asset information based on the smart contract includes: When the user asset information changes through a withdrawal operation, a zero-knowledge proof is generated based on the private key held by the user, and the correctness of the zero-knowledge proof is verified based on the smart contract; In the case where the correctness verification of the zero-knowledge proof is passed, the transfer operation is performed.

5. A data processing device for a financial system, It is characterized in that include: The on-chain module is used to use smart contracts to upload user asset information in the financial system to the chain, wherein the user asset information includes at least one of the following: current account balance, income; An encryption module is used to encrypt the user asset information based on the smart contract when the user asset information is changed by a trigger operation, and to homomorphically encrypt the current account balance ciphertext and the income ciphertext based on the homomorphic encryption method in the smart contract when the user asset information is changed by an income payment operation, wherein the trigger operation refers to an operation performed on the user assets.

6. The device according to claim 5, It is characterized in that The encryption module is used to homomorphically encrypt the current account balance ciphertext and the income ciphertext based on the homomorphic encryption method in the smart contract when the user asset information changes through the income payment operation.

7. The device according to claim 5, It is characterized in that The encryption module is used to obtain the current account balance on the chain based on the smart contract when the user asset information changes through the real-time balance query operation, and decrypt the current balance off-chain through the private key held by the user.

8. The device according to claim 5, It is characterized in that The encryption module is used to generate a zero-knowledge proof based on a private key held by the user when the user asset information changes through a withdrawal operation, and to verify the correctness of the zero-knowledge proof based on the smart contract; In the case where the correctness verification of the zero-knowledge proof is passed, the transfer operation is performed.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the program, the steps of the method according to any one of claims 1 to 4 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.