Data processing method, device and equipment based on block chain and readable storage medium

By deploying information statistics components and smart contracts in the trusted execution environment of the information statistics server, and using the encrypted channel to store the blockchain network, the anonymity and reliability of multi-party information statistics services is solved, and the anonymity of information statistics results is achieved and immutability.

CN119066692APending Publication Date: 2024-12-03TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310634476.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-31
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

In the anonymous application scenario of multi-party information statistics services, it is difficult for the existing technology to ensure the anonymity and reliability of the information reporting process and results disclosure, and may interfere with information reporting and affect the reliability of the final information statistics results.

Method used

By deploying information statistics components and smart contracts in the trusted execution environment of the information statistics server, receiving and processing requests for information statistics services, generating results, and storing the results on the blockchain network through encrypted channels, ensuring the anonymity of the information statistics process Sexual and immutable.

Benefits of technology

It realizes the anonymity and reliability of information statistics services, prevents external interference and tampering, and ensures the integrity and transparency of the final results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119066692A_ABST
    Figure CN119066692A_ABST
Patent Text Reader

Abstract

The invention discloses a data processing method, device and equipment based on a block chain and a readable storage medium, and the method comprises the steps: calling an information statistics contract through an information statistics component, executing a first information reporting request through the information statistics contract, and obtaining a first information reporting result; the information statistics component and the intelligent contract virtual machine corresponding to the information statistics contract are deployed in a trusted execution environment of the information statistics server; when it is determined through the information statistics assembly that the information statistics service meets a service termination condition, obtaining an information statistics result for the information statistics service through the information statistics assembly; the information statistical result is generated based on an information reporting result set containing the first information reporting result; and in the information statistics component, the information statistics result is sent to the block chain network through the encrypted channel, so that the block chain network stores the information statistics result in the information statistics management contract. According to the invention, the anonymity and reliability of the information statistics service can be ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a blockchain-based data processing method, device, equipment, and readable storage medium. Background Art

[0002] Multi-party information statistics services play an important role in people's lives, for example, multi-party voting services, multi-party bidding services, and so on.

[0003] Existing multi-party information statistics services often rely on blockchain, that is, the information reporting process and result disclosure process of multi-party information statistics services are all carried out on the blockchain, thereby ensuring that multiple links are open and transparent. However, in some application scenarios that require anonymity, if the information reporting process and result disclosure process of multi-party information statistics services are reflected in real time on the blockchain, there may be interference with information reporting (intercepting information reporting, guiding information reporting tendencies), thereby affecting the reliability of the final information statistics results. Summary of the invention

[0004] The embodiments of the present application provide a blockchain-based data processing method, device, equipment and readable storage medium, which can ensure the anonymity and reliability of information statistics services.

[0005] On the one hand, an embodiment of the present application provides a data processing method based on blockchain, which is executed by an information statistics server and includes:

[0006] A first information reporting request for an information statistics service is received through an information statistics component, an information statistics contract is called through the information statistics component, and the first information reporting request is executed through the information statistics contract to obtain a first information reporting result; the smart contract virtual machines corresponding to the information statistics component and the information statistics contract are deployed in a trusted execution environment of an information statistics server; the information statistics contract is downloaded from the information statistics management contract of the blockchain network when a contract creation notification for the information statistics contract is received;

[0007] When it is determined through the information statistics component that the information statistics service meets the service termination condition, the information statistics result for the information statistics service is obtained through the information statistics component; the information statistics result is generated based on the information reporting result set; the information reporting result set includes the first information reporting result;

[0008] In the information statistics component, the information statistics results are sent to the blockchain network through an encrypted channel, so that the blockchain network stores the information statistics results in the information statistics management contract.

[0009] On the one hand, an embodiment of the present application provides a data processing method based on blockchain, which is executed by an information blockchain node in a blockchain network; the method includes:

[0010] Receive the information statistics result for the information statistics service sent by the information statistics server through the information statistics component through an encrypted channel; the information statistics result is generated based on the information reporting result set; the information reporting result set includes the first information reporting result; the first information reporting result is obtained by the information statistics server, when receiving the first information reporting request for the information statistics service, calling the information statistics contract through the information statistics component and executing the first information reporting request through the information statistics contract; the information statistics contract is downloaded from the information statistics management contract by the information statistics server when receiving the contract creation notification for the information statistics contract; the information statistics component and the smart contract virtual machine corresponding to the information statistics contract are both deployed in the trusted execution environment of the information statistics server;

[0011] The information statistics results are stored in the information statistics management contract.

[0012] On the one hand, an embodiment of the present application provides a data processing device, which runs on an information statistics server and includes:

[0013] The information reporting module is used to receive a first information reporting request for an information statistics service through an information statistics component, call an information statistics contract through the information statistics component, execute the first information reporting request through the information statistics contract, and obtain a first information reporting result; the smart contract virtual machines corresponding to the information statistics component and the information statistics contract are deployed in a trusted execution environment of the information statistics server; the information statistics contract is downloaded from the information statistics management contract of the blockchain network when a contract creation notification for the information statistics contract is received;

[0014] A result statistics module is used to obtain information statistics results for the information statistics service through the information statistics component when it is determined through the information statistics component that the information statistics service meets the service termination condition; the information statistics result is generated based on the information reporting result set; the information reporting result set includes the first information reporting result;

[0015] The encrypted sending module is used to send the information statistics results to the blockchain network through an encrypted channel in the information statistics component, so that the blockchain network stores the information statistics results in the information statistics management contract.

[0016] Wherein, the above-mentioned data processing device further includes:

[0017] The contract deployment module is used to receive a contract creation notification for an information statistics contract through an information statistics component; the contract creation notification is generated when the first terminal receives a successful contract deployment result sent by the blockchain network; the successful contract deployment result is generated when the blockchain network stores the information statistics contract code and the information statistics contract data in the information statistics management contract; the information statistics contract code refers to the contract code for the information statistics contract contained in the transaction deployment contract; the information statistics contract data refers to the contract data for the information statistics contract contained in the transaction deployment contract; the contract deployment transaction is generated when the first terminal responds to the information statistics creation operation for the information statistics business;

[0018] The contract deployment module is also used to generate a contract download request for the information statistics contract according to the contract creation notification in the information statistics component, and send the contract download request to the blockchain network;

[0019] The contract deployment module is also used to receive, through the information statistics component, the information statistics contract code and information statistics contract data stored in the information statistics management contract returned by the blockchain network according to the contract download request;

[0020] The contract deployment module is also used to deploy the information statistics contract in the smart contract virtual machine according to the information statistics contract code and the information statistics contract data.

[0021] Wherein, the above-mentioned data processing device further includes:

[0022] The first termination module is used to obtain information statistics contract data corresponding to the information statistics contract through the information statistics component; the information statistics contract data includes the business termination time;

[0023] The first termination module is further used to determine that the information statistics service meets the service termination condition when it is detected that the system time is equal to the service termination time.

[0024] Wherein, the above-mentioned data processing device further includes:

[0025] The second termination module is used to obtain information statistics contract data corresponding to the information statistics contract through the information statistics component; the information statistics contract data includes an information statistics object list and a business termination ratio parameter;

[0026] The second termination module is further used to determine the total number of information statistics objects according to the information statistics object list, and determine the number of business termination statistics objects according to the total number of information statistics objects and the business termination ratio parameter;

[0027] The second termination module is also used to determine that the information statistics service meets the service termination condition when the number of reporting objects corresponding to the received information reporting request is equal to the number of service termination statistics objects; the received information reporting request includes the first information reporting request.

[0028] Among them, the result statistics module includes:

[0029] A result request unit, configured to send a service termination request to the information statistics contract through the information statistics component when it is determined through the information statistics component that the information statistics service meets the service termination condition;

[0030] The result processing unit is used to perform information statistics processing on the information reporting result set through the information statistics contract when the information statistics contract receives a service termination request, obtain the information statistics result for the information statistics service, and send the information statistics result to the information statistics component.

[0031] Wherein, the blockchain network includes at least two information blockchain nodes; the encrypted channel includes node encryption channels corresponding to the at least two information blockchain nodes respectively;

[0032] Encrypted sending module, including:

[0033] The first encrypted sending unit is used to send the information statistical results to at least two information blockchain nodes respectively through at least two node encrypted channels in the information statistics component, so that the at least two information blockchain nodes respectively broadcast the received information statistical results to the blockchain network; the blockchain network is used to store the information statistical results in the information statistics management contract when the consensus on the information statistical results is passed.

[0034] Among them, at least two node encryption channels include a target node encryption channel; the information blockchain node corresponding to the target node encryption channel is the target information blockchain node; the target node encryption channel includes a first communication key and a second communication key; the first communication key is generated by the information statistics server when performing remote authentication of the information statistics component with the target information blockchain node; the second communication key is generated by the target information blockchain node when performing remote authentication of the information statistics component with the information statistics server;

[0035] The first encryption sending unit comprises:

[0036] The encryption processing subunit is used to encrypt the information statistics result by using the first communication key in the information statistics component to obtain the encrypted result data;

[0037] The data sending subunit is used to send the encrypted result data to the target information blockchain node, so that the target information blockchain node decrypts the encrypted result data through the second communication key, obtains the information statistical result, and broadcasts the information statistical result to the blockchain network.

[0038] Wherein, the above-mentioned data processing device further includes:

[0039] A remote authentication module, configured to, when receiving a startup request from the information statistics component, send a key negotiation request to a target information blockchain node, so that the target information blockchain node generates a first asymmetric key according to the key negotiation request; the first asymmetric key includes a first public key and a first private key;

[0040] The remote authentication module is further used to send a block query request to the target information blockchain node when receiving the first public key sent by the target information blockchain node, so that the target information blockchain node obtains the latest block hash according to the block query request;

[0041] The remote authentication module is further used to generate a second asymmetric key through the information statistics component; the second asymmetric key includes a second public key and a second private key;

[0042] The remote authentication module is further used to generate a remote authentication report in the information statistics component according to the second public key and the latest block hash, and send the remote authentication report to the target information blockchain node, so that the target information blockchain node determines the remote authentication result of the information statistics component according to the remote authentication report, and if the remote authentication result is a remote authentication pass result, a second communication key is generated according to the second public key and the first private key;

[0043] The remote authentication module is also used to generate a first communication key based on the first public key and the second private key in the information statistics component if the remote authentication result received from the target information blockchain node is a remote authentication pass result.

[0044] Among them, the encryption sending module includes:

[0045] The second encryption sending unit is used to sign the information statistics result in the information statistics component by using the information statistics component private key corresponding to the information statistics component to obtain signature information of the information statistics transaction;

[0046] The second encryption sending unit is also used to package the information statistics results, signature information and the information statistics management contract name into the information statistics transaction;

[0047] The second encrypted sending unit is also used to send the information statistics transaction to the blockchain network through an encrypted channel, so that when the information statistics transaction consensus is passed, the blockchain network stores the information statistics results and signature information in the information statistics management contract according to the information statistics management contract name; the transaction signature information is used to characterize that the information statistics results are generated by the information statistics component.

[0048] On the one hand, an embodiment of the present application provides a data processing device, which runs on an information blockchain node in a blockchain network, and includes:

[0049] The result receiving module is used to receive, through an encrypted channel, information statistics results for information statistics services sent by an information statistics server through an information statistics component; the information statistics results are generated based on an information reporting result set; the information reporting result set includes a first information reporting result; the first information reporting result is obtained when the information statistics server receives a first information reporting request for an information statistics service, calls an information statistics contract through an information statistics component, and executes the first information reporting request through the information statistics contract; the information statistics contract is downloaded from the information statistics management contract when the information statistics server receives a contract creation notification for the information statistics contract; the information statistics component and the smart contract virtual machine corresponding to the information statistics contract are both deployed in the trusted execution environment of the information statistics server;

[0050] The result storage module is used to store the information statistics results in the information statistics management contract.

[0051] Wherein, the above-mentioned data processing device further includes:

[0052] The contract storage module is used to obtain the contract deployment transaction sent by the first terminal, store the information statistics contract code and the information statistics contract data in the information statistics management contract according to the contract deployment transaction, and generate a successful contract deployment result; the information statistics contract code refers to the contract code for the information statistics contract contained in the transaction deployment contract; the information statistics contract data refers to the contract data for the information statistics contract contained in the transaction deployment contract; the contract deployment transaction is generated when the first terminal responds to the information statistics creation operation for the information statistics business;

[0053] The deployment notification module is further used to send the successful contract deployment result to the first terminal, so that the first terminal generates a contract creation notification for the information statistics contract, and sends the contract creation notification to the information statistics server;

[0054] The contract download module is used to receive a contract download request for the information statistics contract generated by the information statistics server according to the contract creation notification, and send the information statistics contract code and information statistics contract data stored in the information statistics management contract to the information statistics server according to the contract download request, so that the information statistics server deploys the information statistics contract in the smart contract virtual machine according to the information statistics contract code and information statistics contract data.

[0055] Wherein, the above-mentioned data processing device further includes:

[0056] A result query module, used to receive a result query request for the information statistics service initiated by the first terminal;

[0057] The result query module is also used to obtain the information statistics management contract according to the result query request;

[0058] The result query module is also used to send the information statistics result to the first terminal if the information statistics result for the information statistics service is obtained in the information statistics management contract.

[0059] On the one hand, an embodiment of the present application provides a computer device, including: a processor, a memory, and a network interface;

[0060] The above-mentioned processor is connected to the above-mentioned memory and the above-mentioned network interface, wherein the above-mentioned network interface is used to provide a data communication network element, the above-mentioned memory is used to store a computer program, and the above-mentioned processor is used to call the above-mentioned computer program to execute the method in the embodiment of the present application.

[0061] On one hand, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. The computer program is suitable for being loaded by a processor and executing the method in the embodiment of the present application.

[0062] On the one hand, an embodiment of the present application provides a computer program product or a computer program, which includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method in the embodiment of the present application.

[0063] In an embodiment of the present application, a first information reporting request for an information statistics service is received through an information statistics component, an information statistics contract is called through the information statistics component, the first information reporting request is executed through the information statistics contract, and a first information reporting result is obtained; the information statistics component and the smart contract virtual machines corresponding to the information statistics contract are both deployed in a trusted execution environment of the information statistics server; the information statistics contract is downloaded from the information statistics management contract of the blockchain network when a contract creation notification for the information statistics contract is received; when it is determined through the information statistics component that the information statistics service meets the service termination condition, the information statistics result for the information statistics service is obtained through the information statistics component; the information statistics result is generated based on an information reporting result set; the information reporting result set includes a first information reporting result; in the information statistics component, the information statistics result is sent to the blockchain network through an encrypted channel, so that the blockchain network stores the information statistics result in the information statistics management contract. Through the method provided in the embodiment of the present application, the acquisition, execution and result statistics of information reporting requests are all implemented in a trusted execution environment through information statistics components and information statistics contracts. The execution process in the trusted execution environment cannot be obtained or interfered with by the outside world, which is equivalent to an anonymous information statistics process. After the information statistics results are obtained, they are published on the blockchain through an encrypted channel, which can ensure that the information statistics results are not tampered with, thereby ensuring the anonymity and reliability of the information statistics service. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0065] Figure 1 This is a schematic diagram of a network architecture provided by an embodiment of the present application;

[0066] Figure 2a This is a schematic diagram of a scenario for creating an information statistics service provided by an embodiment of the present application;

[0067] Figure 2b This is a schematic diagram of a scenario of information statistics service processing provided by an embodiment of the present application;

[0068] Figure 3a It is a flowchart of a data processing method based on blockchain provided in an embodiment of the present application;

[0069] Figure 3b This is a schematic diagram of an interactive scenario for obtaining and uploading information statistics results provided by an embodiment of the present application;

[0070] Figure 4 It is a flowchart of a data processing method based on blockchain provided in an embodiment of the present application;

[0071] Figure 5 It is a flowchart of a data processing method based on blockchain provided in an embodiment of the present application;

[0072] Figure 6 This is a schematic diagram of the architecture of an information statistics system provided in an embodiment of the present application;

[0073] Figure 7 This is a schematic diagram of a scenario of initialization authentication of an information statistics system provided in an embodiment of the present application;

[0074] Figure 8 is a structural schematic diagram of a data processing device provided in an embodiment of the present application;

[0075] Fig. 9 It is a structural diagram of a computer device provided in an embodiment of the present application;

[0076] Fig.10 It is a structural schematic diagram of another blockchain-based data processing device provided in an embodiment of the present application;

[0077] Fig.11 It is a structural diagram of another computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0078] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0079] For ease of understanding, the following first describes the relevant knowledge involved in this application:

[0080] Blockchain is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism and encryption algorithm. It is mainly used to organize data in chronological order and encrypt it into a ledger to make it impossible to be tampered with or forged. At the same time, it can verify, store and update data. Blockchain is essentially a decentralized database. Each node in the database stores an identical blockchain. The blockchain network can divide nodes into consensus nodes and business nodes, among which the consensus node is responsible for the consensus of the entire blockchain network. The process of writing transaction data into the ledger in the blockchain network can be: the client sends the transaction data to the business node, and then the transaction data is passed between the business nodes in the blockchain network in a relay manner until the consensus node receives the transaction data. The consensus node then packs the transaction data into a block and reaches consensus with other consensus nodes. After the consensus is passed, the block carrying the transaction data is written into the ledger.

[0081] Among them, it can be understood that a block is a data packet that carries transaction data (i.e., transaction business) on the blockchain network. It is a data structure marked with a timestamp and a hash value of the previous block. The block is verified by the network's consensus mechanism and the transactions in the block are determined.

[0082] Among them, it can be understood that the hash value, also known as the information characteristic value or characteristic value, is generated by converting input data of any length into a password through a hash algorithm and performing a fixed output. The original input data cannot be retrieved by decrypting the hash value. It is a one-way encryption function. In the blockchain, each block (except the initial block) contains the hash value of the previous block, which is called the parent block of the current block. The hash value is the potential core foundation and the most important aspect of blockchain technology. It retains the authenticity of the recorded and viewed data, as well as the integrity of the blockchain as a whole.

[0083] Smart contract is an automated contract based on blockchain technology. It is a computer program that can execute the pre-set conditions and terms in the contract without the intervention of a third party. The execution results of the smart contract will be recorded on the blockchain and cannot be tampered with, ensuring the transparency and reliability of the contract. Smart contracts can be used in various occasions, such as IoT device interaction, voting and elections. Smart contracts play an important role in decentralized applications, making the interaction between parties more efficient, transparent and secure. Users can call the smart contract deployed on the blockchain by initiating a transaction service request through the client. Subsequently, the business node on the blockchain can send the transaction service request to the consensus node, and each consensus node on the blockchain can run the smart contract separately. It should be understood that the blockchain can include one or more smart contracts, which can be distinguished by identity documents (ID) or names, and the transaction service request initiated by the client can also carry the identity number or name of the smart contract to specify the smart contract that the blockchain needs to run. If the smart contract specified by the client is a contract that needs to read data, each consensus node will access the local ledger to read the data. Finally, each consensus node will verify whether the execution results are consistent with each other (that is, reach a consensus). If they are consistent, the execution results can be stored in their respective local ledgers and returned to the client.

[0084] The Diffie-Hellman (DH) key exchange protocol is a key exchange protocol used by two or more communicating parties to negotiate a shared key over an insecure communication channel. It is based on the discrete logarithm problem and enables the two communicating parties to negotiate the same key without leaking the key.

[0085] Digital signature is a technology used to verify the integrity and identity of digital information. It binds digital information and a key together to ensure the integrity and non-repudiation of the information.

[0086] Symmetric encryption is a cryptographic technique that uses the same key to encrypt and decrypt data at the same time. Symmetric encryption algorithms usually include encryption algorithms and decryption algorithms, where the encryption algorithm converts plaintext into ciphertext and the decryption algorithm converts ciphertext back into plaintext.

[0087] Asymmetric encryption is a type of encrypted communication, also known as public key encryption. In this method, different keys are used for encryption and decryption, called public key and private key respectively. The sender encrypts the data using the receiver's public key, and the receiver decrypts the data using his or her own private key.

[0088] Trusted Execution Environment (TEE) is a secure area built by software and hardware methods on a computing platform, which can ensure that the code and data loaded in the secure area are protected in terms of confidentiality and integrity. Its goal is to ensure that a task is executed as expected, to ensure the confidentiality and integrity of the initial state, as well as the confidentiality and integrity of the runtime state. Classic implementations include SGX (Software Guard Extensions) technology.

[0089] Among them, it can be understood that the software protection extension SGX is a set of security-related extended instruction sets that can be built into the central processing unit (CPU). They allow specific memory areas to be set as user private areas, which are also called enclaves. The contents in the enclave are protected and cannot be accessed by any process other than itself, including virtual machine monitors (VMMs) and operating systems running at higher privilege levels. SGX is committed to providing a trusted execution environment (TEE) for user applications. Developers can execute the part of the code that needs to be protected in the SGX enclave, thereby improving the security of the application when it runs on platforms that may be attacked.

[0090] Among them, it is understood that SGX provides the following features:

[0091] 1) Confidentiality and integrity: The code and data in the enclave can be protected from being snooped or modified by any other software, including privileged software OS (Operating System), BIOS (Basic Input Output System), and VMM.

[0092] 2) Remote authentication: Remote authentication can authenticate whether the enclave running environment of an application has the SGX hardware protection capability and whether the protected code and data of the application have not been tampered with. After the authentication is completed, the user's key, identity information and other sensitive data will be provided to the enclave. The goal of remote authentication is to gain the trust of the hardware entity or the combination of hardware and software from the remote service provider so that the service provider can confidently provide the requested secrets to the client. The remote authentication process also includes the implementation of the DH communication key negotiation algorithm, and the negotiated key is used to ensure communication security. Three aspects of verification need to be completed during remote authentication: first, the identity of the application developer, second, the integrity of the application (not tampered with), and third, the application running environment is an enclave on an SGX-enabled platform.

[0093] 3) Minimize the attack surface: The CPU boundary is the trust boundary of SGX. SGX only trusts data within the CPU boundary, and data is encrypted as soon as it leaves the CPU.

[0094] See also Figure 1 , Figure 1 Schematic diagram of a network architecture provided by an embodiment of the present application. Figure 1 As shown, the network architecture may include a blockchain node cluster 1000, an information statistics server 100, and a terminal device cluster 10, and the blockchain node cluster 1000 may include at least two blockchain nodes. Figure 1 As shown, the blockchain node cluster 1000 may include blockchain node 1000a, blockchain node 1000b, ..., blockchain node 1000n, and the terminal device cluster 10 may specifically include terminal device 10a, terminal device 10b, ..., terminal device 10n.

[0095] like Figure 1 As shown, the terminal device 10a, the terminal device 10b, ..., the terminal device 10n can respectively establish data connection with the information statistics server 100, so that the terminal device can interact with the information statistics server 100 through the data connection; the terminal device 10a, the terminal device 10b, ..., the terminal device 10n can respectively establish data connection with the blockchain node 1000a, the blockchain node 1000b, ..., the blockchain node 1000n, so that the terminal device can interact with the blockchain node through the data connection; the information statistics server 100 can respectively establish data connection with the blockchain node 1000a, the blockchain node 1000b, ..., the blockchain node 1000n, so that the information statistics server 100 can interact with the blockchain node through the data connection; the blockchain node 1000a, the blockchain node 1000b, ..., the blockchain node 1000n are connected to each other, so that data can be interacted between blockchain nodes.

[0096] It is understandable that data or blocks can be transferred between blockchain nodes through the above data connection. The blockchain network can realize data connection between blockchain nodes based on node identification. Each blockchain node in the blockchain network has a node identification corresponding to it, and each of the above blockchain nodes can store the node identifications of other blockchain nodes that are connected to itself, so that the acquired data or generated blocks can be broadcast to other blockchain nodes according to the node identifications of other blockchain nodes. For example, a node identification list as shown in Table 1 can be maintained in blockchain node 1000a, and the node identification list stores the node names and node identifications of other nodes:

[0097] Table 1

[0098] Node Name Node ID Blockchain Node 1000a AAA.AAA.AAA.AAA Blockchain node 1000b BBB.BBB.BBB.BBB … … Blockchain node 1000n CCC.CCC.CCC.CCC

[0099] The node identifier may be an Internet Protocol (IP) address for interconnecting networks or any other information that can be used to identify a blockchain node in a blockchain network. Table 1 only uses the IP address as an example for illustration. For example, blockchain node 1000a may send information (e.g., transaction data) to blockchain node 1000b via node identifier BBB.BBB.BBB.BBB, and blockchain node 1000b may determine that the information is sent by blockchain node 1000a via node identifier AAA.AAA.AAA.AAA.

[0100] In the blockchain, before a block is put on the chain, the block must be agreed upon by the consensus nodes in the blockchain network. Only after the consensus is passed can the block be added to the blockchain. It is understandable that when the blockchain is used in some scenarios of commercial organizations, not all participating nodes in the blockchain (i.e., the blockchain nodes in the above blockchain node cluster 1000) have sufficient resources and necessity to become consensus nodes of the blockchain. For example, in Figure 1 In the blockchain node cluster 1000 shown, blockchain nodes 1000a, 1000b and 1000n can be used as consensus nodes in the blockchain node cluster. The consensus nodes in the blockchain node cluster 1000 participate in consensus, that is, consensus on blocks (including a batch of transactions), including generating blocks and voting on blocks; while non-consensus nodes do not participate in consensus, but will help spread block and voting messages, as well as synchronize status with each other.

[0101] It can be understood that the above-mentioned data connection does not limit the connection method, and can be directly or indirectly connected through wired communication, directly or indirectly connected through wireless communication, or through other connection methods, which are not limited in this application.

[0102] It is understandable that the data processing method provided in the embodiment of the present application can be executed by a computer device, which includes but is not limited to the above-mentioned blockchain node (which can be a terminal or server), an information statistics server, and a terminal device. The above-mentioned server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The above-mentioned terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited to this.

[0103] It can be understood that the embodiments of the present application can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, blockchain, smart driving and other scenarios.

[0104] It can be understood that in the specific implementation of this application, the information reporting request and other related data involved, when the above embodiments of this application are applied to specific products or technologies, need to obtain user permission or consent, and the collection, use and processing of relevant data need to comply with the relevant laws, regulations and standards of relevant countries and regions.

[0105] like Figure 1 As shown, each terminal device in the terminal device cluster 10 can be installed with an application client. When the application client runs in each terminal device, it can interact with the above-mentioned information statistics server 100 or any blockchain node in the blockchain node cluster 1000, so that the above-mentioned information statistics server 100 or any blockchain node in the blockchain node cluster 1000 can receive business data from each terminal device. Among them, the application client can be an application client of a social application such as a game application, a video editing application, an instant messaging application, a live broadcast application, a short video application, a video application, a music application, a shopping application, a novel application, a payment application, a browser, etc., which has the function of displaying data information such as text, images, audio, and video. Among them, the application client can be an independent client or an embedded sub-client integrated in a client (such as an instant messaging client, a social client, a video client, etc.), which is not limited here.

[0106] like Figure 1As shown, any terminal device in the terminal device cluster 10, for example, the terminal device 10a, can perform information statistics business through the application client, and the terminal device 10a can generate a contract deployment transaction in response to the information statistics creation operation for the information statistics business, and the contract deployment transaction contains the information statistics contract code and information statistics contract data corresponding to the information statistics contract for the information statistics business, and then the terminal device 10a can send the contract deployment transaction to any blockchain node in the blockchain node cluster 1000, and the blockchain node that receives the contract deployment transaction can initiate a consensus on the contract deployment transaction to the blockchain network corresponding to the blockchain node cluster 1000. When the contract deployment transaction consensus is successful, the blockchain network can store the information statistics contract code and the information statistics contract data in the information statistics management contract and generate a successful contract deployment result. When the terminal device 10a receives the successful contract deployment result, it can send a contract creation notification to the information statistics server 100. After receiving the contract creation notification, the information statistics server 100 can download the stored information statistics contract code and information statistics contract data from the information statistics management contract in the blockchain network.

[0107] like Figure 1As shown, the information statistics server 100 has a trusted execution environment, in which information statistics components and smart contract virtual machines can be deployed. After obtaining the information statistics contract code and information statistics contract data, the information statistics server 100 can deploy the information statistics contract in the smart contract virtual machine. After that, the information statistics server 100 can complete the acquisition, execution and result statistics process of the information reporting request for the information statistics service through the information statistics component and the deployed information statistics contract. Specifically, the information statistics server 100 can receive the first information reporting request for the information statistics service sent by the first terminal through the information statistics component, wherein the first terminal can be any terminal device in the terminal device cluster 10, and then the information statistics server 100 can call the information statistics contract through the information statistics component, execute the first information reporting request through the information statistics contract, and obtain the first information reporting result; similarly, the information statistics server 100 can receive the information reporting request sent by the terminal device in the terminal device cluster 10 except the first terminal and execute it, and obtain the corresponding information reporting result, and the information statistics server 100 can add the obtained information reporting results to the information reporting result set. When it is determined through the information statistics component that the information statistics service meets the service termination conditions, the information statistics server 100 can obtain the information statistics results for the information statistics service through the information statistics component; wherein, the information statistics results are generated based on the information reporting result set; then, the information statistics server 100 can send the information statistics results to the blockchain network through an encrypted channel in the information statistics component, and the blockchain network can store the information statistics results in the information statistics management contract. It can be understood that since the information statistics component and the deployed information statistics contract are both located in a trusted execution environment, they cannot be obtained externally, which is equivalent to being conducted anonymously and cannot be interfered with externally, thereby ensuring the reliability of the final information statistics results.

[0108] Furthermore, to facilitate understanding of the implementation process of the above-mentioned information statistics service, the information statistics service is taken as a voting service as an example for explanation. Figure 2a-2b , among which, Figure 2a-2b The terminal device 20a, the terminal device 20b, ..., the terminal device 20n shown in the figure can all be the above Figure 1 Any terminal device in the terminal device cluster 10 in the corresponding embodiment, for example, the terminal device 20a may be the terminal device 10a, the terminal device 20b may be the terminal device 10b, and the terminal device 20n may be the terminal device 10n; Figure 2a-2b The voting server 200 shown may be the above Figure 1 The information statistics server 100 in the corresponding embodiment; Figure 2a-2b The blockchain network 2000 shown can be the above Figure 1The blockchain network corresponding to the blockchain node cluster 1000 in the corresponding embodiment.

[0109] Please see first Figure 2a , Figure 2a This is a schematic diagram of a scenario for creating an information statistics service provided by an embodiment of the present application. Figure 2a As shown, the terminal device 20a may be integrated with a voting platform application 21, which may provide the following functions to the voting initiator: select a voting template, set a voting object, set a voting strategy, set a voting deadline, and set a voting option. Among them, different voting templates may be associated with different voting contract codes. The voting initiator may perform a voting creation operation for the voting service 1 through the voting platform application 21, that is, select the required voting template, and then set the corresponding voting object, voting strategy, voting deadline, and voting options. The terminal device 20a may respond to the voting creation operation of the voting initiator and generate a contract deployment transaction 22, which may include a voting contract code A1 and voting contract data A2 for the voting contract A, wherein the voting contract code A1 is obtained by the terminal device 20a based on the voting template selected by the voting initiator, and the voting contract data A2 may include the voting object, voting strategy, voting deadline, and voting options set by the voting initiator. The corresponding data. Then, the terminal device 20a can send the contract deployment transaction 22 to the blockchain network 2000, and the blockchain network 2000 can store the voting contract code A1 and the voting contract data A2 to the voting platform management contract 2001 (i.e., the above-mentioned Figure 1 The information statistics management contract described above). Among them, the voting platform management contract 2001 can be used to store voting contract codes and voting contract data corresponding to multiple voting contracts created by different voting initiators. For example, the voting platform management contract 2001 can also store voting contract code B1 and voting contract data B2 corresponding to voting contract B. It can be understood that the terminal device 20a sends the contract deployment transaction 22 to the blockchain network 2000, which actually means that the terminal device 20a sends the contract deployment transaction 22 to any blockchain node in the blockchain network 2000, and then the blockchain node initiates the consensus on-chain processing for the contract deployment transaction 22. In addition, in fact, a backup of the voting platform management contract 2001 is stored in any blockchain node in the blockchain network 2000. The contract deployment transaction 22 of the blockchain network 2000 stores the voting contract code A1 and the voting contract data A2 in the voting platform management contract 2001. It actually means that after the consensus of the contract deployment transaction 22 is passed, all blockchain nodes in the blockchain network 2000 will store the voting contract code A1 and the voting contract data A2 in the local backup corresponding to the voting platform management contract 2001.

[0110] After the voting contract code A1 and voting contract data A2 are stored in the voting platform management contract 2001, the blockchain network 2000 can send the contract deployment success result to the terminal device 20a. After the terminal device 20a receives the contract deployment success result 202, it can be determined that the voting contract code A1 and voting contract data A2 corresponding to the voting contract A have been stored in the blockchain network 2000. The terminal device 20a can generate a contract creation notification 23, which is used to notify the voting server 200 to download the contract to the blockchain network 2000. Figure 2a As shown, the voting server 200 has a trusted execution environment 201, and the trusted execution environment 201 may include a voting component 202 (i.e., the above-mentioned Figure 1 The information statistics component) and the smart contract virtual machine 203. After the voting server 200 receives the contract creation notification 23 through the voting component, it can generate a contract download request 204 for the voting contract A according to the contract creation notification 23 in the voting component 202, and then send the contract download request 204 to the blockchain network 2000. The blockchain network 2000 can return the voting contract code A1 and the voting contract data A2 stored in the voting platform management contract 2001 according to the contract download request 204. Then, the voting server 200 can call the smart contract virtual machine 203, and then deploy the voting contract A according to the voting contract code A1 and the voting contract data A2.

[0111] After the voting contract A is successfully deployed, the voting server 200 can process the voting request associated with the voting business 1 corresponding to the voting contract A. For ease of understanding, please refer to Figure 2b , Figure 2b Schematic diagram of a scenario of information statistics service processing provided by an embodiment of the present application. Figure 2b As shown, during the voting period of voting service 1, voting server 200 may receive voting requests for voting service 1 sent by multiple terminal devices. For example, voting server 200 may receive voting request 1 sent by terminal device 20a, voting request 2 sent by terminal device 20b, ..., voting request 3 sent by terminal device 20n through voting component 202. Figure 2b As shown, after the voting server 200 receives a voting request through the voting component 202, it can call the voting contract A deployed in the smart contract virtual machine 203 through the voting component 202, and then execute the voting request through the voting contract A to obtain the corresponding voting result. Every time the voting server 200 obtains a voting result, it can add it to the voting result set 205.

[0112] like Figure 2bAs shown, when the voting server 200 determines that the voting is closed (i.e., the business termination condition is met), the voting result A3 can be obtained according to the statistical results of the voting result set 205. Then, the voting server 200 can send the voting statistical result A3 to the blockchain network 2000 through an encrypted channel, and the blockchain network 2000 can store the voting statistical result A3 in the voting platform management contract 2001. Among them, the encrypted channel refers to the use of encryption technology to protect information during the transmission process, so that it cannot be obtained or tampered with during the transmission process, ensuring the security of information of all parties. It can be understood that the transmission of the voting statistical result A3 through an encrypted channel can ensure that the voting statistical result A3 cannot be decrypted when it reaches the blockchain network 2000, and it cannot be changed. When the blockchain network 2000 stores the voting statistical result A3 in the voting platform management contract 2001, the voting statistical result A3 is made public and cannot be tampered with. When the voter or the person initiating the vote wants to view the results of voting service A, he or she can query the blockchain network 2000 through the voting platform application in each terminal device. When the blockchain network 2000 receives the query request for voting service A, it will return the voting statistics result A3 stored in the voting platform management contract 2001 to the terminal device that initiated the query.

[0113] The specific implementation of transmitting the voting statistics result A3 through the encrypted channel can be found in the following description, which will not be explained here.

[0114] It can be seen that by adopting the method provided in the embodiment of the present application, the voting process and the result statistics process of the voting business are executed in a trusted execution environment according to the rules of the contract code, and cannot be obtained or interfered with by the outside world, thereby ensuring the anonymity of the voting business. The final result is encrypted and transmitted to the blockchain network, and cannot be obtained before reaching the blockchain network. Until it reaches the blockchain network and is made public, the integrity and non-tamperability of the result can be guaranteed, thereby ensuring the reliability of the voting business.

[0115] For further information, see Figure 3a , Figure 3a is a flowchart of a data processing method based on blockchain provided by an embodiment of the present application. The method may be performed by an information statistics server (for example, the above Figure 1 The information statistics server 100 in the corresponding embodiment is executed. The following will take the execution of this method by a computer device as an example for explanation, wherein the data processing method based on blockchain may at least include the following steps S101-S103:

[0116] Step S101: receiving a first information reporting request for an information statistics service through an information statistics component, calling an information statistics contract through the information statistics component, executing the first information reporting request through the information statistics contract, and obtaining a first information reporting result.

[0117] Specifically, information statistics business refers to a business that needs to collect and count information from multiple parties, such as voting business and bidding business. When conducting information statistics business, it is sometimes necessary to conduct it anonymously, that is, only the final information statistics result is needed, but the information statistics process is not public, that is, the identity of the information statistics object and the reported information need to be registered, so as to protect the privacy of the information statistics object. Taking the voting business as an example, anonymous voting refers to a voting method in which the identity of the voter is not disclosed during the voting process. Its common application scenarios include election voting, corporate decision-making, community voting, online voting, etc. These application scenarios all need to protect the privacy of the voters and ensure that the voting results are open and transparent, which is just suitable for the method provided in the embodiments of the present application.

[0118] Specifically, the information statistics component may be an application for completing information statistics related work. For example, when the information statistics service is a voting service, the information statistics component may be considered as a voting application. The information statistics contract may be a smart contract for executing information reporting requests. The information statistics contract may be downloaded from the information statistics management contract of the blockchain network when the computer device receives a contract creation notification for the information statistics contract. It can be understood that the information reporting request for the information statistics service is executed in full accordance with the rules indicated by the information statistics contract downloaded from the blockchain network and cannot be manipulated.

[0119] Specifically, the information statistics server is a server with a trusted execution environment, and the smart contract virtual machines corresponding to the information statistics component and the information statistics contract are deployed in a trusted execution environment (TEE). Optionally, when other computer devices have a trusted execution environment, the data processing method provided in this application can also be executed by other computer devices. Therefore, it can be understood that the acquisition, execution, and subsequent result statistics of the information reporting request performed by the information statistics server through the information statistics component and the information statistics contract will be executed in a trusted execution environment, that is, it cannot be obtained and interfered with by the outside world, so the execution process of the information reporting request will be executed in full accordance with the rules indicated by the information statistics contract and cannot be tampered with, which ensures the anonymity and reliability of the information statistics service during execution.

[0120] Optionally, a feasible process for the information statistics server to download the information statistics contract may be: receiving a contract creation notification for the information statistics contract through the information statistics component; then in the information statistics component, generating a contract download request for the information statistics contract according to the contract creation notification, and sending the contract download request to the blockchain network; receiving the information statistics contract code and information statistics contract data stored in the information statistics management contract returned by the blockchain network according to the contract download request through the information statistics component; in the smart contract virtual machine, deploying the information statistics contract according to the information statistics contract code and information statistics contract data. Among them, the contract creation notification may be generated by the first terminal when receiving the successful contract deployment result sent by the blockchain network. Among them, the successful contract deployment result is generated when the blockchain network stores the information statistics contract code and information statistics contract data in the information statistics management contract. Among them, the information statistics contract code refers to the contract code for the information statistics contract contained in the transaction deployment contract, and the information statistics contract data refers to the contract data for the information statistics contract contained in the transaction deployment contract. The contract deployment transaction is generated when the first terminal responds to the information statistics creation operation for the information statistics business.

[0121] Among them, the above-mentioned information statistics creation operation may include an information statistics template selection operation and an information statistics information setting operation. The information statistics template selection operation may be an operation performed by a business initiator when selecting an information statistics template through the first terminal. It should be noted that the first terminal can provide a variety of information statistics templates to the business initiator, and different information statistics templates can be pre-configured with different contract codes. When the first terminal responds to the information statistics template selection operation, it can obtain the contract code corresponding to the information statistics template selected by the business initiator as the contract code of the information statistics contract; the information statistics setting operation may be an operation performed by the business initiator when setting information statistics information related to the selected information statistics template through the first terminal. For example, the business initiator sets the voting object, sets the voting strategy, sets the voting period, sets the voting options, etc. through the first terminal. When the first terminal responds to the information statistics setting operation, it can determine the voting object, voting strategy, voting period, voting options and other data set by the business initiator as the contract data of the information statistics contract.

[0122] To facilitate understanding of the above process, we take the information statistics contract as an example. Figure 2a The voting contract A shown in the figure is used as an example for explanation. Figure 2a ,like Figure 2aAs shown, the terminal device 20a (i.e., the first terminal mentioned above) can, when responding to the voting creation operation of the voting initiator, first obtain the corresponding contract code according to the voting template selected by the voting initiator, and determine the obtained contract code as the voting contract code A1 of the created voting contract A (i.e., the above-mentioned information statistics contract code), and then determine the data corresponding to the voting object, voting strategy, voting period, voting options and other information set by the voting initiator as the voting contract data A2 of the voting contract A (i.e., the above-mentioned information statistics contract data), and then, the terminal device 20a can construct a contract deployment transaction 22 (i.e., the above-mentioned contract deployment transaction) according to the voting contract code A1 and the voting contract data A2, and then send the contract deployment transaction 22 to the blockchain network 2000. When the contract deployment transaction 22 is completed, that is, the voting contract code A1 and the voting contract data A2 are written into the voting platform management contract 2001 (i.e., the above-mentioned information statistics management contract), the blockchain network 2000 can notify the first terminal, and then the first terminal notifies the information statistics server 200 that the voting contract A has been deployed. Then, the information statistics server 200 can download the voting contract code A1 and the voting contract data A2 from the voting platform management contract 2001, and then deploy the voting contract code A1 and the voting contract data A2 in the smart contract virtual machine 203.

[0123] Step S102, when it is determined through the information statistics component that the information statistics service meets the service termination condition, the information statistics result for the information statistics service is obtained through the information statistics component; the information statistics result is generated based on the information reporting result set; the information reporting result set includes the first information reporting result.

[0124] Specifically, the service termination conditions may be that the information statistics time has ended, the number of people involved in information statistics is sufficient, the target number of information statistics has been reached, etc., which may be set according to the actual situation of the information statistics service, and this application does not impose any restrictions thereon.

[0125] Optionally, a feasible embodiment of determining that the information statistics service meets the service termination condition may be: obtaining the information statistics contract data corresponding to the information statistics contract through the information statistics component; the information statistics contract data includes the service termination time; when it is detected that the system time is equal to the service termination time, determining that the information statistics service meets the service termination condition. For example, if the service termination time is 3:15, when the information statistics server detects that the system time is also 3:15, it can be determined that the information statistics service meets the service termination condition.

[0126] Optionally, a feasible implementation method for determining whether the information statistics service meets the service termination conditions may be: obtaining information statistics contract data corresponding to the information statistics contract through the information statistics component; the information statistics contract data includes an information statistics object list and a service termination ratio parameter; determining the total number of information statistics objects according to the information statistics object list, and determining the number of service termination statistics objects according to the total number of information statistics objects and the service termination ratio parameter; determining that the information statistics service meets the service termination conditions when the number of reporting objects corresponding to the received information reporting request is equal to the number of service termination statistics objects; the received information reporting request includes the first information reporting request. For example, if the service termination ratio parameter is 0.5 and the total number of information statistics objects is 100, then when the information statistics server receives information reporting requests sent by 50 different information reporting objects, the information statistics server may determine that the information statistics service meets the service termination conditions.

[0127] Specifically, when it is determined through the information statistics component that the information statistics service meets the service termination conditions, a feasible implementation scheme for obtaining the information statistics results for the information statistics service through the information statistics component may be: when it is determined through the information statistics component that the information statistics service meets the service termination conditions, a service termination request is sent to the information statistics contract through the information statistics component; when the information statistics contract receives the service termination request, information statistics processing is performed on the information reporting result set through the information statistics contract to obtain the information statistics results for the information statistics service, and the information statistics results are sent to the information statistics component.

[0128] To facilitate understanding of the interaction between the information statistics component and the information statistics contract when obtaining information statistics results, we will take the information statistics business as an example of voting business. Please refer to Figure 3b , Figure 3b Schematic diagram of an interactive scenario of obtaining and uploading information statistics results provided by an embodiment of the present application. Figure 3b As shown, in the trusted execution environment 300 of the information statistics server, a voting application 301 (i.e., the above-mentioned information statistics component) and a smart contract virtual machine 302 are deployed. Figure 3b As shown, when the information statistics server determines that the voting time has ended through the voting application 301, it can initiate a voting termination request to the voting contract (i.e., the above-mentioned information statistics contract) in the smart contract virtual machine 302, and the information statistics server can perform statistical processing on the previously obtained voting result set through the voting contract to obtain the voting statistics result, and then return the voting statistics result to the voting application 301. It should be understood that the trusted execution environment 300 does not allow the outside world to access it at will, so the information statistics server can send the voting statistics result to the blockchain network 303 for public disclosure, and the specific sending process can refer to the description of step S103.

[0129] Step S103, in the information statistics component, the information statistics result is sent to the blockchain network through an encrypted channel, so that the blockchain network stores the information statistics result in the information statistics management contract.

[0130] Specifically, in the information statistics component, the information statistics result is sent to the blockchain network through an encrypted channel so that the blockchain network stores the information statistics result in the information statistics management contract. A feasible implementation example can be: in the information statistics component, the information statistics result is signed by the information statistics component private key corresponding to the information statistics component to obtain the signature information of the information statistics transaction; the information statistics result, the signature information and the name of the information statistics management contract are packaged into the information statistics transaction; the information statistics transaction is sent to the blockchain network through an encrypted channel so that the blockchain network stores the information statistics result and the signature information in the information statistics management contract according to the name of the information statistics management contract when the consensus of the information statistics transaction is passed; the transaction signature information is used to characterize that the information statistics result is generated by the information statistics component. Among them, the encrypted channel refers to the use of encryption technology to protect information during transmission, so that it cannot be obtained or tampered with during transmission, thereby ensuring the security of information of all parties. In other words, the information statistics transaction cannot be decrypted before it is transmitted to the blockchain network, thereby ensuring the reliability of the information statistics result finally obtained. Wherein, sending the information statistics transaction to the blockchain network through an encrypted channel can be sending the information statistics transaction to the information statistics management platform corresponding to the blockchain network through an encrypted channel. The information statistics management platform can initiate consensus on-chain processing for the information statistics transaction to the blockchain network, so that the blockchain network can store the information statistics results and signature information in the information statistics management contract according to the name of the information statistics management contract when the consensus of the information statistics transaction is passed. Wherein, the information statistics management platform can be an application integrated and installed in the information blockchain node in the blockchain network, which is mainly responsible for the data interaction between the information blockchain node and the information statistics server and the call of the information statistics management contract. Wherein, the number of information blockchain nodes can be one or more. When the number of information blockchain nodes is multiple, when sending the information statistics transaction to the information statistics management platform corresponding to the blockchain network through an encrypted channel, it is actually sending the information statistics transaction to the information statistics management platform in each information blockchain node through the encrypted channel associated with each information blockchain node. That is to say, at this time, the encrypted channel can include node encryption channels corresponding to each information blockchain node.

[0131] For ease of understanding, we will use the information statistics business as an example to illustrate the voting business. Figure 3b ,like Figure 3bAs shown, after the voting component 301 obtains the voting statistics results, the information statistics server can send the voting statistics results to the voting management platform 304 corresponding to the blockchain network 303 (i.e., the information statistics management platform mentioned above) through an encrypted channel in the voting component 301. After the voting management platform 304 corresponding to the blockchain network 303 obtains the voting statistics results from the encrypted channel, it will forward the voting statistics results to the voting management platform contract 305 for storage.

[0132] Through the method provided by the embodiment of the present application, the acquisition, execution and result statistics of information reporting requests are all implemented in a trusted execution environment through information statistics components and information statistics contracts, which cannot be obtained by the outside world, and the execution process is completely executed in accordance with the rules indicated by the information statistics contract, which cannot be interfered with and has anonymity to the outside world; the voting statistics results and transaction signature information are published on the blockchain, that is, stored in the information statistics management contract, which can ensure the integrity and non-tamperability of the information statistics results, and the authenticity of the voting statistics results can be verified through the transaction signature information; in addition, the information statistics results are uploaded using an encrypted channel to ensure communication security. It can be seen that the method provided by the embodiment of the present application can ensure the anonymity and reliability of the information statistics service.

[0133] For further information, see Figure 4 , Figure 4 is a flowchart of a data processing method based on blockchain provided by an embodiment of the present application. The method can be performed by a computer device (for example, the above Figure 1 The information statistics server 100 in the corresponding embodiment is executed. The following will take the method executed by a computer device as an example for explanation, wherein the data processing method based on blockchain may at least include the following steps S201-S203:

[0134] Step S201: receiving a first information reporting request for an information statistics service through an information statistics component, calling an information statistics contract through the information statistics component, executing the first information reporting request through the information statistics contract, and obtaining a first information reporting result.

[0135] Step S202, when it is determined through the information statistics component that the information statistics service meets the service termination condition, the information statistics result for the information statistics service is obtained through the information statistics component; the information statistics result is generated based on the information reporting result set; the information reporting result set includes the first information reporting result.

[0136] Specifically, the implementation process of step S201-step S202 can refer to the above Figure 3a The specific description of step S101 to step S102 in the corresponding embodiment will not be repeated here.

[0137] Step S203, in the information statistics component, the information statistics results are sent to the at least two information blockchain nodes respectively through at least two node encrypted channels, so that the at least two information blockchain nodes respectively broadcast the received information statistics results to the blockchain network; the blockchain network is used to store the information statistics results in the information statistics management contract when the consensus on the information statistics results is passed.

[0138] Specifically, an information blockchain node refers to a blockchain node in a blockchain network that is used to exchange encrypted data with an information statistics server. It is understandable that there are different node encryption channels between the information statistics server and each information blockchain node, and the information statistics results are sent to the information blockchain node through the node encryption channel corresponding to each information blockchain node, which can be considered as the above Figure 3a A feasible implementation process of sending the information statistics results to the blockchain network through an encrypted channel in the corresponding embodiment.

[0139] Specifically, at least two node encryption channels include a target node encryption channel, and the information blockchain node corresponding to the target node encryption channel is the target information blockchain node. Among them, the target node encryption channel includes a first communication key and a second communication key; the first communication key is generated by the information statistics server when performing remote authentication of the information statistics component with the target information blockchain node; the second communication key is generated by the target information blockchain node when performing remote authentication of the information statistics component with the information statistics server. Therefore, in the information statistics component, the information statistics results are sent to at least two information blockchain nodes respectively through at least two node encryption channels, so that at least two information blockchain nodes broadcast the received information statistics results to the blockchain network respectively. A feasible implementation process can be: in the information statistics component, the information statistics results are encrypted by the first communication key to obtain the encrypted result data; the encrypted result data is sent to the target information blockchain node, so that the target information blockchain node decrypts the encrypted result data by the second communication key to obtain the information statistics result, and broadcasts the information statistics result to the blockchain network. Among them, the first communication key and the second communication key can be the same symmetric encryption key, the encryption processing can adopt the encryption algorithm in the symmetric encryption algorithm, and the decryption processing can adopt the decryption algorithm in the symmetric encryption algorithm, wherein the encryption algorithm can convert plaintext into ciphertext, and the decryption algorithm can convert the ciphertext back to plaintext.

[0140] Optionally, when a startup request of the information statistics component is received, a key negotiation request is sent to the target information blockchain node, so that the target information blockchain node generates a first asymmetric key according to the key negotiation request. The key negotiation request may be a DH key negotiation request. The first asymmetric key includes a first public key and a first private key. Upon receiving the first public key sent by the target information blockchain node, the information statistics server may send a block query request to the target information blockchain node, so that the target information blockchain node obtains the latest block hash according to the block query request; then, the information statistics server generates a second asymmetric key through the information statistics component; the second asymmetric key includes a second public key and a second private key. Finally, the information statistics server can generate a remote authentication report in the information statistics component according to the second public key and the latest block hash, and send the remote authentication report to the target information blockchain node, so that the target information blockchain node determines the remote authentication result of the information statistics component according to the remote authentication report. If the remote authentication result is a remote authentication pass result, the second communication key is generated according to the second public key and the first private key; if the remote authentication result received from the target information blockchain node is a remote authentication pass result, the first communication key is generated in the information statistics component according to the first public key and the second private key. Among them, the remote authentication report is used to confirm to the information blockchain node that the trusted execution environment in which the information statistics component is located is secure and the information statistics component is secure. It should be understood that the use of the latest block hash to generate a remote authentication report means that the remote authentication report is recently generated, rather than a historical or other authentication result.

[0141] By adopting the method provided in the embodiment of the present application, the second private key generated in the trusted execution environment will never be leaked, and the first private key generated in the information blockchain node is only used by this node, never saved, and no query interface is provided to the outside, thereby ensuring the security of the first communication key and the second communication key, and also ensuring that the information statistical results will not be leaked during the upload process.

[0142] For further information, see Figure 5 , Figure 5 is a flowchart of a data processing method based on blockchain provided by an embodiment of the present application. The method can be performed by a computer device (for example, the above Figure 1 Any blockchain node in the blockchain node cluster in the corresponding embodiment, or the above Figure 4 The following will take the method executed by a computer device as an example for explanation, wherein the data processing method based on blockchain may at least include the following steps S301-S302:

[0143] Step S301: receiving, through an encrypted channel, information statistics results for an information statistics service sent by the information statistics server through an information statistics component.

[0144] Specifically, the information statistics result is generated based on the information reporting result set; the information reporting result set includes the first information reporting result; the first information reporting result is obtained by the information statistics server, when receiving the first information reporting request for the information statistics business, calling the information statistics contract through the information statistics component, and executing the first information reporting request through the information statistics contract; the information statistics contract is downloaded from the information statistics management contract when the information statistics server receives the contract creation notification for the information statistics contract; the information statistics component and the smart contract virtual machine corresponding to the information statistics contract are both deployed in the trusted execution environment of the information statistics server.

[0145] Specifically, the information statistics component generates the first information reporting result and uploads the information statistics result. Figure 3a The description of step S101 to step S103 in the corresponding embodiment will not be repeated here.

[0146] Optionally, obtain the contract deployment transaction sent by the first terminal, store the information statistics contract code and the information statistics contract data in the information statistics management contract according to the contract deployment transaction, and generate a successful contract deployment result; the information statistics contract code refers to the contract code for the information statistics contract contained in the transaction deployment contract; the information statistics contract data refers to the contract data for the information statistics contract contained in the transaction deployment contract; the contract deployment transaction is generated when the first terminal responds to the information statistics creation operation for the information statistics business; send the successful contract deployment result to the first terminal, so that the first terminal generates a contract creation notification for the information statistics contract, and sends the contract creation notification to the information statistics server; receive the contract download request for the information statistics contract generated by the information statistics server according to the contract creation notification, and send the information statistics contract code and the information statistics contract data stored in the information statistics management contract to the information statistics server according to the contract download request, so that the information statistics server deploys the information statistics contract in the smart contract virtual machine according to the information statistics contract code and the information statistics contract data. The generation of the contract deployment transaction and the implementation process of the information statistics server deploying the information statistics contract can be found in the above Figure 3a The optional description of step S101 in the corresponding embodiment will not be repeated here.

[0147] Step S302, storing the information statistics result in the information statistics management contract.

[0148] Specifically, the information statistics management contract can be used to store the contract codes, contract data and corresponding information voting results of multiple information statistics contracts. A feasible storage structure and method of the information statistics management contract is shown in Table 2 below:

[0149] Table 2

[0150]

[0151] Among them, Vote refers to the business name of the information statistics business. The authorization object list, validity period, effective threshold, information statistics strategy, etc. can all be included in the above information statistics contract data. It can be seen from the above table that in the information statistics management contract, the information statistics contract code, information statistics contract data and the final information statistics results corresponding to the same information statistics business are stored in the same structure for easy reference.

[0152] Optionally, a result query request for the information statistics service initiated by the first terminal is received; an information statistics management contract is obtained according to the result query request; if information statistics results for the information statistics service are obtained in the information statistics management contract, the information statistics results are sent to the first terminal.

[0153] By adopting the method provided in the embodiment of the present application, the information statistics process of the information statistics business is carried out in the trusted execution environment of the information statistics server, ensuring fairness, impartiality and opacity, and the final information statistics results are stored in the information statistics management contract, which can be viewed at will and cannot be tampered with, ensuring the openness, transparency and reliability of the information statistics results.

[0154] For further information, see Figure 6 , Figure 6 Schematic diagram of the architecture of an information statistics system provided in an embodiment of the present application. Figure 6 As shown, the information statistics system consists of an information statistics application, an information statistics management platform in the blockchain network, and an information statistics component in the trusted execution environment.

[0155] like Figure 6 As shown, the information statistics application can be integrated and installed in the terminal device, and can be used to provide business initiators with functions such as information statistics template selection and information statistics template data setting. Among them, an information statistics template can correspond to a contract code, and the information statistics template data setting is to set the corresponding contract data for the selected contract code; the information statistics application can also provide business participants with functions such as information reporting and result query.

[0156] like Figure 6As shown, the information statistics application can interact with the information statistics management platform in the blockchain network to create information statistics services and obtain information statistics results. Among them, the information statistics management platform can be an application integrated in the information blockchain node in the blockchain network, which is responsible for data interaction with the information statistics application and the information statistics component, that is, the data interaction between the information blockchain node and the information statistics application can be realized through the information statistics management platform; the information statistics management platform can also call the information statistics management contract in the blockchain network. Among them, creating an information statistics service means that after the terminal device generates a contract deployment transaction through the information statistics application, the contract deployment transaction can be sent to the blockchain network, that is, to the information statistics management platform in the information blockchain node in the blockchain network. Among them, obtaining information statistics results means querying the information statistics results corresponding to the information statistics service from the blockchain network, and displaying them to business participants through the information statistics application.

[0157] like Figure 6 As shown, the information statistics component is deployed in a trusted execution environment, and a smart contract virtual machine is also deployed in the trusted execution environment. The trusted execution environment can belong to the information statistics server. The information statistics component is responsible for downloading the information statistics contract from the blockchain network, receiving the information reporting request sent by the information statistics application, and then executing the information reporting request through the downloaded information statistics contract, and obtaining the corresponding information reporting result, and when it is determined that the business termination conditions are met, the information statistics result is generated according to the obtained information reporting result. The information statistics component also needs to perform remote authentication with the information blockchain node in the blockchain network, establish a secure and encrypted communication channel, and then upload the information statistics result to the blockchain network through the encrypted communication channel. The smart contract virtual machine is mainly used to run the downloaded information statistics contract.

[0158] It is understandable that Figure 6 The information statistics system shown can be obtained by Figure 3a , Figure 4 ,as well as Figure 5 The data processing method corresponding to any one of the embodiments is used to complete the information statistics service initiated by the service initiator. However, before the information statistics service is completed through the information statistics system, it is also necessary to initialize and authenticate it to ensure the communication security within the information statistics system. For further information, please refer to Figure 7 , Figure 7 This is a schematic diagram of a scenario for initialization authentication of an information statistics system provided in an embodiment of the present application.

[0159] like Figure 7As shown, when performing the initialization authentication of the information statistics system, the terminal device needs to download the blockchain certificate from the blockchain network through the information statistics application. The blockchain certificate is used to identify the identity of the blockchain node. Later, when the terminal device interacts with the information statistics management platform in the blockchain network through the information statistics application, the signature carried in the data can be used to identify whether the data source is an information blockchain node in the blockchain network.

[0160] like Figure 7 As shown, when performing the initialization authentication of the information statistics system, the terminal device needs to remotely authenticate the information statistics component in the trusted execution environment through the information statistics application and the information statistics management platform in the blockchain network. The information statistics server can generate a remote authentication report through the trusted execution environment, and then send the remote authentication report to the information statistics application and the information statistics management platform. It can be understood that the remote authentication report can determine the security of the operating environment of the information statistics component, the security of the application, and ensure that the application signer meets expectations. The remote authentication process also includes a DH communication key negotiation process to establish a communication key for encrypting information to be transmitted between the two parties, such as information statistics results.

[0161] It can be understood that the information statistics component is an application based on a trusted execution environment, which is used to implement the information statistics function. When the information statistics component is started, it is necessary to confirm the application environment security and application security to the information statistics application and the information statistics management platform, so a remote authentication report is required. At the same time, the information statistics component in the information management server and the information management statistics platform in the information blockchain node need to negotiate keys to ensure the security of the communication between the two parties. The implementation process of key negotiation and remote authentication can be found in the above Figure 4 The description of step S203 in the corresponding embodiment will not be repeated here.

[0162] It can be seen that the embodiment of the present application provides a decentralized, anonymous, fair and open information statistics system, through which the above-mentioned Figure 3a , Figure 4 ,as well as Figure 5 The data processing method corresponding to any one of the embodiments can ensure the anonymity and reliability of the information statistics service.

[0163] See also Figure 8 , Figure 8 1 is a schematic diagram of the structure of a blockchain-based data processing device provided in an embodiment of the present application. The data processing device 1 may be a computer program (including program code) running on a computer device, for example, the data processing device 1 is an application software; the data processing device 1 may be used to execute the corresponding steps in the data processing method provided in an embodiment of the present application. Figure 8 As shown, the data processing device 1 may include: an information reporting module 11 , a result statistics module 12 and an encryption sending module 13 .

[0164] The information reporting module 11 is used to receive a first information reporting request for an information statistics service through an information statistics component, call an information statistics contract through the information statistics component, execute the first information reporting request through the information statistics contract, and obtain a first information reporting result; the smart contract virtual machines corresponding to the information statistics component and the information statistics contract are deployed in a trusted execution environment of the information statistics server; the information statistics contract is downloaded from the information statistics management contract of the blockchain network when a contract creation notification for the information statistics contract is received;

[0165] A result statistics module 12 is used to obtain information statistics results for the information statistics service through the information statistics component when it is determined through the information statistics component that the information statistics service meets the service termination condition; the information statistics result is generated based on the information reporting result set; the information reporting result set includes the first information reporting result;

[0166] The encrypted sending module 13 is used to send the information statistics results to the blockchain network through an encrypted channel in the information statistics component, so that the blockchain network stores the information statistics results in the information statistics management contract.

[0167] The specific implementation of the information reporting module 11, the result statistics module 12 and the encrypted sending module 13 can be found in the above Figure 3a The description of step S101 to step S103 in the corresponding embodiment will not be repeated here.

[0168] Wherein, the above-mentioned data processing device 1 also includes: a contract deployment module 14.

[0169] The contract deployment module 14 is used to receive a contract creation notification for the information statistics contract through the information statistics component; the contract creation notification is generated when the first terminal receives a successful contract deployment result sent by the blockchain network; the successful contract deployment result is generated when the blockchain network stores the information statistics contract code and the information statistics contract data in the information statistics management contract; the information statistics contract code refers to the contract code for the information statistics contract contained in the transaction deployment contract; the information statistics contract data refers to the contract data for the information statistics contract contained in the transaction deployment contract; the contract deployment transaction is generated when the first terminal responds to the information statistics creation operation for the information statistics business;

[0170] The contract deployment module 14 is also used to generate a contract download request for the information statistics contract according to the contract creation notification in the information statistics component, and send the contract download request to the blockchain network;

[0171] The contract deployment module 14 is also used to receive, through the information statistics component, the information statistics contract code and the information statistics contract data stored in the information statistics management contract returned by the blockchain network according to the contract download request;

[0172] The contract deployment module 14 is also used to deploy the information statistics contract in the smart contract virtual machine according to the information statistics contract code and the information statistics contract data.

[0173] The specific implementation of the contract deployment module 14 can be found in the above Figure 3a The optional description of step S101 in the corresponding embodiment will not be repeated here.

[0174] Wherein, the above data processing device 1 further includes: a first termination module 15.

[0175] The first termination module 15 is used to obtain information statistics contract data corresponding to the information statistics contract through the information statistics component; the information statistics contract data includes the service termination time;

[0176] The first termination module 15 is further configured to determine that the information statistics service meets the service termination condition when it is detected that the system time is equal to the service termination time.

[0177] The specific implementation of the first termination module 15 can refer to the above Figure 3a The optional description of step S102 in the corresponding embodiment will not be repeated here.

[0178] Wherein, the above data processing device further includes: a second termination module 16.

[0179] The second termination module 16 is used to obtain information statistics contract data corresponding to the information statistics contract through the information statistics component; the information statistics contract data includes an information statistics object list and a business termination ratio parameter;

[0180] The second termination module 16 is further used to determine the total number of information statistical objects according to the information statistical object list, and determine the number of business termination statistical objects according to the total number of information statistical objects and the business termination ratio parameter;

[0181] The second termination module 16 is further used to determine that the information statistics service meets the service termination condition when the number of reporting objects corresponding to the received information reporting request is equal to the number of service termination statistics objects; the received information reporting request includes the first information reporting request.

[0182] The specific implementation of the second termination module 16 can be found in the above Figure 3aThe optional description of step S102 in the corresponding embodiment will not be repeated here.

[0183] The result statistics module 12 includes: a result request unit 121 and a result processing unit 122 .

[0184] A result request unit 121 is used to send a service termination request to the information statistics contract through the information statistics component when it is determined through the information statistics component that the information statistics service meets the service termination condition;

[0185] The result processing unit 122 is used to perform information statistics processing on the information reporting result set through the information statistics contract when the information statistics contract receives a service termination request, obtain the information statistics result for the information statistics service, and send the information statistics result to the information statistics component.

[0186] The specific implementation of the result request unit 121 and the result processing unit 122 can be found in the above Figure 3a The description of step S102 in the corresponding embodiment will not be repeated here.

[0187] Wherein, the blockchain network includes at least two information blockchain nodes; the encrypted channel includes node encryption channels corresponding to the at least two information blockchain nodes respectively;

[0188] The encryption and sending module 13 includes: a first encryption and sending unit 131.

[0189] The first encrypted sending unit 131 is used to send the information statistical results to at least two information blockchain nodes through at least two node encrypted channels in the information statistics component, so that the at least two information blockchain nodes broadcast the received information statistical results to the blockchain network respectively; the blockchain network is used to store the information statistical results in the information statistics management contract when the information statistical results are agreed upon.

[0190] The specific implementation of the first encryption sending unit 131 can refer to the above Figure 4 The description of step S203 in the corresponding embodiment will not be repeated here.

[0191] Among them, at least two node encryption channels include a target node encryption channel; the information blockchain node corresponding to the target node encryption channel is the target information blockchain node; the target node encryption channel includes a first communication key and a second communication key; the first communication key is generated by the information statistics server when performing remote authentication of the information statistics component with the target information blockchain node; the second communication key is generated by the target information blockchain node when performing remote authentication of the information statistics component with the information statistics server;

[0192] The first encryption sending unit 131 includes: an encryption processing subunit 1311 and a data sending subunit 1312 .

[0193] The encryption processing subunit 1311 is used to encrypt the information statistics result by using the first communication key in the information statistics component to obtain encryption result data;

[0194] The data sending subunit 1312 is used to send the encrypted result data to the target information blockchain node, so that the target information blockchain node decrypts the encrypted result data through the second communication key, obtains the information statistical result, and broadcasts the information statistical result to the blockchain network.

[0195] The specific implementation of the encryption processing subunit 1311 and the data sending subunit 1312 can be found in the above Figure 4 The description of step S203 in the corresponding embodiment will not be repeated here.

[0196] The data processing device 1 further includes a remote authentication module 17 .

[0197] The remote authentication module 17 is used to send a key negotiation request to the target information blockchain node when receiving a startup request of the information statistics component, so that the target information blockchain node generates a first asymmetric key according to the key negotiation request; the first asymmetric key includes a first public key and a first private key;

[0198] The remote authentication module 17 is further used to send a block query request to the target information blockchain node when receiving the first public key sent by the target information blockchain node, so that the target information blockchain node obtains the latest block hash according to the block query request;

[0199] The remote authentication module 17 is further used to generate a second asymmetric key through the information statistics component; the second asymmetric key includes a second public key and a second private key;

[0200] The remote authentication module 17 is further used to generate a remote authentication report in the information statistics component according to the second public key and the latest block hash, and send the remote authentication report to the target information blockchain node, so that the target information blockchain node determines the remote authentication result of the information statistics component according to the remote authentication report, and if the remote authentication result is a remote authentication pass result, a second communication key is generated according to the second public key and the first private key;

[0201] The remote authentication module 17 is also used to generate a first communication key based on the first public key and the second private key in the information statistics component if the remote authentication result received from the target information blockchain node is a remote authentication pass result.

[0202] The specific implementation of the remote authentication module 17 can be found in the above Figure 4 The optional description of step S203 in the corresponding embodiment will not be repeated here.

[0203] The encryption and sending module 13 includes: a second encryption and sending unit 132.

[0204] The second encryption sending unit 132 is used to sign the information statistics result in the information statistics component by using the information statistics component private key corresponding to the information statistics component to obtain signature information of the information statistics transaction;

[0205] The second encryption sending unit 132 is also used to package the information statistics results, signature information and the information statistics management contract name into the information statistics transaction;

[0206] The second encrypted sending unit 132 is also used to send the information statistics transaction to the blockchain network through an encrypted channel, so that when the information statistics transaction consensus is passed, the blockchain network stores the information statistics results and signature information in the information statistics management contract according to the information statistics management contract name; the transaction signature information is used to characterize that the information statistics results are generated by the information statistics component.

[0207] The specific implementation of the second encryption sending unit 132 can refer to the above Figure 3a The description of step S103 in the corresponding embodiment will not be repeated here.

[0208] See also Fig. 9 , Fig. 9 Schematic diagram of the structure of a computer device provided in an embodiment of the present application. Fig. 9 As shown above Figure 8 The data processing device 1 in the corresponding embodiment can be applied to a computer device 1000, and the computer device 1000 may include: a processor 1001, a network interface 1004 and a memory 1005. In addition, the above-mentioned computer device 1000 may also include: a user interface 1003, and at least one communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. Among them, the user interface 1003 may include a display screen (Display), a keyboard (Keyboard), and the user interface 1003 may optionally include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or it may be a non-volatile memory (non-volatile memory), such as at least one disk storage. The memory 1005 may optionally also be at least one storage device located away from the aforementioned processor 1001. As Fig. 9As shown, the memory 1005 as a computer-readable storage medium may include an operating system, a network communication module, a user interface module, and a device control application program.

[0209] In such Fig. 9 In the computer device 1000 shown, the network interface 1004 can provide a network communication network element; the user interface 1003 is mainly used to provide an input interface for the user; and the processor 1001 can be used to call the device control application stored in the memory 1005 to achieve:

[0210] A first information reporting request for an information statistics service is received through an information statistics component, an information statistics contract is called through the information statistics component, and the first information reporting request is executed through the information statistics contract to obtain a first information reporting result; the smart contract virtual machines corresponding to the information statistics component and the information statistics contract are deployed in a trusted execution environment of an information statistics server; the information statistics contract is downloaded from the information statistics management contract of the blockchain network when a contract creation notification for the information statistics contract is received;

[0211] When it is determined through the information statistics component that the information statistics service meets the service termination condition, the information statistics result for the information statistics service is obtained through the information statistics component; the information statistics result is generated based on the information reporting result set; the information reporting result set includes the first information reporting result;

[0212] In the information statistics component, the information statistics results are sent to the blockchain network through an encrypted channel, so that the blockchain network stores the information statistics results in the information statistics management contract.

[0213] It should be understood that the computer device 1000 described in the embodiment of the present application can execute the above Figure 3a , Figure 4 , Figure 5 The description of the data processing method in any corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of adopting the same method will not be repeated here.

[0214] In addition, it should be pointed out here that: the embodiment of the present application also provides a computer-readable storage medium, and the computer-readable storage medium stores a computer program executed by the data processing device 1 mentioned above, and the computer program includes program instructions. When the processor executes the program instructions, the computer program can execute the above-mentioned data processing device 1. Figure 3a , Figure 4 , Figure 5The description of the above data processing method in any corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of the same method will not be repeated. For technical details not disclosed in the computer-readable storage medium embodiment involved in this application, please refer to the description of the method embodiment of this application.

[0215] For further information, see Fig.10 , Fig.10 is a schematic diagram of the structure of another data processing device provided in an embodiment of the present application. The above-mentioned data processing device 3 may be a computer program (including program code) running in a computer device, for example, the data processing device 3 is an application software; the data processing device 3 may be used to execute the corresponding steps in the method provided in an embodiment of the present application. Fig.10 As shown, the data processing device 3 may include: a result receiving module 31 and a result storage module 32 .

[0216] The result receiving module 31 is used to receive, through an encrypted channel, information statistics results for information statistics services sent by the information statistics server through the information statistics component; the information statistics results are generated based on the information reporting result set; the information reporting result set includes a first information reporting result; the first information reporting result is obtained by the information statistics server, when receiving a first information reporting request for the information statistics service, calling the information statistics contract through the information statistics component and executing the first information reporting request through the information statistics contract; the information statistics contract is downloaded from the information statistics management contract by the information statistics server when receiving a contract creation notification for the information statistics contract; the information statistics component and the smart contract virtual machine corresponding to the information statistics contract are both deployed in the trusted execution environment of the information statistics server;

[0217] The result storage module 32 is used to store the information statistics results in the information statistics management contract.

[0218] The specific implementation of the result receiving module 31 and the result storage module 32 can be found in the above Figure 5 The description of step S301 - step S302 in the corresponding embodiment will not be repeated here.

[0219] The data processing device 3 further includes: a contract storage module 33 , a deployment notification module 34 and a contract download module 35 .

[0220] The contract storage module 33 is used to obtain the contract deployment transaction sent by the first terminal, store the information statistics contract code and the information statistics contract data in the information statistics management contract according to the contract deployment transaction, and generate a successful contract deployment result; the information statistics contract code refers to the contract code for the information statistics contract contained in the transaction deployment contract; the information statistics contract data refers to the contract data for the information statistics contract contained in the transaction deployment contract; the contract deployment transaction is generated when the first terminal responds to the information statistics creation operation for the information statistics business;

[0221] The deployment notification module 34 is further used to send the successful contract deployment result to the first terminal, so that the first terminal generates a contract creation notification for the information statistics contract, and sends the contract creation notification to the information statistics server;

[0222] The contract download module 35 is used to receive a contract download request for the information statistics contract generated by the information statistics server according to the contract creation notification, and send the information statistics contract code and information statistics contract data stored in the information statistics management contract to the information statistics server according to the contract download request, so that the information statistics server deploys the information statistics contract in the smart contract virtual machine according to the information statistics contract code and information statistics contract data.

[0223] The specific implementation of the contract storage module 33, the deployment notification module 34 and the contract download module 35 can be found in the above Figure 5 The optional description of step S302 in the corresponding embodiment will not be repeated here.

[0224] Wherein, the above-mentioned data processing device 3 further includes: a result query module 36.

[0225] A result query module 36, configured to receive a result query request for an information statistics service initiated by the first terminal;

[0226] The result query module 36 is also used to obtain the information statistics management contract according to the result query request;

[0227] The result query module 36 is further configured to send the information statistics result to the first terminal if the information statistics result for the information statistics service is obtained in the information statistics management contract.

[0228] The specific implementation of the result query module 36 can be found in the above Figure 5 The optional description of step S302 in the corresponding embodiment will not be repeated here.

[0229] For further information, see Fig.11 , Fig.11 Schematic diagram of another computer device provided in the embodiment of the present application. Fig.11 As shown above Fig.10 The data processing device 3 in the corresponding embodiment can be applied to a computer device 3000, and the computer device 3000 may include: a processor 3001, a network interface 3004 and a memory 3005. In addition, the above-mentioned computer device 3000 also includes: a user interface 3003, and at least one communication bus 3002. Among them, the communication bus 3002 is used to realize the connection and communication between these components. Among them, the user interface 3003 may include a display screen (Display), a keyboard (Keyboard), and the user interface 3003 may optionally include a standard wired interface and a wireless interface. The network interface 3004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 3005 may be a high-speed RAM memory, or it may be a non-volatile memory (non-volatile memory), such as at least one disk storage. The memory 3005 may optionally also be at least one storage device located away from the aforementioned processor 3001. As Fig.11 As shown, the memory 3005 as a computer-readable storage medium may include an operating system, a network communication module, a user interface module, and a device control application.

[0230] exist Fig.11 In the computer device 3000 shown, the network interface 3004 can provide a network communication function; the user interface 3003 is mainly used to provide an input interface for the user; and the processor 3001 can be used to call the device control application stored in the memory 3005 to achieve:

[0231] Receive the information statistics result for the information statistics service sent by the information statistics server through the information statistics component through an encrypted channel; the information statistics result is generated based on the information reporting result set; the information reporting result set includes the first information reporting result; the first information reporting result is obtained by the information statistics server, when receiving the first information reporting request for the information statistics service, calling the information statistics contract through the information statistics component and executing the first information reporting request through the information statistics contract; the information statistics contract is downloaded from the information statistics management contract by the information statistics server when receiving the contract creation notification for the information statistics contract; the information statistics component and the smart contract virtual machine corresponding to the information statistics contract are both deployed in the trusted execution environment of the information statistics server;

[0232] The information statistics results are stored in the information statistics management contract.

[0233] It should be understood that the computer device 3000 described in the embodiments of the present application can execute the description of the data processing method in the above embodiments, and can also execute the above Fig. 9The description of the data processing device 3 in the corresponding embodiment will not be repeated here. In addition, the description of the beneficial effects of adopting the same method will not be repeated here either.

[0234] In addition, it should be pointed out here that: the embodiment of the present application also provides a computer-readable storage medium, and the computer-readable storage medium stores the computer program executed by the data processing device 3 mentioned above. When the processor loads and executes the computer program, it can execute the description of the data processing method in any of the previous embodiments, so it will not be repeated here. In addition, the description of the beneficial effects of the same method will not be repeated. For technical details not disclosed in the computer-readable storage medium embodiment involved in this application, please refer to the description of the method embodiment of this application.

[0235] The computer-readable storage medium may be the data processing device provided in any of the aforementioned embodiments or the internal storage unit of the computer device, such as the hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (smart media card, SMC), a secure digital (secure digital, SD) card, a flash card (flash card), etc. equipped on the computer device. Further, the computer-readable storage medium may also include both the internal storage unit of the computer device and an external storage device. The computer-readable storage medium is used to store the computer program and other programs and data required by the computer device. The computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.

[0236] In addition, it should be noted that: the embodiment of the present application also provides a computer program product or a computer program, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the above Figure 3a , Figure 4 , Figure 5 Any method provided by the corresponding embodiment.

[0237] The terms "first", "second", etc. in the description, claims, and drawings of the embodiments of the present application are used to distinguish different objects, rather than to describe a specific order. In addition, the term "comprising" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, device, product, or equipment that includes a series of steps or units is not limited to the listed steps or modules, but optionally includes steps or modules that are not listed, or optionally includes other step units inherent to these processes, methods, devices, products, or equipment.

[0238] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of network elements in the above description. Whether these network elements are executed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described network elements for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0239] The above disclosure is only the preferred embodiment of the present application, which certainly cannot be used to limit the scope of rights of the present application. Therefore, equivalent changes made according to the claims of the present application are still within the scope covered by the present application.

Claims

1. A data processing method based on blockchain, characterized in that: The method is executed by an information statistics server, and comprises: Receiving a first information reporting request for an information statistics service through an information statistics component, calling an information statistics contract through the information statistics component, executing the first information reporting request through the information statistics contract, and obtaining a first information reporting result; the information statistics component and the smart contract virtual machine corresponding to the information statistics contract are both deployed in a trusted execution environment of the information statistics server; the information statistics contract is downloaded from the information statistics management contract of the blockchain network when a contract creation notification for the information statistics contract is received; When it is determined by the information statistics component that the information statistics service meets the service termination condition, obtaining an information statistics result for the information statistics service by the information statistics component; the information statistics result is generated based on an information reporting result set; the information reporting result set includes the first information reporting result; In the information statistics component, the information statistics result is sent to the blockchain network through an encrypted channel, so that the blockchain network stores the information statistics result in the information statistics management contract.

2. The method according to claim 1, characterized in that Also includes: A contract creation notification for an information statistics contract is received through an information statistics component; the contract creation notification is generated by the first terminal when receiving a successful contract deployment result sent by the blockchain network; the successful contract deployment result is generated when the blockchain network stores the information statistics contract code and the information statistics contract data in the information statistics management contract; the information statistics contract code refers to the contract code for the information statistics contract contained in the transaction deployment contract; the information statistics contract data refers to the contract data for the information statistics contract contained in the transaction deployment contract; the contract deployment transaction is generated when the first terminal responds to an information statistics creation operation for an information statistics service; In the information statistics component, a contract download request for the information statistics contract is generated according to the contract creation notification, and the contract download request is sent to the blockchain network; Receiving, through the information statistics component, the information statistics contract code and the information statistics contract data stored in the information statistics management contract returned by the blockchain network according to the contract download request; In the smart contract virtual machine, the information statistics contract is deployed according to the information statistics contract code and the information statistics contract data.

3. The method according to claim 1, characterized in that Also includes: Acquire information statistics contract data corresponding to the information statistics contract through the information statistics component; The information statistics contract data includes the service termination time; When it is detected that the system time is equal to the service termination time, it is determined that the information statistics service meets the service termination condition.

4. The method according to claim 1, characterized in that: Also includes: Acquire information statistics contract data corresponding to the information statistics contract through the information statistics component; The information statistics contract data includes an information statistics object list and a service termination ratio parameter; Determine the total number of information statistics objects according to the information statistics object list, and determine the number of service termination statistics objects according to the total number of information statistics objects and the service termination ratio parameter; When the number of reporting objects corresponding to the received information reporting request is equal to the number of service termination statistics objects, it is determined that the information statistics service meets the service termination condition; the received information reporting request includes the first information reporting request.

5. The method according to claim 1, characterized in that When it is determined by the information statistics component that the information statistics service meets the service termination condition, obtaining the information statistics result for the information statistics service by the information statistics component includes: When it is determined by the information statistics component that the information statistics service meets the service termination condition, sending a service termination request to the information statistics contract by the information statistics component; When the information statistics contract receives the service termination request, the information statistics contract performs information statistics processing on the information reporting result set to obtain the information statistics result for the information statistics service, and sends the information statistics result to the information statistics component.

6. The method according to claim 1, characterized in that The blockchain network includes at least two information blockchain nodes; the encrypted channel includes node encryption channels corresponding to the at least two information blockchain nodes respectively; In the information statistics component, sending the information statistics result to the blockchain network through an encrypted channel so that the blockchain network stores the information statistics result in the information statistics management contract, including: In the information statistics component, the information statistics results are respectively sent to the at least two information blockchain nodes through at least two node encrypted channels, so that the at least two information blockchain nodes respectively broadcast the received information statistics results to the blockchain network; the blockchain network is used to store the information statistics results in the information statistics management contract when the consensus on the information statistics results is passed.

7. The method according to claim 6, characterized in that The at least two node encryption channels include a target node encryption channel; the information blockchain node corresponding to the target node encryption channel is the target information blockchain node; the target node encryption channel includes a first communication key and a second communication key; the first communication key is generated by the information statistics server when performing remote authentication of the information statistics component with the target information blockchain node; the second communication key is generated by the target information blockchain node when performing remote authentication of the information statistics component with the information statistics server; In the information statistics component, the information statistics results are sent to the at least two information blockchain nodes respectively through at least two node encrypted channels, so that the at least two information blockchain nodes broadcast the received information statistics results to the blockchain network respectively, including: In the information statistics component, the information statistics result is encrypted by using the first communication key to obtain encrypted result data; The encrypted result data is sent to the target information blockchain node, so that the target information blockchain node decrypts the encrypted result data through the second communication key, obtains the information statistical result, and broadcasts the information statistical result to the blockchain network.

8. The method according to claim 7, characterized in that Also includes: When receiving a start request of the information statistics component, sending a key negotiation request to a target information blockchain node, so that the target information blockchain node generates a first asymmetric key according to the key negotiation request; the first asymmetric key includes a first public key and a first private key; Upon receiving the first public key sent by the target information blockchain node, sending a block query request to the target information blockchain node, so that the target information blockchain node obtains the latest block hash according to the block query request; Generate a second asymmetric key through the information statistics component; the second asymmetric key includes a second public key and a second private key; In the information statistics component, a remote authentication report is generated according to the second public key and the latest block hash, and the remote authentication report is sent to the target information blockchain node, so that the target information blockchain node determines the remote authentication result of the information statistics component according to the remote authentication report, and if the remote authentication result is a remote authentication pass result, a second communication key is generated according to the second public key and the first private key; If the remote authentication result received from the target information blockchain node is a remote authentication pass result, a first communication key is generated in the information statistics component based on the first public key and the second private key.

9. The method according to claim 1, characterized in that: In the information statistics component, sending the information statistics result to the blockchain network through an encrypted channel so that the blockchain network stores the information statistics result in the information statistics management contract, including: In the information statistics component, the information statistics result is signed by the information statistics component private key corresponding to the information statistics component to obtain signature information of the information statistics transaction; Packing the information statistics results, the signature information and the information statistics management contract name into an information statistics transaction; The information statistics transaction is sent to the blockchain network through an encrypted channel, so that when the information statistics transaction consensus is passed, the blockchain network stores the information statistics result and the signature information in the information statistics management contract according to the information statistics management contract name; the transaction signature information is used to characterize that the information statistics result is generated by the information statistics component.

10. A data processing method based on blockchain, characterized in that: The method is performed by an information blockchain node in a blockchain network; the method comprises: receiving, through an encrypted channel, an information statistics result for an information statistics service sent by the information statistics server through an information statistics component; the information statistics result is generated based on an information reporting result set; the information reporting result set includes a first information reporting result; the first information reporting result is obtained by the information statistics server, when receiving a first information reporting request for the information statistics service, calling the information statistics contract through the information statistics component and executing the first information reporting request through the information statistics contract; the information statistics contract is obtained by the information statistics server downloading from the information statistics management contract when receiving a contract creation notification for the information statistics contract; the information statistics component and the smart contract virtual machine corresponding to the information statistics contract are both deployed in the trusted execution environment of the information statistics server; The information statistics results are stored in the information statistics management contract.

11. The method according to claim 10, characterized in that Also includes: Obtaining a contract deployment transaction sent by the first terminal, storing the information statistics contract code and the information statistics contract data in the information statistics management contract according to the contract deployment transaction, and generating a successful contract deployment result; the information statistics contract code refers to the contract code for the information statistics contract contained in the transaction deployment contract; the information statistics contract data refers to the contract data for the information statistics contract contained in the transaction deployment contract; the contract deployment transaction is generated when the first terminal responds to the information statistics creation operation for the information statistics business; Sending the successful contract deployment result to the first terminal, so that the first terminal generates a contract creation notification for the information statistics contract, and sending the contract creation notification to the information statistics server; Receive a contract download request for the information statistics contract generated by the information statistics server according to the contract creation notification, and send the information statistics contract code and the information statistics contract data stored in the information statistics management contract to the information statistics server according to the contract download request, so that the information statistics server deploys the information statistics contract in the smart contract virtual machine according to the information statistics contract code and the information statistics contract data.

12. The method according to claim 10, characterized in that Also includes: receiving a result query request for the information statistics service initiated by the first terminal; Obtaining the information statistics management contract according to the result query request; If the information statistics result for the information statistics service is obtained in the information statistics management contract, the information statistics result is sent to the first terminal.

13. A data processing device based on blockchain, characterized in that: The device runs on an information statistics server and includes: An information reporting module is used to receive a first information reporting request for an information statistics service through an information statistics component, call an information statistics contract through the information statistics component, execute the first information reporting request through the information statistics contract, and obtain a first information reporting result; the information statistics component and the smart contract virtual machine corresponding to the information statistics contract are both deployed in the trusted execution environment of the information statistics server; the information statistics contract is downloaded from the information statistics management contract of the blockchain network when a contract creation notification for the information statistics contract is received; A result statistics module, configured to obtain, through the information statistics component, an information statistics result for the information statistics service when it is determined through the information statistics component that the information statistics service meets the service termination condition; the information statistics result is generated based on the information reporting result set; the information reporting result set includes the first information reporting result; An encrypted sending module is used to send the information statistics result to the blockchain network through an encrypted channel in the information statistics component, so that the blockchain network stores the information statistics result in the information statistics management contract.

14. A computer device, characterized in that: include: Processor, memory, and network interface; The processor is connected to the memory and the network interface, wherein the network interface is used to provide a data communication function, the memory is used to store program code, and the processor is used to call the program code to execute the method described in any one of claims 1-12.

15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is suitable for being loaded by a processor and executing the method according to any one of claims 1 to 12.

16. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the method according to any one of claims 1 to 12 can be performed.