A point conversion method based on homomorphic encryption and related equipment

By using homomorphic encryption technology to encrypt points on the blockchain, the problem of information leakage during points transfer and cashing in the existing technology is solved, the privacy and security of on-chain points are realized, and the stability of the total amount of points is ensured.

CN115102684BActive Publication Date: 2025-05-09华润数字科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210686870.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-16
Publication Date
2025-05-09
Estimated Expiration
2042-06-16

AI Technical Summary

Technical Problem

When the prior art realizes points transfer and cashing on the blockchain, there is a hidden danger of information leakage, and traditional encryption methods cannot realize points conversion in the ciphertext state.

Method used

The integral conversion method based on homomorphic encryption is adopted. By generating a homomorphic public and private key pair of each participant node on the alliance chain and uploading the public key to the blockchain ledger, the encryption of the integral conversion amount is realized, ensuring that the integral conversion is performed in the ciphertext state.

Benefits of technology

It realizes that while ensuring the privacy of points, it completes the full ciphertext conversion of points on the chain to prevent information leakage, and successfully judges through over-limit detection and point conversion, ensuring that the total amount of points remains unchanged and avoids changes in the total amount of points due to abnormalities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115102684B_ABST
    Figure CN115102684B_ABST
Patent Text Reader

Abstract

The present application discloses a point conversion method and related equipment based on homomorphic encryption, which belongs to the field of blockchain technology. The present application parses a point conversion request into two transactions, and uses the corresponding public key to encrypt the point conversion amount and then sends the encrypted ciphertext to the two parties involved in the point conversion, and initiates corresponding addition / subtraction transaction proposals for the two parties involved in the point conversion. The two nodes involved in the point conversion each perform homomorphic simulation operations in their own peer nodes, and realize the full ciphertext conversion of points on the chain by adding overlimit judgment and judgment on whether the point conversion is successful, so that the point calculation is realized under the premise that the points of each participant are visible to themselves, and the privacy of the point chain is improved to prevent information leakage. In addition, the present application also detects whether there is abnormal conversion by judging whether the point conversion is successful, and ensures that the total amount of points remains unchanged while improving the privacy of the point chain, avoiding the increase or decrease of the total amount of points due to abnormal conversion.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of blockchain technology, and specifically relates to a point conversion method, device, computer equipment and storage medium based on homomorphic encryption. Background Art

[0002] Homomorphic encryption is a cryptographic technology based on the computational complexity theory of mathematical problems. When the homomorphically encrypted data is processed to obtain an output, the output is decrypted, and the result is the same as the output obtained by processing the unencrypted original data in the same way. That is, the result obtained by the homomorphic calculation of addition, subtraction, multiplication and division of the two ciphertexts in the homomorphic encryption algorithm is consistent with the result obtained by direct calculation with the real data of the original text after decryption, ensuring data privacy while achieving data computability.

[0003] At present, blockchain is usually used to realize the transfer and redemption of private points. Blockchain can be regarded as a distributed database. The data on the chain is maintained by each node. It has the characteristics of decentralization, traceability and non-tamperability. The distributed characteristics of blockchain make the points on the chain visible to all participants, so there may be hidden dangers of information leakage. If traditional encryption methods are used, it is impossible to realize functions such as transfer and exchange of points in ciphertext state, and only plain text conversion can be used, which may also pose a risk of information leakage. Summary of the invention

[0004] The purpose of the embodiments of the present application is to propose a point conversion method, device, computer equipment and storage medium based on homomorphic encryption to solve the technical problem that the existing point conversion scheme has the potential for information leakage.

[0005] In order to solve the above technical problems, the embodiment of the present application provides a point conversion method based on homomorphic encryption, which adopts the following technical solution:

[0006] A point conversion method based on homomorphic encryption is applied to a consortium chain. The consortium chain is built on a blockchain. The consortium chain includes at least several participant nodes and orderer nodes. The method includes:

[0007] receiving a points conversion request instruction, and determining points conversion participants and points conversion amounts according to the points conversion request instruction, wherein the points conversion participants include a first participant and a second participant;

[0008] Obtaining a first public key from a preset public key list, and obtaining a second public key from the public key list;

[0009] The points conversion amount is encrypted using the first public key and the second public key to obtain a first amount ciphertext and a second amount ciphertext;

[0010] The first amount ciphertext is sent to the peer node of the first participant, and the first points conversion is completed based on the first amount ciphertext in the peer node of the first participant to obtain a first conversion result;

[0011] The second amount ciphertext is sent to the peer node of the second participant, and the second point conversion is completed based on the second amount ciphertext in the peer node of the second participant to obtain a second conversion result;

[0012] Performing over-limit detection on the first conversion result and the second conversion result respectively;

[0013] When all over-limit tests are passed, judging whether the first integral conversion is successful according to the first conversion result, and judging whether the second integral conversion is successful according to the second conversion result;

[0014] When both the first point conversion and the second point conversion are successful, the first point conversion information and the second point conversion information are obtained, and the first point conversion information and the second point conversion information are sent to the orderer node.

[0015] Furthermore, before receiving the points conversion request instruction and determining the points conversion participants and the points conversion amount according to the points conversion request instruction, it also includes:

[0016] Generate a homomorphic public-private key pair for each participating node, which includes a public key and a private key;

[0017] The private key of each participant node is stored in a database in its own local storage;

[0018] Upload the public key of each participating node to the blockchain ledger in turn to form a public key list.

[0019] Furthermore, after uploading the public key of each participant node to the blockchain ledger in sequence to form a public key list, it also includes:

[0020] Get the initial points of each participating node;

[0021] Use the public key of each participant node to encrypt each initial score, and obtain the initial score ciphertext of each participant node;

[0022] The initial points ciphertext of each participating node is uploaded to the blockchain ledger in turn to form an initial points list.

[0023] Furthermore, the first amount ciphertext is sent to the peer node of the first participant, and the first points conversion is completed based on the first amount ciphertext in the peer node of the first participant to obtain a first conversion result, which specifically includes:

[0024] Obtain the initial points ciphertext of the first participant;

[0025] Sending the initial points ciphertext and the first amount ciphertext to the peer node of the first participant;

[0026] Simulate a transaction in accordance with the smart contract based on the first participant's initial points ciphertext and the first amount ciphertext in the peer node of the first participant to complete the first points conversion and obtain a first conversion result;

[0027] The second amount ciphertext is sent to the peer node of the second participant, and the second point conversion is completed based on the second amount ciphertext in the peer node of the second participant to obtain a second conversion result, which specifically includes:

[0028] Obtain the initial points ciphertext of the second participant;

[0029] Send the initial points ciphertext and the second amount ciphertext to the peer node of the second participant;

[0030] A transaction is simulated in the peer node of the second participant based on the initial points ciphertext and the second amount ciphertext of the second participant according to the smart contract to complete the second points conversion and obtain a second conversion result.

[0031] Furthermore, a transaction is simulated in the peer node of the first participant based on the initial points ciphertext and the first amount ciphertext of the first participant according to the smart contract to complete the first points conversion and obtain a first conversion result, which specifically includes:

[0032] Determine a first points conversion rule corresponding to the first participant according to the points conversion request instruction;

[0033] In the peer node of the first participant, based on the first point conversion rule, the initial point ciphertext and the first amount ciphertext of the first participant are simulated for transaction according to the smart contract to perform the first point conversion and obtain a first conversion result;

[0034] In the peer node of the second participant, based on the second participant's initial points ciphertext and the second amount ciphertext, a transaction is simulated according to the smart contract to complete the second points conversion and obtain a second conversion result, which specifically includes:

[0035] Determine a second points conversion rule corresponding to the second participant according to the points conversion request instruction;

[0036] In the peer node of the second participant, based on the second point conversion rule, the initial point ciphertext and the second amount ciphertext of the second participant are traded in a simulated manner according to the smart contract to perform the second point conversion and obtain a second conversion result.

[0037] Further, the first conversion result and the second conversion result are respectively subjected to over-limit detection, specifically including:

[0038] Obtain the private key of the first participant to obtain a first private key;

[0039] Partially decrypting the first conversion result using the first private key to obtain positive and negative information of the first score, wherein the positive and negative information of the first score represents the positive and negative of the current score of the first participant;

[0040] Obtain the private key of the second participant to obtain a second private key;

[0041] The second conversion result is partially decrypted using the second private key to obtain the positive and negative information of the second integral, wherein the positive and negative information of the second integral represents the positive and negative of the current integral of the second participant;

[0042] An over-limit detection is performed on the first conversion result according to the positive and negative information of the first integral, and an over-limit detection is performed on the second conversion result according to the positive and negative information of the second integral.

[0043] Further, when all over-limit detections are passed, judging whether the first integral conversion is successful according to the first conversion result, and judging whether the second integral conversion is successful according to the second conversion result, specifically includes:

[0044] When both the over-limit detections are passed, the first conversion result and the second conversion result are signed respectively to obtain a first signature and a second signature, wherein the first signature includes attribute information of the first conversion result, and the second signature includes attribute information of the second conversion result;

[0045] Whether the first points conversion is successful is determined based on the first signature, and whether the second points conversion is successful is determined based on the second signature.

[0046] In order to solve the above technical problems, the embodiment of the present application also provides a point conversion device based on homomorphic encryption, which adopts the following technical solution:

[0047] A point conversion device based on homomorphic encryption, applying the point conversion method based on homomorphic encryption as described above, the point conversion method based on homomorphic encryption is installed in a consortium chain, the consortium chain is built based on a blockchain, the consortium chain includes at least a number of participant nodes and orderer nodes, and the device includes:

[0048] An instruction receiving module, used to receive a points conversion request instruction, and determine the points conversion participants and the points conversion amount according to the points conversion request instruction, wherein the points conversion participants include a first participant and a second participant;

[0049] A public key acquisition module, used to acquire a first public key from a preset public key list, and acquire a second public key from the public key list;

[0050] A conversion amount encryption module, used to encrypt the points conversion amount using the first public key and the second public key respectively, to obtain a first amount ciphertext and a second amount ciphertext;

[0051] A first points conversion module, used to send the first amount ciphertext to the peer node of the first participant, and complete the first points conversion based on the first amount ciphertext in the peer node of the first participant to obtain a first conversion result;

[0052] A second points conversion module, used to send the second amount ciphertext to the peer node of the second participant, and complete the second points conversion based on the second amount ciphertext in the peer node of the second participant to obtain a second conversion result;

[0053] An over-limit detection module, used to perform over-limit detection on the first conversion result and the second conversion result respectively;

[0054] A conversion detection module, used for judging whether the first integral conversion is successful according to the first conversion result and judging whether the second integral conversion is successful according to the second conversion result after all over-limit detections are passed;

[0055] The points conversion module is used to obtain the first points conversion information and the second points conversion information when the first points conversion and the second points conversion are successful, and send the first points conversion information and the second points conversion information to the orderer node.

[0056] In order to solve the above technical problems, the embodiment of the present application further provides a computer device, which adopts the following technical solution:

[0057] A computer device comprises a memory and a processor, wherein the memory stores computer-readable instructions, and when the processor executes the computer-readable instructions, the steps of the integral conversion method based on homomorphic encryption as described in any one of the above items are implemented.

[0058] In order to solve the above technical problems, the embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solution:

[0059] A computer-readable storage medium having computer-readable instructions stored thereon, wherein the computer-readable instructions, when executed by a processor, implement the steps of the integral conversion method based on homomorphic encryption as described in any one of the above.

[0060] Compared with the prior art, the embodiments of the present application have the following beneficial effects:

[0061] The present application discloses a point conversion method and related equipment based on homomorphic encryption, which belongs to the field of blockchain technology. The present application parses a point conversion request into two transactions, and uses the corresponding public key to encrypt the point conversion amount and then sends the encrypted ciphertext to the two parties involved in the point conversion, and initiates corresponding addition / subtraction transaction proposals for the two parties involved in the point conversion. The two nodes involved in the point conversion each perform homomorphic simulation operations in their own peer nodes, and realize the full ciphertext conversion of points on the chain by adding overlimit judgment and judgment on whether the point conversion is successful, so that the point calculation is realized under the premise that the points of each participant are visible to themselves, and the privacy of the point chain is improved to prevent information leakage. In addition, the present application also detects whether there is abnormal conversion by judging whether the point conversion is successful, and ensures that the total amount of points remains unchanged while improving the privacy of the point chain, avoiding the increase or decrease of the total amount of points due to abnormal conversion. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0063] Figure 1 An exemplary system architecture diagram is shown in which the present application can be applied;

[0064] Figure 2 A flowchart of an embodiment of a point conversion method based on homomorphic encryption according to the present application is shown;

[0065] Figure 3 A flowchart of an embodiment of the alliance chain homomorphic initialization of the point conversion method based on homomorphic encryption according to the present application is shown;

[0066] Figure 4 Shows Figure 2 A flowchart of an embodiment of step S204 and step S205;

[0067] Figure 5 Shows Figure 2 A flowchart of an embodiment of step S206;

[0068] Figure 6 A schematic structural diagram of an embodiment of a point conversion device based on homomorphic encryption according to the present application is shown;

[0069] Figure 7 A schematic structural diagram of an embodiment of a computer device according to the present application is shown. DETAILED DESCRIPTION

[0070] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.

[0071] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0072] 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 accompanying drawings.

[0073] like Figure 1 As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0074] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.

[0075] Terminal devices 101, 102, 103 can be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 (Moving Picture Experts Group Audio Layer IV) players, laptop computers, desktop computers, etc.

[0076] Server 105 can be a server that provides various services, such as a background server that provides support for pages displayed on terminal devices 101, 102, and 103. The server can be an independent server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.

[0077] It should be noted that the point conversion method based on homomorphic encryption provided in the embodiment of the present application is generally executed by a server, and accordingly, the point conversion device based on homomorphic encryption is generally set in the server.

[0078] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0079] Continue to refer Figure 2 , showing a flow chart of an embodiment of the integral conversion method based on homomorphic encryption according to the present application. The embodiment of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0080] The basic technologies of artificial intelligence generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics and other technologies. Artificial intelligence software technology mainly includes computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning. The point conversion method based on homomorphic encryption is applied to the alliance chain. The alliance chain is built on the blockchain. The alliance chain includes at least several participant nodes and orderer nodes. The method includes:

[0081] S201, receiving a points conversion request instruction, and determining points conversion participants and points conversion amount according to the points conversion request instruction, wherein the points conversion participants include a first participant and a second participant.

[0082] In the embodiment of the present application, the point conversion method based on homomorphic encryption is applied to the alliance chain. The alliance chain is built on the blockchain. The alliance chain includes at least several participant nodes and orderer nodes. The alliance chain is also configured with an apiserver server, which is used to manage nodes and chain operations. After receiving the point conversion request instruction, the apiserver server determines the point conversion participant node and the point conversion amount on the alliance chain according to the point conversion request instruction, wherein the point conversion participants include the first participant and the second participant.

[0083] In this embodiment, the electronic device (for example Figure 1 The server shown in the figure) can receive the points conversion request instruction through a wired connection or a wireless connection. It should be noted that the above wireless connection method may include but is not limited to 3G / 4G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods currently known or to be developed in the future.

[0084] Further, refer to Figure 3 , before receiving the points conversion request instruction and determining the points conversion participants and the points conversion amount according to the points conversion request instruction, it also includes:

[0085] S211, generating a homomorphic public-private key pair for each participating node, the homomorphic public-private key pair including a public key and a private key;

[0086] S212, storing the private key of each participant node in a database in its own local storage;

[0087] S213, upload the public key of each participant node to the blockchain ledger in sequence to form a public key list.

[0088] In an embodiment of the present application, before performing point conversion, it is necessary to fully deploy the alliance chain, the apiserver server traverses all participating nodes on the alliance chain, and generates a homomorphic public-private key pair for each participating node. The homomorphic public-private key pair includes a public key and a private key, and stores the private key of each participating node in a database in its own local storage, and uploads the public key of each participating node to the blockchain ledger in turn to form a public key list.

[0089] Further, continue to refer to Figure 3 , after uploading the public key of each participant node to the blockchain ledger in turn to form a public key list, it also includes:

[0090] S214, obtaining the initial points of each participating node;

[0091] S215, using the public key of each participant node to encrypt the initial points of each participant node, to obtain the initial points ciphertext of each participant node;

[0092] S216, upload the initial points ciphertext of each participant node to the blockchain ledger in sequence to form an initial points list.

[0093] In an embodiment of the present application, the apiserver server traverses all the participating nodes on the alliance chain again, obtains the initial points of each participating node, encrypts each participating node's initial points using the public key of each participating node, obtains the initial points ciphertext of each participating node, and uploads the initial points ciphertext of each participating node to the blockchain ledger in turn to form an initial points list.

[0094] In a specific embodiment of the present application, there are three participant nodes, namely, participant A, participant B and participant C, on the alliance chain. The apiserver first generates a homomorphic public-private key pair for each participant node, namely, public key A, public key B, public key C and private key A, private key B, private key B, and instructs participant A, participant B and participant C to upload the public key to the blockchain account book of the alliance chain, forming a public key list in the blockchain account book, and instructs participant A, participant B and participant C to store the private key in the database of their own local storage. Then the apiserver obtains the initial points of participant A, participant B and participant C respectively, obtains initial points A, initial points B, initial points C, and encrypts the initial points using the public keys of participant A, participant B and participant C respectively, obtains initial points ciphertext MA, initial points ciphertext MB, initial points ciphertext MC, and instructs participant A, participant B and participant C to upload the initial points ciphertext to the blockchain account book of the alliance chain to form an initial points list.

[0095] S202: Acquire a first public key from a preset public key list, and acquire a second public key from the public key list.

[0096] In an embodiment of the present application, after determining the first participant and the second participant in the points conversion, the apiserver server obtains the public key of the first participant from the public key list in the blockchain ledger of the alliance chain to obtain the first public key, and obtains the public key of the second participant from the public key list in the blockchain ledger of the alliance chain to obtain the second public key.

[0097] S203, using the first public key and the second public key to encrypt the points conversion amount respectively, to obtain the first amount ciphertext and the second amount ciphertext.

[0098] In an embodiment of the present application, after obtaining the first public key and the second public key, the apiserver server uses the first public key to encrypt the point conversion amount to obtain a first amount ciphertext, and uses the second public key to encrypt the point conversion amount to obtain a second amount ciphertext.

[0099] S204, sending the first amount ciphertext to the peer node of the first participant, and completing the first points conversion based on the first amount ciphertext in the peer node of the first participant to obtain a first conversion result.

[0100] In an embodiment of the present application, the apiserver server sends the encrypted first amount ciphertext to the peer node of the first participant, and completes the first point conversion in the ciphertext state within the peer node of the first participant based on the first amount ciphertext and the initial points ciphertext of the first participant, to obtain a first conversion result, wherein the obtained first conversion result is also in the ciphertext state.

[0101] S205, sending the second amount ciphertext to the peer node of the second participant, and completing the second points conversion based on the second amount ciphertext in the peer node of the second participant to obtain a second conversion result.

[0102] In an embodiment of the present application, the apiserver server sends the encrypted second amount ciphertext to the peer node of the second participant, and completes the second point conversion in the ciphertext state within the peer node of the second participant based on the second amount ciphertext and the initial points ciphertext of the second participant, to obtain a second conversion result, wherein the obtained second conversion result is also in the ciphertext state.

[0103] Further, refer to Figure 4 , sending the first amount ciphertext to the peer node of the first participant, and completing the first points conversion based on the first amount ciphertext in the peer node of the first participant to obtain a first conversion result, specifically including:

[0104] S251, obtaining the initial points ciphertext of the first participant;

[0105] S252, sending the initial points ciphertext and the first amount ciphertext to the peer node of the first participant;

[0106] S253, simulating a transaction in accordance with the smart contract based on the initial points ciphertext and the first amount ciphertext of the first participant in the peer node of the first participant, so as to complete the first points conversion and obtain a first conversion result;

[0107] Continue to refer Figure 4 , sending the second amount ciphertext to the peer node of the second participant, and completing the second points conversion based on the second amount ciphertext in the peer node of the second participant to obtain a second conversion result, specifically including:

[0108] S254, obtaining the initial points ciphertext of the second participant;

[0109] S255, sending the initial points ciphertext and the second amount ciphertext to the peer node of the second participant;

[0110] S256, within the peer node of the second participant, a transaction is simulated according to the smart contract based on the second participant's initial points ciphertext and the second amount ciphertext to complete the second points conversion and obtain a second conversion result.

[0111] In an embodiment of the present application, the apiserver server first obtains the initial points ciphertext of the first participant and the smart contract of the blockchain network, and then sends the initial points ciphertext and the first amount ciphertext to the peer node of the first participant, and initiates a simulated transaction in the peer node of the first participant based on the initial points ciphertext and the first amount ciphertext of the first participant and in accordance with the smart contract to complete the first points conversion and obtain a first conversion result, and then obtains the initial points ciphertext of the second participant, and sends the initial points ciphertext and the second amount ciphertext to the peer node of the second participant, and initiates a simulated transaction in the peer node of the second participant based on the initial points ciphertext and the second amount ciphertext of the second participant and in accordance with the smart contract to complete the second points conversion and obtain a second conversion result.

[0112] Furthermore, a transaction is simulated in the peer node of the first participant based on the initial points ciphertext and the first amount ciphertext of the first participant according to the smart contract to complete the first points conversion and obtain a first conversion result, which specifically includes:

[0113] Determine a first points conversion rule corresponding to the first participant according to the points conversion request instruction;

[0114] In the peer node of the first participant, based on the first point conversion rule, the initial point ciphertext and the first amount ciphertext of the first participant are simulated for transaction according to the smart contract to perform the first point conversion and obtain a first conversion result;

[0115] In the peer node of the second participant, based on the second participant's initial points ciphertext and the second amount ciphertext, a transaction is simulated according to the smart contract to complete the second points conversion and obtain a second conversion result, which specifically includes:

[0116] Determine a second points conversion rule corresponding to the second participant according to the points conversion request instruction;

[0117] In the peer node of the second participant, based on the second point conversion rule, the initial point ciphertext and the second amount ciphertext of the second participant are traded in a simulated manner according to the smart contract to perform the second point conversion and obtain a second conversion result.

[0118] In an embodiment of the present application, the points conversion request instruction also includes points conversion rules, and the points conversion rules include points increase conversion and points decrease conversion. The apiserver first determines the first points conversion rule corresponding to the first participant according to the points conversion request instruction, and initiates a simulated transaction based on the first points conversion rule for the initial points ciphertext and the first amount ciphertext of the first participant in the peer node of the first participant according to the smart contract to perform the first points conversion and obtain the first conversion result. Then, the second points conversion rule corresponding to the second participant is determined according to the points conversion request instruction, and in the peer node of the second participant, the initial points ciphertext and the second amount ciphertext of the second participant are initiated based on the second points conversion rule and the simulated transaction is initiated according to the smart contract to perform the second points conversion and obtain the second conversion result.

[0119] S206, performing over-limit detection on the first conversion result and the second conversion result respectively.

[0120] In an embodiment of the present application, the apiserver server performs over-limit detection on the first conversion result and the second conversion result respectively through a preset over-limit detection instruction to determine the positive and negative status of the number of integrals in the first conversion result and the second conversion result. When the number of integrals is a positive number, it indicates that the current integral operation is allowed. When the number of integrals is a negative number, it does not indicate that the current integral operation is allowed, and a prompt message is issued.

[0121] Further, refer to Figure 5 , respectively performing over-limit detection on the first conversion result and the second conversion result, specifically including:

[0122] S261, obtaining a private key of the first participant to obtain a first private key;

[0123] S262, partially decrypting the first conversion result using the first private key to obtain positive and negative information of the first score, wherein the positive and negative information of the first score represents the positive and negative of the current score of the first participant;

[0124] S263, obtaining the private key of the second participant to obtain a second private key;

[0125] S264, partially decrypting the second conversion result using the second private key to obtain information about the positive and negative values ​​of the second points, wherein the information about the positive and negative values ​​of the second points represents the positive and negative values ​​of the current points of the second participant;

[0126] S265, performing an over-limit detection on the first conversion result according to the positive and negative information of the first integral, and performing an over-limit detection on the second conversion result according to the positive and negative information of the second integral.

[0127] In an embodiment of the present application, the apiserver server uses the first private key to partially decrypt the first conversion result to obtain the positive and negative information of the first points, wherein the positive and negative information of the first points represents the positive and negative of the current points of the first participant, obtains the private key of the second participant, obtains the second private key, and uses the second private key to partially decrypt the second conversion result to obtain the positive and negative information of the second points, wherein the positive and negative information of the second points represents the positive and negative of the current points of the second participant, performs an over-limit check on the first conversion result according to the positive and negative information of the first points, and performs an over-limit check on the second conversion result according to the positive and negative information of the second points. When the number of points is a positive number, it indicates that the current point calculation is allowed, and when the number of points is a negative number, it does not indicate that the current point calculation is allowed, and a prompt message is issued.

[0128] S207, when all over-limit detections are passed, judging whether the first integral conversion is successful according to the first conversion result, and judging whether the second integral conversion is successful according to the second conversion result.

[0129] In an embodiment of the present application, after both the first conversion result and the second conversion result pass the over-limit detection, the apiserver server instructs the first participant node to sign the first conversion result and to upload the signed first conversion result. At the same time, the apiserver server instructs the second participant node to sign the second conversion result and to upload the signed second conversion result. The first conversion result after signing and the second conversion result after signing are used to determine whether the first points conversion and the second conversion result are successful.

[0130] Further, when all over-limit detections are passed, judging whether the first integral conversion is successful according to the first conversion result, and judging whether the second integral conversion is successful according to the second conversion result, specifically includes:

[0131] When both the over-limit detections are passed, the first conversion result and the second conversion result are signed respectively to obtain a first signature and a second signature, wherein the first signature includes attribute information of the first conversion result, and the second signature includes attribute information of the second conversion result;

[0132] Whether the first points conversion is successful is determined based on the first signature, and whether the second points conversion is successful is determined based on the second signature.

[0133] In an embodiment of the present application, after both the first conversion result and the second conversion result pass the over-limit detection, the first conversion result and the second conversion result are signed respectively to obtain a first signature and a second signature, wherein the first signature includes attribute information of the first conversion result, and the second signature includes attribute information of the second conversion result, and whether the first point conversion is successful is judged based on the attribute information of the first conversion result included in the first signature, and whether the second point conversion is successful is judged based on the attribute information of the second conversion result included in the second signature.

[0134] S208, when the first point conversion and the second point conversion are both successful, obtain the first point conversion information and the second point conversion information, and send the first point conversion information and the second point conversion information to the orderer node.

[0135] In an embodiment of the present application, after determining that both the first point conversion and the second point conversion are successful, the first point conversion information and the second point conversion information, i.e., the information of two simulated transactions conducted in the peer node, are obtained, and the first point conversion information and the second point conversion information are sent to the orderer node. The orderer node is responsible for sorting the transactions according to the first point conversion information and the second point conversion information to generate blocks, and broadcasting the generated blocks in the blockchain network.

[0136] In the above embodiment, the present application discloses a point conversion method based on homomorphic encryption, which belongs to the field of blockchain technology. The present application parses a point conversion request into two transactions, and uses the corresponding public key to encrypt the point conversion amount and then sends the encrypted ciphertext to the two parties involved in the point conversion, and initiates corresponding addition / subtraction transaction proposals for the two parties involved in the point conversion. The two nodes involved in the point conversion each perform homomorphic simulation operations in their own peer nodes, and realize the full ciphertext conversion of the points on the chain by adding overlimit judgment and judgment on whether the point conversion is successful, so that the point calculation is realized under the premise that the points of each participant are visible to themselves, and the privacy of the point chain is improved to prevent information leakage. In addition, the present application also detects whether there is abnormal conversion by judging whether the point conversion is successful, and ensures that the total amount of points remains unchanged while improving the privacy of the point chain, avoiding the increase or decrease of the total amount of points due to abnormal conversion.

[0137] The blockchain referred to in this application is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.

[0138] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium. When the computer-readable instructions are executed, they can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

[0139] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0140] Further references Figure 6 , as a response to the above Figure 2 The present application provides an embodiment of a point conversion device based on homomorphic encryption, and the device embodiment is similar to Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0141] like Figure 6 As shown, the point conversion device 600 based on homomorphic encryption described in this embodiment applies the point conversion method based on homomorphic encryption as described above, and the point conversion device 600 based on homomorphic encryption is applied to the alliance chain. The alliance chain is built based on the blockchain. The alliance chain includes at least a number of participant nodes and orderer nodes. The point conversion device 600 based on homomorphic encryption includes:

[0142] The instruction receiving module 601 is used to receive a point conversion request instruction, and determine the point conversion participants and the point conversion amount according to the point conversion request instruction, wherein the point conversion participants include a first participant and a second participant;

[0143] A public key acquisition module 602, configured to acquire a first public key from a preset public key list, and acquire a second public key from the public key list;

[0144] The conversion amount encryption module 603 is used to encrypt the point conversion amount using the first public key and the second public key to obtain the first amount ciphertext and the second amount ciphertext;

[0145] The first points conversion module 604 is used to send the first amount ciphertext to the peer node of the first participant, and complete the first points conversion based on the first amount ciphertext in the peer node of the first participant to obtain a first conversion result;

[0146] The second point conversion module 605 is used to send the second amount ciphertext to the peer node of the second participant, and complete the second point conversion based on the second amount ciphertext in the peer node of the second participant to obtain a second conversion result;

[0147] An over-limit detection module 606, used to perform over-limit detection on the first conversion result and the second conversion result respectively;

[0148] The conversion detection module 607 is used to determine whether the first integral conversion is successful according to the first conversion result and whether the second integral conversion is successful according to the second conversion result after all over-limit detections are passed;

[0149] The points conversion module 608 is used to obtain the first points conversion information and the second points conversion information when the first points conversion and the second points conversion are successful, and send the first points conversion information and the second points conversion information to the orderer node.

[0150] Furthermore, the integral conversion device based on homomorphic encryption also includes:

[0151] A public-private key pair generation module is used to generate a homomorphic public-private key pair for each participating node, and the homomorphic public-private key pair includes a public key and a private key;

[0152] A private key storage module is used to store the private key of each participant node in a database in its own local storage;

[0153] The public key storage module is used to upload the public key of each participating node to the blockchain ledger in sequence to form a public key list.

[0154] Furthermore, the integral conversion device based on homomorphic encryption also includes:

[0155] The initial points acquisition module is used to obtain the initial points of each participating node;

[0156] The initial score encryption module is used to encrypt the initial score of each participant node using the public key of each participant node to obtain the initial score ciphertext of each participant node;

[0157] The initial points ciphertext upload module is used to upload the initial points ciphertext of each participating node to the blockchain ledger in sequence to form an initial points list.

[0158] Furthermore, the first integral conversion module 604 specifically includes:

[0159] A first initial integral ciphertext obtaining unit, used to obtain an initial integral ciphertext of the first participant;

[0160] A first ciphertext sending unit, used to send the initial points ciphertext and the first amount ciphertext to the peer node of the first participant;

[0161] A first points conversion unit is used to simulate a transaction in a peer node of the first participant based on the initial points ciphertext of the first participant and the first amount ciphertext according to the smart contract to complete the first points conversion and obtain a first conversion result;

[0162] The second integral conversion module 605 specifically includes:

[0163] A second initial points ciphertext obtaining unit, used to obtain the initial points ciphertext of the second participant;

[0164] A second ciphertext sending unit, used to send the initial points ciphertext and the second amount ciphertext to the peer node of the second participant;

[0165] The second point conversion unit is used to simulate a transaction in accordance with the smart contract within the peer node of the second participant based on the initial point ciphertext and the second amount ciphertext of the second participant to complete the second point conversion and obtain a second conversion result.

[0166] Furthermore, the first integral conversion unit specifically includes:

[0167] A first points conversion rule acquisition subunit, used to determine a first points conversion rule corresponding to the first participant according to the points conversion request instruction;

[0168] A first points conversion subunit is used to simulate a transaction on the initial points ciphertext and the first amount ciphertext of the first participant according to the smart contract in the peer node of the first participant based on the first points conversion rule, so as to perform the first points conversion and obtain a first conversion result;

[0169] The second integral conversion unit specifically includes:

[0170] A second points conversion rule acquisition subunit is used to determine the second points conversion rule corresponding to the second participant according to the points conversion request instruction;

[0171] The second point conversion sub-unit is used to simulate a transaction on the initial point ciphertext and the second amount ciphertext of the second participant in accordance with the smart contract based on the second point conversion rule in the peer node of the second participant, so as to perform the second point conversion and obtain the second conversion result.

[0172] Furthermore, the over-limit detection module 606 specifically includes:

[0173] A first private key acquisition unit, used to acquire a private key of the first participant to obtain a first private key;

[0174] A first decryption unit is used to partially decrypt the first conversion result using the first private key to obtain the positive and negative information of the first score, wherein the positive and negative information of the first score represents the positive and negative of the current score of the first participant;

[0175] A first private key acquisition unit, used to acquire the private key of the second participant to obtain a second private key;

[0176] A second decryption unit is used to partially decrypt the second conversion result using the second private key to obtain the positive and negative information of the second integral, wherein the positive and negative information of the second integral represents the positive and negative of the current integral of the second participant;

[0177] The over-limit detection unit is used to perform over-limit detection on the first conversion result according to the positive and negative information of the first integral, and to perform over-limit detection on the second conversion result according to the positive and negative information of the second integral.

[0178] Furthermore, the conversion detection module 607 specifically includes:

[0179] A signature unit, used for signing the first conversion result and the second conversion result respectively after both the over-limit detections are passed, to obtain a first signature and a second signature, wherein the first signature includes attribute information of the first conversion result, and the second signature includes attribute information of the second conversion result;

[0180] The conversion detection unit is used to determine whether the first point conversion is successful based on the first signature, and to determine whether the second point conversion is successful based on the second signature.

[0181] In the above embodiment, the present application discloses a point conversion device based on homomorphic encryption, which belongs to the field of blockchain technology. The present application parses a point conversion request into two transactions, and uses the corresponding public key to encrypt the point conversion amount and then sends the encrypted ciphertext to the two parties participating in the point conversion, and initiates corresponding addition / subtraction transaction proposals for the two parties participating in the point conversion. The two nodes participating in the point conversion each perform homomorphic simulation operations in their own peer nodes, and realize the full ciphertext conversion of the points on the chain by adding overlimit judgment and judgment on whether the point conversion is successful, so that the point calculation is realized under the premise that the points of each participant are visible to themselves, and the privacy of the point chain is improved to prevent information leakage. In addition, the present application also detects whether there is abnormal conversion by judging whether the point conversion is successful, and ensures that the total amount of points remains unchanged while improving the privacy of the point chain, avoiding the increase or decrease of the total amount of points due to abnormal conversion.

[0182] To solve the above technical problems, the present application also provides a computer device. Figure 7 , Figure 7 This is a basic structural block diagram of the computer device in this embodiment.

[0183] The computer device 7 includes a memory 71, a processor 72, and a network interface 73 that are interconnected through a system bus. It should be noted that the figure only shows a computer device 7 with components 71-73, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.

[0184] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.

[0185] The memory 71 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 71 can be an internal storage unit of the computer device 7, such as a hard disk or memory of the computer device 7. In other embodiments, the memory 71 can also be an external storage device of the computer device 7, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), etc. equipped on the computer device 7. Of course, the memory 71 can also include both the internal storage unit of the computer device 7 and its external storage device. In this embodiment, the memory 71 is generally used to store the operating system and various application software installed on the computer device 7, such as computer-readable instructions of the integral conversion method based on homomorphic encryption, etc. In addition, the memory 71 can also be used to temporarily store various types of data that have been output or are to be output.

[0186] The processor 72 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip in some embodiments. The processor 72 is generally used to control the overall operation of the computer device 7. In this embodiment, the processor 72 is used to run computer-readable instructions or process data stored in the memory 71, such as computer-readable instructions for running the integral conversion method based on homomorphic encryption.

[0187] The network interface 73 may include a wireless network interface or a wired network interface. The network interface 73 is generally used to establish a communication connection between the computer device 7 and other electronic devices.

[0188] In the above embodiment, the present application discloses a computer device, which belongs to the field of blockchain technology. The present application parses a point conversion request into two transactions, and uses the corresponding public key to encrypt the point conversion amount and then sends the encrypted ciphertext to the two parties participating in the point conversion, and initiates corresponding addition / subtraction transaction proposals for the two parties participating in the point conversion. The two nodes participating in the point conversion each perform homomorphic simulation operations in their own peer nodes, and realize the full ciphertext conversion of the points on the chain by adding overlimit judgment and judgment on whether the point conversion is successful, so that the point operation is realized under the premise that the points of each participant are visible to themselves, and the privacy of the point chain is improved to prevent information leakage. In addition, the present application also detects whether there is abnormal conversion by judging whether the point conversion is successful, and ensures that the total amount of points remains unchanged while improving the privacy of the point chain, avoiding the increase or decrease of the total amount of points due to abnormal conversion.

[0189] The present application also provides another embodiment, namely, providing a computer-readable storage medium, which stores computer-readable instructions, and the computer-readable instructions can be executed by at least one processor to enable the at least one processor to perform the steps of the integral conversion method based on homomorphic encryption as described above.

[0190] In the above embodiment, the present application discloses a storage medium, which belongs to the field of blockchain technology. The present application parses a point conversion request into two transactions, and uses the corresponding public key to encrypt the point conversion amount and then sends the encrypted ciphertext to the two parties participating in the point conversion. The two parties participating in the point conversion initiate corresponding addition / subtraction transaction proposals, and the two nodes participating in the point conversion each perform homomorphic simulation operations in their own peer nodes. By adding over-limit judgments and judgments on whether the point conversion is successful, the full ciphertext conversion of the points on the chain is realized, so that the points of each participant can be seen by themselves. The point operation is realized, and the privacy of the point chain is improved to prevent information leakage. In addition, the present application also detects whether there is an abnormal conversion by judging whether the point conversion is successful, while improving the privacy of the point chain. The total amount of points remains unchanged, avoiding the increase or decrease of the total amount of points due to abnormal conversion.

[0191] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0192] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0193] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.

Claims

1. A point conversion method based on homomorphic encryption, characterized in that: The point conversion method based on homomorphic encryption is applied to a consortium chain, the consortium chain is built based on a blockchain, the consortium chain includes at least a number of participant nodes and an orderer node, and the method includes: receiving a points conversion request instruction, and determining points conversion participants and points conversion amounts according to the points conversion request instruction, wherein the points conversion participants include a first participant and a second participant; Obtaining a first public key from a preset public key list, and obtaining a second public key from the public key list; The points conversion amount is encrypted using the first public key and the second public key to obtain a first amount ciphertext and a second amount ciphertext; Sending the first amount ciphertext to the peer node of the first participant, and completing a first points conversion based on the first amount ciphertext in the peer node of the first participant to obtain a first conversion result; Sending the second amount ciphertext to the peer node of the second participant, and completing the second points conversion based on the second amount ciphertext in the peer node of the second participant to obtain a second conversion result; Performing over-limit detection on the first conversion result and the second conversion result respectively; When the over-limit detection is passed, judging whether the first integral conversion is successful according to the first conversion result, and judging whether the second integral conversion is successful according to the second conversion result; When the first point conversion and the second point conversion are both successful, obtaining the first point conversion information and the second point conversion information, and sending the first point conversion information and the second point conversion information to the orderer node; The sending of the first amount ciphertext to the peer node of the first participant, and completing the first points conversion based on the first amount ciphertext in the peer node of the first participant to obtain a first conversion result, specifically includes: Obtaining the initial points ciphertext of the first participant; Sending the initial points ciphertext and the first amount ciphertext to the peer node of the first participant; Simulating a transaction in accordance with a smart contract based on the initial points ciphertext of the first participant and the first amount ciphertext in the peer node of the first participant to complete the first points conversion and obtain a first conversion result; The second amount ciphertext is sent to the peer node of the second participant, and a second point conversion is completed in the peer node of the second participant based on the second amount ciphertext to obtain a second conversion result, which specifically includes: Obtaining the initial points ciphertext of the second participant; Sending the initial points ciphertext and the second amount ciphertext to the peer node of the second participant; A transaction is simulated in the peer node of the second participant based on the initial points ciphertext of the second participant and the second amount ciphertext according to the smart contract to complete the second points conversion and obtain a second conversion result.

2. The integral conversion method based on homomorphic encryption according to claim 1, characterized in that: Before receiving the point conversion request instruction and determining the point conversion participants and the point conversion amount according to the point conversion request instruction, the method further includes: Generate a homomorphic public-private key pair for each of the participating nodes, wherein the homomorphic public-private key pair includes a public key and a private key; The private key of each of the participating nodes is stored in a database in its own local storage; The public key of each participating node is uploaded to the blockchain account book in turn to form a public key list.

3. The integral conversion method based on homomorphic encryption as claimed in claim 2, characterized in that: After uploading the public key of each of the participant nodes to the blockchain account book in sequence to form a public key list, the process further includes: Obtaining the initial points of each of the participating nodes; Using the public key of each of the participating nodes to encrypt the initial points of each participant, to obtain the initial points ciphertext of each of the participating nodes; The initial points ciphertext of each participating node is uploaded to the blockchain ledger in turn to form an initial points list.

4. The integral conversion method based on homomorphic encryption as claimed in claim 3, characterized in that: The simulating transaction in the peer node of the first participant according to the smart contract based on the initial points ciphertext of the first participant and the first amount ciphertext to complete the first points conversion and obtain the first conversion result specifically includes: Determining a first points conversion rule corresponding to the first participant according to the points conversion request instruction; In the peer node of the first participant, based on the first point conversion rule, the initial point ciphertext of the first participant and the first amount ciphertext are simulated for transaction according to the smart contract to perform first point conversion and obtain the first conversion result; The simulating transaction in the peer node of the second participant according to the smart contract based on the initial points ciphertext of the second participant and the second amount ciphertext to complete the second points conversion and obtain the second conversion result specifically includes: Determining a second point conversion rule corresponding to the second participant according to the point conversion request instruction; In the peer node of the second participant, based on the second point conversion rule, a transaction is simulated according to the smart contract for the initial point ciphertext and the second amount ciphertext of the second participant to perform the second point conversion and obtain the second conversion result.

5. The integral conversion method based on homomorphic encryption according to any one of claims 1 to 4, characterized in that: Performing over-limit detection on the first conversion result and the second conversion result respectively includes: Obtaining the private key of the first participant to obtain a first private key; Partially decrypting the first conversion result using the first private key to obtain positive and negative information of the first score, wherein the positive and negative information of the first score represents the positive and negative of the current score of the first participant; Obtaining the private key of the second participant to obtain a second private key; Partially decrypting the second conversion result using the second private key to obtain positive and negative information of the second points, wherein the positive and negative information of the second points represents the positive and negative of the current points of the second participant; An over-limit detection is performed on the first conversion result according to the positive and negative information of the first integral, and an over-limit detection is performed on the second conversion result according to the positive and negative information of the second integral.

6. The integral conversion method based on homomorphic encryption as claimed in claim 5, characterized in that: When the over-limit detection is passed, judging whether the first integral conversion is successful according to the first conversion result, and judging whether the second integral conversion is successful according to the second conversion result, specifically includes: When the over-limit detection is passed, the first conversion result and the second conversion result are signed respectively to obtain a first signature and a second signature, wherein the first signature includes attribute information of the first conversion result, and the second signature includes attribute information of the second conversion result; Whether the first points conversion is successful is determined based on the first signature, and whether the second points conversion is successful is determined based on the second signature.

7. A point conversion device based on homomorphic encryption, characterized in that: The point conversion method based on homomorphic encryption as described in any one of claims 1 to 6 is applied, and the point conversion method based on homomorphic encryption is installed in a consortium chain, and the consortium chain is built based on a blockchain, and the consortium chain includes at least a number of participant nodes and orderer nodes, and the device includes: An instruction receiving module, used to receive a points conversion request instruction, and determine the points conversion participants and the points conversion amount according to the points conversion request instruction, wherein the points conversion participants include a first participant and a second participant; A public key acquisition module, used to acquire a first public key from a preset public key list, and acquire a second public key from the public key list; A conversion amount encryption module, used to encrypt the points conversion amount using the first public key and the second public key to obtain a first amount ciphertext and a second amount ciphertext; A first points conversion module, used for sending the first amount ciphertext to the peer node of the first participant, and completing a first points conversion based on the first amount ciphertext in the peer node of the first participant to obtain a first conversion result; A second points conversion module, used for sending the second amount ciphertext to the peer node of the second participant, and completing the second points conversion based on the second amount ciphertext in the peer node of the second participant to obtain a second conversion result; An over-limit detection module, used to perform over-limit detection on the first conversion result and the second conversion result respectively; a conversion detection module, configured to determine whether the first integral conversion is successful according to the first conversion result, and determine whether the second integral conversion is successful according to the second conversion result, when the over-limit detection is passed; The points conversion module is used to obtain the first points conversion information and the second points conversion information when the first points conversion and the second points conversion are successful, and send the first points conversion information and the second points conversion information to the orderer node.

8. A computer device, characterized in that: It includes a memory and a processor, wherein the memory stores computer-readable instructions, and when the processor executes the computer-readable instructions, the steps of the integral conversion method based on homomorphic encryption as described in any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, which, when executed by a processor, implement the steps of the integral conversion method based on homomorphic encryption as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Homomorphic encryption method supporting ZKPs and blockchain transaction amount encryption method

    CN110414981A

  • Blockchain-based transaction method and apparatus, and remitter device

    US20210058230A1