Data processing method and device based on block chain and electronic equipment

By generating the public key and synthetic account address of the oracle node off-chain, and using threshold signature negotiation to select the data upload node, the problems of high data uploading overhead and low flexibility in blockchain oracle technology are solved, and efficient and flexible data processing is achieved.

CN120614099APending Publication Date: 2025-09-09TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410262233.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-07
Publication Date
2025-09-09

AI Technical Summary

Technical Problem

Current blockchain oracle technology requires all nodes to submit information simultaneously, resulting in high data on-chain overhead, and the aggregation logic is limited by the performance of on-chain smart contracts, resulting in low flexibility.

Method used

By generating the public key and synthetic account address of the oracle node off-chain, and using threshold signature negotiation to select the data upload node, the data uploading process is simplified, the on-chain communication is reduced, and efficiency is improved.

Benefits of technology

It reduces the overhead of data on-chain, improves the efficiency and flexibility of data on-chain, and reduces the amount of data processing on the blockchain.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120614099A_ABST
    Figure CN120614099A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a data processing method and device based on a block chain and electronic equipment, and the method comprises the steps: generating a public key and a synthetic account address corresponding to each oracle node under the chain of the block chain based on a node network address and a private key fragment of each oracle node; sending a binding transaction to the block chain, and binding the node account address corresponding to each oracle node and the synthetic account address in the oracle contract to generate an oracle node list in the oracle contract; data to be uploaded is sent to a block chain by using a data uploading oracle machine node, the data uploading oracle machine node is determined by each oracle machine node through a threshold signature under the chain of the block chain before uploading the data to be uploaded, and the data to be uploaded is generated based on node data of each oracle machine node. By utilizing the technical scheme provided by the specification, the data uplink process is simplified, the data uplink efficiency is improved, and the data uplink overhead is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] A blockchain is a data structure consisting of several blocks linked by hash values. Each block consists of transactions generated over a period of time, packaged by computer nodes authorized to record the transactions, and independently verified by each node. Oracles are applications that acquire, verify, and transmit external information (i.e., information stored off-chain) to smart contracts running on the blockchain. Oracles allow business smart contracts to reflect the external world of the blockchain, enabling data exchange between the blockchain network and the real world. They serve as the interface for data exchange between the blockchain and the real world.

[0003] However, current oracle technology often requires all oracle nodes to submit information to the chain at the same time, which makes the overhead of uploading data to the chain relatively high. In addition, the aggregation of multiple data by current blockchain oracles relies on the code of smart contracts on the blockchain for aggregation. Due to the performance and cost of smart contracts on the chain, its aggregation logic is often relatively simple, making it difficult to flexibly implement complex aggregation logic and having low flexibility.

[0004] Therefore, it is necessary to provide a blockchain-based data processing solution to at least partially solve the above problems. Summary of the Invention

[0005] The embodiments of this specification provide a blockchain-based data processing method, apparatus, device, storage medium, and computer program product, which simplify the process of uploading data to the blockchain and reduce the overhead of uploading data to the blockchain.

[0006] In one aspect, embodiments of this specification provide a data processing method based on a blockchain, wherein the blockchain includes an oracle network, wherein the oracle network includes multiple oracle nodes, and each oracle node corresponds to a private key shard, a node account address, and a node network address. The method includes:

[0007] Based on the node network address and private key shard of each oracle node, generating a public key corresponding to each oracle node off-chain of the blockchain;

[0008] Generate a synthetic account address corresponding to each oracle node based on the public key;

[0009] Sending a binding transaction to the blockchain to bind the node account address corresponding to each oracle node to the synthetic account address in the oracle contract, so as to generate an oracle node list in the oracle contract; the oracle node list includes the node account address of each oracle node and the bound synthetic account address;

[0010] The data to be uploaded is sent to the blockchain using a pre-designated data upload oracle node; wherein, the data upload oracle node is determined by each oracle node through a threshold signature under the blockchain before uploading the data to be uploaded; the data to be uploaded is generated based on the node data broadcasted by each oracle node in the oracle network according to the node network address.

[0011] Another aspect provides a data processing device based on a blockchain, wherein the blockchain includes an oracle network, the oracle network includes multiple oracle nodes, each of the oracle nodes corresponds to a private key shard, a node account address, and a node network address, the device comprising:

[0012] A public key generation module, configured to generate, off-chain in the blockchain, a public key corresponding to each oracle node based on the node network address and private key shard of each oracle node;

[0013] An account synthesis module, configured to generate a synthetic account address corresponding to each of the oracle nodes based on the public key;

[0014] a binding registration module, configured to send a binding transaction to the blockchain, respectively binding the node account address corresponding to each of the oracle nodes to the synthetic account address in the oracle contract, so as to generate an oracle node list in the oracle contract; the oracle node list includes the node account address of each of the oracle nodes and the bound synthetic account address;

[0015] A data upload module is used to use a pre-designated data upload oracle node to send the data to be uploaded to the blockchain; wherein, the data upload oracle node is determined by each oracle node through a threshold signature under the blockchain before uploading the data to be uploaded; the data to be uploaded is generated based on the node data broadcast by each oracle node in the oracle network according to the node network address.

[0016] Another aspect provides an electronic device, including: a processor;

[0017] a memory for storing instructions executable by the processor;

[0018] The processor is configured to execute the instructions to implement any of the above-mentioned blockchain-based data processing methods.

[0019] On the other hand, a computer-readable storage medium is provided. When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is capable of performing any of the above-mentioned blockchain-based data processing methods.

[0020] Another aspect provides a computer program product or computer program, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the blockchain-based data processing method provided in the various optional implementations described above.

[0021] The blockchain-based data processing methods, devices, equipment, storage media, and computer program products provided in the embodiments of this specification have the following technical effects:

[0022] The blockchain-based data processing method provided in the embodiments of this specification can merge the node account addresses of multiple oracle nodes into a single composite account address based on the node network addresses and private key shards of each oracle node in the oracle network. Each oracle node binds its node account address to the composite account address by submitting a binding transaction to the oracle contract, thereby delegating its authority to the composite account address. In each subsequent round of data submission, each oracle node can select a data upload oracle node through threshold signature negotiation off-chain to submit data. This data upload oracle node then submits the node data of each oracle node to the blockchain. Only one data upload oracle node is required to submit data, eliminating the need for each oracle node to submit its own data simultaneously. This simplifies the data upload process, improves data upload efficiency, and reduces data upload overhead. Simultaneously, each oracle node publishes its node network address, which can be processed directly off-chain via TCP messages without on-chain communication, completing the synthesis of keys and addresses, thus reducing the data processing workload of the blockchain. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the technical solutions and advantages of the embodiments of this specification or the prior art, the following is a brief introduction to the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0024] Figure 1 This is a schematic diagram of an application environment of a blockchain-based data processing method provided in an embodiment of this specification;

[0025] Figure 2 This is a flowchart of a blockchain-based data processing method provided by one embodiment of this specification;

[0026] Figure 3 This is a schematic diagram of the binding registration principle based on the oracle node in a scenario example of this manual;

[0027] Figure 4 This is a schematic diagram of the principle of data submission by the oracle node in a scenario example in this manual;

[0028] Figure 5 This is a schematic diagram of the structure of a blockchain-based data processing device provided in an embodiment of this specification;

[0029] Figure 6 This is a block diagram of an electronic device for blockchain-based data processing provided by an embodiment of this specification;

[0030] Figure 7 This is a block diagram of another electronic device for blockchain-based data processing provided in an embodiment of this specification. DETAILED DESCRIPTION

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

[0032] It should be noted that the terms "first", "second", etc. in the description and claims of the embodiments of this specification and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of this specification described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0033] The embodiments of this specification relate to blockchain technology, a novel application model for computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. A blockchain is essentially a decentralized database, a series of data blocks generated using cryptographic methods. Each block contains information about a batch of online transactions, which is used to verify the validity of the information (to prevent counterfeiting) and generate the next block. A blockchain can include an underlying blockchain platform, a platform product service layer, and an application service layer.

[0034] The underlying blockchain platform can include processing modules such as user management, basic services, smart contracts, and operation monitoring. Among them, the user management module is responsible for the identity information management of all blockchain participants, including maintaining public and private key generation (account management), key management, and maintaining the corresponding relationship between the user's real identity and the blockchain address (authority management), etc., and under authorization, it supervises and audits the transactions of certain real identities and provides risk control rule configuration (risk control audit); the basic service module is deployed on all blockchain node devices to verify the validity of business requests, and records the valid requests to the storage after consensus is reached. For a new business request, the basic service first adapts the interface to parse and authenticate the request (interface adaptation), and then encrypts the business information through the consensus algorithm (consensus management). The smart contract module is responsible for the registration, issuance, triggering and execution of contracts. Developers can define the contract logic in a programming language and publish it to the blockchain (contract registration). According to the logic of the contract terms, the contract logic is triggered by calling keys or other events to trigger execution. The contract logic is completed, and the contract upgrade and cancellation functions are also provided. The operation monitoring module is mainly responsible for the deployment, configuration modification, contract setting, cloud adaptation and real-time status visualization output of the product during the product release process, such as alarms, network status monitoring, and node equipment health status monitoring.

[0035] The platform's product service layer provides the basic capabilities and implementation framework for typical applications. Developers can build on these basic capabilities, overlay business features, and complete the blockchain implementation of business logic. The application service layer provides application services based on blockchain solutions for business participants to use.

[0036] Smart contracts can be understood as computer programs that run on a distributed ledger (i.e., blockchain) with pre-set rules, state, and conditional responses. They can encapsulate, verify, and execute complex behaviors of distributed nodes to facilitate information exchange, value transfer, and asset management. Based on blockchain's distributed architecture and consensus algorithms, smart contracts allow mutually untrusting parties to complete transactions without the need for any trusted third-party intermediary or authority. Furthermore, digital smart contracts can be flexibly embedded in various tangible or intangible assets, transactions, and data, enabling active or passive asset and information management and control, and gradually building programmable intelligent assets and systems.

[0037] An oracle is a mechanism that writes data outside the blockchain into the blockchain. It allows smart contracts to reflect the world outside the blockchain, completing the data exchange between the blockchain network and the real world. It is the interface for data interaction between the blockchain and the real world.

[0038] See also Figure 1 , Figure 1 This is a schematic diagram of an application environment of a data processing method based on blockchain provided in an embodiment of this specification. Figure 1 As shown, the blockchain system in the embodiment of this specification may include a cross-chain and an oracle network. The oracle network may include multiple oracle nodes. Each oracle node can obtain data from outside the blockchain and upload the obtained data to the blockchain based on the oracle contract.

[0039] The blockchain-based data processing method in the embodiments of this specification can synthesize the node account addresses of each oracle node into a synthetic account address based on the private key sharding of each oracle node. By merging multiple oracle node accounts into a public account generated based on a threshold signature, and then binding the node account addresses of each oracle node to the synthetic account address, the power of each oracle node can be delegated to the synthetic account address. In this way, when submitting data subsequently, only one oracle node can be selected for submission, so that the on-chain transaction fee is reduced from N nodes per time period to 1 node, thereby reducing the overall and average costs.

[0040] The following describes a data processing method based on blockchain in an embodiment of this specification. Figure 2It is a flowchart of a blockchain-based data processing method provided by an embodiment of this specification. This specification provides method operation steps such as the embodiment or flowchart, but may include more or fewer operation steps based on conventional or non-creative labor. The order of steps listed in the embodiment is only one way of executing the order of many steps and does not represent the only execution order. When the actual system or server product is executed, it can be executed in sequence or in parallel according to the method shown in the embodiment or the accompanying drawings (for example, a parallel processor or a multi-threaded processing environment). The method can be applied to terminals such as computers, tablets, smart phones, smart wearable devices, and vehicle-mounted devices. Of course, it can also be applied to servers according to actual needs, and the embodiments of this specification do not specifically limit this. Specifically, Figure 2 As shown, the method may include:

[0041] S202: Based on the node network address and private key shards of each oracle node, the public key corresponding to each oracle node is generated off-chain in the blockchain.

[0042] In specific implementations, the blockchain in the embodiments of this specification may be equipped with an oracle network. The oracle network may include multiple oracle nodes, each of which has its own private key shard, node account address, and node network address. The private key shard can be used for subsequent public key synthesis and signing. The node account address can be understood as the oracle node's wallet address, which can be used for staking governance rewards and penalties. The node network address can be understood as the IP (Internet Protocol Address) corresponding to the oracle node. Based on the node network address, other nodes can broadcast messages to the oracle node off-chain, without going through the blockchain. "Off-chain" can be understood as an application scenario that does not require consensus and related data on the blockchain. The process and results of data processing off-chain are not fully recorded on the blockchain. For example, some logic related to intensive computing is usually implemented off-chain. Some complex encryption and decryption algorithms can be designed to generate proofs off-chain for rapid on-chain verification. If the business process involves traversing, sorting, and statistics of various data, indexes are established off-chain, and only accurate reading and writing of key-value pairs is performed on-chain.

[0043] In some embodiments, before generating the public key corresponding to each oracle node off-chain of the blockchain using the threshold signature based on the node network address and private key shard of each oracle node, the method further includes:

[0044] Generate multiple oracle nodes;

[0045] Each oracle node publishes its own node account address and node network address in the oracle contract;

[0046] The oracle network is constructed based on the node network addresses corresponding to each oracle node.

[0047] In the specific implementation process, an oracle contract typically runs on the blockchain. During the deployment and setup phase of the oracle contract, N oracle nodes are generated through methods such as staking governance of other contracts. Each oracle node is associated with a node account address, which can be used for staking governance rewards and penalties. At the same time, each oracle node can generate its own private key shard based on cryptography, which is then used for subsequent account address synthesis or signing. Furthermore, in the embodiments of this specification, each oracle node also has its own node network address. Each oracle node can publish its node account address and node network address in the oracle contract. Based on the node network addresses corresponding to each oracle node, an oracle network can be constructed. Subsequently, the negotiation of keys, results, signatures, and other processes can be handled directly off-chain via TCP messages, without requiring on-chain communication. In other words, each oracle node can broadcast information based on the node network addresses corresponding to other oracle nodes, eliminating the need for cross-chain transactions or data processing. This reduces the data processing pressure on the blockchain and lays a data foundation for subsequent data uploads by individual oracle nodes. Among them, the TCP message format is a connection-oriented, reliable, byte stream-based transport layer communication protocol.

[0048] After the oracle node is generated, a cryptographic algorithm can be used to shard the private keys of each oracle node, and based on the node network address of each oracle node under the blockchain, each private key shard is synthesized into the public key corresponding to each oracle node. Among them, the public key generation algorithm can be selected according to actual needs. In some embodiments of this specification, a threshold signature can be used to synthesize the public key of each oracle node. Among them, the threshold signature scheme (TSS) is an encrypted digital signature protocol. Among a group of signers, a part of the signers can sign the message on behalf of the entire group, which can greatly improve the security and privacy of the digital signature system. Generally, in a threshold signature system, a private key is first generated, but this private key will not be sent to any signer. Each signer can only get a part of the private key, that is, the private key shard. When a certain number of signers are reached, they can sign a message on behalf of the entire signature group, but a small number of signers cannot sign. Based on the total number of oracle nodes, we can first define the threshold signature's N (the number of all signers) and T (the threshold value). At least T signers need to participate in the signature. After each oracle node uses the threshold signature to generate its own private key shard, it can synthesize the public key based on the private key shard and its own node network address under the blockchain using the threshold signature algorithm. For example, according to the Multi-party ECDSA (Elliptic Curve Digital Signature Algorithm) and other algorithms (hereinafter referred to as GG20), according to the oracle setting that the result recognized by more than T nodes is a trusted result, a fused public key can be obtained as follows:

[0049] EnsemblePubKey=GG20_SET(N,T,PriKeys,IPs)

[0050] Where EnsemblePubKey is the synthesized T-Of-N public key, GG20_SET is the synthesized public key set function in the GG20 threshold signature algorithm, PriKeys is the set of private key shards of each oracle node, and IPs is the set of node network addresses of each oracle node. Based on the node network address, it can be directly processed in the form of TCP messages off-chain, and the public key can be synthesized off-chain without the need for on-chain communication.

[0051] S204: Generate the synthetic account address corresponding to each oracle node based on the public key.

[0052] In the specific implementation process, after obtaining the public keys corresponding to each oracle node, a synthetic account address can be generated using the blockchain account address rules. The method of synthesizing the account address can be referred to as follows:

[0053] EnsembleAddr=CONVERT(EnsemblePubKey)

[0054] Among them, EnsembleAddr is the generated synthetic account address, EnsemblePubKey is the public key generated above, and the CONVERT function converts the synthetic public key into a 160-bit synthetic address according to the Ethereum contract account rules.

[0055] S206: Send a binding transaction to the blockchain to bind the node account address corresponding to each oracle node and the synthetic account address in the oracle contract to generate an oracle node list in the oracle contract; the oracle node list includes the node account address of each oracle node and the bound synthetic account address.

[0056] In the specific implementation process, after generating the synthetic account address, each oracle node can send a binding transaction to the blockchain to bind and register its own node account address with the synthetic account address in the oracle contract. After the binding registration is successful, a oracle node list can be generated in the oracle contract. The oracle node list can include the node account address of the oracle node that has been successfully bound and registered, as well as the binding relationship between it and the synthetic account address. Through the binding transaction, the node account address of each oracle node can be bound to the synthetic account address, that is, each oracle node can delegate its own power to the synthetic account address. Then, the synthetic account address can represent all oracle nodes in the oracle network. In this way, when submitting subsequent data, based on this binding delegation relationship, one oracle node can be used as a representative to submit the data of all oracle nodes to the chain.

[0057] S208: Using a pre-designated data upload oracle node to send the data to be uploaded to the blockchain; wherein, the data upload oracle node is determined by each oracle node through a threshold signature under the blockchain before uploading the data to be uploaded; the data to be uploaded is generated based on the node data broadcasted by each oracle node in the oracle network according to the node network address.

[0058] In a specific implementation, after registration and binding are complete, during each round of data submission, each oracle node in the oracle network can first negotiate and determine the data upload oracle node for that round of data upload through threshold signatures off-chain on the blockchain. For example, when data submission is required, a oracle node can be randomly selected from the oracle network off-chain as a candidate data upload oracle node, or each oracle node can rotate as a candidate data upload oracle node. Other node screening rules or algorithms can also be set to select candidate data upload oracle nodes. The oracle node that agrees to use the candidate data upload oracle node for data submission can perform a threshold signature off-chain on the blockchain. If the signed oracle node meets a preset threshold, the selected candidate data upload oracle node can be used as the data upload oracle node for the current round of data submission. Of course, other methods can be used to determine the data upload oracle node depending on the actual situation, and this embodiment of the specification does not specifically limit the method for selecting the data upload oracle node. The data upload oracle node selected for each data submission can be the same or different, depending on the actual situation.

[0059] Once the data upload oracle node is determined, it is no longer necessary for each oracle node to provide its own information to the oracle contract. Instead, the data upload oracle node can directly submit the data of each oracle node to the oracle contract. Specifically, each oracle node can broadcast its own node data within the oracle network based on the node network address, so that other oracle nodes can obtain the node data of other oracle nodes in the oracle network. The data upload oracle node can generate the data to be uploaded based on its own node data and the node data broadcast by other oracle nodes, and send the data to be uploaded to the blockchain. The node data of each oracle node can be data obtained by the oracle node outside the blockchain, such as the acquired transaction price, exchange rate, etc. The node data of each oracle node can be the same or different, and the embodiments of this specification do not limit the specific content of the node data. In addition, generally, the data upload oracle node that submits the data to be uploaded is an oracle node registered with the oracle contract of the blockchain, that is, the data upload oracle node is an oracle node in the oracle node list. Only in this way can the data to be uploaded be successfully sent to the blockchain.

[0060] In addition, in some embodiments of this specification, after using a pre-designated data upload oracle node to send the data to be uploaded to the blockchain, the method further includes:

[0061] After verifying that the data upload node is bound to the synthetic account address based on the oracle node list, the data to be uploaded is uploaded to the blockchain.

[0062] In the specific implementation process, after the data upload oracle node sends the data to be uploaded to the blockchain, the oracle contract can verify the data upload oracle node to verify whether the data upload oracle node is bound to the registered synthetic account address in the oracle contract. If the synthetic account address is bound, the solution provided by the embodiment of this specification can be used to submit data on behalf of other oracle nodes in the oracle network. For example, the oracle contract can first obtain the node network address of the data upload oracle node that sends the data, and match the node network address with the node network address stored in the oracle node list. If the match is successful, it means that the data upload oracle node has completed registration and bound to the synthetic account address. Then, the data sent by the data upload oracle node can be uploaded to the chain to complete the data submission. Of course, if the match fails, it means that the data upload oracle node has not completed registration. At this time, the data to be uploaded sent by the data upload oracle node cannot be uploaded to the chain. A prompt message indicating that the data submission failed can be returned, and the reason for the failure can be indicated.

[0063] The blockchain-based data processing method provided in the embodiments of this specification can merge the node account addresses of multiple oracle nodes into a synthetic account address based on the node network address and private key sharding of each oracle node in the oracle network. Each oracle node binds its own node account address to the synthetic account address by submitting a binding transaction to the oracle contract, thereby delegating its own power to the synthetic account address. In each subsequent round of data submission, each oracle node can select a data upload node to submit data through threshold signature negotiation under the blockchain. The data upload oracle node is used to submit the node data of each oracle node to the blockchain. The blockchain verifies that the oracle node that uploaded the data has been successfully bound and registered in the oracle contract, and the data can be uploaded to the chain. Only one oracle node needs to submit the data, and each oracle node no longer needs to submit its own data at the same time. This simplifies the process of uploading data to the chain, improves the efficiency of uploading data to the chain, and reduces the overhead of uploading data to the chain. At the same time, each oracle node publishes its own node network address, so that it can be processed directly in the form of TCP messages off-chain without going through on-chain communication, and the synthesis of keys and addresses can be completed, reducing the data processing volume of the blockchain.

[0064] In some embodiments of this specification, a binding transaction is sent to the blockchain to bind the node account address corresponding to each oracle node to the synthetic account address in the oracle contract, including:

[0065] Use the private key pairs corresponding to the node account addresses of each of the oracle nodes to sign the synthetic account addresses respectively to obtain the synthetic address signature results;

[0066] Send a binding transaction to the blockchain based on the node account address of each oracle node, the synthetic address signature result, and the synthetic account address;

[0067] Verify whether the signature result of the synthetic address in the binding transaction is the signature of the node account address in the binding transaction, and bind the node account address corresponding to the verified oracle node and the synthetic account address in the oracle contract.

[0068] During the specific implementation process, when binding and registering an oracle node, the synthetic account address can be signed using the private key corresponding to the node account address of each oracle node to obtain a synthetic address signature result. The private key corresponding to the node account address of the oracle node can be the same as or different from the private key shards of each oracle node in the above-mentioned embodiment. That is, each oracle node can have two private keys: one private key shard used to synthesize the public key, and one private key previously pledged to become the oracle node. Using them separately is more secure, but using a single private key for both functions is also possible. After obtaining the synthetic address signature results of each oracle node, a binding transaction can be sent to the blockchain based on the node account address of each oracle node, the synthetic address signature result, and the synthetic account address. After receiving the binding transaction, the blockchain can verify the legitimacy of the binding transaction using the synthetic address signature result in the binding transaction. Once verification is successful, the oracle node's binding registration is complete. For example, the oracle contract can verify whether the signature result of the synthetic address in the binding transaction is the signature of the node account address in the binding transaction. If so, the verification is successful, and the node account address in the binding transaction after verification and the synthetic account address are bound in the oracle contract.

[0069] It can be seen that in the embodiments of this specification, the private key shards of each oracle node and the private keys corresponding to the node account addresses will not leave the oracle node itself, but will only be used for signing, ensuring the security of the private key shards and private keys.

[0070] The embodiments of this specification can improve the security of oracle binding registration and thus improve the security of blockchain data processing by signing the synthetic account address and then binding and registering the oracle node.

[0071] In some embodiments of this specification, based on the node account address of each oracle node, the synthetic address signature result, and the synthetic account address, a binding transaction is sent to the blockchain, including:

[0072] Each oracle node sends a binding transaction to the blockchain based on its own node account address, synthetic address signature result, and synthetic account address.

[0073] In the specific implementation process, when performing the binding registration of the oracle node, each oracle node can send its own node account address, synthetic address signature result, and synthesized synthetic account address to the blockchain to request a binding transaction and conduct point-to-point binding registration to ensure the accuracy of the binding registration.

[0074] In some other embodiments of this specification, based on the node account address of each oracle node, the synthetic address signature result, and the synthetic account address, a binding transaction is sent to the blockchain, including:

[0075] Select one oracle node from each oracle node as the binding oracle node;

[0076] The binding oracle node aggregates the binding transactions corresponding to the specified number of oracle nodes based on the node account addresses, synthetic address signature results, and synthetic account addresses of the specified number of oracle nodes, and submits the aggregated binding transactions to the blockchain.

[0077] In the specific implementation process, when performing the binding registration of the oracle node, you can also select an oracle node from the oracle network as the binding oracle node, and use the binding oracle node to perform batch binding registration. For example: the binding oracle node can select a specified number of oracle nodes from the oracle node that signs the synthetic account address in the oracle network for binding registration, and based on the node account addresses, synthetic address signature results, and synthetic account addresses of the selected specified number of oracle nodes, the binding transactions corresponding to the selected specified number of oracle nodes are aggregated, and the aggregated binding transactions are submitted to the blockchain. For example: the binding oracle node can select 5 oracle nodes from the oracle node that signs the synthetic account address, aggregate the node account addresses, synthetic address signature results, and synthetic account addresses of these 5 oracle nodes to obtain a batch registered binding transaction, such as: TX_BOUND s =<“BOUND”,Addr s ,EnsembleAddr,SIG s >

[0078] Among them, TX_BOUND s The binding transaction sent by the five oracle nodes selected in the above embodiment, Addr s is the set of node account addresses of the five oracle nodes selected in the above embodiment, EnsembleAddr is the synthetic account address, SIG s The transaction calls the BOUND function to the oracle contract, and its content is the binding <Addrs ,EnsembleAddr> to the oracle contract, you can use SIG s Verify the above binding transaction.

[0079] Among them, the number of oracle nodes selected each time can be adjusted according to actual needs. Some oracle nodes in the oracle network can be bound and registered in batches, or all oracle nodes in the oracle network can be bound and registered in batches together. The embodiments of this specification do not specifically limit the number of oracle nodes registered in batches each time.

[0080] In the embodiment of this specification, after signing the synthetic account address, a binding oracle node is selected for batch binding registration, which can not only ensure the security of the oracle node binding registration, but also improve the efficiency of the binding registration.

[0081] In some embodiments of this specification, using a pre-designated data upload oracle node to send data to be uploaded to the blockchain includes:

[0082] Based on the data aggregation logic preset in the oracle contract, each oracle node aggregates the node data of each oracle node off-chain to obtain the data to be uploaded aggregated by each oracle node;

[0083] Use the data upload oracle node to send the data to be uploaded to the blockchain.

[0084] In a specific implementation, after the oracle node completes the binding of the synthetic account address and data submission is required, each oracle node can broadcast its own node data within the oracle network based on the node network address, so that each oracle node can obtain the node data of other oracle nodes. Each oracle node can aggregate its own node data and the node data obtained from other oracle nodes off-chain based on the data aggregation logic preset in the oracle contract to obtain the data to be uploaded. The data aggregation logic can be pre-written into the oracle contract based on actual circumstances, and different data aggregation logic can be set for different node data, such as averaging, weighted averaging, outlier detection, and low-reputation calculation. Of course, depending on actual needs, the data aggregation logic can also directly upload the raw node data without any data processing. The specific content of the data aggregation logic is not specifically limited in this embodiment of the present specification. After the aggregation process is completed, the pre-selected data upload oracle node can send the aggregated data to be uploaded to the blockchain. After blockchain verification, the data can be uploaded to the blockchain.

[0085] In the embodiments of this specification, the node data can be broadcast off-chain on the basis of the node network address of the oracle node, and the node data of each oracle node can be aggregated off-chain on the blockchain according to the preset data aggregation logic. It is no longer limited by the performance constraints of the on-chain smart contract, and complex aggregation logic can also be implemented, thereby achieving flexible data processing and improving the flexibility of data processing.

[0086] In some embodiments of this specification, using a pre-designated data upload oracle node to send data to be uploaded to the blockchain includes:

[0087] Obtaining the oracle nodes that obtain the same data to be uploaded through aggregation processing as target oracle nodes. When the number of target oracle nodes is greater than or equal to a preset number, the data to be uploaded is signed using a threshold signature in the data uploading oracle node to obtain an aggregated data signature.

[0088] The data upload oracle node sends the aggregated data signature to the blockchain;

[0089] After verifying that the data upload node is bound to the synthetic account address based on the oracle node list, the data to be uploaded is uploaded to the blockchain, including:

[0090] Get the node account address of the oracle node that uploads data;

[0091] According to the oracle node list, obtain the synthetic account address bound to the node account address of the oracle node that uploaded the data;

[0092] The aggregated data signature is verified using the synthetic account address. Once the verification is passed, the data to be uploaded is obtained and uploaded to the blockchain.

[0093] In the specific implementation process, before submitting the aggregated data to be uploaded to the blockchain, the data to be uploaded aggregated by each oracle node can be compared to see if they are the same. For example, each oracle node can broadcast its own aggregated data to be uploaded within the oracle network. Each oracle node can then compare its own aggregated data to be uploaded with the data to be uploaded by other oracle nodes to determine if the data to be uploaded is identical. Generally, if the oracle node is functioning properly, the data to be uploaded obtained based on the data aggregation logic should be identical. However, if the oracle node's code has been tampered with or attacked, the data to be uploaded it aggregates may differ from that of other oracle nodes.

[0094] The same oracle node of the data to be uploaded obtained by the aggregation process is obtained as the target oracle node. If there are greater than or equal to the preset number of target oracle nodes, the threshold signature can be used to sign the data to be uploaded in the selected data upload oracle node to obtain the aggregated data signature. The specific value of the preset number can be set according to actual needs, such as: it can be set based on the threshold value in the threshold signature, and the embodiments of this specification do not make specific limitations. For example, if there are greater than or equal to T oracle nodes that aggregate and obtain the same data to be uploaded, then each oracle node can execute the signature function of the threshold signature in the data upload oracle node, that is, the target oracle node can sign the data to be uploaded in the data upload oracle node, and the signed oracle node can indicate the approval of the data to be uploaded. The data upload oracle node can send the signed aggregated signature data to the blockchain. At this time, the blockchain can verify the aggregated signature data and the data upload oracle node. For example, you can first obtain the node account address of the data upload oracle node and match it with the oracle list obtained through node binding registration. If a match is successful, the data upload oracle node has completed the binding registration of the synthetic account address and can submit the data to be uploaded. At the same time, the synthetic account address bound to the node account address of the data upload oracle node is obtained from the oracle list. This synthetic account address is used to verify the aggregated data signature to verify whether the aggregated data signature is obtained from more than a preset number of oracle node signatures. For example, if the aggregated data signature is successfully decrypted using the synthetic account address, it can be said that the verification has passed, and the decryption result can be the data to be uploaded, which can be uploaded to the blockchain.

[0095] The embodiments of this specification implement the aggregation of data from multiple oracle nodes through off-chain predetermined data aggregation logic execution, and prevent a single oracle node from acting maliciously or being disconnected through threshold signature security submission, thereby improving the accuracy and security of data upload.

[0096] In some embodiments of this specification, using a pre-designated data upload oracle node to send data to be uploaded to the blockchain includes:

[0097] The oracle node that obtains the same data to be uploaded through aggregation processing is used as the target oracle node. When the number of target oracle nodes is less than the preset number, the data upload oracle node sends the node signature data broadcast by each oracle node in the oracle network to the blockchain, wherein the node signature data of each oracle node is obtained by each oracle node using its own private key shard to sign its own node data.

[0098] In the specific implementation process, when each round of data submission, each oracle node uses its own private key shard to sign its own node data and obtain the node signature data corresponding to each oracle node. Each oracle node can broadcast its own node data and node signature data in the oracle network, so that each oracle node can obtain the node data and node signature data of other oracle nodes, and then can aggregate the node data according to the preset data aggregation logic to obtain the data to be uploaded. Compare whether the data to be uploaded obtained by the aggregation of each oracle node is the same, and obtain the same oracle node as the target oracle node for the data to be uploaded obtained by the aggregation. If the number of target oracle nodes that aggregate and obtain the same data to be uploaded is less than the preset number, then the threshold signature will fail, and the threshold signature cannot be used to aggregate and upload the node data. At this time, the data uploading oracle node can send its own node signature data and the node signature data broadcast by other oracle nodes to the blockchain.

[0099] In the embodiments of this specification, when the data to be uploaded obtained by the aggregation of various oracle nodes cannot reach a consensus, the selected data upload oracle node directly submits the node signature data of all oracle nodes. Although submitting this result cannot reach a consensus in the on-chain contract, it can indicate that the data upload oracle node is operating normally and has not committed any malicious acts, which facilitates the blockchain to perform subsequent node penalties or other processing.

[0100] In some other embodiments of this specification, after using a pre-designated data upload oracle node to send the data to be uploaded to the blockchain, the method further includes:

[0101] If the data upload oracle node does not send the data to be uploaded within the specified time, or fails to send the data to be uploaded, other oracle nodes in the oracle network upload node abnormality information to the blockchain. The node abnormality information is used to indicate that there is an abnormality in the data upload oracle node.

[0102] In the specific implementation process, if the selected data upload oracle node does not upload the data to be uploaded within the specified time, or the data to be uploaded fails to be sent, it can be considered that there is an abnormality in the data upload oracle node, such as: the data upload oracle node is offline. At this time, other oracle nodes can upload node abnormality information to the blockchain. Node abnormality information is mainly used to prove that the data upload oracle node is abnormal. For example, other oracle nodes can upload specified abnormal characters and the node account address of the data upload oracle node to the blockchain to indicate to the blockchain that the data upload oracle node has an abnormality, which facilitates the blockchain to handle subsequent timeouts or abnormalities.

[0103] The failure of a data upload oracle node to upload data to be uploaded within a specified timeframe can include two scenarios: one is that the data upload oracle node fails to upload the aggregated result or aggregated data signature of the node data of each oracle node within the specified timeframe; the other is that when the number of nodes that aggregate and obtain the same data to be uploaded is less than a preset number, the data upload oracle node fails to upload the node signature data of all oracle nodes within the specified timeframe. The failure to send data to be uploaded can be understood as the failure of the blockchain to verify the data despite the data upload oracle node uploading it within the specified timeframe, e.g., the failure to verify the aggregated data signature in the above-mentioned embodiment.

[0104] The blockchain oracle technology provided by the embodiments of this specification can generally be divided into two phases: the setup phase, which involves selecting and registering oracle nodes through methods such as staking governance, so that these nodes are required to periodically supply data to the blockchain smart contract; and the supply phase, which involves sending off-chain data to the smart contract through various collection methods and aggregation logic. The following describes the specific processes of the two phases in the embodiments of this specification using scenario examples:

[0105] Figure 3 This is a schematic diagram of the binding registration principle based on the oracle node in a scenario example in this manual. Figure 3 Oracles A, B, and C can be understood as selected blockchain oracle nodes. Each oracle node contains a private key shard and independently runs a blockchain accounting program. This example uses three decentralized oracle nodes, designated A, B, and C. The number of oracle nodes can be flexibly adjusted based on actual needs. Private key shards A, B, and C are 256-bit integers held by each oracle node, which can be used as private keys for cryptographic algorithms such as ECDSA. These private keys are later combined to form a public key suitable for threshold signatures, hence the term "private key shard." The synthesized public key and address are the public key synthesized using multi-party ECDSA or other threshold signature technologies, and the blockchain account address corresponding to the public key is the synthesized account address. The accounting program is the program that actually maintains the blockchain world state data, processes blockchain transactions, and communicates blockchain network messages with external blockchain nodes. The oracle supply contract is a smart contract that obtains off-chain data and provides data to consumers on the chain. The oracle contract is often a system composed of multiple contracts. Its governance, supply, aggregation, and billing logic are often decoupled into different contracts. However, for convenience, they are collectively referred to as oracle contracts in the embodiments of the specification.

[0106] like Figure 3 As shown, the binding registration process of the oracle node in the embodiment of this specification may include:

[0107] 1. Specify the oracle and IP address:

[0108] An oracle contract generated by the oracle supply template deployment is run on the blockchain. During its deployment and setup phase, N oracle nodes are generated through the staking governance of other contracts. The node account address (i.e., IP address) specified by the oracle is published in the smart contract. The content of the published node account address can be referred to as follows:

[0109] Oracle i = <Addr i ,NULL>

[0110] Among them, Oracle i Refers to the i-th oracle node, Addr i It is the node account address used for staking governance rewards and penalties, etc. NULL is an empty value, and its oracle node is required to announce its IP address, i.e., the node network address.

[0111] Among them, each oracle node can be i After signing with the corresponding private key (or publishing in other ways in advance), the respective node network addresses are published to the oracle contract, which can be easily achieved:

[0112] Oracle i = <Addr i ,IP i >

[0113] Among them, IP i This can be understood as the node network address of each oracle node. The IP address is published here so that the subsequent negotiation of keys, results, and signatures can be handled directly in the form of TCP messages off-chain without the need for on-chain communication.

[0114] In the following content, all N Addr i The collection is called Addrs, all N IP i The collection of IPs is called IPs. Note that the private key of Addresses may not be the same as the private key of Figure 2 The private key fragments in the shards are the same private key. However, for the sake of convenience in the embodiments of this specification, the account address corresponding to the private key fragments (denoted as PriKeys) can be referred to as Addrs.

[0115] 2. Distributed synthesis:

[0116] The oracle contract first synthesizes the public key off-chain. Based on the Multi-party ECDSA algorithm (hereinafter referred to as GG20), the result recognized by more than T nodes is set as the trusted result. A fused public key can be obtained as follows:

[0117] EnsemblePubKey=GG20_SET(N,T,PriKeys,IPs)

[0118] Among them, EnsemblePubKey is the synthesized T-Of-N public key, GG20_SET is the synthesized public key setting function in the GG20 threshold signature algorithm, N is the number of all oracle nodes, T is the threshold value, PriKeys is the set of private key shards of each oracle node, and IPs is the set of node network addresses of each oracle node.

[0119] According to the Ethereum blockchain account address rules, the synthetic account address corresponding to the public key can be generated as follows:

[0120] EnsembleAddr=CONVERT(EnsemblePubKey)

[0121] Among them, EnsembleAddr is the generated synthetic account address, and the function of CONVERT is to convert the synthetic public key into a 160-bit synthetic address EnsembleAddr according to the Ethereum contract account rules.

[0122] 3. Sign the synthetic account address:

[0123] For each oracle node, by signing the synthetic account address with its own private key, you can get:

[0124] SIG i =SIGN(Addr i ,EnsembleAddr)

[0125] Among them, SIG i It can be understood as the signature result of the i-th oracle node on the synthetic account address, and SIGN can be the blockchain signature function.

[0126] 4. Binding registration:

[0127] TX_BOUND i =<“BOUND”,Addr i ,EnsembleAddr,SIG i >

[0128] Among them, TX_BOUND i The binding transaction sent by the i-th oracle node calls the BOUND function to the oracle contract, and its content is the binding <Addr i ,EnsembleAddr> to the oracle contract, the oracle contract can verify whether the call is legal by verifying the corresponding SIG, that is, verifying SIGi Is it using Addr i The SIG here can also be aggregated by a node and submitted in batches to the oracle contract to achieve batch registration.

[0129] 5. Designate submitters for each round:

[0130] After the registration settings are completed, in each subsequent round of data submission, it is not necessary for each oracle node to provide its own information (such as public key, node data, etc.) to the oracle contract. Instead, it is only necessary for each oracle node to reach a negotiation result off-chain, and the agreed oracle nodes to perform threshold signatures and submit it by one oracle node.

[0131] In this step, we assume that:

[0132] SELECT_NODE=RANDOM(Addrs)

[0133] SELECT_NODE is the address selected from the Addrs set by the random function RANDOM, representing an oracle node responsible for submission.

[0134] Figure 4 This is a schematic diagram of the principle of data submission by the oracle node in a scenario example of this manual, as shown in Figure 4 As shown, compared with Figure 3 A result pool is added at the bottom. The result pool can include node data obtained by each oracle node, such as securities prices, exchange rates, etc. The node data of each oracle node can be the same or different. The consensus result needs to be selected or calculated according to certain rules and reported to the oracle contract. The process of data aggregation submission can be referred to as follows:

[0135] 1. Single Signature Supply Sharing:

[0136] Each oracle node has its own node data, signs this node data, and broadcasts its own node data and the node signature data obtained by the signature to the oracle network composed of IPs based on the Gossip protocol, such as:

[0137] DATA_SIG i =SIGN(PriKey i ,DATA i )

[0138] Among them, DATA_SIG i It can be understood as the node signature data corresponding to the i-th oracle node, PriKey i It can be understood as the private key shard of the i-th oracle node, DATA iIt can be understood as the node data of the i-th oracle node.

[0139] At this point, the result pool of each oracle node in the IPs should contain the DATA data and signature DATA_SIG of N-1 other oracle nodes.

[0140] 2. Negotiate the results and distribute the signatures:

[0141] When each oracle node receives the node data and node signature data from N-1 other nodes, it performs calculations according to the predetermined data aggregation logic, such as:

[0142] Result i =ENSEMBLE(DATAs)

[0143] Among them, Result i Represents the data to be uploaded obtained by the aggregation of the i-th oracle node, DATAs represents the set of node data DATA of N oracle nodes, and ENSEMBLE represents the aggregation function preset by the oracle network (such as average value, etc.). This is executed under the blockchain chain, so aggregation functions with various complex logics can be set. It only needs to be reached by each node under the chain before the oracle contract is set, or the corresponding template code can be directly deployed. If the correctness of its code is tampered with or attacked, the Result of the oracle node will be invalid. i Different from other nodes.

[0144] When the data to be uploaded obtained by the aggregation of more than or equal to T nodes is the same, both are Result i , the signature function based on the threshold signature can be executed:

[0145] EnsembleSIG=GG20_SIGN(Result i ,PriKeys,IPs)

[0146] Among them, GG20_SIGN is the threshold signature function of the existing GG20 algorithm, which obtains an EnsembleSIG aggregate signature in the oracle network composed of IPs.

[0147] 3.1. Submit negotiation results:

[0148] If the selected data upload oracle node is Oracle A (i.e. SELECT_NODE) ​​and is online, and it obtains EnsembleSIG normally, then the off-chain negotiation is successful (this is the majority of cases that may occur in the oracle network), and it can send EnsembleSIG to the oracle contract on the chain, which can be verified in the contract:

[0149] Valid=VERIFY(Result i ,EnsembleSIG,EnsembleAddr)

[0150] VERIFY is a common cryptographic signature verification function (such as the Ethereum account signature verification function), which can verify whether the consensus result is signed by more than or equal to T nodes. If Valid is True, the verification is passed and the data to be uploaded can be uploaded to the chain.

[0151] 3.2. Submit single-signature supply:

[0152] If Oracle A (i.e., SELECT_NODE) ​​is online but fails to reach a consensus (i.e., the number of nodes with the same data to be uploaded obtained by aggregation is less than T), Oracle A submits the single signature result DATA_SIG of all oracle nodes. Although submitting this result cannot reach a consensus in the on-chain contract, it can indicate that Node A is operating normally and is not doing anything malicious.

[0153] 4. Governance is not submitted within the time limit:

[0154] If Oracle A does not execute step 3.1 or step 3.2, or if Valid in step 3.1 is False, it is considered an offline node. At this time, the remaining Oracle nodes need to send node exception information to indicate that Oracle A is offline. For example, the remaining Oracle nodes can send DOWN and Oracle A's node account address to the blockchain to indicate that Oracle A has been offline, etc., to initiate governance on the chain. The format of the exception information can be referred to as follows:

[0155] TX i =<“DOWN”,SELECT_NODE>

[0156] The punishment is then handled according to the timeout mechanism of the existing blockchain oracle technology.

[0157] The blockchain-based data processing method provided in the embodiments of this specification, and the oracle node binding technology based on private key sharding synthetic addresses, merge multiple oracle node accounts into a public account generated based on threshold signatures. In most cases, only the bound account is required for submission, reducing on-chain transaction fees from N nodes per period to 1 node, thereby reducing overall and average costs. When submitting oracle data, the aggregation of multiple oracle data is achieved through the execution of predetermined off-chain logic, and the secure submission through threshold signatures prevents individual nodes from acting maliciously or being disconnected. Compared with traditional oracle technology that requires on-chain aggregation, more complex aggregation logic can be implemented, with greater flexibility.

[0158] Based on the blockchain-based data processing method described above, one or more embodiments of this specification also provide a terminal and server for blockchain-based data processing. The terminal and server may include devices (including distributed systems), software (applications), modules, components, servers, terminals, etc. that use the methods described in the embodiments of this specification and are combined with necessary implementation hardware. Based on the same innovative concept, the devices in one or more embodiments provided in the embodiments of this specification are as described in the following embodiments. Since the implementation solutions and methods of the devices to solve the problems are similar, the implementation of the specific devices in the embodiments of this specification can refer to the implementation of the aforementioned methods, and the repetitions will not be repeated. As used below, the terms "unit" or "module" can refer to a combination of software and / or hardware that implements the predetermined functions. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.

[0159] As can be seen from the technical solutions provided in the above embodiments of this specification, this specification also provides a data processing device based on blockchain. Figure 5 This is a schematic diagram of a data processing device based on a blockchain provided by an embodiment of this specification, wherein the blockchain includes an oracle network, such as Figure 5 As shown, the above device includes:

[0160] A public key generation module 510 is configured to generate a public key corresponding to each oracle node in the blockchain based on the node network address and private key shard of each oracle node;

[0161] An account synthesis module 520 is configured to generate a synthetic account address corresponding to each of the oracle nodes based on the public key;

[0162] A binding registration module 530 is configured to send a binding transaction to the blockchain to bind the node account address corresponding to each oracle node to the synthetic account address in the oracle contract, so as to generate an oracle node list in the oracle contract; the oracle node list includes the node account address of each oracle node and the bound synthetic account address;

[0163] The data upload module 540 is used to use a pre-designated data upload oracle node to send the data to be uploaded to the blockchain; wherein, the data upload oracle node is determined by each oracle node through a threshold signature under the blockchain before uploading the data to be uploaded; the data to be uploaded is generated based on the node data broadcast by each oracle node in the oracle network according to the node network address.

[0164] In some embodiments, the binding registration module 530 is specifically configured to:

[0165] Using the private key pairs corresponding to the node account addresses of the oracle nodes, the synthetic account addresses are respectively signed to obtain the synthetic address signature results corresponding to the oracle nodes;

[0166] Sending a binding transaction to the blockchain based on the node account address of each oracle node, the synthetic address signature result, and the synthetic account address;

[0167] Verify whether the signature result of the synthetic address in the binding transaction is the signature of the node account address in the binding transaction, and bind the node account address corresponding to the verified oracle node with the synthetic account address in the oracle contract.

[0168] In some embodiments, the binding registration module 530 is specifically configured to:

[0169] Each of the oracle nodes sends a binding transaction to the blockchain based on its own node account address, the synthetic address signature result, and the synthetic account address.

[0170] In some embodiments, the binding registration module 530 is specifically configured to:

[0171] Selecting one oracle node from each of the oracle nodes as a binding oracle node;

[0172] The binding oracle node aggregates the binding transactions corresponding to the specified number of oracle nodes based on the node account addresses of the specified number of oracle nodes, the synthetic address signature result, and the synthetic account address, and submits the aggregated binding transactions to the blockchain.

[0173] In some embodiments, the apparatus further comprises an oracle designation module configured to:

[0174] Generate multiple oracle nodes based on the node network address and private key shards of each oracle node, before generating the public key corresponding to each oracle node off-chain of the blockchain using a threshold signature;

[0175] Each of the oracle nodes publishes its own node account address and node network address in the oracle contract;

[0176] The oracle network is constructed based on the node network addresses corresponding to each of the oracle nodes.

[0177] In some embodiments, the data upload module 540 is specifically used to:

[0178] Based on the data aggregation logic preset in the oracle contract, each of the oracle nodes aggregates the node data of each of the oracle nodes under the blockchain to obtain the data to be uploaded aggregated by each of the oracle nodes;

[0179] The data upload oracle node is used to send the data to be uploaded to the blockchain.

[0180] In some embodiments, the data upload module 540 is specifically used to:

[0181] Obtaining the oracle nodes that obtain the same data to be uploaded through the aggregation process as target oracle nodes, and when the number of the target oracle nodes is greater than or equal to a preset number, signing the data to be uploaded using the threshold signature in the data uploading oracle node to obtain an aggregated data signature;

[0182] The data upload oracle node sends the aggregated data signature to the blockchain;

[0183] Obtain the node account address of the oracle node to which the data is uploaded;

[0184] According to the oracle node list, obtain the synthetic account address bound to the node account address of the oracle node for uploading the data;

[0185] The aggregated data signature is verified using the synthetic account address. After the verification is passed, the data to be uploaded is obtained and uploaded to the blockchain.

[0186] In some embodiments, the data upload module 540 is specifically used to:

[0187] The oracle node with the same data to be uploaded obtained through the aggregation processing is obtained as the target oracle node. When the number of the target oracle nodes is less than the preset number, the data uploading oracle node sends the node signature data of each oracle node to the blockchain, wherein the node signature data of each oracle node is obtained by each oracle node using its own private key shard to sign its own node data, and is broadcasted in the oracle network.

[0188] In some embodiments, the data upload module 540 is specifically used to:

[0189] After using a pre-designated data upload oracle node to send the data to be uploaded to the blockchain, if the data upload oracle node does not send the data to be uploaded within the specified time, or fails to send the data to be uploaded, then other oracle nodes in the oracle network upload node abnormality information to the blockchain, and the node abnormality information is used to indicate that there is an abnormality in the data upload oracle node.

[0190] In some embodiments, the device further includes a verification uplink module configured to:

[0191] After using a pre-designated data upload oracle node to send the data to be uploaded to the blockchain, after verifying that the data upload node is bound to the synthetic account address based on the oracle node list, the data to be uploaded is uploaded to the blockchain.

[0192] Regarding the apparatus in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method and will not be elaborated on here. The apparatus in the above embodiment may also include other implementation methods according to the description of the method embodiment. The specific implementation methods can refer to the description of the relevant method embodiment and will not be described in detail here.

[0193] Figure 6 This is a block diagram of an electronic device for data processing based on blockchain provided by an embodiment of this specification. The electronic device can be a terminal, and its internal structure diagram can be as follows Figure 6 As shown. The electronic device includes a processor, memory, network interface, display screen, and input device connected via a system bus. The processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The network interface of the electronic device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a blockchain-based data processing method is implemented. The display screen of the electronic device can be a liquid crystal display or an electronic ink display screen. The input device of the electronic device can be a touch layer covering the display screen, or a key, trackball, or touchpad provided on the electronic device housing, or an external keyboard, touchpad, or mouse.

[0194] Figure 7 This is a block diagram of another electronic device for data processing based on blockchain provided by an embodiment of this specification. The electronic device may be a server, and its internal structure diagram may be as follows: Figure 7As shown. The electronic device includes a processor, memory, and a network interface connected via a system bus. The processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The network interface of the electronic device is used to communicate with an external terminal via a network connection. When executed by the processor, the computer program implements a blockchain-based data processing method.

[0195] Those skilled in the art will understand that Figure 6 or Figure 7 The structure shown in the figure is merely a block diagram of a portion of the structure related to the embodiment scheme of this specification, and does not constitute a limitation on the electronic device to which the embodiment scheme of this specification is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0196] In an exemplary embodiment, an electronic device is also provided, comprising: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement the blockchain-based data processing method as in the embodiment of this specification.

[0197] In an exemplary embodiment, a computer-readable storage medium is also provided. When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the blockchain-based data processing method in the embodiment of this specification.

[0198] In an exemplary embodiment, a computer program product or computer program is also provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the blockchain-based data processing method provided in the various optional implementations described above.

[0199] It is understandable that in the specific implementation of this specification, when user-related data is involved, when the above embodiments of this specification are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0200] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this specification can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0201] Those skilled in the art will readily recognize alternative embodiments of the embodiments described herein after considering the specification and practicing the inventions disclosed herein. This specification is intended to cover any variations, uses, or adaptations of the embodiments described herein that follow the general principles of the embodiments described herein and include common knowledge or customary techniques in the art not disclosed in the embodiments described herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the embodiments described herein being indicated by the following claims.

[0202] It should be understood that the embodiments of the present invention are not limited to the precise structures described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the embodiments of the present invention is limited only by the appended claims.

Claims

1. A data processing method based on blockchain, characterized in that: The blockchain includes an oracle network, the oracle network includes multiple oracle nodes, each of the oracle nodes corresponds to a private key shard, a node account address, and a node network address, and the method includes: Based on the node network address and private key shard of each oracle node, generating a public key corresponding to each oracle node off-chain of the blockchain; Generate a synthetic account address corresponding to each oracle node based on the public key; Sending a binding transaction to the blockchain to bind the node account address corresponding to each oracle node to the synthetic account address in the oracle contract, so as to generate an oracle node list in the oracle contract; the oracle node list includes the node account address of each oracle node and the bound synthetic account address; The data to be uploaded is sent to the blockchain using a pre-designated data upload oracle node; wherein, the data upload oracle node is determined by each oracle node through a threshold signature under the blockchain before uploading the data to be uploaded; the data to be uploaded is generated based on the node data broadcasted by each oracle node in the oracle network according to the node network address.

2. The method according to claim 1, characterized in that The sending of a binding transaction to the blockchain to bind the node account address corresponding to each oracle node to the synthetic account address in the oracle contract includes: Using the private key pairs corresponding to the node account addresses of the respective oracle nodes to sign the synthetic account addresses respectively, to obtain the synthetic address signature results corresponding to the respective oracle nodes; Sending a binding transaction to the blockchain based on the node account address of each oracle node, the synthetic address signature result, and the synthetic account address; Verify whether the signature result of the synthetic address in the binding transaction is the signature of the node account address in the binding transaction, and bind the node account address corresponding to the verified oracle node with the synthetic account address in the oracle contract.

3. The method according to claim 2, characterized in that The sending of a binding transaction to the blockchain based on the node account address of each oracle node, the synthetic address signature result, and the synthetic account address includes: Each of the oracle nodes sends a binding transaction to the blockchain based on its own node account address, the synthetic address signature result, and the synthetic account address.

4. The method according to claim 2, characterized in that The sending of a binding transaction to the blockchain based on the node account address of each oracle node, the synthetic address signature result, and the synthetic account address includes: Selecting one oracle node from each of the oracle nodes as a binding oracle node; The binding oracle node aggregates the binding transactions corresponding to the specified number of oracle nodes based on the node account addresses of the specified number of oracle nodes, the synthetic address signature result, and the synthetic account address, and submits the aggregated binding transactions to the blockchain.

5. The method according to claim 1, wherein Before generating the public key corresponding to each oracle node off-chain of the blockchain using a threshold signature based on the node network address and private key shard of each oracle node, the method further includes: Generate multiple oracle nodes; Each of the oracle nodes publishes its own node account address and node network address in the oracle contract; The oracle network is constructed based on the node network addresses corresponding to each of the oracle nodes.

6. The method according to claim 1, characterized in that The method of using a pre-designated data upload oracle node to send the data to be uploaded to the blockchain includes: Based on the data aggregation logic preset in the oracle contract, each of the oracle nodes aggregates the node data of each of the oracle nodes under the blockchain to obtain the data to be uploaded aggregated by each of the oracle nodes; The data upload oracle node is used to send the data to be uploaded to the blockchain.

7. The method according to claim 6, characterized in that The method of using a pre-designated data upload oracle node to send the data to be uploaded to the blockchain includes: Obtaining the oracle nodes that obtain the same data to be uploaded through the aggregation process as target oracle nodes, and when the number of the target oracle nodes is greater than or equal to a preset number, signing the data to be uploaded using the threshold signature in the data uploading oracle node to obtain an aggregated data signature; The data upload oracle node sends the aggregated data signature to the blockchain; After verifying that the data uploading node is bound to the synthetic account address based on the oracle node list, uploading the data to be uploaded to the blockchain includes: Obtain the node account address of the oracle node to which the data is uploaded; According to the oracle node list, obtain the synthetic account address bound to the node account address of the oracle node for uploading the data; The aggregated data signature is verified using the synthetic account address. After the verification is passed, the data to be uploaded is obtained and uploaded to the blockchain.

8. The method according to claim 6, characterized in that The method of using a pre-designated data upload oracle node to send the data to be uploaded to the blockchain includes: The oracle node with the same data to be uploaded obtained through the aggregation processing is obtained as the target oracle node. When the number of the target oracle nodes is less than the preset number, the data uploading oracle node sends the node signature data broadcasted by each oracle node in the oracle network to the blockchain; wherein the node signature data of each oracle node is obtained by each oracle node signing its own node data using its own private key shard.

9. The method according to claim 1, characterized in that After sending the data to be uploaded to the blockchain using the pre-designated data upload oracle node, the method further includes: If the data upload oracle node does not send the data to be uploaded within the specified time, or fails to send the data to be uploaded, the other oracle nodes in the oracle network upload node abnormality information to the blockchain. The node abnormality information is used to indicate that there is an abnormality in the data upload oracle node.

10. The method according to claim 1, characterized in that After sending the data to be uploaded to the blockchain using the pre-designated data upload oracle node, the method further includes: After verifying that the data uploading node is bound to the synthetic account address based on the oracle node list, the data to be uploaded is uploaded to the blockchain.

11. A data processing device based on blockchain, characterized in that: The blockchain includes an oracle network, the oracle network includes multiple oracle nodes, each of the oracle nodes corresponds to a private key shard, a node account address, and a node network address, and the device includes: A public key generation module, configured to generate, off-chain in the blockchain, a public key corresponding to each oracle node based on the node network address and private key shard of each oracle node; An account synthesis module, configured to generate a synthetic account address corresponding to each of the oracle nodes based on the public key; a binding registration module, configured to send a binding transaction to the blockchain, respectively binding the node account address corresponding to each of the oracle nodes to the synthetic account address in the oracle contract, so as to generate an oracle node list in the oracle contract; the oracle node list includes the node account address of each of the oracle nodes and the bound synthetic account address; A data upload module is used to use a pre-designated data upload oracle node to send the data to be uploaded to the blockchain; wherein, the data upload oracle node is determined by each oracle node through a threshold signature under the blockchain before uploading the data to be uploaded; the data to be uploaded is generated based on the node data broadcast by each oracle node in the oracle network according to the node network address.

12. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the blockchain-based data processing method as described in any one of claims 1 to 10.

13. A computer-readable storage medium, characterized in that When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the blockchain-based data processing method as described in any one of claims 1 to 10.