WO2021043067A1 - 一种基于区块链的数据统计的方法及装置 - Google Patents
一种基于区块链的数据统计的方法及装置 Download PDFInfo
- Publication number
- WO2021043067A1 WO2021043067A1 PCT/CN2020/111832 CN2020111832W WO2021043067A1 WO 2021043067 A1 WO2021043067 A1 WO 2021043067A1 CN 2020111832 W CN2020111832 W CN 2020111832W WO 2021043067 A1 WO2021043067 A1 WO 2021043067A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- data
- server
- statistical
- public key
- group
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/602—Providing cryptographic facilities or services
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/62—Protecting access to data via a platform, e.g. using keys or access control rules
- G06F21/6218—Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
- G06F21/6272—Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database by registering files or documents with a third party
Definitions
- the embodiment of the present invention relates to the field of financial technology (Fintech), and in particular to a method and device for data statistics based on a block chain (BlockChain).
- the data statistics process refers to summarizing the to-be-statistical data of all participants, and then forming aggregated statistical data through a certain agreed statistical function.
- the statistical function is to determine the distribution curve of all to-be-stated data. After the statistics are completed, through the distribution curve, each participant and data user can query their position on the distribution curve to determine their ranking.
- the privacy of each participant needs to be protected, and the relationship between the participants and the data to be statistically protected is specifically protected, that is, during the data statistics process, it is only necessary to know which participants provided the data and what data to be statistically included. There is no need to know which participant provided which statistical data.
- the secret sharing method is mainly used to realize the privacy protection of each participant. For example, there are currently participant 1, participant 2, participant 3, and count the sum of the data to be statistic of the three.
- Participant 1 divides data A into A1, A2, A3, sends A2 to participant 2, and sends A3 to participant 3, and A1 retains it locally; participant 2 divides data B into B1, B2, B3, and divides B1 Send to participant 1, send B3 to participant 3, B2 is reserved locally; participant 3 divides data C into C1, C2, C3, sends C1 to participant 1, sends C2 to participant 2, and C3 locally Reserved; then, participant 1 sends A1, B1, C1 to the statistics party, participant 2 sends A2, B2, C2 to the statistics party, and participant 3 sends A3, B3, C3 to the statistics party, so the statistics party cannot Associate the statistical data of each participant, but the sum of the three statistical data can be determined.
- the embodiments of the present invention provide a method and device for data statistics based on a blockchain, which are used to provide a simple and easy-to-use data statistics method and protect the privacy of each participant.
- An embodiment of the present invention provides a block chain-based data statistics method, including:
- the statistics server receives the encrypted data from the data server forwarded by the forwarding server;
- the encrypted data is data encrypted by the data server using the first public key to treat statistical data and signature information;
- the first public key is the statistics server Generated and sent to the data server;
- the signature information is the information after the data server signs the data to be counted with the second private key;
- the second private key is the supervisory server according to the location of the data server.
- the statistics server uses the first private key corresponding to the first public key to decrypt the encrypted data to obtain the data to be counted and the signature information;
- the statistics server uses the second public key corresponding to the second private key to verify the signature information, and then counts the to-be-stated data to obtain a statistical result; the second public key is sent by the supervision server to the The group public key of the statistical group where the data server of the statistical server is located.
- the forwarding server receives the encrypted data sent by each data server, and sends the encrypted data to the statistics server.
- the statistics server cannot obtain the identity information of the data server that sends the data, and the statistics server cannot calculate the data according to each data.
- the sending time of the data server sent by the server infers the identity information of the data server.
- the identity information of the data server can be effectively hidden.
- the embodiment of the present invention realizes the privacy protection of the association relationship between the data server and the data to be counted by means of separation of permissions.
- the method further includes:
- the statistical server writes the signature information and the statistical data into the blockchain correspondingly, so that the supervisory server can verify the statistical data provided by the data server.
- the statistical server writes the signature information and the statistical data correspondingly into the blockchain, and utilizes the non-tamperability of the blockchain to ensure the accuracy of the signature information and the statistical data, and provide the supervisory server with no tampering.
- the data is written the signature information and the statistical data correspondingly into the blockchain, and utilizes the non-tamperability of the blockchain to ensure the accuracy of the signature information and the statistical data, and provide the supervisory server with no tampering. The data.
- the statistical server further includes:
- the statistics server writes the statistics result into the blockchain, and after receiving the data query request sent by the query server, obtains the query result from the blockchain according to the query request, and transfers the query result Feedback to the query server.
- the statistical server writes the statistical results into the blockchain, and provides query services for the query server.
- the blockchain is not easily tampered with, to ensure the accuracy of the statistical results, and provide the query server with unmodified information. data.
- the verification of the signature information by the statistics server using the second public key corresponding to the second private key includes:
- the statistics server uses the second public key to verify whether the data server is a data server in the statistics group, and if so, determines that the signature information passes verification.
- the statistical server uses the second public key to verify the signature information, determines whether to perform statistics on the statistical data provided by the data server, to ensure the accuracy of data statistics, and to avoid the data server in the non-statistical group from submitting errors.
- Statistical data pollution statistical results
- the method further includes:
- the statistical server sends the first public key to the data server, the data server can use the first public key to encrypt the statistical data and the signature information, and the encrypted data can be decrypted by the statistical server using the first private key but cannot be decrypted
- the forwarding server decrypts.
- the statistics server receives the second public key sent by the supervision server, and the statistics server can use the second public key to verify whether the data server belongs to the statistics group to be counted.
- the embodiment of the present invention also provides a block chain-based data statistics method, including:
- the forwarding server receives the encrypted data sent by the data server;
- the encrypted data is data encrypted by the data server using the first public key to be statistical data and signature information, and the first public key is generated by the statistical server and sent to the The data server;
- the signature information is the information after the data server uses the second private key to sign the to-be-stated data;
- the second private key is the group public key of the supervisory server according to the statistics group where the data server is located And the group private key is generated for the data server and sent to the data server;
- the forwarding server sends the encrypted data to the statistics server, so that the statistics server uses the first private key corresponding to the first public key to decrypt the encrypted data, and is using the second After the decrypted signature information is verified by the second public key corresponding to the private key, the decrypted data to be statistically counted; the second public key is the statistics of the data server sent by the supervision server to the statistical server The group public key of the group.
- the forwarding server can only know the identity information of the data server that sends the data, but does not know the data to be counted in the encrypted data.
- the forwarding server forwards the encrypted data to the statistics server, and the statistics server can only obtain the information of the forwarding server. Identity information, but the identity information of the data server that sends the data cannot be obtained.
- the statistics server cannot infer the identity information of the data server based on the sending time of the data sent by each data server.
- the identity information of the server realizes the privacy protection of the association relationship between the data server and the data to be counted by means of separation of permissions.
- the statistics group includes N data servers, and N is greater than or equal to 1; there are M encrypted data sent by the data server to the forwarding server, and M is greater than or equal to 1, and each encrypted data corresponds to a data attribute ;
- the receiving of the encrypted data sent by the data server by the forwarding server includes:
- the forwarding server sending the encrypted data to the statistics server includes:
- the forwarding server After determining that the forwarding server has completed receiving the M encrypted data sent by each of the N data servers, it determines that M groups of encrypted data have the same attribute, and each group has N encrypted data;
- the forwarding server sends the M groups of encrypted data to the statistics server at a preset time.
- the forwarding server can receive encrypted data sent by each data server in the statistical group within a preset time period, and each data server sends encrypted data of multiple data attributes to the forwarding server, and the forwarding server can be based on each The data attributes of the data to be counted group the received encrypted data, and the grouped data to be counted are sent to the statistics server respectively.
- the embodiment of the present invention also provides a block chain-based data statistics method, including:
- the data server uses the second private key to sign the statistical data to generate signature information;
- the second private key is generated by the supervisory server for the data server according to the group public key and the group private key of the statistical group where the data server is located And sent to the data server;
- the data server uses a first public key to encrypt the signature information and the data to be counted to generate encrypted data; the first public key is generated by the statistics server and sent to the data server;
- the data server sends the encrypted data to the forwarding server, so that the forwarding server forwards the encrypted data to the statistics server for data statistics.
- the data server uses the second private key to sign the statistical data to generate signature information, and uses the first public key to encrypt the signature information and the statistical data to generate encrypted data.
- the forwarding server receives the encrypted data, but because Without the first private key to decrypt the encrypted data, only the identity information of the data server that sent the data can be known, but the data to be counted in the encrypted data is not known.
- the forwarding server forwards the encrypted data to the statistics server, and the statistics server can only The identity information of the forwarding server is obtained, but the identity information of the data server that sends the data cannot be obtained.
- the statistics server cannot infer the identity information of the data server based on the sending time of the data sent by each data server. This way, it can be done Efficiently hide the identity information of the data server.
- the embodiment of the present invention realizes the privacy protection of the association relationship between the data server and the data to be counted by means of separation of permissions.
- M data to be counted there are M data to be counted, and M is greater than or equal to 1;
- the data server uses the first public key to encrypt the signature information and the to-be-stated data to generate encrypted data, including:
- the data server For each data to be counted, uses the first public key to encrypt the signature information and the data to be counted to generate encrypted data.
- the data server before generating the signature information, the data server further includes:
- the data server receives the second private key sent by the supervision server
- the data server Before said generating encrypted data, the data server further includes:
- the data server receives the first public key sent by the statistics server.
- the data server receives the second private key sent by the supervision server, and is used to sign the statistical data to generate signature information, and the data server receives the first public key sent by the statistical server, which is used to perform the statistical data and signature information. encryption.
- the embodiment of the present invention also provides a block chain-based data statistics method, including:
- the supervision server obtains the information to be verified from the blockchain, and the information to be verified includes the data to be statistic and signature information;
- the signature information is that the data server that provides the data to be statistic uses the second private key to verify the data to be statistic. Signed information; the second private key is generated and sent to the data server by the supervision server according to the group public key and the group private key of the statistical group where the data server is located;
- the supervision server decrypts the signature information using the group private key of the statistical group where the data server to be verified is located, and determines the signature information of the data server to be verified and the corresponding statistical data;
- the supervision server verifies the statistical data provided by the data server to be verified according to the signature information of the data server to be verified and the corresponding statistical data.
- the supervisory server can use the group private key of the statistical group to decrypt each signature information, so that the statistical data provided by the data server to be verified can be obtained from the blockchain, so that the authenticity and authenticity of the data provided by the data server to be verified can be obtained from the blockchain.
- the rationality is verified to ensure the validity of the data in the data statistics process.
- the signature information and statistical data are correspondingly written into the blockchain to provide the supervisory server with data that has not been tampered with.
- the supervision server obtains the information to be verified from the blockchain, it further includes:
- the supervision server generates the group private key and the group public key of the statistical group
- the supervision server generates the second private key of each data server in the statistical group according to the group private key and the group public key of the statistical group, and sends the second private key to each data server so that the data server can use the second private key of each data server.
- the private key signs the statistical data to be processed and generates signature information; the signature information is used by the data server to use the first public key to encrypt the signature information and the statistical data; the first public key is generated and sent by the statistical server To the data server;
- the supervision server sends the group public key as the second public key corresponding to the second private key to the statistics server, so that the statistics server uses the second public key to verify the signature information.
- the data server can use its own private key to generate signature information for the statistical group where it is located, and other data servers or statistical servers can only use the group public key to verify the signature, and which group the signature information is located to, but cannot be located To which data server, only the supervisory server can use the group private key to locate the signature information to which data server.
- the statistical server can ensure that the statistical data is processed by the statistical server and the supervisory server provides the data server with the data to be statistic. Verification.
- an embodiment of the present invention also provides a statistics server, including:
- Transceiving unit decryption unit, processing unit
- the transceiving unit is configured to receive encrypted data from the data server forwarded by the forwarding server;
- the encrypted data is data encrypted by the data server using a first public key to treat statistical data and signature information;
- the first public key is The processing unit generates and sends to the data server;
- the signature information is the information obtained by the data server using the second private key to sign the to-be-stated data;
- the second private key is the information obtained by the supervisory server according to the The group public key and the group private key of the statistical group where the data server is located are generated for the data server and sent to the data server;
- the decryption unit is configured to use the first private key corresponding to the first public key to decrypt the encrypted data to obtain the data to be counted and the signature information;
- the processing unit is configured to use the second public key corresponding to the second private key to verify the signature information, and then collect statistics on the to-be-stated data to obtain a statistical result; the second public key is sent by the supervision server The group public key of the statistical group where the data server to the processing unit is located.
- processing unit is further configured to:
- the signature information and the statistical data are correspondingly written into the blockchain, so that the supervisory server can control the statistical data provided by the data server authenticating.
- processing unit is further configured to:
- the statistical result is written into the blockchain, and after receiving the data query request sent by the query server, the query result is obtained from the blockchain according to the query request, and the query result is obtained from the blockchain according to the query request. The query result is fed back to the query server.
- processing unit is specifically configured to:
- the second public key is used to verify whether the data server is a data server in the statistics group, and if so, it is determined that the signature information passes verification.
- processing unit is further configured to:
- the transceiver unit Before the transceiver unit receives the encrypted data from the data server forwarded by the forwarding server, generating the first private key and the first public key;
- the transceiver unit is also used for:
- an embodiment of the present invention also provides a forwarding server, including:
- the receiving unit is configured to receive encrypted data sent by a data server;
- the encrypted data is data obtained by the data server using a first public key to encrypt statistical data and signature information, and the first public key is generated and combined by the statistical server.
- the signature information is the information after the data server signs the data to be statistic with the second private key;
- the second private key is the supervision server according to the statistics group where the data server is located
- the group public key and group private key of is generated for the data server and sent to the data server;
- the sending unit is configured to send the encrypted data to the statistics server, so that the statistics server uses the first private key corresponding to the first public key to decrypt the encrypted data, and is using the After the decrypted signature information is verified by the second public key corresponding to the second private key, the decrypted data to be statistically counted; the second public key is the data server sent by the supervision server to the statistical server The group public key of the statistical group.
- the statistical group includes N data servers, and N is greater than or equal to 1; there are M encrypted data sent by the data server to the receiving unit, and M is greater than or equal to 1, and each encrypted data corresponds to a data attribute ;
- the receiving unit is specifically configured to:
- the sending unit is specifically used for:
- the M groups of encrypted data are sent to the statistics server at a preset time.
- an embodiment of the present invention also provides a data server, including:
- Encryption unit and transceiver unit
- the encryption unit is used to use a second private key to sign the statistical data to generate signature information;
- the second private key is generated by the supervisory server for the data server according to the group public key and the group private key of the statistical group where the data server is located And sent to the transceiver unit;
- the encryption unit is further configured to use a first public key to encrypt the signature information and the data to be counted to generate encrypted data; the first public key is generated by the statistics server and sent to the transceiver unit;
- the transceiver unit is configured to send the encrypted data to the forwarding server, so that the forwarding server forwards the encrypted data to the statistics server for data statistics.
- M data to be counted there are M data to be counted, and M is greater than or equal to 1;
- the encryption unit is specifically used for:
- encrypted data is generated after encrypting the signature information and the data to be counted using the first public key.
- the transceiver unit is further configured to:
- the transceiver unit is also used for:
- the encryption unit Before the encryption unit generates encrypted data, the first public key sent by the statistics server is received.
- an embodiment of the present invention also provides a supervision server, including:
- the obtaining unit is used to obtain the information to be verified from the blockchain, the information to be verified includes the statistical data and the signature information;
- the signature information is the data server that provides the statistical data using the second private key to The information to be signed by the statistical data;
- the second private key is generated and sent to the data server by the supervisory server according to the group public key and the group private key of the statistical group where the data server is located;
- the decryption unit is configured to use the group private key of the statistical group where the data server to be verified is located to decrypt the signature information, and determine the signature information of the data server to be verified and the corresponding statistical data;
- the verification unit is configured to verify the statistical data provided by the data server to be verified according to the signature information of the data server to be verified and corresponding statistical data.
- the device further includes a generating unit and a transceiver unit;
- the generating unit is used for:
- the transceiver unit is used for:
- the second private key of each data server is sent to each data server, so that the data server uses the second private key to sign the statistical data to be processed and generates signature information; the signature information is used by the data server.
- the first public key encrypts the signature information and the data to be counted; the first public key is generated by the statistics server and sent to the data server;
- the group public key is sent to the statistics server as the second public key corresponding to the second private key, so that the statistics server uses the second public key to verify the signature information.
- an embodiment of the present invention also provides a computing device, including:
- processor, memory, and communication interface among them, the processor, memory and communication interface are connected by a bus;
- the processor is configured to read the program in the memory, execute the method executed by the data server in the blockchain-based data statistics, or forward the method executed by the server, or the method executed by the statistics server, or supervise the execution of the server Methods;
- the memory is used to store one or more executable programs, and can store data used by the processor when performing operations.
- the embodiment of the present invention also provides a non-transitory computer-readable storage medium.
- the non-transitory computer-readable storage medium stores computer instructions. When it runs on a computer, the computer executes the aforementioned blockchain-based The method executed by the data server, or the method executed by the forwarding server, or the method executed by the statistics server, or the method executed by the supervisory server in the data statistics.
- an embodiment of the present invention also provides a computer program product containing instructions.
- the computer program product includes a calculation program stored on a non-transitory computer-readable storage medium.
- the computer program includes program instructions. When the program instructions are executed by a computer, the computer executes the method executed by the data server in the blockchain-based data statistics, or the method executed by the forwarding server, or the method executed by the statistics server, or the method executed by the supervisory server.
- FIG. 1 is a schematic diagram of a system architecture provided by an embodiment of the present invention
- FIG. 2 is a schematic flowchart of a data statistics method based on blockchain according to an embodiment of the present invention
- FIG. 3 is a schematic structural diagram of a statistics server provided by an embodiment of the present invention.
- FIG. 4 is a schematic structural diagram of a forwarding server provided by an embodiment of the present invention.
- FIG. 5 is a schematic structural diagram of a data server provided by an embodiment of the present invention.
- FIG. 6 is a schematic structural diagram of a supervision server provided by an embodiment of the present invention.
- FIG. 7 is a schematic structural diagram of a computing device provided by this application.
- FIG. 1 exemplarily shows a system architecture applicable to the method for providing blockchain-based data statistics according to an embodiment of the present invention.
- the system architecture may include a data server, a forwarding server, a statistics server, a supervision server, and a blockchain.
- Multiple data servers form a statistical group, and the embodiment of the present invention is used to perform statistics on to-be-stated data provided by multiple data servers in a statistical group.
- the data server also called the statistical participant or participant, is the main body that participates in the calculation of statistical standards and contributes to the statistical data, and the data server sends the statistical data to the forwarding server.
- Each data server has a series of atomic attributes. Atomic attributes can be arbitrarily combined into new composite attributes in a predetermined manner.
- the statistical data sent by each data server can be atomic attribute values or composite attribute values.
- the forwarding server also called the data forwarding party, is used to receive the statistical data sent by each data server in the statistical group within a preset time period, and after the statistical data is summarized, it will be summarized at a specific time point (preset time) The subsequent data is sent to the statistics server.
- the statistical server also called the standard publisher and the statistical party, is used to receive the data forwarded by the forwarding server, and perform statistics on the received data according to a certain agreed statistical function, and store the statistical data in the blockchain .
- the statistics server is also used to store the received data in the blockchain.
- the type of the attribute value of the data server can be any type
- the agreed statistical function can also be any statistical function that can be obtained by aggregating attribute values.
- the supervisory server also called the supervisor, is used to read the data stored in the blockchain by the statistical server, and verify the statistical data provided by the data server based on the read data.
- a blockchain is a chain composed of a series of blocks. In addition to recording the data of this block, each block also records the hash value of the previous block. In this way, a chain is formed. Blockchain is used to store data to ensure the tamper-proof modification of data.
- the forwarding server, the statistics server, and the supervision server are independent entities, and the data transmission between the three is limited to the data involved in the embodiment of the present invention, and no data other than the embodiment of the present invention will be sent.
- the statistical server may be a server provided by an industry association that sets statistical standards
- the forwarding server may be a server provided by a third-party network service provider other than the association and its members
- the supervision server may be a server provided by a supervisory authority.
- the embodiment of the present invention can perform data statistics on multiple statistics groups at the same time.
- the identification of the statistical group where the data server is recorded in the statistical data provided by each data server such as the ID (Identification) of the statistical group, so that the statistical server can identify after receiving the statistical data In which statistics group the data to be statistic is sent from the data server.
- FIG. 2 exemplarily shows the flow of a method for data statistics based on a blockchain provided by an embodiment of the present invention, and the flow may be jointly executed by the foregoing data server, forwarding server, and statistics server.
- the statistics server generates a key pair for encrypting and decrypting data, which are the first public key and the first private key.
- the statistics server sends the first public key to the data server, and the data server receives the first public key and uses the first public key.
- a public key encrypts data (including data to be counted and signature information), so that after the statistics server receives the encrypted data sent by the data server forwarded by the forwarding server, the statistics server can use the first private key to decrypt the encrypted data.
- the supervision server (equivalent to the group administrator in the statistical group) generates the group private key and the group public key of the statistical group for a statistical group, and generates each group in the statistical group according to the group private key and the group public key of the statistical group.
- the second private key of the data server (each data server corresponds to a second private key) and sent to each data server. After each data server receives its second private key, it will count according to its second private key.
- the data is signed and signature information is generated, so that each data server uses the first public key to encrypt the signature information and the data to be counted to generate encrypted data.
- the supervision server will also send the group public key of the statistics group as the second public key corresponding to the second private key to the statistics server or other data servers, where the statistics server can use the second public key to verify the signature information. Specifically, The statistics server can use the second public key to verify whether the data server corresponding to the signature information belongs to the statistics group currently being counted.
- the data servers can use their own private keys to generate signature information for the statistical group they belong to.
- Other data servers or statistical servers can only use the group public key to verify the signature and locate the signature information to which group, but cannot Which data server to locate, and only the supervisory server can use the group private key to locate the signature information to which data server.
- the statistical server can ensure that the statistical data is processed by the statistical server and the supervisory server provides statistics to the data server. Data verification.
- the statistics server will receive the group public key generated and sent by the supervisory server for each statistical group; the data server will receive the first generated and sent by the supervisory server for the data server in the statistical group. Second, the private key; the data server will also receive the first public key generated and sent by the statistics server.
- the process specifically includes:
- Step 201 The data server uses the second private key to sign the statistical data to be processed to generate signature information.
- the data to be counted is the attribute value to be counted.
- the data server uses its own second private key to sign the counted data. Specifically, it can calculate the hash value of the string of the data to be counted, and then use the second private key to Hash value signature to generate signature information.
- the data server may calculate the hash value of the character string composed of the data to be statistic, the statistic group identifier, etc., and then sign the hash value according to the second private key to generate signature information.
- Step 202 The data server uses the first public key to encrypt the signature information and the to-be-stated data to generate encrypted data.
- the data server may have M data to be counted, where M is greater than or equal to 1, and each data to be counted corresponds to a data attribute.
- the data to be counted sent by the data server includes total assets, liability assets, operating income, and net profit.
- the data server For each of the M to-be-stated data, the data server uses the first public key to encrypt the signature information and the to-be-stated data to generate encrypted data. Taking one of the statistical data v_i as an example, the data server uses the first public key pk_p to encrypt the signature information Sig_group_j_v_i and the statistical data v_i to generate encrypted data as pk_p(v_i, Sig_group_j_v_i).
- Step 203 The data server sends the encrypted data to the forwarding server.
- the data server sends encrypted data to the forwarding server. Because the forwarding server does not have the first private key to decrypt the encrypted data, that is, the forwarding server cannot decrypt the encrypted data, nor can it obtain the pending data in the encrypted data. Statistical data. Although, when the forwarding server receives the encrypted data sent by the data server, it can determine the identity information of the data server sending the data based on the received encrypted data, such as IP (Internet Protocol, protocol for interconnection between networks) address , But it does not know the content of the encrypted data, that is, the forwarding server cannot associate the data server with the data to be counted.
- IP Internet Protocol, protocol for interconnection between networks
- Step 204 The forwarding server sends the encrypted data to the statistics server.
- the forwarding server After the forwarding server hides the identity information of the data server that encrypts the data, it sends the concealed encrypted data to the statistics server.
- the hiding processing in the embodiment of the present invention can be understood as follows. After the forwarding server receives the encrypted data, only The identity information of the data server sending the data can be known, but the data to be counted in the encrypted data is not known. The forwarding server forwards the encrypted data to the statistics server. The statistics server can only obtain the identity information of the forwarding server, but not the sending The identity information of the data server of the data, so as to achieve the hiding processing of the identity information of the data server by the forwarding server.
- the forwarding server can receive encrypted data sent by each data server in the statistical group within a preset time period, and each data server sends encrypted data of multiple data attributes to the forwarding server.
- the statistical group includes N data servers, N is greater than or equal to 1, the data server sends M encrypted data to the forwarding server, M is greater than or equal to 1, each encrypted data corresponds to a data attribute, and the forwarding server receives N data
- M encrypted data sent by each data server in the server and after the M encrypted data sent by each of the N data servers are determined to be received, M groups of encrypted data with the same attributes are determined, and each group has N encrypted data Data, M groups of encrypted data are sent to the statistics server at a preset time.
- the forwarding server may determine that the encrypted data has been received after the above-mentioned preset time period, or may determine that the encrypted data has been received after the N data servers have completed sending, or it may be determined by other standards.
- the preset time for the forwarding server to send the encrypted data to the statistics server may be a certain pre-appointed time point after the completion of receiving the encrypted data is determined.
- the statistics group includes 5 data servers, and each data server sends 2 data to be counted to the forwarding server, namely total assets and liability assets.
- the forwarding server stipulates that the preset time period for accepting data is 2019/9 From /200:00 to 2019/9/2 23:59, each data server can send its statistical data to the forwarding server at any point in the time period, and the forwarding server can be at 00:00 2019/9/3 Finish receiving data, and hide the received data, and group the statistical data with the same data attributes into one group. Specifically, group the total assets sent by 5 data servers into one group, and group 5 data servers Send the liabilities and assets into one group separately, and then send the two groups of data to the statistics server.
- the forwarding server receives the encrypted data sent by each data server within a preset time period and sends the encrypted data at the preset time.
- the statistics server cannot obtain the identity information of the data server that sent the data.
- the statistics server cannot infer the identity information of the data server based on the sending time of the data sent by each data server.
- the identity information of the data server can be efficiently hidden.
- the embodiment of the present invention realizes the privacy protection of the association relationship between the data server and the data to be counted by means of separation of permissions.
- the forwarding server can receive the encrypted data sent by each data server within a preset time period.
- the forwarding server needs to be online in real time, and there is no need for the data servers to be online in real time.
- the data server only needs to perform data interaction once, and does not need to perform multiple data interactions. Compared with multiple data interactions and real-time online in the prior art, it is simpler and easier to use.
- Step 205 The statistics server uses the first private key corresponding to the first public key to decrypt the encrypted data to obtain the data to be counted and the signature information.
- the data server uses the first private key sk_p to decrypt the encrypted data pk_p(v_i, Sig_group_j_v_i), and decrypts the signature information Sig_group_j_v_i and the statistical data v_i respectively.
- the signature information is used by the statistical server for the statistical group where the data server is Performing verification is equivalent to the statistical server verifying whether the statistical data provided by the data server needs to be counted; the statistical data is used by the statistical server to perform data statistics.
- Step 206 After the statistical server passes the verification of the signature information by using the second public key corresponding to the second private key, the statistical data is calculated to obtain the statistical result.
- the statistics server uses the second public key to verify whether the data server is a data server in the statistics group. If it is, it is determined that the signature information has passed the verification, and the statistical data provided by the data server is counted; otherwise, it is determined that the signature information does not pass the verification. No statistics will be made on the to-be-stated data provided by the data server.
- the data server uses the second public key pk_group to verify whether the data server indicated by the signature information Sig_group_j_v_i is a data server in the statistical group.
- the statistics server can enter the data statistics stage, and perform statistics on the statistical data according to the preset statistical function and determine the statistical results, such as determining the distribution curve of the statistical data, determining the sum of the statistical data, and so on.
- the statistical server can write the statistical results into the blockchain for the query server (data user) to query the data in the blockchain.
- the statistics server can obtain the query result from the blockchain according to the query request, and feed the query result back to the query server.
- the query server can also directly obtain it from the blockchain.
- the query result is not limited here.
- the query server can send its own attribute value to the statistics server, and the statistics server compares the received attribute value with the corresponding statistics result, and returns the comparison result to the query server, such as the return of the query server The rank of the attribute value in the distribution curve.
- the statistics server should delete the corresponding intermediate data and the comparison result immediately after the comparison is completed.
- the statistics server can further verify the received encrypted data after confirming that the signature information has been verified to verify that there are duplicates in the received signature information, and whether the total number of received encrypted data is the same as the expected total number of data servers If the verification is passed, you can enter the data statistics stage, otherwise you need to determine the reason for the failure of the verification.
- the statistical server After the statistical server obtains the statistical data and the signature information, it can also write the signature information and the statistical data into the block chain correspondingly, so as to supervise the server to verify the statistical data provided by the data server.
- the data to be statistic is non-sensitive data, which can be stored in the blockchain as plaintext data and signature information; in another achievable way, the data to be statistic is sensitive data.
- the statistical data is converted into a corresponding interval value (for example, the top 30%) and the signature information is correspondingly stored in the blockchain.
- non-sensitive data can be used to calculate an accurate distribution curve
- sensitive data can be used to calculate a rough distribution interval (top 10%, top 30%, top 50%, and others).
- the smart contract for data storage can be called to realize the interaction between the data on the chain and the data off the chain.
- it can also be other blockchain components for providing data storage functions.
- the supervisory server can obtain the information from the blockchain for verification. Specifically, the supervisory server obtains the information to be verified, and the information to be verified includes There are multiple one-to-one correspondences of statistical data and signature information.
- the supervision server uses the group private key of the statistical group where the data server to be verified is located to decrypt each signature information, thereby determining the signature information of the data server to be verified and the corresponding statistical data, and supervise The server verifies the statistical data provided by the data server to be verified according to the signature information of the data server to be verified and the corresponding statistical data.
- the supervision server can use a fair manner to verify the authenticity and rationality of the statistics to be provided by the data server.
- the supervisory server can use the group private key of the statistical group to decrypt each signature information, so that the statistical data provided by the data server to be verified can be obtained from the blockchain, so that the authenticity and authenticity of the data provided by the data server to be verified can be obtained from the blockchain.
- the rationality is verified to ensure the validity of the data in the data statistics process.
- the signature information and statistical data are correspondingly written into the blockchain to provide the supervisory server with data that has not been tampered with.
- FIG. 3 exemplarily shows a structural diagram of a statistics server provided by an embodiment of the present invention, and the statistics server includes:
- Transceiving unit 301 decryption unit 302, processing unit 303;
- the transceiving unit 301 is configured to receive encrypted data from a data server forwarded by a forwarding server; the encrypted data is data encrypted by the data server using a first public key to treat statistical data and signature information; the first public key Is generated by the processing unit 303 and sent to the data server; the signature information is the information obtained by the data server using the second private key to sign the data to be counted; the second private key is the supervision server Generate and send to the data server according to the group public key and the group private key of the statistical group where the data server is located;
- the decryption unit 302 is configured to use the first private key corresponding to the first public key to decrypt the encrypted data to obtain the data to be counted and the signature information;
- the processing unit 303 is configured to use the second public key corresponding to the second private key to verify the signature information, and then collect statistics on the to-be-stated data to obtain a statistical result; the second public key is the supervision server The group public key of the statistical group where the data server is sent to the processing unit 303.
- processing unit 303 is further configured to:
- the signature information and the statistical data are correspondingly written into the blockchain, so that the supervisory server can control the statistical data provided by the data server authenticating.
- processing unit 303 is further configured to:
- the statistical result is written into the blockchain, and after receiving the data query request sent by the query server, the query result is obtained from the blockchain according to the query request, and the query result is obtained from the blockchain according to the query request. The query result is fed back to the query server.
- processing unit 303 is specifically configured to:
- the second public key is used to verify whether the data server is a data server in the statistics group, and if so, it is determined that the signature information passes verification.
- processing unit 303 is further configured to:
- the transceiving unit 301 Before the transceiving unit 301 receives the encrypted data from the data server forwarded by the forwarding server, generating the first private key and the first public key;
- the transceiver unit 301 is also used for:
- FIG. 4 exemplarily shows a schematic structural diagram of a forwarding server provided by an embodiment of the present invention, and the forwarding server includes:
- the receiving unit 401 is configured to receive encrypted data sent by a data server;
- the encrypted data is data obtained by the data server using a first public key to encrypt statistical data and signature information, and the first public key is generated by the statistical server And sent to the data server;
- the signature information is the information obtained by the data server using the second private key to sign the data to be counted;
- the second private key is the statistics of the supervisory server according to the location of the data server
- the group public key and the group private key of the group are generated for the data server and sent to the data server;
- the sending unit 402 is configured to send the encrypted data to the statistics server, so that the statistics server uses the first private key corresponding to the first public key to decrypt the encrypted data, and uses all the encrypted data. After the decrypted signature information is verified by the second public key corresponding to the second private key, the decrypted data to be statistically counted; the second public key is the data sent by the supervision server to the statistical server The group public key of the statistics group where the server is located.
- the statistical group includes N data servers, and N is greater than or equal to 1.
- the data server sends M encrypted data to the receiving unit 401, and M is greater than or equal to 1, and each encrypted data corresponds to one data. Attributes;
- the receiving unit 401 is specifically configured to:
- the sending unit 402 is specifically configured to:
- the M groups of encrypted data are sent to the statistics server at a preset time.
- FIG. 5 exemplarily shows a schematic structural diagram of a data server provided by an embodiment of the present invention, and the data server includes:
- the encryption unit 501 is configured to use a second private key to sign the statistical data to be generated to generate signature information; the second private key is used by the supervisory server according to the group public key and group private key of the statistical group where the data server is located. Generate and send to the transceiver unit 502;
- the encryption unit 501 is further configured to use a first public key to encrypt the signature information and the to-be-stated data to generate encrypted data; the first public key is generated by the statistics server and sent to the transceiver unit 502;
- the transceiving unit 502 is configured to send the encrypted data to the forwarding server, so that the forwarding server forwards the encrypted data to the statistics server for data statistics.
- M data to be counted there are M data to be counted, and M is greater than or equal to 1;
- the encryption unit 501 is specifically configured to:
- encrypted data is generated after encrypting the signature information and the data to be counted using the first public key.
- the transceiving unit 502 is further configured to:
- the encryption unit 501 Before the encryption unit 501 generates the signature information, receiving the second private key sent by the supervision server;
- the transceiver unit 502 is also used for:
- the encryption unit 501 Before the encryption unit 501 generates encrypted data, it receives the first public key sent by the statistics server.
- FIG. 6 exemplarily shows a schematic structural diagram of a supervision server provided by an embodiment of the present invention, and the supervision server includes:
- the obtaining unit 601 is configured to obtain information to be verified from the blockchain, the information to be verified includes statistical data and signature information; the signature information is that the data server that provides the statistical data uses a second private key pair The information to be signed by the statistical data; the second private key is generated by the supervisory server according to the group public key and the group private key of the statistical group where the data server is located for the data server and sent to the data server;
- the decryption unit 602 is configured to use the group private key of the statistical group where the data server to be verified is located to decrypt the signature information, and determine the signature information of the data server to be verified and the corresponding statistical data;
- the verification unit 603 is configured to verify the statistical data provided by the data server to be verified according to the signature information of the data server to be verified and corresponding statistical data.
- the device further includes a generating unit 604 and a transceiver unit 605;
- the generating unit 604 is used to:
- the transceiver unit 605 is used to:
- the second private key of each data server is sent to each data server, so that the data server uses the second private key to sign the statistical data to be processed and generates signature information; the signature information is used by the data server.
- the first public key encrypts the signature information and the data to be counted; the first public key is generated by the statistics server and sent to the data server;
- the group public key is sent to the statistics server as the second public key corresponding to the second private key, so that the statistics server uses the second public key to verify the signature information.
- the present application also provides a computing device.
- the computing device includes at least one processor 720 for implementing the method shown in FIG. 2 provided by the embodiment of the present application. It relates to the method executed by the data server in the method embodiment, or the method executed by the forwarding server, or the method executed by the statistics server, or the method executed by the supervisory server.
- the computing device 700 may also include at least one memory 730 for storing program instructions and/or data.
- the memory 730 and the processor 720 are coupled.
- the coupling in the embodiments of the present application is an indirect coupling or communication connection between devices, units or modules, and may be in electrical, mechanical or other forms, and is used for information exchange between devices, units or modules.
- the processor 720 may operate in cooperation with the memory 730.
- the processor 720 may execute program instructions stored in the memory 730. At least one of the at least one memory may be included in the processor.
- each step of the above method can be completed by an integrated logic circuit of hardware in the processor or instructions in the form of software.
- the steps of the method disclosed in the embodiments of the present application may be directly embodied as being executed and completed by a hardware processor, or executed by a combination of hardware and software modules in the processor.
- the software module can be located in a mature storage medium in the field such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers.
- the storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware. To avoid repetition, it will not be described in detail here.
- the processor in the embodiment of the present application may be an integrated circuit chip with signal processing capability.
- the steps of the foregoing method embodiments can be completed by hardware integrated logic circuits in the processor or instructions in the form of software.
- the above-mentioned processor may be a general-purpose processor, a digital signal processing circuit (digital signal processor, DSP), a dedicated integrated circuit (application specific integrated circuit, ASIC), a field programmable gate array (field programmable gate array, FPGA) or other Programming logic devices, discrete gates or transistor logic devices, discrete hardware components.
- DSP digital signal processing circuit
- ASIC application specific integrated circuit
- FPGA field programmable gate array
- Programming logic devices discrete gates or transistor logic devices, discrete hardware components.
- the general-purpose processor may be a microprocessor or the processor may also be any conventional processor or the like.
- the steps of the method disclosed in the embodiments of the present application can be directly embodied as being executed and completed by a hardware decoding processor, or executed and completed by a combination of hardware and software modules in the decoding processor.
- the software module can be located in a mature storage medium in the field such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, registers.
- the storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.
- the memory in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory.
- the non-volatile memory can be read-only memory (ROM), programmable read-only memory (programmable ROM, PROM), erasable programmable read-only memory (erasable PROM, EPROM), and electrically available Erase programmable read-only memory (electrically EPROM, EEPROM) or flash memory.
- the volatile memory may be random access memory (RAM), which is used as an external cache.
- RAM random access memory
- static random access memory static random access memory
- dynamic RAM dynamic RAM
- DRAM dynamic random access memory
- synchronous dynamic random access memory synchronous DRAM, SDRAM
- double data rate synchronous dynamic random access memory double data rate SDRAM, DDR SDRAM
- enhanced synchronous dynamic random access memory enhanced SDRAM, ESDRAM
- synchronous connection dynamic random access memory serial DRAM, SLDRAM
- direct rambus RAM direct rambus RAM
- the computing device 700 may further include a communication interface 710 for communicating with other devices through a transmission medium, so that the apparatus used in the computing device 700 can communicate with other devices.
- the communication interface may be a transceiver, circuit, bus, module, or other type of communication interface.
- the transceiver when the communication interface is a transceiver, the transceiver may include an independent receiver and an independent transmitter; it may also be a transceiver with integrated transceiver functions, or an interface circuit.
- the computing device 700 may also include a communication line 740.
- the communication interface 710, the processor 720, and the memory 730 may be connected to each other through a communication line 740;
- the communication line 740 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (extended industry standard architecture). , Referred to as EISA) bus and so on.
- the communication line 740 can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is used in FIG. 7, but it does not mean that there is only one bus or one type of bus.
- embodiments of the present invention also provide a non-transitory computer-readable storage medium.
- the non-transitory computer-readable storage medium stores computer instructions. When it runs on a computer, the computer executes the instructions shown in FIG. 2 It relates to the method executed by the data server in the method embodiment, or the method executed by the forwarding server, or the method executed by the statistics server, or the method executed by the supervisory server.
- inventions of the present application provide a computer program product.
- the computer program product includes a calculation program stored on a non-transitory computer-readable storage medium.
- the computer program includes program instructions. When executed by a computer, the computer is caused to execute the method executed by the data server, or the method executed by the forwarding server, or the method executed by the statistics server, or the method executed by the supervision server in the method embodiment involved in FIG. 2 above.
- These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device.
- the device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
- These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment.
- the instructions provide steps for implementing the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- General Health & Medical Sciences (AREA)
- Computer Hardware Design (AREA)
- Computer Security & Cryptography (AREA)
- Health & Medical Sciences (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Bioethics (AREA)
- Databases & Information Systems (AREA)
- Storage Device Security (AREA)
Abstract
本发明公开了一种基于区块链的数据统计的方法及装置,其中,方法包括:数据服务器使用第二私钥对待统计数据进行签名后生成签名信息,使用第一公钥对签名信息和待统计数据加密后生成加密数据,将加密数据发送至转发服务器,转发服务器将加密数据发送至统计服务器,统计服务器使用第一公钥对应的第一私钥解密加密数据,得到待统计数据和签名信息,使用第二私钥对应的第二公钥对签名信息验证通过后,统计待统计数据得到统计结果。该技术方案用于提供一种简单易用的数据统计方法,且保护各参与方隐私。
Description
相关申请的交叉引用
本申请要求在2019年09月03日提交中国专利局、申请号为201910828975.6、申请名称为“一种基于区块链的数据统计的方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本发明实施例涉及金融科技(Fintech)领域,尤其涉及一种基于区块链(BlockChain)的数据统计的方法及装置。
随着计算机技术的发展,越来越多的技术应用在金融领域,传统金融业正在逐步向金融科技转变,数据统计也不例外,但由于金融、支付行业的安全性、实时性要求,也对数据统计技术提出的更高的要求。
数据统计过程指的是汇总所有参与方的待统计数据,然后通过某种约定的统计函数形成聚合后的统计数据。例如,统计函数为确定所有待统计数据的分布曲线,在统计完成之后,通过该分布曲线,每个参与方和数据使用方都可以查询自己的在该分布曲线上的位置从而确定自己的排名。
数据统计过程中需要对各参与方的隐私进行保护,具体保护参与方和待统计数据的关联关系,即数据统计过程中,仅需要知道哪些参与方提供了数据,以及待统计数据有哪些,但无需知道是哪一个参与方提供了哪一个待统计数据。现有技术中,主要采用秘密共享方式实现各参与方的隐私保护,举例来说,当前有参与方1、参与方2、参与方3,统计三者的待统计数据之和,具体实现中,参与方1将数据A分为A1、A2、A3,将A2发送至参与方2,将A3发送至参与方3,A1本地保留;参与方2将数据B分为B1、B2、B3,将B1发送至参与方1,将B3发送至参与方3,B2本地保留;参与方3将数据C分为C1、C2、C3,将C1发送至参与方1,将C2发送至参与方2,C3本地保留;然后,参与方1将A1、B1、C1发送至统计方,参与方2将A2、B2、C2发送至统计方,参与方3将A3、B3、C3发送至统计方,所以统计方不能将各参与方的待统计数据关联起来,但可以确定出三者的待统计数据之和。
但现有技术中,参与方与参与方之间进行多次数据交互,参与方与统计方之间进行多次数据交互,该方式数据交互复杂,还需要各参与方和统计方一直在线。
发明内容
本发明实施例提供一种基于区块链的数据统计的方法及装置,用于提供一种简单易用的数据统计方法,且保护各参与方隐私。
本发明实施例提供的一种基于区块链的数据统计的方法,包括:
统计服务器接收转发服务器转发的来自数据服务器的加密数据;所述加密数据是所述数据服务器使用第一公钥对待统计数据和签名信息加密后的数据;所述第一公钥是所述统计服务器生成并发送至所述数据服务器的;所述签名信息是所述数据服务器使用第二私钥 对所述待统计数据签名后的信息;所述第二私钥是监管服务器根据所述数据服务器所在统计群的群公钥和群私钥针对所述数据服务器生成并发送至所述数据服务器;
所述统计服务器使用所述第一公钥对应的第一私钥解密所述加密数据,得到所述待统计数据和所述签名信息;
所述统计服务器使用所述第二私钥对应的第二公钥对所述签名信息验证通过后,统计所述待统计数据得到统计结果;所述第二公钥是所述监管服务器发送至所述统计服务器的所述数据服务器所在统计群的群公钥。
上述技术方案中,转发服务器接收各数据服务器发送的加密数据,并发送加密数据至统计服务器,通过该方式,统计服务器不能获取到发送数据的数据服务器的身份信息,同时统计服务器也不能根据各数据服务器发送数据的发送时间推断出数据服务器的身份信息,通过设置转发服务器,可以做到高效的隐藏数据服务器的身份信息。本发明实施例通过权限分离的方式实现数据服务器和待统计数据之间关联关系的隐私保护。
可选的,所述统计服务器在得到所述待统计数据和所述签名信息之后,还包括:
所述统计服务器将所述签名信息和所述待统计数据对应写入区块链中,以使所述监管服务器对所述数据服务器所提供的待统计数据进行验证。
上述技术方案中,统计服务器将签名信息和待统计数据对应写入区块链中,利用区块链的不易篡改性,保障签名信息和待统计数据的准确性,为监管服务器提供未被篡改过的数据。
可选的,所述统计服务器在得到统计结果之后,还包括:
所述统计服务器将所述统计结果写入区块链中,并在接收到查询服务器发送的数据查询请求后,根据所述查询请求从所述区块链中获取查询结果,将所述查询结果反馈至所述查询服务器。
上述技术方案中,统计服务器将统计结果写入区块链中,并为查询服务器提供查询服务,利用区块链的不易篡改性,保障统计结果的准确性,为查询服务器提供未被篡改过的数据。
可选的,所述统计服务器使用所述第二私钥对应的第二公钥对所述签名信息验证,包括:
所述统计服务器使用所述第二公钥验证所述数据服务器是否为所述统计群中的数据服务器,若是,则确定所述签名信息通过验证。
上述技术方案中,统计服务器使用第二公钥验证签名信息,确定是否对该数据服务器所提供的待统计数据进行统计,保障数据统计的准确性,避免非统计群里的数据服务器提交错误的待统计数据污染统计结果。
可选的,所述统计服务器在接收所述转发服务器转发的来自数据服务器的加密数据之前,还包括:
生成所述第一私钥和所述第一公钥,将所述第一公钥发送至所述数据服务器;以及接收所述监管服务器发送的所述第二公钥。
上述技术方案中,统计服务器将第一公钥发送至数据服务器,数据服务器可以使用第一公钥对待统计数据和签名信息加密,且该加密数据可以被统计服务器使用第一私钥解密但不能被转发服务器解密。统计服务器接收监管服务器发送的第二公钥,统计服务器可以使用第二公钥验证数据服务器是否属于待统计的统计群。
相应的,本发明实施例还提供了一种基于区块链的数据统计的方法,包括:
转发服务器接收数据服务器发送的加密数据;所述加密数据是所述数据服务器使用第一公钥对待统计数据和签名信息加密后的数据,所述第一公钥是统计服务器生成并发送至所述数据服务器的;所述签名信息是所述数据服务器使用第二私钥对所述待统计数据签名后的信息;所述第二私钥是监管服务器根据所述数据服务器所在统计群的群公钥和群私钥针对所述数据服务器生成并发送至所述数据服务器;
所述转发服务器将所述加密数据发送至所述统计服务器,以使所述统计服务器使用所述第一公钥对应的第一私钥,对所述加密数据解密,并在使用所述第二私钥对应的第二公钥对解密后的签名信息验证通过后,统计解密后的待统计数据;所述第二公钥是所述监管服务器发送至所述统计服务器的所述数据服务器所在统计群的群公钥。
上述技术方案中,转发服务器只可以知道发送数据的数据服务器的身份信息,但不知道加密数据中的待统计数据,转发服务器将该加密数据转发至统计服务器,统计服务器仅可以获取到转发服务器的身份信息,但不能获取到发送数据的数据服务器的身份信息,同时统计服务器也不能根据各数据服务器发送数据的发送时间推断出数据服务器的身份信息,通过设置转发服务器,可以做到高效的隐藏数据服务器的身份信息。本发明实施例通过权限分离的方式实现数据服务器和待统计数据之间关联关系的隐私保护。
可选的,所述统计群中包括N个数据服务器,N大于等于1;所述数据服务器向所述转发服务器发送的加密数据有M个,M大于等于1,每一个加密数据对应一个数据属性;
所述转发服务器接收数据服务器发送的加密数据,包括:
所述转发服务器接收所述N个数据服务器中各数据服务器发送的M个加密数据;
所述转发服务器将所述加密数据发送至所述统计服务器,包括:
所述转发服务器在确定接收完成所述N个数据服务器中各数据服务器发送的M个加密数据之后,确定出M组具有相同属性的加密数据,每组有N个加密数据;
所述转发服务器在预设时间将M组加密数据发送至所述统计服务器。
上述技术方案中,转发服务器可以接收预设时间段内的该统计群中各数据服务器发送的加密数据,且各数据服务器分别向该转发服务器发送多个数据属性的加密数据,转发服务器可以根据各待统计数据的数据属性将接收到的加密数据进行分组,且将分组后的待统计数据分别发送至统计服务器。
相应的,本发明实施例还提供了一种基于区块链的数据统计的方法,包括:
所述数据服务器使用第二私钥对待统计数据进行签名后生成签名信息;所述第二私钥是监管服务器根据所述数据服务器所在统计群的群公钥和群私钥针对所述数据服务器生成并发送至所述数据服务器;
所述数据服务器使用第一公钥对所述签名信息和所述待统计数据加密后生成加密数据;所述第一公钥是统计服务器生成并发送至所述数据服务器的;
所述数据服务器将所述加密数据发送至所述转发服务器,以使所述转发服务器将所述加密数据转发至所述统计服务器进行数据统计。
上述技术方案中,数据服务器使用第二私钥对待统计数据进行签名后生成签名信息,使用第一公钥对签名信息和待统计数据加密后生成加密数据,转发服务器接收到该加密数据,但由于没有解密该加密数据的第一私钥,则只可以知道发送数据的数据服务器的身份信息,但不知道加密数据中的待统计数据,转发服务器将该加密数据转发至统计服务器, 统计服务器仅可以获取到转发服务器的身份信息,但不能获取到发送数据的数据服务器的身份信息,同时统计服务器也不能根据各数据服务器发送数据的发送时间推断出数据服务器的身份信息,通过该方式,可以做到高效的隐藏数据服务器的身份信息。本发明实施例通过权限分离的方式实现数据服务器和待统计数据之间关联关系的隐私保护。
可选的,所述待统计数据为M个,M大于等于1;
所述数据服务器使用第一公钥对所述签名信息和所述待统计数据加密后生成加密数据,包括:
所述数据服务器针对每一个待统计数据,使用所述第一公钥对所述签名信息和所述待统计数据加密后生成加密数据。
可选的,所述数据服务器在所述生成签名信息之前,还包括:
所述数据服务器接收所述监管服务器发送的第二私钥;
所述数据服务器在所述生成加密数据之前,还包括:
所述数据服务器接收所述统计服务器发送的第一公钥。
上述技术方案中,数据服务器接收监管服务器发送的第二私钥,用于对待统计数据进行签名从而生成签名信息,数据服务器接收统计服务器发送的第一公钥,用于对待统计数据和签名信息进行加密。
相应的,本发明实施例还提供了一种基于区块链的数据统计的方法,包括:
监管服务器从区块链上获取待验证信息,所述待验证信息包括待统计数据和签名信息;所述签名信息是提供所述待统计数据的数据服务器使用第二私钥对所述待统计数据签名后的信息;所述第二私钥是所述监管服务器根据所述数据服务器所在统计群的群公钥和群私钥针对所述数据服务器生成并发送至所述数据服务器;
所述监管服务器使用待验证数据服务器所在统计群的群私钥解密所述签名信息,确定所述待验证数据服务器的签名信息和对应的待统计数据;
所述监管服务器根据所述待验证数据服务器的签名信息和对应的待统计数据,对所述待验证数据服务器所提供的待统计数据进行验证。
上述技术方案中,监管服务器可以采用统计群的群私钥解密各签名信息,从而可以从区块链中获取待验证数据服务器所提供的待统计数据,从而对待验证数据服务器提供数据的真实性和合理性进行验证,保证数据统计过程中的数据有效性。将签名信息和待统计数据对应写入区块链中,为监管服务器提供未被篡改过的数据。
可选的,所述监管服务器在从区块链上获取待验证信息之前,还包括:
监管服务器生成统计群的群私钥和群公钥;
所述监管服务器根据所述统计群的群私钥和群公钥,生成所述统计群中各数据服务器的第二私钥,并发送至各数据服务器,以使所述数据服务器使用所述第二私钥对待统计数据签名并生成签名信息;所述签名信息用于所述数据服务器使用第一公钥对所述签名信息和待统计数据加密;所述第一公钥是统计服务器生成并发送至所述数据服务器的;
所述监管服务器将所述群公钥作为所述第二私钥对应的第二公钥发送至所述统计服务器,以使所述统计服务器使用所述第二公钥对所述签名信息验证。
上述技术方案中,数据服务器可以采用各自的私钥生成针对所在统计群的签名信息,其它数据服务器或者统计服务器仅能使用群公钥验证签名,将该签名信息定位至哪一个群,但不能定位至哪一个数据服务器,而仅有监管服务器可以使用群私钥将该签名信息定位至 哪一个数据服务器,通过该方式,可以保证统计服务器对待统计数据的统计以及监管服务器对数据服务器提供待统计数据的验证。
相应的,本发明实施例还提供了一种统计服务器,包括:
收发单元、解密单元、处理单元;
所述收发单元用于接收转发服务器转发的来自数据服务器的加密数据;所述加密数据是所述数据服务器使用第一公钥对待统计数据和签名信息加密后的数据;所述第一公钥是所述处理单元生成并发送至所述数据服务器的;所述签名信息是所述数据服务器使用第二私钥对所述待统计数据签名后的信息;所述第二私钥是监管服务器根据所述数据服务器所在统计群的群公钥和群私钥针对所述数据服务器生成并发送至所述数据服务器;
所述解密单元用于使用所述第一公钥对应的第一私钥解密所述加密数据,得到所述待统计数据和所述签名信息;
所述处理单元用于使用所述第二私钥对应的第二公钥对所述签名信息验证通过后,统计所述待统计数据得到统计结果;所述第二公钥是所述监管服务器发送至所述处理单元的所述数据服务器所在统计群的群公钥。
可选的,所述处理单元还用于:
在得到所述待统计数据和所述签名信息之后,将所述签名信息和所述待统计数据对应写入区块链中,以使所述监管服务器对所述数据服务器所提供的待统计数据进行验证。
可选的,所述处理单元还用于:
在得到统计结果之后,将所述统计结果写入区块链中,并在接收到查询服务器发送的数据查询请求后,根据所述查询请求从所述区块链中获取查询结果,将所述查询结果反馈至所述查询服务器。
可选的,所述处理单元具体用于:
使用所述第二公钥验证所述数据服务器是否为所述统计群中的数据服务器,若是,则确定所述签名信息通过验证。
可选的,所述处理单元还用于:
在所述收发单元接收所述转发服务器转发的来自数据服务器的加密数据之前,生成所述第一私钥和所述第一公钥;
所述收发单元还用于:
将所述第一公钥发送至所述数据服务器;以及接收所述监管服务器发送的所述第二公钥。
相应的,本发明实施例还提供了一种转发服务器,包括:
接收单元和发送单元;
所述接收单元用于接收数据服务器发送的加密数据;所述加密数据是所述数据服务器使用第一公钥对待统计数据和签名信息加密后的数据,所述第一公钥是统计服务器生成并发送至所述数据服务器的;所述签名信息是所述数据服务器使用第二私钥对所述待统计数据签名后的信息;所述第二私钥是监管服务器根据所述数据服务器所在统计群的群公钥和群私钥针对所述数据服务器生成并发送至所述数据服务器;
所述发送单元用于将所述加密数据发送至所述统计服务器,以使所述统计服务器使用所述第一公钥对应的第一私钥,对所述加密数据解密,并在使用所述第二私钥对应的第二公钥对解密后的签名信息验证通过后,统计解密后的待统计数据;所述第二公钥是所述监 管服务器发送至所述统计服务器的所述数据服务器所在统计群的群公钥。
可选的,所述统计群中包括N个数据服务器,N大于等于1;所述数据服务器向所述接收单元发送的加密数据有M个,M大于等于1,每一个加密数据对应一个数据属性;
所述接收单元具体用于:
接收所述N个数据服务器中各数据服务器发送的M个加密数据;
所述发送单元具体用于:
在确定接收完成所述N个数据服务器中各数据服务器发送的M个加密数据之后,确定出M组具有相同属性的加密数据,每组有N个加密数据;
在预设时间将M组加密数据发送至所述统计服务器。
相应的,本发明实施例还提供了一种数据服务器,包括:
加密单元和收发单元;
所述加密单元用于使用第二私钥对待统计数据进行签名后生成签名信息;所述第二私钥是监管服务器根据数据服务器所在统计群的群公钥和群私钥针对所述数据服务器生成并发送至所述收发单元;
所述加密单元还用于使用第一公钥对所述签名信息和所述待统计数据加密后生成加密数据;所述第一公钥是统计服务器生成并发送至所述收发单元的;
所述收发单元用于将所述加密数据发送至所述转发服务器,以使所述转发服务器将所述加密数据转发至所述统计服务器进行数据统计。
可选的,所述待统计数据为M个,M大于等于1;
所述加密单元具体用于:
针对每一个待统计数据,使用所述第一公钥对所述签名信息和所述待统计数据加密后生成加密数据。
可选的,所述收发单元还用于:
在所述加密单元生成签名信息之前,接收所述监管服务器发送的第二私钥;
所述收发单元还用于:
在所述加密单元生成加密数据之前,接收所述统计服务器发送的第一公钥。
相应的,本发明实施例还提供了一种监管服务器,包括:
获取单元、解密单元、验证单元;
所述获取单元用于从区块链上获取待验证信息,所述待验证信息包括待统计数据和签名信息;所述签名信息是提供所述待统计数据的数据服务器使用第二私钥对所述待统计数据签名后的信息;所述第二私钥是监管服务器根据所述数据服务器所在统计群的群公钥和群私钥针对所述数据服务器生成并发送至所述数据服务器;
所述解密单元用于使用待验证数据服务器所在统计群的群私钥解密所述签名信息,确定所述待验证数据服务器的签名信息和对应的待统计数据;
所述验证单元用于根据所述待验证数据服务器的签名信息和对应的待统计数据,对所述待验证数据服务器所提供的待统计数据进行验证。
可选的,所述装置还包括生成单元和收发单元;
所述生成单元用于:
在从所述获取单元区块链上获取待验证信息之前,生成统计群的群私钥和群公钥;
根据所述统计群的群私钥和群公钥,生成所述统计群中各数据服务器的第二私钥;
所述收发单元用于:
将所述各数据服务器的第二私钥发送至各数据服务器,以使所述数据服务器使用所述第二私钥对待统计数据签名并生成签名信息;所述签名信息用于所述数据服务器使用第一公钥对所述签名信息和待统计数据加密;所述第一公钥是统计服务器生成并发送至所述数据服务器的;
将所述群公钥作为所述第二私钥对应的第二公钥发送至所述统计服务器,以使所述统计服务器使用所述第二公钥对所述签名信息验证。
相应的,本发明实施例还提供了一种计算设备,包括:
处理器、存储器、通信接口;其中,处理器、存储器与通信接口之间通过总线连接;
所述处理器,用于读取所述存储器中的程序,执行上述基于区块链的数据统计中数据服务器执行的方法,或转发服务器执行的方法,或统计服务器执行的方法,或监管服务器执行的方法;
所述存储器,用于存储一个或多个可执行程序,可以存储所述处理器在执行操作时所使用的数据。
相应的,本发明实施例还提供了一种非暂态计算机可读存储介质,非暂态计算机可读存储介质中存储计算机指令,当其在计算机上运行时,使得计算机执行上述基于区块链的数据统计中数据服务器执行的方法,或转发服务器执行的方法,或统计服务器执行的方法,或监管服务器执行的方法。
相应的,本发明实施例还提供一种包含指令的计算机程序产品,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,使所述计算机执行上述基于区块链的数据统计中数据服务器执行的方法,或转发服务器执行的方法,或统计服务器执行的方法,或监管服务器执行的方法。
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简要介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域的普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为本发明实施例提供的一种系统架构的示意图;
图2为本发明实施例提供的一种基于区块链的数据统计方法流程示意图;
图3为本发明实施例提供的一种统计服务器的结构示意图;
图4为本发明实施例提供的一种转发服务器的结构示意图;
图5为本发明实施例提供的一种数据服务器的结构示意图;
图6为本发明实施例提供的一种监管服务器的结构示意图;
图7为本申请提供的一种计算设备的结构示意图。
为了使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明作进一步地详细描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。 基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本发明保护的范围。
图1示例性的示出了本发明实施例提供基于区块链的数据统计的方法所适用的系统架构,该系统架构可以包括数据服务器、转发服务器、统计服务器、监管服务器、区块链。多个数据服务器组成一个统计群,本发明实施例用于对一个统计群中多个数据服务器提供的待统计数据进行统计。
数据服务器,也叫统计参与方、参与方,是参与统计标准计算并贡献待统计数据的主体,数据服务器将待统计数据发送至转发服务器。每个数据服务器都有一系列的原子属性,原子属性可以按事先约定的方式任意组合成新的复合属性,每个数据服务器发送的待统计数据可以是原子属性值或复合属性值。
转发服务器,也叫数据转发方,用于在预设时段内接收统计群中各数据服务器发送的待统计数据,并将这些待统计数据汇总后,在一个特定时间点(预设时间)将汇总后的数据发送至统计服务器。
统计服务器,也叫标准发布方、统计方,用于接收转发服务器转发的数据,并将接收到的数据根据某种约定的统计函数进行统计,以及将该统计后的数据存储至区块链中。统计服务器还用于将接收到的数据存储至区块链中。此处,数据服务器的属性值的类型可以是任意类型,约定的统计函数也可以是任意可以通过聚合属性值获得的统计函数。
监管服务器,也叫监管方,用于读取统计服务器存储至区块链中的数据,并根据读取的数据对数据服务器提供的待统计数据进行验证。
区块链,是由一系列区块组成的一条链,每个块上除了记录本块的数据还会记录上一块的哈希值,通过这种方式组成一条链。区块链用于存储数据,保障数据的防篡改性。
实际使用中,转发服务器、统计服务器和监管服务器是相互独立的实体,三者之间的数据传输仅限于本发明实施例中所涉及的数据,不会发送除本发明实施例以外的数据。其中,统计服务器可以是制定统计标准的行业协会所提供的服务器,转发服务器可以是协会和协会成员之外的第三方网络服务商所提供的服务器,监管服务器可以是监管部门所提供的服务器。
需要说明的是,本发明实施例在实际使用中,可以同时对多个统计群进行数据统计。可以设置每个数据服务器提供的待统计数据中记录数据服务器所在统计群的标识(如统计群的ID(Identification,身份标识号)),以使得统计服务器在接收到待统计数据后,可以识别出该待统计数据是哪一个统计群中数据服务器发送的。
基于上述描述,图2示例性的示出了本发明实施例提供的一种基于区块链的数据统计的方法的流程,该流程可以由上述数据服务器、转发服务器、统计服务器共同执行。
在描述图2示出的数据统计流程之前,先对数据统计流程中涉及的加密、解密详细说明如下。
统计服务器生成用于加解密数据的密钥对,分别是第一公钥和第一私钥,统计服务器将第一公钥发送至数据服务器,数据服务器接收该第一公钥,并使用该第一公钥对数据(包括待统计数据和签名信息)进行加密,从而统计服务器在接收到转发服务器转发的数据服务器发送的加密数据后,统计服务器可以使用第一私钥对该加密数据进行解密。
监管服务器(相当于统计群中的群管理员)针对一个统计群生成该统计群的群私钥和群公钥,并根据该统计群的群私钥和群公钥,生成该统计群中各数据服务器的第二私钥(每 个数据服务器对应一个第二私钥),并发送至各数据服务器,各数据服务器接收到各自的第二私钥后,会根据各自的第二私钥对待统计数据签名并生成签名信息,从而各数据服务器会使用第一公钥对签名信息和待统计数据加密,以生成加密数据。监管服务器还会将该统计群的群公钥作为第二私钥对应的第二公钥发送至统计服务器或者其它数据服务器,其中,统计服务器可以使用第二公钥对签名信息验证,具体的,统计服务器可以使用第二公钥验证该签名信息对应的数据服务器是否属于当前正在统计的统计群。
本发明实施例中,数据服务器可以采用各自的私钥生成针对所在统计群的签名信息,其它数据服务器或者统计服务器仅能使用群公钥验证签名,将该签名信息定位至哪一个群,但不能定位至哪一个数据服务器,而仅有监管服务器可以使用群私钥将该签名信息定位至哪一个数据服务器,通过该方式,可以保证统计服务器对待统计数据的统计以及监管服务器对数据服务器提供待统计数据的验证。
换个角度说,在数据统计流程之前,统计服务器会接收到监管服务器针对每一个统计群生成并发送的群公钥;数据服务器会接收到监管服务器针对该统计群中该数据服务器生成并发送的第二私钥;数据服务器还会接收到统计服务器生成并发送的第一公钥。
如图2所示,该流程具体包括:
步骤201,数据服务器使用第二私钥对待统计数据进行签名后生成签名信息。
待统计数据即待统计的属性值,数据服务器使用自己的第二私钥对待统计数据进行签名,具体的,可以是计算待统计数据的字符串的哈希值,再根据第二私钥对该哈希值签名,以生成签名信息。
一种实现方式中,数据服务器可以计算待统计数据、统计群标识等所组成字符串的哈希值,进而根据第二私钥对该哈希值签名,以生成签名信息。示例性的,数据服务器的第二私钥为sk_group_j(其中,group_j指的是该统计群中的第j个数据服务器),数据服务器使用sk_group_j对待统计数据v_i和统计群标识ID_stat的群签名为Sig_group_j_v_i=Sig_sk_group_j(Hash(v_i||ID_stat)。
步骤202,数据服务器使用第一公钥对签名信息和待统计数据加密后生成加密数据。
数据服务器可以有M个待统计数据,其中,M大于等于1,每个待统计数据对应一个数据属性,如数据服务器发送的待统计数据有总资产、负债资产、营业收入、净利润等。
数据服务器针对M个待统计数据中的每一个待统计数据,使用第一公钥对签名信息和该待统计数据进行加密后生成加密数据。以其中一个待统计数据v_i为例,数据服务器使用第一公钥pk_p对该签名信息Sig_group_j_v_i和待统计数据v_i加密生成加密数据为pk_p(v_i,Sig_group_j_v_i)。
步骤203,数据服务器将加密数据发送至转发服务器。
数据服务器向转发服务器发送加密数据,由于转发服务器并没有对该加密数据进行解密的第一私钥,也就是说,转发服务器不能对该加密数据进行解密,也不能获取到该加密数据中的待统计数据。虽然,转发服务器在接收到数据服务器发送的加密数据时,是可以根据接收到的加密数据确定出该发送数据的数据服务器的身份信息,如IP(Internet Protocol,网络之间互连的协议)地址,但并不能知道该加密数据的内容,也即,转发服务器不能将数据服务器和待统计数据关联起来。
步骤204,转发服务器将加密数据发送至统计服务器。
转发服务器将加密数据的数据服务器的身份信息进行隐藏处理后,将隐藏处理后的加 密数据发送至统计服务器,本发明实施例中的隐藏处理可以理解如下,转发服务器在接收到加密数据后,只可以知道发送数据的数据服务器的身份信息,但不知道加密数据中的待统计数据,转发服务器将该加密数据转发至统计服务器,统计服务器仅可以获取到转发服务器的身份信息,但不能获取到发送数据的数据服务器的身份信息,从而达到转发服务器对数据服务器的身份信息的隐藏处理。
一种实现方式中,转发服务器可以接收预设时间段内的该统计群中各数据服务器发送的加密数据,且各数据服务器分别向该转发服务器发送多个数据属性的加密数据。具体的,统计群中包括N个数据服务器,N大于等于1,数据服务器向转发服务器发送的加密数据有M个,M大于等于1,每一个加密数据对应一个数据属性,转发服务器接收N个数据服务器中各数据服务器发送的M个加密数据,并在确定接收完成N个数据服务器中各数据服务器发送的M个加密数据之后,确定出M组具有相同属性的加密数据,每组有N个加密数据,在预设时间将M组加密数据发送至统计服务器。此处,转发服务器可以在上述预设时间段之后,即确定接收完成加密数据,也可以在确定N个数据服务器发送完成后,即确定接收完成加密数据,或者采用其他标准确定。转发服务器发送加密数据至统计服务器的预设时间可以是在确定接收完成加密数据之后的某个预先约定的时间点。
举个例子,统计群中包括5个数据服务器,每个数据服务器向转发服务器发送2个待统计数据,分别是总资产、负债资产,转发服务器规定可接受数据的预设时间段为2019/9/200:00至2019/9/2 23:59,则每个数据服务器可以在该时间段的任一个时间点发送其待统计数据至转发服务器,转发服务器可以在2019/9/3 00:00结束接收数据,并将接收到的数据进行隐藏处理,且将相同数据属性的待统计数据归为一组,具体的,将5个数据服务器分别发送总资产归为一组,将5个数据服务器分别发送负债资产归为一组,然后将该两组数据分别发送至统计服务器。
本发明实施例中,转发服务器在预设时间段内接收各数据服务器发送的加密数据,并在预设时间发送加密数据,通过该方式,统计服务器不能获取到发送数据的数据服务器的身份信息,同时统计服务器也不能根据各数据服务器发送数据的发送时间推断出数据服务器的身份信息,通过设置转发服务器,可以做到高效的隐藏数据服务器的身份信息。本发明实施例通过权限分离的方式实现数据服务器和待统计数据之间关联关系的隐私保护。
此外,通过转发服务器上述实现方式,转发服务器可以在预设时间段内接收各数据服务器发送的加密数据,整个过程中,仅需要转发服务器实时在线,无需各数据服务器实时在线,且转发服务器和各数据服务器只需要进行一次数据交互,无需进行多次数据交互,相比于现有技术中的多次数据交互和实时在线,更简单易用。
步骤205,统计服务器使用第一公钥对应的第一私钥解密加密数据,得到待统计数据和签名信息。
例如,数据服务器使用第一私钥sk_p对加密数据pk_p(v_i,Sig_group_j_v_i)进行解密,分别解密出签名信息Sig_group_j_v_i和待统计数据v_i,其中,签名信息用于统计服务器对该数据服务器所在的统计群进行验证,相当于统计服务器验证是否需要对该数据服务器所提供的待统计数据进行统计;待统计数据即用于统计服务器进行数据统计。
步骤206,统计服务器使用第二私钥对应的第二公钥对签名信息验证通过后,统计待统计数据得到统计结果。
统计服务器使用第二公钥验证数据服务器是否为统计群中的数据服务器,若是,则确 定签名信息通过验证,对该数据服务器所提供的待统计数据进行统计,否则,确定签名信息不通过验证,不对该数据服务器所提供的待统计数据进行统计。例如,数据服务器使用第二公钥pk_group验证签名信息Sig_group_j_v_i所指示的数据服务器是否为该统计群中的数据服务器。
统计服务器在确定签名信息验证通过后,可以进入数据统计阶段,对待统计数据按照预设的统计函数进行统计并确定统计结果,如确定待统计数据的分布曲线,确定待统计数据之和等。在确定统计结果之后,统计服务器可以将统计结果写入区块链中,用于查询服务器(数据使用方)对区块链中的数据查询。具体的,统计服务器可以在接收到查询服务器发送的数据查询请求后,根据查询请求从区块链中获取查询结果,将查询结果反馈至查询服务器,当然查询服务器也可以直接从区块链中获取查询结果,在此不做限制。
一种查询方式中,查询服务器可以将自己的属性值发送至统计服务器,统计服务器将接收到的属性值与对应的统计结果进行比对,并向查询服务器返回比对结果,如返回查询服务器的属性值在分布曲线中的排名。此处,若查询服务器所提供的属性值比较敏感,则统计服务器在结束比对后,应立即删除对应的中间数据和比对结果。
此外,统计服务器在确定签名信息验证通过后,还可以对接收到的加密数据进一步验证,验证接收到的签名信息中是有重复,且接收到的加密数据的总数是否与期望的数据服务器总数相同,若验证通过,则可以进入数据统计阶段,否则需要确定验证未通过的原因。
统计服务器在得到待统计数据和签名信息之后,还可以将签名信息和待统计数据对应写入区块链中,用于监管服务器对数据服务器所提供的待统计数据进行验证。一种可实现方式中,待统计数据为非敏感数据,可以将待统计数据作为明文数据与签名信息对应存储至区块链中;另一种可实现方式中,待统计数据为敏感数据,可以将待统计数据转化为对应的区间值(例如,前30%)与签名信息对应存储至区块链中。示例性的,非敏感数据可以用于计算精确的分布曲线,敏感数据可以用于计算粗略的分布区间(前10%,前30%,前50%,其他)。
本发明实施例中,在统计服务器将数据写入区块链上时,可以调用用于数据存证的智能合约来实现链上数据与链下的数据交互。当然,也可以是其他用于提供数据存证功能的区块链组件。
换个角度,在统计服务器将签名信息和待统计数据对应写入区块链之后,监管服务器可以从区块链上获取信息进行验证,具体的,监管服务器获取待验证信息,该待验证信息中包括多个一一对应的待统计数据和签名信息,监管服务器使用待验证数据服务器所在统计群的群私钥解密各签名信息,从而确定出待验证数据服务器的签名信息和对应的待统计数据,监管服务器根据待验证数据服务器的签名信息和对应的待统计数据,对待验证数据服务器所提供的待统计数据进行验证。此处,监管服务器可以采用公允的方式验证数据服务器所提供的待统计的真伪和合理性。
上述实施例中,监管服务器可以采用统计群的群私钥解密各签名信息,从而可以从区块链中获取待验证数据服务器所提供的待统计数据,从而对待验证数据服务器提供数据的真实性和合理性进行验证,保证数据统计过程中的数据有效性。将签名信息和待统计数据对应写入区块链中,为监管服务器提供未被篡改过的数据。
基于同一发明构思,图3示例性的示出了本发明实施例提供的一种统计服务器的结构示意图,所述统计服务器包括:
收发单元301、解密单元302、处理单元303;
所述收发单元301用于接收转发服务器转发的来自数据服务器的加密数据;所述加密数据是所述数据服务器使用第一公钥对待统计数据和签名信息加密后的数据;所述第一公钥是所述处理单元303生成并发送至所述数据服务器的;所述签名信息是所述数据服务器使用第二私钥对所述待统计数据签名后的信息;所述第二私钥是监管服务器根据所述数据服务器所在统计群的群公钥和群私钥针对所述数据服务器生成并发送至所述数据服务器;
所述解密单元302用于使用所述第一公钥对应的第一私钥解密所述加密数据,得到所述待统计数据和所述签名信息;
所述处理单元303用于使用所述第二私钥对应的第二公钥对所述签名信息验证通过后,统计所述待统计数据得到统计结果;所述第二公钥是所述监管服务器发送至所述处理单元303的所述数据服务器所在统计群的群公钥。
可选的,所述处理单元303还用于:
在得到所述待统计数据和所述签名信息之后,将所述签名信息和所述待统计数据对应写入区块链中,以使所述监管服务器对所述数据服务器所提供的待统计数据进行验证。
可选的,所述处理单元303还用于:
在得到统计结果之后,将所述统计结果写入区块链中,并在接收到查询服务器发送的数据查询请求后,根据所述查询请求从所述区块链中获取查询结果,将所述查询结果反馈至所述查询服务器。
可选的,所述处理单元303具体用于:
使用所述第二公钥验证所述数据服务器是否为所述统计群中的数据服务器,若是,则确定所述签名信息通过验证。
可选的,所述处理单元303还用于:
在所述收发单元301接收所述转发服务器转发的来自数据服务器的加密数据之前,生成所述第一私钥和所述第一公钥;
所述收发单元301还用于:
将所述第一公钥发送至所述数据服务器;以及接收所述监管服务器发送的所述第二公钥。
基于同一发明构思,图4示例性的示出了本发明实施例提供的一种转发服务器的结构示意图,所述转发服务器包括:
接收单元401和发送单元402;
所述接收单元401用于接收数据服务器发送的加密数据;所述加密数据是所述数据服务器使用第一公钥对待统计数据和签名信息加密后的数据,所述第一公钥是统计服务器生成并发送至所述数据服务器的;所述签名信息是所述数据服务器使用第二私钥对所述待统计数据签名后的信息;所述第二私钥是监管服务器根据所述数据服务器所在统计群的群公钥和群私钥针对所述数据服务器生成并发送至所述数据服务器;
所述发送单元402用于将所述加密数据发送至所述统计服务器,以使所述统计服务器使用所述第一公钥对应的第一私钥,对所述加密数据解密,并在使用所述第二私钥对应的第二公钥对解密后的签名信息验证通过后,统计解密后的待统计数据;所述第二公钥是所述监管服务器发送至所述统计服务器的所述数据服务器所在统计群的群公钥。
可选的,所述统计群中包括N个数据服务器,N大于等于1;所述数据服务器向所述 接收单元401发送的加密数据有M个,M大于等于1,每一个加密数据对应一个数据属性;
所述接收单元401具体用于:
接收所述N个数据服务器中各数据服务器发送的M个加密数据;
所述发送单元402具体用于:
在确定接收完成所述N个数据服务器中各数据服务器发送的M个加密数据之后,确定出M组具有相同属性的加密数据,每组有N个加密数据;
在预设时间将M组加密数据发送至所述统计服务器。
基于同一发明构思,图5示例性的示出了本发明实施例提供的一种数据服务器的结构示意图,所述数据服务器包括:
加密单元501和收发单元502;
所述加密单元501用于使用第二私钥对待统计数据进行签名后生成签名信息;所述第二私钥是监管服务器根据数据服务器所在统计群的群公钥和群私钥针对所述数据服务器生成并发送至所述收发单元502;
所述加密单元501还用于使用第一公钥对所述签名信息和所述待统计数据加密后生成加密数据;所述第一公钥是统计服务器生成并发送至所述收发单元502的;
所述收发单元502用于将所述加密数据发送至所述转发服务器,以使所述转发服务器将所述加密数据转发至所述统计服务器进行数据统计。
可选的,所述待统计数据为M个,M大于等于1;
所述加密单元501具体用于:
针对每一个待统计数据,使用所述第一公钥对所述签名信息和所述待统计数据加密后生成加密数据。
可选的,所述收发单元502还用于:
在所述加密单元501生成签名信息之前,接收所述监管服务器发送的第二私钥;
所述收发单元502还用于:
在所述加密单元501生成加密数据之前,接收所述统计服务器发送的第一公钥。
基于同一发明构思,图6示例性的示出了本发明实施例提供的一种监管服务器的结构示意图,所述监管服务器包括:
获取单元601、解密单元602、验证单元603;
所述获取单元601用于从区块链上获取待验证信息,所述待验证信息包括待统计数据和签名信息;所述签名信息是提供所述待统计数据的数据服务器使用第二私钥对所述待统计数据签名后的信息;所述第二私钥是监管服务器根据所述数据服务器所在统计群的群公钥和群私钥针对所述数据服务器生成并发送至所述数据服务器;
所述解密单元602用于使用待验证数据服务器所在统计群的群私钥解密所述签名信息,确定所述待验证数据服务器的签名信息和对应的待统计数据;
所述验证单元603用于根据所述待验证数据服务器的签名信息和对应的待统计数据,对所述待验证数据服务器所提供的待统计数据进行验证。
可选的,所述装置还包括生成单元604和收发单元605;
所述生成单元604用于:
在从所述获取单元601区块链上获取待验证信息之前,生成统计群的群私钥和群公钥;
根据所述统计群的群私钥和群公钥,生成所述统计群中各数据服务器的第二私钥;
所述收发单元605用于:
将所述各数据服务器的第二私钥发送至各数据服务器,以使所述数据服务器使用所述第二私钥对待统计数据签名并生成签名信息;所述签名信息用于所述数据服务器使用第一公钥对所述签名信息和待统计数据加密;所述第一公钥是统计服务器生成并发送至所述数据服务器的;
将所述群公钥作为所述第二私钥对应的第二公钥发送至所述统计服务器,以使所述统计服务器使用所述第二公钥对所述签名信息验证。
基于与上述图2所示的方法相同的构思,本申请还提供一种计算设备,如图7所示,该计算设备包括至少一个处理器720,用于实现本申请实施例提供的图2所涉及方法实施例中数据服务器执行的方法,或转发服务器执行的方法,或统计服务器执行的方法,或监管服务器执行的方法。
计算设备700还可以包括至少一个存储器730,用于存储程序指令和/或数据。存储器730和处理器720耦合。本申请实施例中的耦合是装置、单元或模块之间的间接耦合或通信连接,可以是电性,机械或其它的形式,用于装置、单元或模块之间的信息交互。处理器720可能和存储器730协同操作。处理器720可能执行存储器730中存储的程序指令。所述至少一个存储器中的至少一个可以包括于处理器中。
在实现过程中,上述方法的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。结合本申请实施例所公开的方法的步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法的步骤。为避免重复,这里不再详细描述。
应注意,本申请实施例中的处理器可以是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法实施例的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器可以是通用处理器、数字信号处理电路(digital signal processor,DSP)、专用集成芯片(application specific integrated circuit,ASIC)、现场可编程门阵列(field programmable gate array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器,处理器读取存储器中的信息,结合其硬件完成上述方法的步骤。
可以理解,本申请实施例中的存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(read-only memory,ROM)、可编程只读存储器(programmable ROM,PROM)、可擦除可编程只读存储器(erasable PROM,EPROM)、电可擦除可编程只读存储器(electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(random access memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态 随机存取存储器(static RAM,SRAM)、动态随机存取存储器(dynamic RAM,DRAM)、同步动态随机存取存储器(synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(double data rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(direct rambus RAM,DR RAM)。应注意,本文描述的系统和方法的存储器旨在包括但不限于这些和任意其它适合类型的存储器。
计算设备700还可以包括通信接口710,用于通过传输介质和其它设备进行通信,从而用于计算设备700中的装置可以和其它设备进行通信。在本申请实施例中,通信接口可以是收发器、电路、总线、模块或其它类型的通信接口。在本申请实施例中,通信接口为收发器时,收发器可以包括独立的接收器、独立的发射器;也可以集成收发功能的收发器、或者是接口电路。
计算设备700还可以包括通信线路740。其中,通信接口710、处理器720以及存储器730可以通过通信线路740相互连接;通信线路740可以是外设部件互连标准(peripheral component interconnect,简称PCI)总线或扩展工业标准结构(extended industry standard architecture,简称EISA)总线等。所述通信线路740可以分为地址总线、数据总线、控制总线等。为便于表示,图7中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
基于同一发明构思,本发明实施例还提供了一种非暂态计算机可读存储介质,非暂态计算机可读存储介质中存储计算机指令,当其在计算机上运行时,使得计算机执行图2所涉及方法实施例中数据服务器执行的方法,或转发服务器执行的方法,或统计服务器执行的方法,或监管服务器执行的方法。
基于同一发明构思,本申请实施例提供一种计算机程序产品,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,使所述计算机执行上述图2所涉及方法实施例中数据服务器执行的方法,或转发服务器执行的方法,或统计服务器执行的方法,或监管服务器执行的方法。
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个 方框或多个方框中指定的功能的步骤。
尽管已描述了本发明的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本发明范围的所有变更和修改。
显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。
Claims (27)
- 一种基于区块链的数据统计的方法,其特征在于,包括:统计服务器接收转发服务器转发的来自数据服务器的加密数据;所述加密数据是所述数据服务器使用第一公钥对待统计数据和签名信息加密后的数据;所述第一公钥是所述统计服务器生成并发送至所述数据服务器的;所述签名信息是所述数据服务器使用第二私钥对所述待统计数据签名后的信息;所述第二私钥是监管服务器根据所述数据服务器所在统计群的群公钥和群私钥针对所述数据服务器生成并发送至所述数据服务器;所述统计服务器使用所述第一公钥对应的第一私钥解密所述加密数据,得到所述待统计数据和所述签名信息;所述统计服务器使用所述第二私钥对应的第二公钥对所述签名信息验证通过后,统计所述待统计数据得到统计结果;所述第二公钥是所述监管服务器发送至所述统计服务器的所述数据服务器所在统计群的群公钥。
- 如权利要求1所述的方法,其特征在于,所述统计服务器在得到所述待统计数据和所述签名信息之后,还包括:所述统计服务器将所述签名信息和所述待统计数据对应写入区块链中,以使所述监管服务器对所述数据服务器所提供的待统计数据进行验证。
- 如权利要求1所述的方法,其特征在于,所述统计服务器在得到统计结果之后,还包括:所述统计服务器将所述统计结果写入区块链中,并在接收到查询服务器发送的数据查询请求后,根据所述查询请求从所述区块链中获取查询结果,将所述查询结果反馈至所述查询服务器。
- 如权利要求1所述的方法,其特征在于,所述统计服务器使用所述第二私钥对应的第二公钥对所述签名信息验证,包括:所述统计服务器使用所述第二公钥验证所述数据服务器是否为所述统计群中的数据服务器,若是,则确定所述签名信息通过验证。
- 如权利要求1所述的方法,其特征在于,所述统计服务器在接收所述转发服务器转发的来自数据服务器的加密数据之前,还包括:生成所述第一私钥和所述第一公钥,将所述第一公钥发送至所述数据服务器;以及接收所述监管服务器发送的所述第二公钥。
- 一种基于区块链的数据统计的方法,其特征在于,包括:转发服务器接收数据服务器发送的加密数据;所述加密数据是所述数据服务器使用第一公钥对待统计数据和签名信息加密后的数据,所述第一公钥是统计服务器生成并发送至所述数据服务器的;所述签名信息是所述数据服务器使用第二私钥对所述待统计数据签名后的信息;所述第二私钥是监管服务器根据所述数据服务器所在统计群的群公钥和群私钥针对所述数据服务器生成并发送至所述数据服务器;所述转发服务器将所述加密数据发送至所述统计服务器,以使所述统计服务器使用所述第一公钥对应的第一私钥,对所述加密数据解密,并在使用所述第二私钥对应的第二公钥对解密后的签名信息验证通过后,统计解密后的待统计数据;所述第二公钥是所述监管服务器发送至所述统计服务器的所述数据服务器所在统计群的群公钥。
- 如权利要求6所述的方法,其特征在于,所述统计群中包括N个数据服务器,N大于等于1;所述数据服务器向所述转发服务器发送的加密数据有M个,M大于等于1,每一个加密数据对应一个数据属性;所述转发服务器接收数据服务器发送的加密数据,包括:所述转发服务器接收所述N个数据服务器中各数据服务器发送的M个加密数据;所述转发服务器将所述加密数据发送至所述统计服务器,包括:所述转发服务器在确定接收完成所述N个数据服务器中各数据服务器发送的M个加密数据之后,确定出M组具有相同属性的加密数据,每组有N个加密数据;所述转发服务器在预设时间将M组加密数据发送至所述统计服务器。
- 一种基于区块链的数据统计的方法,其特征在于,包括:数据服务器使用第二私钥对待统计数据进行签名后生成签名信息;所述第二私钥是监管服务器根据所述数据服务器所在统计群的群公钥和群私钥针对所述数据服务器生成并发送至所述数据服务器;所述数据服务器使用第一公钥对所述签名信息和所述待统计数据加密后生成加密数据;所述第一公钥是统计服务器生成并发送至所述数据服务器的;所述数据服务器将所述加密数据发送至所述转发服务器,以使所述转发服务器将所述加密数据转发至所述统计服务器进行数据统计。
- 如权利要求8所述的方法,其特征在于,所述待统计数据为M个,M大于等于1;所述数据服务器使用第一公钥对所述签名信息和所述待统计数据加密后生成加密数据,包括:所述数据服务器针对每一个待统计数据,使用所述第一公钥对所述签名信息和所述待统计数据加密后生成加密数据。
- 如权利要求8所述的方法,其特征在于,所述数据服务器在所述生成签名信息之前,还包括:所述数据服务器接收所述监管服务器发送的第二私钥;所述数据服务器在所述生成加密数据之前,还包括:所述数据服务器接收所述统计服务器发送的第一公钥。
- 一种基于区块链的数据统计的方法,其特征在于,包括:监管服务器从区块链上获取待验证信息,所述待验证信息包括待统计数据和签名信息;所述签名信息是提供所述待统计数据的数据服务器使用第二私钥对所述待统计数据签名后的信息;所述第二私钥是所述监管服务器根据所述数据服务器所在统计群的群公钥和群私钥针对所述数据服务器生成并发送至所述数据服务器;所述监管服务器使用待验证数据服务器所在统计群的群私钥解密所述签名信息,确定所述待验证数据服务器的签名信息和对应的待统计数据;所述监管服务器根据所述待验证数据服务器的签名信息和对应的待统计数据,对所述待验证数据服务器所提供的待统计数据进行验证。
- 如权利要求11所述的方法,其特征在于,所述监管服务器在从区块链上获取待验证信息之前,还包括:监管服务器生成统计群的群私钥和群公钥;所述监管服务器根据所述统计群的群私钥和群公钥,生成所述统计群中各数据服务器 的第二私钥,并发送至各数据服务器,以使所述数据服务器使用所述第二私钥对待统计数据签名并生成签名信息;所述签名信息用于所述数据服务器使用第一公钥对所述签名信息和待统计数据加密;所述第一公钥是统计服务器生成并发送至所述数据服务器的;所述监管服务器将所述群公钥作为所述第二私钥对应的第二公钥发送至所述统计服务器,以使所述统计服务器使用所述第二公钥对所述签名信息验证。
- 一种统计服务器,其特征在于,包括:收发单元、解密单元、处理单元;所述收发单元用于接收转发服务器转发的来自数据服务器的加密数据;所述加密数据是所述数据服务器使用第一公钥对待统计数据和签名信息加密后的数据;所述第一公钥是所述处理单元生成并发送至所述数据服务器的;所述签名信息是所述数据服务器使用第二私钥对所述待统计数据签名后的信息;所述第二私钥是监管服务器根据所述数据服务器所在统计群的群公钥和群私钥针对所述数据服务器生成并发送至所述数据服务器;所述解密单元用于使用所述第一公钥对应的第一私钥解密所述加密数据,得到所述待统计数据和所述签名信息;所述处理单元用于使用所述第二私钥对应的第二公钥对所述签名信息验证通过后,统计所述待统计数据得到统计结果;所述第二公钥是所述监管服务器发送至所述处理单元的所述数据服务器所在统计群的群公钥。
- 如权利要求13所述的统计服务器,其特征在于,所述处理单元还用于:在得到所述待统计数据和所述签名信息之后,将所述签名信息和所述待统计数据对应写入区块链中,以使所述监管服务器对所述数据服务器所提供的待统计数据进行验证。
- 如权利要求13所述的统计服务器,其特征在于,所述处理单元还用于:在得到统计结果之后,将所述统计结果写入区块链中,并在接收到查询服务器发送的数据查询请求后,根据所述查询请求从所述区块链中获取查询结果,将所述查询结果反馈至所述查询服务器。
- 如权利要求13所述的统计服务器,其特征在于,所述处理单元具体用于:使用所述第二公钥验证所述数据服务器是否为所述统计群中的数据服务器,若是,则确定所述签名信息通过验证。
- 如权利要求13所述的统计服务器,其特征在于,所述处理单元还用于:在所述收发单元接收所述转发服务器转发的来自数据服务器的加密数据之前,生成所述第一私钥和所述第一公钥;所述收发单元还用于:将所述第一公钥发送至所述数据服务器;以及接收所述监管服务器发送的所述第二公钥。
- 一种转发服务器,其特征在于,包括:接收单元和发送单元;所述接收单元用于接收数据服务器发送的加密数据;所述加密数据是所述数据服务器使用第一公钥对待统计数据和签名信息加密后的数据,所述第一公钥是统计服务器生成并发送至所述数据服务器的;所述签名信息是所述数据服务器使用第二私钥对所述待统计数据签名后的信息;所述第二私钥是监管服务器根据所述数据服务器所在统计群的群公钥和群私钥针对所述数据服务器生成并发送至所述数据服务器;所述发送单元用于将所述加密数据发送至所述统计服务器,以使所述统计服务器使用所述第一公钥对应的第一私钥,对所述加密数据解密,并在使用所述第二私钥对应的第二公钥对解密后的签名信息验证通过后,统计解密后的待统计数据;所述第二公钥是所述监管服务器发送至所述统计服务器的所述数据服务器所在统计群的群公钥。
- 如权利要求18所述的转发服务器,其特征在于,所述统计群中包括N个数据服务器,N大于等于1;所述数据服务器向所述接收单元发送的加密数据有M个,M大于等于1,每一个加密数据对应一个数据属性;所述接收单元具体用于:接收所述N个数据服务器中各数据服务器发送的M个加密数据;所述发送单元具体用于:在确定接收完成所述N个数据服务器中各数据服务器发送的M个加密数据之后,确定出M组具有相同属性的加密数据,每组有N个加密数据;在预设时间将M组加密数据发送至所述统计服务器。
- 一种数据服务器,其特征在于,包括:加密单元和收发单元;所述加密单元用于使用第二私钥对待统计数据进行签名后生成签名信息;所述第二私钥是监管服务器根据数据服务器所在统计群的群公钥和群私钥针对所述数据服务器生成并发送至所述收发单元;所述加密单元还用于使用第一公钥对所述签名信息和所述待统计数据加密后生成加密数据;所述第一公钥是统计服务器生成并发送至所述收发单元的;所述收发单元用于将所述加密数据发送至所述转发服务器,以使所述转发服务器将所述加密数据转发至所述统计服务器进行数据统计。
- 如权利要求20所述的数据服务器,其特征在于,所述待统计数据为M个,M大于等于1;所述加密单元具体用于:针对每一个待统计数据,使用所述第一公钥对所述签名信息和所述待统计数据加密后生成加密数据。
- 如权利要求20所述的数据服务器,其特征在于,所述收发单元还用于:在所述加密单元生成签名信息之前,接收所述监管服务器发送的第二私钥;所述收发单元还用于:在所述加密单元生成加密数据之前,接收所述统计服务器发送的第一公钥。
- 一种监管服务器,其特征在于,包括:获取单元、解密单元、验证单元;所述获取单元用于从区块链上获取待验证信息,所述待验证信息包括待统计数据和签名信息;所述签名信息是提供所述待统计数据的数据服务器使用第二私钥对所述待统计数据签名后的信息;所述第二私钥是监管服务器根据所述数据服务器所在统计群的群公钥和群私钥针对所述数据服务器生成并发送至所述数据服务器;所述解密单元用于使用待验证数据服务器所在统计群的群私钥解密所述签名信息,确定所述待验证数据服务器的签名信息和对应的待统计数据;所述验证单元用于根据所述待验证数据服务器的签名信息和对应的待统计数据,对所述待验证数据服务器所提供的待统计数据进行验证。
- 如权利要求23所述的监管服务器,其特征在于,所述装置还包括生成单元和收发单元;所述生成单元用于:在从所述获取单元区块链上获取待验证信息之前,生成统计群的群私钥和群公钥;根据所述统计群的群私钥和群公钥,生成所述统计群中各数据服务器的第二私钥;所述收发单元用于:将所述各数据服务器的第二私钥发送至各数据服务器,以使所述数据服务器使用所述第二私钥对待统计数据签名并生成签名信息;所述签名信息用于所述数据服务器使用第一公钥对所述签名信息和待统计数据加密;所述第一公钥是统计服务器生成并发送至所述数据服务器的;将所述群公钥作为所述第二私钥对应的第二公钥发送至所述统计服务器,以使所述统计服务器使用所述第二公钥对所述签名信息验证。
- 一种计算设备,其特征在于,包括处理器、存储器、通信接口,其中处理器、存储器与通信接口之间通过总线连接;所述处理器,用于读取所述存储器中的程序,执行权利要求1至5任一项所述方法,或权利要求6或7所述方法,或权利要求8至10任一项所述方法,或权利要求11或12所述方法;所述存储器,用于存储一个或多个可执行程序,以及存储所述处理器在执行操作时所使用的数据。
- 一种非暂态计算机可读存储介质,其特征在于,所述非暂态计算机可读存储介质存储计算机指令,所述计算机指令用于使所述计算机执行权利要求1至5任一项所述方法,或权利要求6或7所述方法,或权利要求8至10任一项所述方法,或权利要求11或12所述方法。
- 一种计算机程序产品,其特征在于,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,使所述计算机执行权利要求1至5任一项所述方法,或权利要求6或7所述方法,或权利要求8至10任一项所述方法,或权利要求11或12所述方法。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910828975.6 | 2019-09-03 | ||
CN201910828975.6A CN110569666B (zh) | 2019-09-03 | 2019-09-03 | 一种基于区块链的数据统计的方法及装置 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2021043067A1 true WO2021043067A1 (zh) | 2021-03-11 |
Family
ID=68777604
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2020/111832 WO2021043067A1 (zh) | 2019-09-03 | 2020-08-27 | 一种基于区块链的数据统计的方法及装置 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN110569666B (zh) |
WO (1) | WO2021043067A1 (zh) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113806794A (zh) * | 2021-03-12 | 2021-12-17 | 京东科技控股股份有限公司 | 文件电子签章的处理方法、装置、计算机设备和存储介质 |
Families Citing this family (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110569666B (zh) * | 2019-09-03 | 2023-09-08 | 深圳前海微众银行股份有限公司 | 一种基于区块链的数据统计的方法及装置 |
CN111162910A (zh) * | 2019-12-20 | 2020-05-15 | 杭州能信科技有限公司 | 一种多语言的高并发的新能源发电数据的加密传输方案 |
CN111170104A (zh) * | 2020-01-06 | 2020-05-19 | 北京时代凌宇科技股份有限公司 | 一种基于区块链的电梯巡检监测系统和方法 |
CN111210352A (zh) * | 2020-01-10 | 2020-05-29 | 李�荣 | 一种基于区块链的经济数据统计装置及方法 |
CN111585769B (zh) * | 2020-05-14 | 2023-07-25 | 天星数科科技有限公司 | 数据传输方法、装置及介质 |
CN111914293B (zh) * | 2020-07-31 | 2024-05-24 | 平安科技(深圳)有限公司 | 一种数据访问权限验证方法、装置、计算机设备及存储介质 |
CN111741031B (zh) * | 2020-08-26 | 2020-11-20 | 深圳信息职业技术学院 | 基于区块链的网络通信加密方法 |
CN114595437B (zh) * | 2022-05-09 | 2022-09-30 | 荣耀终端有限公司 | 访问控制方法、电子设备及计算机可读存储介质 |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103490880A (zh) * | 2013-10-07 | 2014-01-01 | 西安电子科技大学 | 智能电网中具有隐私保护的电量统计及计费方法 |
CN107493162A (zh) * | 2017-07-25 | 2017-12-19 | 中国联合网络通信集团有限公司 | 区块链节点的实现方法及装置 |
CN107911216A (zh) * | 2017-10-26 | 2018-04-13 | 矩阵元技术(深圳)有限公司 | 一种区块链交易隐私保护方法及系统 |
WO2019003071A1 (en) * | 2017-06-26 | 2019-01-03 | nChain Holdings Limited | CRYPTOGRAPHIC PRIVATE KEY RELEASE |
CN110569666A (zh) * | 2019-09-03 | 2019-12-13 | 深圳前海微众银行股份有限公司 | 一种基于区块链的数据统计的方法及装置 |
Family Cites Families (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5655718B2 (ja) * | 2011-06-24 | 2015-01-21 | 富士通株式会社 | 変換処理方法、装置及びプログラム、復元処理方法、装置及びプログラム |
JP5724720B2 (ja) * | 2011-07-26 | 2015-05-27 | 富士通株式会社 | 情報処理方法及び装置、並びにコンピュータシステム |
US8997198B1 (en) * | 2012-12-31 | 2015-03-31 | Emc Corporation | Techniques for securing a centralized metadata distributed filesystem |
JP2014211607A (ja) * | 2013-04-04 | 2014-11-13 | キヤノン株式会社 | 情報処理装置およびその方法 |
CN104951472A (zh) * | 2014-03-29 | 2015-09-30 | 华为技术有限公司 | 一种基于分布式的数据统计的方法 |
CN105827399B (zh) * | 2016-04-12 | 2018-12-21 | 金华鸿正科技有限公司 | 用于电子选举的数据处理方法 |
US10496830B2 (en) * | 2017-10-12 | 2019-12-03 | Salesforce.Com, Inc. | Mass encryption management |
CN109726563B (zh) * | 2017-10-31 | 2020-11-03 | 创新先进技术有限公司 | 一种数据统计的方法、装置以及设备 |
CN109286497B (zh) * | 2018-09-06 | 2021-04-09 | 贵阳信息技术研究院(中科院软件所贵阳分部) | 一种基于区块链的不记名投票和多条件计票的方法 |
CN110069501A (zh) * | 2019-04-23 | 2019-07-30 | 北京恒冠网络数据处理有限公司 | 一种大数据储存系统 |
-
2019
- 2019-09-03 CN CN201910828975.6A patent/CN110569666B/zh active Active
-
2020
- 2020-08-27 WO PCT/CN2020/111832 patent/WO2021043067A1/zh active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103490880A (zh) * | 2013-10-07 | 2014-01-01 | 西安电子科技大学 | 智能电网中具有隐私保护的电量统计及计费方法 |
WO2019003071A1 (en) * | 2017-06-26 | 2019-01-03 | nChain Holdings Limited | CRYPTOGRAPHIC PRIVATE KEY RELEASE |
CN107493162A (zh) * | 2017-07-25 | 2017-12-19 | 中国联合网络通信集团有限公司 | 区块链节点的实现方法及装置 |
CN107911216A (zh) * | 2017-10-26 | 2018-04-13 | 矩阵元技术(深圳)有限公司 | 一种区块链交易隐私保护方法及系统 |
CN110569666A (zh) * | 2019-09-03 | 2019-12-13 | 深圳前海微众银行股份有限公司 | 一种基于区块链的数据统计的方法及装置 |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113806794A (zh) * | 2021-03-12 | 2021-12-17 | 京东科技控股股份有限公司 | 文件电子签章的处理方法、装置、计算机设备和存储介质 |
Also Published As
Publication number | Publication date |
---|---|
CN110569666B (zh) | 2023-09-08 |
CN110569666A (zh) | 2019-12-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021043067A1 (zh) | 一种基于区块链的数据统计的方法及装置 | |
CN108900533B (zh) | 一种共享数据隐私保护方法、系统、终端及介质 | |
WO2018137316A1 (zh) | 基于区块链的安全交易方法、电子装置、系统及存储介质 | |
WO2018076762A1 (zh) | 基于区块链的交易验证方法、系统、电子装置及介质 | |
CN108769010B (zh) | 节点受邀注册的方法和装置 | |
CN107172056A (zh) | 一种信道安全确定方法、装置、系统、客户端及服务器 | |
JP5944437B2 (ja) | 耐タンパ性トークンを用いてセキュアなトランザクションを達成するための効率的な技術 | |
WO2022089237A1 (zh) | 基于区块链的数值验证方法、装置、计算机设备和介质 | |
CN110378755A (zh) | 电子发票生成方法、装置、计算机设备和存储介质 | |
WO2020216078A1 (zh) | 一种基于区块链的竞争排名方法及装置 | |
CN111741268B (zh) | 视频的传输方法、装置、服务器、设备和介质 | |
WO2022156594A1 (zh) | 联邦模型训练方法、装置、电子设备、计算机程序产品及计算机可读存储介质 | |
WO2020140672A1 (zh) | 基于区块链的资产数据处理方法、系统和存储介质 | |
WO2022134812A1 (zh) | 基于联盟链的多机构数据处理方法、装置及相关设备 | |
KR102014647B1 (ko) | 블록체인 기반 전자투표방법 | |
CN111639938A (zh) | 数据处理方法、装置、设备及介质 | |
CN112788001A (zh) | 一种基于数据加密的数据处理业务处理方法、装置及设备 | |
CN116596094A (zh) | 基于联邦学习的数据审计系统、方法、计算机设备及介质 | |
CN112600830A (zh) | 业务数据处理方法、装置、电子设备及存储介质 | |
CN112910641B (zh) | 用于跨链交易监管的验证方法、装置、中继链节点及介质 | |
CN112948789B (zh) | 身份认证方法及装置、存储介质及电子设备 | |
CN113328860A (zh) | 一种基于区块链的用户隐私数据安全提供方法 | |
US11436351B1 (en) | Homomorphic encryption of secure data | |
CN116881936A (zh) | 可信计算方法及相关设备 | |
CN116401697A (zh) | 一种基于区块链的电子招投标隐私保护方法 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 20860942 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 18/07/2022) |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 20860942 Country of ref document: EP Kind code of ref document: A1 |