WO2021042713A1 - 用于处理数据请求的方法和装置 - Google Patents

用于处理数据请求的方法和装置 Download PDF

Info

Publication number
WO2021042713A1
WO2021042713A1 PCT/CN2020/082670 CN2020082670W WO2021042713A1 WO 2021042713 A1 WO2021042713 A1 WO 2021042713A1 CN 2020082670 W CN2020082670 W CN 2020082670W WO 2021042713 A1 WO2021042713 A1 WO 2021042713A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
data
query
public key
current blockchain
Prior art date
Application number
PCT/CN2020/082670
Other languages
English (en)
French (fr)
Inventor
邵珠光
孙海波
黄海泉
赵光伟
张爽
Original Assignee
北京海益同展信息科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京海益同展信息科技有限公司 filed Critical 北京海益同展信息科技有限公司
Priority to EP20861933.8A priority Critical patent/EP4027577A4/en
Priority to US17/630,669 priority patent/US20220271924A1/en
Priority to JP2022504261A priority patent/JP7235930B2/ja
Publication of WO2021042713A1 publication Critical patent/WO2021042713A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0816Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
    • H04L9/0819Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s)
    • H04L9/0825Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s) using asymmetric-key encryption or public key infrastructure [PKI], e.g. key signature or public key certificates
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/02Network architectures or network communication protocols for network security for separating internal from external traffic, e.g. firewalls
    • H04L63/0281Proxies
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/06Network architectures or network communication protocols for network security for supporting key management in a packet data network
    • H04L63/062Network architectures or network communication protocols for network security for supporting key management in a packet data network for key distribution, e.g. centrally by trusted party
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0823Network architectures or network communication protocols for network security for authentication of entities using certificates
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/083Network architectures or network communication protocols for network security for authentication of entities using passwords
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0876Network architectures or network communication protocols for network security for authentication of entities based on the identity of the terminal or configuration, e.g. MAC address, hardware or software configuration or device fingerprint
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • H04L63/126Applying verification of the received information the source of the received data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0618Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation
    • H04L9/0637Modes of operation, e.g. cipher block chaining [CBC], electronic codebook [ECB] or Galois/counter mode [GCM]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3263Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving certificates, e.g. public key certificate [PKC] or attribute certificate [AC]; Public key infrastructure [PKI] arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees

Definitions

  • the embodiments of the present disclosure relate to the field of computer technology, and in particular to methods and devices for processing data requests.
  • Blockchain is a technology that uses the idea of decentralization to manage data. Because of the high reliability of blockchain technology, it is used in various data systems.
  • the cross-chain technology of the blockchain is a technology that promotes the interaction (such as data query and storage) between different blockchains.
  • the embodiments of the present disclosure propose methods and devices for processing data requests.
  • an embodiment of the present disclosure provides a method for processing a data request, the method comprising: receiving a query request and a query request sent by a first node in a block chain other than the current block chain Signature information, where the proxy node of the first node exists in the current blockchain, and the query request includes the query content and the storage number of the public key of the first node in the current blockchain; according to the public key of the first node in the current zone The storage number in the block chain obtains the public key of the first node from the current block chain; in response to the query request, the signature information is verified by the first node’s public key, and the query indicated by the query content is obtained from the current block chain Data; feedback the query result to the first node based on the query data.
  • the signature information in response to the query request is verified by the public key of the first node, and the query data indicated by the query content is obtained from the current blockchain, including: the signature information in response to the query request passes the first node.
  • the verification of the public key of the node determines whether the agent node of the first node has the query authority to query the content; in response to the agent node of the first node having the query authority to query the content, the query data indicated by the query content is obtained from the current blockchain .
  • the above-mentioned feedback of the query result based on the query data to the first node includes: signing the query data with a private key to obtain signature information of the query data; and combining the signature information of the query data, the query data, and the first node The public key of the proxy node is fed back to the first node as the query result.
  • the proxy node of the first node establishes a proxy relationship with the first node by performing the following steps: sending the received first digital certificate sent by the first node to the authentication platform indicated by the first digital certificate, so that The authentication platform authenticates the first digital certificate, where the first digital certificate includes the authentication information of the first node, the signature information of the authentication information of the first node, and the public key of the authentication platform, and the authentication information of the first node includes the first node.
  • the public key of a node in response to the authentication result fed back by the authentication platform indicating that the first digital certificate is authenticated, the private key is used to sign the public key of the first node to obtain the signature information of the public key of the first node;
  • the signature information of the public key and the public key of the first node are submitted to the current blockchain as the first submission data, so that the nodes in the current blockchain can store the first submission data in the current blockchain through the adopted consensus mechanism Medium; feedback the proxy result to the first node based on the storage number of the first submitted data in the current blockchain.
  • the foregoing feedback of the proxy result to the first node based on the storage number of the first submitted data in the current blockchain includes: using a private key to sign the storage number of the first submitted data in the current blockchain, Obtain the signature information of the storage number of the first submitted data in the current blockchain; combine the signature information of the storage number of the first submitted data in the current blockchain, the storage number of the first submitted data in the current blockchain, and The public key of the proxy node of the first node is fed back to the first node as a proxy result.
  • the above method further includes: receiving the submission request and the signature information of the submission request sent by a second node in a block chain other than the current block chain, where the second node exists in the current block chain
  • the proxy node the submission request includes the submitted content and the storage number of the public key of the second node in the current blockchain; according to the storage number of the public key of the second node in the current blockchain, obtain it from the current blockchain
  • the public key of the second node in response to the node that receives the submission request sent by the second node in the current blockchain, it is the proxy node of the second node, and uses the submission request and the signature information of the submission request as the second submission data, and use
  • the private key signs the second submission data to obtain the signature information of the second submission data; submit the signature information of the second submission data and the second submission data to the current blockchain so that the nodes in the current blockchain can pass the adopted data
  • the consensus mechanism stores the processing results of the submitted content in the current blockchain, where the nodes in the current blockchain process the submitted content through
  • the above method further includes: feeding back the submission result to the second node based on the storage number of the processing result in the current blockchain.
  • the node that responds to the submission request sent by the second node in the current blockchain is the proxy node of the second node, uses the submission request and the signature information of the submission request as the second submission data, and uses The private key signs the second submission data to obtain the signature information of the second submission data, including: the node responding to the submission request sent by the second node in the current blockchain is the proxy node of the second node and the signature of the submission request The information is verified by the public key of the second node to determine whether there is an abnormality in the submitted content; in response to the submission of no abnormality, the submission request and the signature information of the submission request are used as the second submission data, and the private key is used for the second submission data Sign to get the signature information of the second submitted data.
  • feeding back the submission result to the second node based on the storage number of the processing result in the current blockchain includes: using a private key to sign the storage number of the processing result in the current blockchain to obtain the processing result in the The signature information of the storage number in the current blockchain; the signature information of the storage number of the processing result in the current blockchain, the storage number of the processing result in the current blockchain, and the public number of the proxy node of the second node The key is fed back to the second node as the submission result.
  • the proxy node of the second node establishes a proxy relationship with the second node by performing the following steps: sending the received second digital certificate sent by the second node to the authentication platform indicated by the second digital certificate, so that The authentication platform authenticates the second digital certificate, where the second digital certificate includes the authentication information of the second node, the signature information of the authentication information of the second node, and the public key of the authentication platform, and the authentication information of the second node includes the first The public key of the second node; in response to the authentication result fed back by the authentication platform indicating that the second digital certificate is authenticated, the private key is used to sign the public key of the second node to obtain the signature information of the public key of the second node; The signature information of the public key and the public key of the second node are submitted to the current blockchain as the third submission data, so that the nodes in the current blockchain can store the third submission data in the current blockchain through the adopted consensus mechanism Medium; Based on the storage number of the third submitted data in the current blockchain, the proxy result is fed back to the
  • the foregoing feedback of the proxy result to the second node based on the storage number of the third submitted data in the current blockchain includes: using a private key to sign the storage number of the third submitted data in the current blockchain, Obtain the signature information of the storage number of the third submitted data in the current blockchain; the signature information of the storage number of the third submitted data in the current blockchain, the storage number of the third submitted data in the current blockchain, and The public key of the proxy node of the second node is fed back to the second node as a proxy result.
  • an embodiment of the present disclosure provides an apparatus for processing a data request.
  • the apparatus includes: a first receiving unit configured to receive a first node in a block chain other than the current block chain The sent query request and the signature information of the query request, where the proxy node of the first node exists in the current blockchain, and the query request includes the query content and the storage number of the public key of the first node in the current blockchain;
  • the obtaining unit is configured to obtain the public key of the first node from the current blockchain according to the storage number of the public key of the first node in the current blockchain;
  • the second obtaining unit is configured to respond to the query request
  • the signature information is verified by the public key of the first node, and the query data indicated by the query content is obtained from the current blockchain;
  • the first feedback unit is configured to feed back the query result to the first node based on the query data.
  • the second acquiring unit is further configured to: in response to the signature information of the query request being verified by the public key of the first node, determine whether the proxy node of the first node has query authority to query content; The proxy node of a node has the query authority to query the content, and obtains the query data indicated by the query content from the current blockchain.
  • the first feedback unit is further configured to: use the private key to sign the query data to obtain signature information of the query data; and feed back the signature information of the query data, the query data, and the public key as the query result to the first node .
  • the proxy relationship between the proxy node of the first node and the first node is established by performing the following steps: sending the received first digital certificate sent by the first node to the instruction of the first digital certificate
  • the authentication platform enables the authentication platform to authenticate the first digital certificate, where the first digital certificate includes the authentication information of the first node, the signature information of the authentication information of the first node, and the public key of the authentication platform, and the authentication of the first node
  • the information includes the public key of the first node; in response to the authentication result fed back by the authentication platform indicating that the first digital certificate is authenticated, the private key is used to sign the public key of the first node to obtain the signature information of the public key of the first node;
  • the signature information of the public key of a node and the public key of the first node are submitted to the current blockchain as the first submitted data, so that the nodes in the current blockchain can store the first submitted data in the current blockchain through the adopted consensus mechanism.
  • the blockchain based on the storage number of the first submitted data in the current
  • the proxy result fed back to the first node is fed back to the first node in the following manner: Use the private key to sign the storage number of the first submitted data in the current blockchain to obtain the first submitted data The signature information of the storage number in the current blockchain; the signature information of the storage number of the first submitted data in the current blockchain, the storage number and public key of the first submitted data in the current blockchain as the proxy result Feedback to the first node.
  • the above-mentioned apparatus further includes: a second receiving unit configured to receive the submission request and the signature information of the submission request sent by a second node in another blockchain other than the current blockchain, wherein the current There is a proxy node of the second node in the blockchain, and the submission request includes the submitted content and the storage number of the second node’s public key in the current blockchain; the third acquisition unit is configured to log in according to the second node’s public key.
  • the storage number in the current blockchain obtains the public key of the second node from the current blockchain; the signature unit is configured to respond to the node receiving the submission request sent by the second node in the current blockchain as the second
  • the proxy node of the node uses the submission request and the signature information of the submission request as the second submission data, and uses the private key to sign the second submission data to obtain the signature information of the second submission data; the submission unit is configured to submit the second submission
  • the signature information of the data and the second submission data are submitted to the current blockchain, so that the nodes in the current blockchain can store the processing results of the submitted content in the current blockchain through the adopted consensus mechanism.
  • the current block The nodes in the chain process the submitted content through the following steps: According to the storage number of the public key of the second node in the current blockchain, obtain the public key of the proxy node of the second node and the second node from the current blockchain In response to the signature information of the second submission data verified by the public key of the proxy node of the second node and the signature information of the submission request verified by the public key of the second node, the submitted content is processed to obtain the processing result.
  • the above-mentioned apparatus further includes: a second feedback unit configured to feed back the submission result to the second node based on the storage number of the processing result in the current blockchain.
  • the signature unit is further configured to: in response to the node receiving the submission request sent by the second node in the current blockchain, it is the proxy node of the second node, and the signature information of the submission request passes through the public of the second node. Key verification to determine whether there is an abnormality in the submitted content; in response to no abnormality in the submitted content, use the submission request and the signature information of the submission request as the second submission data, and use the private key to sign the second submission data to obtain the second submission data Signature information.
  • the second feedback unit is further configured to: use the private key to sign the storage number of the processing result in the current blockchain to obtain signature information of the storage number of the processing result in the current blockchain;
  • the signature information of the storage number of the result in the current blockchain, the storage number of the processing result in the current blockchain, and the public key are fed back to the second node as the submission result.
  • the proxy relationship between the proxy node of the second node and the second node is established by performing the following steps: sending the received second digital certificate sent by the second node to the instruction of the second digital certificate
  • the authentication platform allows the authentication platform to authenticate the second digital certificate, where the second digital certificate includes the authentication information of the second node, the signature information of the authentication information of the second node, and the public key of the authentication platform, and the authentication of the second node
  • the information includes the public key of the second node; in response to the authentication result fed back by the authentication platform indicating that the second digital certificate is authenticated, the private key is used to sign the public key of the second node to obtain the signature information of the public key of the second node;
  • the signature information of the public key of the second node and the public key of the second node are submitted to the current blockchain as the third submission data, so that the nodes in the current blockchain can store the third submission data in the current blockchain through the adopted consensus mechanism.
  • the blockchain based on the storage number of the third submitted data in the current blockchain
  • the proxy result fed back to the second node is fed back to the second node in the following manner: Use the private key to sign the storage number of the third submitted data in the current blockchain to obtain the third submitted data The signature information of the storage number in the current blockchain; the signature information of the storage number of the third submission data in the current blockchain, the storage number and public key of the third submission data in the current blockchain as the proxy result Feedback to the second node.
  • an embodiment of the present disclosure provides an electronic device that includes: one or more processors; a storage device on which one or more programs are stored; when one or more programs are stored by one or more Multiple processors execute, so that one or more processors implement the method described in any implementation manner of the first aspect.
  • an embodiment of the present disclosure provides a computer-readable medium on which a computer program is stored, and when the program is executed by a processor, the method as described in any implementation manner in the first aspect is implemented.
  • the method and device for processing data requests provided by the embodiments of the present disclosure first receive the query request and the signature information of the query request sent by the first node in the other blockchain except the current blockchain, and then according to the first
  • the storage number of the node’s public key in the current blockchain obtains the public key of the first node from the current blockchain, and then after the signature information requested by the query passes the verification of the public key of the first node, from the current area
  • the query data indicated by the query content is obtained in the block chain, and finally the query result is fed back to the first node based on the query data.
  • the first node in other blockchains can query data in the current blockchain, that is, the data stored in the blockchain
  • the risk of being leaked is low and the data cross-chain query is realized without increasing the point of failure.
  • Fig. 1 is an exemplary system architecture diagram to which an embodiment of the present disclosure can be applied;
  • Fig. 2 is a flowchart of an embodiment of a method for processing a data request according to the present disclosure
  • Fig. 3 is a schematic diagram of an application scenario of the method for processing a data request according to an embodiment of the present disclosure
  • Fig. 4 is a flowchart of another embodiment of a method for processing a data request according to the present disclosure
  • Fig. 5 is a schematic structural diagram of an embodiment of an apparatus for processing a data request according to the present disclosure
  • Fig. 6 is a schematic structural diagram of an electronic device suitable for implementing embodiments of the present disclosure.
  • FIG. 1 shows an exemplary architecture 100 of a method for processing a data request or an apparatus for processing a data request of the present disclosure can be applied.
  • the system architecture 100 may include two blockchains 10 and 20 and a network 30.
  • the blockchain 10 includes nodes 101, 102, and 103
  • the blockchain 20 includes nodes 104, 105, and 106.
  • the network 30 is used to provide a medium for communication links between nodes in the blockchain 10 and nodes in the blockchain 20.
  • the network 30 may include various connection types, such as wired, wireless communication links, or fiber optic cables, and so on.
  • the node in the blockchain 20 can obtain the data to be queried from the data stored in the blockchain 10 through the network 30.
  • the node 102 in the blockchain 10 is a proxy node of the node 104 in the blockchain 20, and the node 104 in the blockchain 20 can send query requests and queries to the node 101 in the blockchain 10 through the network 30.
  • the node 101 in the blockchain 10 can obtain the query data from the blockchain 10 according to the query request and the signature information of the query request, and then feedback the obtained query data to the blockchain 20 Node 104.
  • the nodes 101, 102, 103, 104, 105, 106 can be terminal devices or servers.
  • nodes 101, 102, 103, 104, 105, and 106 are terminal devices, various communication client applications such as blockchain applications, web browser applications, shopping applications, search applications, etc. can be installed. It is hardware or software. If the nodes 101, 102, 103, 104, 105, 106 are hardware, they can be various electronic devices that support information transmission, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and so on. If the nodes 101, 102, 103, 104, 105, 106 are software, they can be installed in the electronic devices listed above, and they can be implemented as multiple software or software modules, or as a single software or software module. There is no specific limitation here.
  • nodes 101, 102, 103, 104, 105, and 106 can be hardware or software. If the nodes 101, 102, 103, 104, 105, 106 are hardware, they can be implemented as a distributed server cluster composed of multiple servers, or as a single server. If the nodes 101, 102, 103, 104, 105, 106 are software, they can be implemented as multiple software or software modules (for example, multiple software or software modules used to provide distributed services), or as a single software or software Module. There is no specific limitation here.
  • the method for processing data requests provided by the embodiments of the present disclosure is generally executed by nodes in the blockchain 10 (for example, nodes 101, 102, 103), and accordingly, the device for processing data requests It is generally set in a node in the blockchain 10.
  • FIG. 1 the number of nodes and networks in FIG. 1 is merely illustrative. According to implementation needs, there can be any number of nodes and networks.
  • the method for processing data requests includes the following steps:
  • Step 201 Receive a query request and signature information of the query request sent by a first node in a block chain other than the current block chain.
  • the executor of the method for processing data requests can receive data sent by the first node in other blockchains than the current blockchain.
  • the current blockchain and other blockchains can be blockchains that provide data services for different systems, or different blockchains that provide different data services for the same system. It can be understood that the above-mentioned execution subject and the first node may be two nodes in two different blockchains.
  • the proxy node of the first node may be the above-mentioned execution subject, or may be other nodes in the current blockchain.
  • the proxy node of the first node may be a node that has established a proxy relationship with the first node in advance.
  • the first node can send a request for establishing a proxy relationship to a node in the current blockchain, and establish a proxy relationship with the node in the current blockchain on the premise that the node in the current blockchain accepts the request.
  • the query request may include the query content and the storage number of the public key of the first node in the current blockchain.
  • the query content may be the content that the first node needs to query in the current blockchain.
  • the signature information of the query request may be the signature information obtained by the first node using its private key to sign the query request.
  • the proxy node of the first node may establish a proxy relationship with the first node by executing the methods shown in step S1 to step S4.
  • Step S1 Send the received first digital certificate sent by the first node to the authentication platform indicated by the first digital certificate, so that the authentication platform can authenticate the first digital certificate.
  • the first digital certificate may include the authentication information of the first node, the signature information of the authentication information of the first node, and the public key of the authentication platform.
  • the authentication information of the first node may include, for example, the public key of the first node, and may also include the name and number of the first node, for example.
  • the proxy node of the first node may receive the first digital certificate sent by the first node, and send the first digital certificate to the authentication platform indicated by the first digital certificate to authenticate the first digital certificate.
  • the authentication platform may be a third-party platform that authenticates the authentication information of the nodes in the blockchain.
  • the authentication platform can use its private key to sign the authentication information of the first node to obtain the signature information of the authentication information of the first node, and pass the authentication information of the first node, the signature information of the authentication information of the first node, and the signature information of the authentication information of the first node.
  • the public key is processed to obtain the first digital certificate.
  • Step S2 in response to the authentication result fed back by the authentication platform indicating that the first digital certificate is authenticated, the private key is used to sign the public key of the first node to obtain signature information of the public key of the first node.
  • the proxy node of the first node can use its private key to sign the public key of the first node to obtain signature information of the public key of the first node.
  • the authentication result may include information indicating that the authentication is passed, and in other application scenarios, the authentication result may include the signature information and certification that the authentication platform uses its private key to sign the information indicating that the authentication is passed. The public key of the platform.
  • Step S3 the signature information of the public key of the first node and the public key of the first node are submitted to the current blockchain as the first submission data, so that the nodes in the current blockchain will pass the consensus mechanism adopted by the first node.
  • the submitted data is stored in the current blockchain.
  • the nodes in the current blockchain can compete for the right to record the first submitted data according to the consensus mechanism adopted by the current blockchain, and seize the first submission.
  • a node that submits the recording right of the data can record the first submitted data in the current blockchain, and the node that has not captured the recording right of the first submitted data can verify the data recorded by the node that captures the recording right of the first submitted data After the verification is passed, the storage of the first submitted data in the current blockchain can be completed.
  • step S4 the proxy result is fed back to the first node based on the storage number of the first submitted data in the current blockchain.
  • the proxy node of the first node may feed back the storage number of the first submitted data in the current blockchain as the proxy result to the first node.
  • the agent node of the first node establishes an agent relationship with the first node after the authentication platform passes the authentication information of the first node, and can establish an agent relationship with the first node on the premise of ensuring the security of the first node.
  • the proxy node of the first node may perform step S4 in the following manner.
  • the proxy node of the first node can use its private key to sign the storage number of the first submitted data in the current blockchain to obtain the signature information of the storage number of the first submitted data in the current blockchain.
  • the proxy node of the first node can transfer the signature information of the storage number of the first submitted data in the current blockchain, the storage number of the first submitted data in the current blockchain, and the public key of the proxy node of the first node. Feed back to the first node as a proxy result.
  • adding the signature information of the storage number of the first submitted data in the current blockchain and the public key of the proxy node of the first node in the proxy result can prevent the first submitted data from being in the current blockchain
  • the storage number of is tampered with during the process of feeding back to the first node.
  • Step 202 Obtain the public key of the first node from the current blockchain according to the storage number of the public key of the first node in the current blockchain.
  • the current blockchain stores the public keys of nodes in other blockchains that have a pre-established proxy relationship with the nodes in the current blockchain, and the public keys of each node are stored according to a uniquely determined storage number Stored. It can be understood that the public key of the first node is stored in the current blockchain according to a uniquely determined storage number.
  • the above-mentioned execution subject can obtain the storage number of the public key of the first node included in the query request in the current blockchain, and then obtain the storage number from the current blockchain. Indicate the public key, that is, obtain the public key of the first node.
  • Step 203 In response to the signature information of the query request being verified by the public key of the first node, the query data indicated by the query content is obtained from the current blockchain.
  • the above-mentioned execution subject can use the public key of the first node to verify the signature information of the query request. Specifically, the above-mentioned execution subject can use the public key of the first node to decrypt the signature information of the query request. If the result of the decryption is consistent with the query request, it can be determined that the signature information of the query request has passed the verification, otherwise it can be determined that the query request is valid. The signature information failed verification.
  • the above-mentioned execution subject can obtain the data indicated by the query content included in the query request from the current blockchain, that is, obtain the query data.
  • the above-mentioned execution subject may execute step 203 in the following manner.
  • the above-mentioned execution subject can determine whether the proxy node of the first node has the query authority to query the content.
  • the above-mentioned execution subject can determine the proxy of the first node based on the data indicating the query authority of the proxy node of the first node stored in the current blockchain Whether the node has the query authority for the query content included in the query request.
  • the above-mentioned execution subject may obtain the query data indicated by the query content from the current blockchain.
  • the above-mentioned execution subject can obtain the query data indicated by the query content from the current blockchain.
  • obtaining the query data indicated by the query content from the current blockchain can ensure that the first node obtains the query data from the current blockchain.
  • the blockchain queries the data within the query authority of its agent node.
  • Step 204 Feed back the query result to the first node based on the query data.
  • the above-mentioned execution subject may feed back the query data to the first node as a query result.
  • the above-mentioned execution subject may execute step 204 in the following manner.
  • the above-mentioned execution subject can use its private key to sign the query data to obtain the signature information of the query data.
  • the above-mentioned execution subject may feed back the signature information of the query data, the query data and its public key as the query result to the first node.
  • the signature information of the query data and the public key of the above-mentioned execution subject are added to the query result, which can prevent the query data from being tampered with in the process of being fed back to the first node.
  • Fig. 3 is a schematic diagram of an application scenario of the method for processing a data request according to this embodiment.
  • the terminal device 301 is a node in the current blockchain
  • the terminal device 302 is a node in other blockchains
  • the terminal device 301 can receive the query request 303 and the signature information 304 of the query request 303 sent by the terminal device 302.
  • the query request 303 may include the query content 3032 and the storage number 3031 of the public key of the terminal device 302 in the current blockchain.
  • the terminal device 301 can obtain the public key 305 of the terminal device 302 from the current blockchain according to the storage number 3031.
  • the terminal device 301 can use the obtained public key 305 to verify the signature information 304. If the verification is passed, the terminal device 301 can obtain the query data 306 indicated by the query content 3032 from the current blockchain.
  • the terminal device 301 can feed back the query data 306 to the terminal device 302 as a query result.
  • the existing technology uses a notary mechanism to introduce a third-party notary to realize the interaction between different blockchains, which may increase the amount of data stored in the blockchain during the cross-chain process. Risk of leakage.
  • the existing technology adopts the side chain (or relay chain) mode to introduce the side chain (or relay chain) to realize the interaction between different blockchains, which may increase the point of failure in the cross-chain process, that is, , When the side chain (or relay chain) fails, the cross-chain cannot be completed.
  • the first node in other blockchains can query data in the current blockchain, that is, the data stored in the blockchain Cross-chain query of data is realized on the basis of low risk of leakage and no increase in failure points.
  • FIG. 4 shows a flow 400 of another embodiment of a method for processing a data request.
  • the process 400 of the method for processing a data request includes the following steps:
  • Step 401 Receive a query request and signature information of the query request sent by a first node in a block chain other than the current block chain.
  • Step 402 Obtain the public key of the first node from the current blockchain according to the storage number of the public key of the first node in the current blockchain.
  • Step 403 In response to the signature information of the query request being verified by the public key of the first node, the query data indicated by the query content is obtained from the current blockchain.
  • Step 404 Feed back the query result to the first node based on the query data.
  • steps 401, 402, 403, and step 404 can be performed in a similar manner to step 201, step 202, step 203, and step 204 in the embodiment shown in FIG. 203.
  • the description of step 204 is also applicable to 401, step 402, step 403, and step 404, and will not be repeated here.
  • Step 405 Receive the submission request and the signature information of the submission request sent by a second node in a block chain other than the current block chain.
  • the execution body of the method for processing data requests can receive data sent by second nodes in other blockchains than the current blockchain. Submit request and submit request signature information.
  • the agent node of the second node may be the above-mentioned execution subject, or may be other nodes in the current blockchain.
  • the agent node of the second node may be a node that has established an agent relationship with the second node in advance.
  • the second node may send a request to establish a proxy relationship to a node in the current blockchain, and establish a proxy relationship with the node in the current blockchain under the premise that the node in the current blockchain accepts the request.
  • the submission request may include the submitted content and the storage number of the public key of the second node in the current blockchain.
  • the submitted content may be the content that the second node needs to store in the current blockchain.
  • the signature information of the submission request may be the signature information obtained by the second node using its private key to sign the submission request.
  • step 201 may be the same blockchain or different blockchains.
  • the second node and the first node may be the same node or different nodes.
  • the above-mentioned execution subject may execute step 401 and step 405 in sequence, or may execute step 401 and step 405 in parallel.
  • the proxy node of the second node may establish a proxy relationship with the second node by executing the methods shown in step T1 to step T4.
  • Step T1 Send the received second digital certificate sent by the second node to the authentication platform indicated by the second digital certificate, so that the authentication platform authenticates the second digital certificate.
  • the second digital certificate may include the authentication information of the second node, the signature information of the authentication information of the second node, and the public key of the authentication platform.
  • the authentication information of the second node may include, for example, the public key of the second node, for example, may also include the name, number, etc. of the second node.
  • Step T2 In response to the authentication result fed back by the authentication platform indicating that the second digital certificate is authenticated, the private key is used to sign the public key of the second node to obtain signature information of the public key of the second node.
  • Step T3 submit the signature information of the public key of the second node and the public key of the second node as the third submission data to the current blockchain, so that the nodes in the current blockchain will pass the adopted consensus mechanism to the third
  • the submitted data is stored in the current blockchain.
  • Step T4 based on the storage number of the third submitted data in the current blockchain, feedback the proxy result to the second node.
  • step T1 to step T4 the manner in which the proxy node of the second node performs step T1 to step T4 is similar to the manner in which the proxy node of the first node performs step S1 to step S4, and will not be repeated here.
  • the agent node of the second node establishes an agent relationship with the second node after the authentication platform passes the authentication information of the second node, and can establish an agent relationship with the second node on the premise of ensuring the security of the second node.
  • the proxy node of the second node may perform step T4 in the following manner.
  • the proxy node of the second node can use its private key to sign the storage number of the third submitted data in the current blockchain to obtain the signature information of the storage number of the third submitted data in the current blockchain.
  • the proxy node of the second node can feed back the signature information of the storage number of the third submitted data in the current blockchain, the storage number of the third submitted data in the current blockchain and its public key as the proxy result to the first Two nodes.
  • adding the signature information of the storage number of the third submitted data in the current blockchain and the public key of the proxy node of the second node in the proxy result can prevent the third submitted data from being in the current blockchain
  • the storage number of is tampered with during the feedback to the second node.
  • Step 406 Obtain the public key of the second node from the current blockchain according to the storage number of the public key of the second node in the current blockchain.
  • the above-mentioned execution subject can start from the current storage number of the public key of the second node included in the submission request in the current blockchain. Obtain the public key of the second node in the blockchain.
  • Step 407 In response to the node receiving the submission request sent by the second node in the current blockchain, it is the proxy node of the second node, the submission request and the signature information of the submission request are used as the second submission data, and the private key is used to pair the second node. Second, submit the data signature to obtain the signature information of the second submitted data.
  • the above-mentioned execution subject can further determine whether the node in the current blockchain that receives the submission request sent by the second node is the proxy node of the second node, that is, to determine the above-mentioned execution Whether the subject itself is a proxy node of the second node.
  • the above-mentioned execution subject can determine whether it is the proxy node of the second node according to the information of the proxy node of the second node stored in the current blockchain.
  • the above-mentioned execution subject may use the submission request and the signature information of the submission request as the second submission data. After that, the above-mentioned execution subject can use its private key to sign the obtained second submitted data to obtain the signature information of the second submitted data.
  • the above-mentioned execution subject may execute step 407 in the following manner.
  • the node in response to the current blockchain receiving the submission request sent by the second node, the node is the proxy node of the second node and the signature information of the submission request is verified by the public key of the second node, the above-mentioned executive body can determine the content of the submission Whether there is an abnormality.
  • the above-mentioned execution subject can not only determine whether it is a proxy node of the second node, but also use the public key of the second node to verify the signature information of the submission request. After the above-mentioned execution subject determines that it is the proxy node of the second node and the signature information of the submission request is verified, it can further determine whether there is an abnormality in the submission content included in the submission request.
  • the abnormality of the submitted content can mean that the submitted content will have an adverse effect on the current blockchain (for example, an infinite loop).
  • the above-mentioned execution subject can use the submission request and the signature information of the submission request as the second submission data, and use the private key to sign the second submission data to obtain the signature information of the second submission data.
  • the above-mentioned execution subject can use the submission request and the signature information of the submission request as the second submission data, and use its private key to sign the second submission data to obtain the signature of the second submission data. information.
  • signing the second submitted data can ensure that the data submitted by the second node to the current blockchain will not affect the operation of the current blockchain.
  • Step 408 Submit the signature information of the second submitted data and the second submitted data to the current blockchain, so that the nodes in the current blockchain can store the processing results of the submitted content in the current blockchain through the adopted consensus mechanism. in.
  • the above-mentioned execution subject can submit the signature information of the second submission data and the second submission data to the current blockchain.
  • the nodes in the current blockchain can submit the submitted content in the submission request in the following manner Perform processing to obtain processing results.
  • the nodes in the current blockchain can obtain the public key of the proxy node of the second node and the public key of the second node from the current blockchain according to the storage number of the public key of the second node in the current blockchain .
  • the nodes in the current blockchain can verify the submitted content Perform processing to obtain processing results.
  • the submitted content can be "A’s account balance is 1000, B’s account balance is 500, and A transfers 300 to B.”
  • the current block chain node's processing of the submitted content can be determined by A and B after the transfer Account balance, then the processing result obtained can be "A's account balance is 700, and B's account balance is 800".
  • the nodes in the current blockchain can also store the obtained processing results in the current blockchain through the consensus mechanism adopted by the current blockchain.
  • the above-mentioned execution subject may feed back the submission result to the second node based on the storage number of the processing result in the current blockchain.
  • the above-mentioned execution subject may feed back the storage number of the processing result in the current blockchain as the submission result to the second node. It can be understood that the storage number of the processing result in the current blockchain is fed back to the second node as the submission result.
  • the second node can be notified that the process of submitting data in the current blockchain has been completed.
  • the second node The submitted data can be queried in the current blockchain through the received storage number.
  • the above-mentioned execution subject may feed back the submission result to the second node in the following manner.
  • the above-mentioned execution subject can use its private key to sign the storage number of the processing result in the current blockchain, and obtain the signature information of the storage number of the processing result in the current blockchain.
  • the above-mentioned execution subject can feed back the signature information of the storage number of the processing result in the current blockchain, the storage number of the processing result in the current blockchain, and its public key as the submission result to the second node.
  • adding the signature information of the storage number of the processing result in the current blockchain and the public key of the above-mentioned execution subject to the submission result can prevent the storage number of the processing result in the current blockchain from being fed back to the first The process of the second node was tampered with.
  • the second node in other blockchains can store data in the current blockchain without introducing third-party notaries, side chains (or relay chains), that is, without increasing the storage of the blockchain
  • Cross-chain storage of data is realized based on the risk of data leakage and points of failure.
  • the present disclosure provides an embodiment of a device for processing data requests.
  • the device embodiment corresponds to the method embodiment shown in FIG. Specifically, it can be applied to various electronic devices.
  • the apparatus 500 for processing data requests includes: a first receiving unit 501, a first obtaining unit 502, a second obtaining unit 503, and a first feedback unit 504.
  • the first receiving unit 501 may be configured to: receive the query request and the signature information of the query request sent by the first node in the other block chain other than the current block chain, wherein the current block chain has the first node's signature information.
  • the proxy node, the query request includes the query content and the storage number of the public key of the first node in the current blockchain.
  • the first obtaining unit 502 may be configured to obtain the public key of the first node from the current blockchain according to the storage number of the public key of the first node in the current blockchain.
  • the second obtaining unit 503 may be configured to obtain the query data indicated by the query content from the current blockchain in response to the signature information of the query request being verified by the public key of the first node.
  • the first feedback unit 504 may be configured to feed back the query result to the first node based on the query data.
  • the specific processing of the first receiving unit 501, the first acquiring unit 502, the second acquiring unit 503, and the first feedback unit 504 and the technical effects brought about by them Reference may be made to the relevant descriptions of step 201, step 202, step 203, and step 204 in the embodiment corresponding to FIG. 2 respectively, which will not be repeated here.
  • the second obtaining unit 503 may be further configured to: in response to the signature information of the query request, verifying the public key of the first node, determine whether the proxy node of the first node has The query authority of the query content; in response to the agent node of the first node having the query authority of the query content, the query data indicated by the query content is obtained from the current blockchain.
  • the first feedback unit 504 may be further configured to: use a private key to sign the query data to obtain signature information of the query data; The key is fed back to the first node as the query result.
  • the proxy relationship between the proxy node of the first node and the first node is established by performing the following steps: Send the received first digital certificate sent by the first node To the authentication platform indicated by the first digital certificate, so that the authentication platform authenticates the first digital certificate, where the first digital certificate includes the authentication information of the first node, the signature information of the authentication information of the first node, and the authentication platform
  • the public key of the first node, the authentication information of the first node includes the public key of the first node; in response to the authentication result fed back by the authentication platform indicating that the first digital certificate is authenticated, the private key is used to sign the public key of the first node to obtain the first node
  • the signature information of the public key of the first node; the signature information of the public key of the first node and the public key of the first node are submitted to the current blockchain as the first submission data, so that the nodes in the current blockchain can pass the adopted consensus
  • the mechanism stores the first submitted data in the current blockchain; based on the storage number of the first submitted
  • the proxy result that is fed back to the first node is fed back to the first node in the following manner: Use the private key to set the storage number of the first submitted data in the current blockchain Sign to get the signature information of the storage number of the first submitted data in the current blockchain; the signature information of the storage number of the first submitted data in the current blockchain, and the storage of the first submitted data in the current blockchain The number and public key are fed back to the first node as the proxy result.
  • the foregoing apparatus 500 may further include: a second receiving unit (not shown in the figure), a third acquiring unit (not shown in the figure), and a signature unit (not shown in the figure). Shown) and a submission unit (not shown in the figure).
  • the second receiving unit may be configured to: receive the submission request and the signature information of the submission request sent by a second node in another block chain other than the current block chain, where there is a proxy of the second node in the current block chain Node, the submission request includes the submitted content and the storage number of the public key of the second node in the current blockchain.
  • the third obtaining unit may be configured to obtain the public key of the second node from the current blockchain according to the storage number of the public key of the second node in the current blockchain.
  • the signature unit may be configured to: respond to the node receiving the submission request sent by the second node in the current blockchain as the proxy node of the second node, use the submission request and the signature information of the submission request as the second submission data, and use The private key signs the second submitted data to obtain the signature information of the second submitted data.
  • the submission unit may be configured to: submit the signature information of the second submission data and the second submission data to the current blockchain, so that the nodes in the current blockchain can store the processing results of the submitted content in the adopted consensus mechanism
  • the nodes in the current blockchain process the submitted content through the following steps: According to the storage number of the second node’s public key in the current blockchain, the second node is obtained from the current blockchain.
  • the foregoing device 500 may further include a second feedback unit (not shown in the figure).
  • the second feedback unit may be configured to feed back the submission result to the second node based on the storage number of the processing result in the current blockchain.
  • the signature unit may be further configured to: in response to the node receiving the submission request sent by the second node in the current blockchain, it is the proxy node of the second node and submits the request.
  • the signature information is verified by the public key of the second node to determine whether there is an abnormality in the submitted content; in response to the submission of no abnormality, the submission request and the signature information of the submission request are used as the second submission data, and the private key is used for the second submission
  • the data is signed to obtain the signature information of the second submitted data.
  • the second feedback unit may be further configured to: use the private key to sign the storage number of the processing result in the current blockchain to obtain the processing result in the current blockchain.
  • the signature information of the storage number; the signature information of the storage number of the processing result in the current blockchain, the storage number of the processing result in the current blockchain, and the public key are fed back to the second node as the submission result.
  • the proxy relationship between the proxy node of the second node and the second node is established by performing the following steps: Send the received second digital certificate sent by the second node To the authentication platform indicated by the second digital certificate, so that the authentication platform authenticates the second digital certificate, where the second digital certificate includes the authentication information of the second node, the signature information of the authentication information of the second node, and the public of the authentication platform
  • the authentication information of the second node includes the public key of the second node; in response to the authentication result fed back by the authentication platform indicating that the second digital certificate is authenticated, the private key is used to sign the public key of the second node to obtain the public key of the second node.
  • the signature information of the key; the signature information of the public key of the second node and the public key of the second node are submitted to the current blockchain as the third submission data, so that the nodes in the current blockchain will pass the consensus mechanism adopted
  • the third submitted data is stored in the current blockchain; the proxy result is fed back to the second node based on the storage number of the third submitted data in the current blockchain.
  • the proxy result that is fed back to the second node is fed back to the second node in the following manner: Use the private key to pair the storage number of the third submitted data in the current blockchain Sign to get the signature information of the storage number of the third submitted data in the current blockchain; the signature information of the storage number of the third submitted data in the current blockchain, and the storage of the third submitted data in the current blockchain The number and public key are fed back to the second node as the proxy result.
  • the device provided by the above-mentioned embodiment of the present disclosure first receives the query request and the signature information of the query request sent by the first node in the other blockchain except the current blockchain through the first receiving unit 501, and then passes the first receiving unit 501.
  • the obtaining unit 502 obtains the public key of the first node from the current blockchain according to the storage number of the public key of the first node in the current blockchain, and then uses the second obtaining unit 503 to query the requested signature information After the public key of the first node is verified, the query data indicated by the query content is obtained from the current blockchain, and finally the first feedback unit 504 feeds back the query result to the first node based on the query data.
  • the first node in other blockchains can query data in the current blockchain, that is, the data stored in the blockchain
  • the risk of being leaked is low and the data cross-chain query is realized without increasing the point of failure.
  • FIG. 6 shows a schematic structural diagram of an electronic device (for example, nodes 101, 102, 103 in FIG. 1) 600 suitable for implementing embodiments of the present disclosure.
  • the electronic device shown in FIG. 6 is only an example, and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
  • the electronic device 600 may include a processing device (such as a central processing unit, a graphics processor, etc.) 601, which may be loaded into a random access device according to a program stored in a read-only memory (ROM) 602 or from a storage device 608.
  • the program in the memory (RAM) 603 executes various appropriate actions and processing.
  • various programs and data required for the operation of the electronic device 600 are also stored.
  • the processing device 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604.
  • An input/output (I/O) interface 605 is also connected to the bus 604.
  • the following devices can be connected to the I/O interface 605: including input devices 606 such as touch screens, touch pads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; including, for example, liquid crystal displays (LCD), speakers, vibration An output device 607 such as a device; a storage device 608 such as a magnetic tape, a hard disk, etc.; and a communication device 609.
  • the communication device 609 may allow the electronic device 600 to perform wireless or wired communication with other devices to exchange data.
  • FIG. 6 shows an electronic device 600 having various devices, it should be understood that it is not required to implement or have all of the illustrated devices. It may alternatively be implemented or provided with more or fewer devices. Each block shown in FIG. 6 may represent one device, or may represent multiple devices as needed.
  • an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart.
  • the computer program may be downloaded and installed from the network through the communication device 609, or installed from the storage device 608, or installed from the ROM 602.
  • the processing device 601 the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
  • the computer-readable medium described in the embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two.
  • the computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or a combination of any of the above. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable removable Programmable read only memory (EPROM or flash memory), optical fiber, portable compact disk read only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
  • the computer-readable storage medium may be any tangible medium that contains or stores a program, and the program may be used by or in combination with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a data signal propagated in a baseband or as a part of a carrier wave, and a computer-readable program code is carried therein. This propagated data signal can take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • the computer-readable signal medium may also be any computer-readable medium other than the computer-readable storage medium.
  • the computer-readable signal medium may send, propagate or transmit the program for use by or in combination with the instruction execution system, apparatus, or device .
  • the program code contained on the computer-readable medium can be transmitted by any suitable medium, including but not limited to: wire, optical cable, RF (Radio Frequency), etc., or any suitable combination of the above.
  • the above-mentioned computer-readable medium may be included in the above-mentioned electronic device; or it may exist alone without being assembled into the electronic device.
  • the above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: receives the first node in the other blockchain except the current blockchain.
  • the query request and the signature information of the query request where the proxy node of the first node exists in the current blockchain, and the query request includes the query content and the storage number of the first node’s public key in the current blockchain;
  • the storage number of the node’s public key in the current blockchain, and the public key of the first node is obtained from the current blockchain;
  • the signature information in response to the query request is verified by the public key of the first node, from the current blockchain
  • the computer program code for performing the operations of the embodiments of the present disclosure may be written in one or more programming languages or a combination thereof, the programming languages including object-oriented programming languages-such as Java, Smalltalk, C++, Also includes conventional procedural programming languages-such as "C" language or similar programming languages.
  • the program code can be executed entirely on the user's computer, partly on the user's computer, executed as an independent software package, partly on the user's computer and partly executed on a remote computer, or entirely executed on the remote computer or server.
  • the remote computer can be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (for example, using an Internet service provider to pass Internet connection).
  • LAN local area network
  • WAN wide area network
  • each block in the flowchart or block diagram may represent a module, program segment, or part of code, and the module, program segment, or part of code contains one or more for realizing the specified logical function Executable instructions.
  • the functions marked in the block may also occur in a different order from the order marked in the drawings. For example, two blocks shown in succession can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, depending on the functions involved.
  • each block in the block diagram and/or flowchart, and the combination of the blocks in the block diagram and/or flowchart can be implemented by a dedicated hardware-based system that performs the specified functions or operations Or it can be realized by a combination of dedicated hardware and computer instructions.
  • the units involved in the embodiments described in the present disclosure may be implemented in a software manner, and may also be implemented in a hardware manner.
  • the described unit may also be provided in the processor.
  • a processor including a first receiving unit, a first acquiring unit, a second acquiring unit, and a first feedback unit.
  • the names of these units do not constitute a limitation on the unit itself under certain circumstances.
  • the first feedback unit can also be described as "a unit that feeds back query results to the first node based on query data.”

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Storage Device Security (AREA)

Abstract

本公开的实施例公开了用于处理数据请求的方法和装置。该方法的一具体实施方式包括:接收当前区块链之外的其它区块链中的第一节点发送的查询请求和查询请求的签名信息,其中,当前区块链中存在第一节点的代理节点,查询请求包括查询内容和第一节点的公钥在当前区块链中的存储编号;根据第一节点的公钥在当前区块链中的存储编号,从当前区块链中获取第一节点的公钥;响应于查询请求的签名信息通过第一节点的公钥的验证,从当前区块链中获取查询内容指示的查询数据;基于查询数据向第一节点反馈查询结果。该实施方式在区块链所存储的数据被泄露的风险较低和不增加故障点的基础上实现数据的跨链查询。

Description

用于处理数据请求的方法和装置
本专利申请要求于2019年9月3日提交的、申请号为201910827775.9、申请人为北京海益同展信息科技有限公司、发明名称为“用于处理数据请求的方法和装置”的中国专利申请的优先权,该申请的全文以引用的方式并入本申请中
技术领域
本公开的实施例涉及计算机技术领域,具体涉及用于处理数据请求的方法和装置。
背景技术
区块链是利用去中心化的思想对数据进行管理的技术。由于区块链技术具有较高的可靠性,所以被应用在各种数据系统中。
在很多应用场景中,需要获取跨系统的数据来实现相应的功能。在这种需求之下,区块链的跨链技术也随之发展。区块链的跨链技术是一种促进不同的区块链之间的交互(例如数据的查询、存储)的技术。
发明内容
本公开的实施例提出了用于处理数据请求的方法和装置。
第一方面,本公开的实施例提供了一种用于处理数据请求的方法,该方法包括:接收当前区块链之外的其它区块链中的第一节点发送的查询请求和查询请求的签名信息,其中,当前区块链中存在第一节点的代理节点,查询请求包括查询内容和第一节点的公钥在当前区块链中的存储编号;根据第一节点的公钥在当前区块链中的存储编号,从当前区块链中获取第一节点的公钥;响应于查询请求的签名信息通过第一节点的公钥的验证,从当前区块链中获取查询内容指示的查询数据;基于查询数据向第一节点反馈查询结果。
在一些实施例中,上述响应于查询请求的签名信息通过第一节点 的公钥的验证,从当前区块链中获取查询内容指示的查询数据,包括:响应于查询请求的签名信息通过第一节点的公钥的验证,确定第一节点的代理节点是否具有查询内容的查询权限;响应于第一节点的代理节点具有查询内容的查询权限,从当前区块链中获取查询内容指示的查询数据。
在一些实施例中,上述基于查询数据向第一节点反馈查询结果,包括:使用私钥对查询数据签名,得到查询数据的签名信息;将查询数据的签名信息、查询数据和所述第一节点的代理节点的公钥作为查询结果反馈至第一节点。
在一些实施例中,第一节点的代理节点通过执行如下步骤与第一节点建立代理关系:将接收到的第一节点发送的第一数字证书发送至第一数字证书指示的认证平台,以使认证平台对第一数字证书进行认证,其中,第一数字证书包括所述第一节点的认证信息、第一节点的认证信息的签名信息和认证平台的公钥,第一节点的认证信息包括第一节点的公钥;响应于认证平台反馈的认证结果指示第一数字证书通过认证,使用私钥对第一节点的公钥签名,得到第一节点的公钥的签名信息;将第一节点的公钥的签名信息和第一节点的公钥作为第一提交数据提交至当前区块链,以使当前区块链中的节点通过所采用的共识机制将第一提交数据存储在当前区块链中;基于第一提交数据在当前区块链中的存储编号向第一节点反馈代理结果。
在一些实施例中,上述基于第一提交数据在当前区块链中的存储编号向第一节点反馈代理结果,包括:使用私钥对第一提交数据在当前区块链中的存储编号签名,得到第一提交数据在当前区块链中的存储编号的签名信息;将第一提交数据在当前区块链中的存储编号的签名信息、第一提交数据在当前区块链中的存储编号和所述第一节点的代理节点的公钥作为代理结果反馈至第一节点。
在一些实施例中,上述方法还包括:接收当前区块链之外的其它区块链中的第二节点发送的提交请求和提交请求的签名信息,其中,当前区块链中存在第二节点的代理节点,提交请求包括提交内容和第二节点的公钥在当前区块链中的存储编号;根据第二节点的公钥在当 前区块链中的存储编号,从当前区块链中获取第二节点的公钥;响应于当前区块链中接收到第二节点发送的提交请求的节点为第二节点的代理节点,将提交请求和提交请求的签名信息作为第二提交数据,以及使用私钥对第二提交数据签名,得到第二提交数据的签名信息;将第二提交数据的签名信息和第二提交数据提交至当前区块链,以使当前区块链中的节点通过所采用的共识机制将提交内容的处理结果存储在当前区块链中,其中,当前区块链中的节点通过如下步骤对提交内容进行处理:根据第二节点的公钥在当前区块链中的存储编号,从当前区块链中获取第二节点的代理节点的公钥和第二节点的公钥;响应于第二提交数据的签名信息通过第二节点的代理节点的公钥的验证且提交请求的签名信息通过第二节点的公钥的验证,对提交内容进行处理得到处理结果。
在一些实施例中,上述方法还包括:基于处理结果在当前区块链中的存储编号向第二节点反馈提交结果。
在一些实施例中,上述响应于当前区块链中接收到第二节点发送的提交请求的节点为第二节点的代理节点,将提交请求和提交请求的签名信息作为第二提交数据,以及使用私钥对第二提交数据签名,得到第二提交数据的签名信息,包括:响应于当前区块链中接收到第二节点发送的提交请求的节点为第二节点的代理节点且提交请求的签名信息通过第二节点的公钥的验证,确定提交内容是否存在异常;响应于提交内容未存在异常,将提交请求和提交请求的签名信息作为第二提交数据,以及使用私钥对第二提交数据签名,得到第二提交数据的签名信息。
在一些实施例中,上述基于处理结果在当前区块链中的存储编号向第二节点反馈提交结果,包括:使用私钥对处理结果在当前区块链中的存储编号签名,得到处理结果在当前区块链中的存储编号的签名信息;将处理结果在当前区块链中的存储编号的签名信息、处理结果在当前区块链中的存储编号和所述第二节点的代理节点的公钥作为提交结果反馈至第二节点。
在一些实施例中,第二节点的代理节点通过执行如下步骤与第二 节点建立代理关系:将接收到的第二节点发送的第二数字证书发送至第二数字证书指示的认证平台,以使认证平台对第二数字证书进行认证,其中,第二数字证书包括所述第二节点的认证信息、第二节点的认证信息的签名信息和认证平台的公钥,第二节点的认证信息包括第二节点的公钥;响应于认证平台反馈的认证结果指示第二数字证书通过认证,使用私钥对第二节点的公钥签名,得到第二节点的公钥的签名信息;将第二节点的公钥的签名信息和第二节点的公钥作为第三提交数据提交至当前区块链,以使当前区块链中的节点通过所采用的共识机制将第三提交数据存储在当前区块链中;基于第三提交数据在当前区块链中的存储编号向第二节点反馈代理结果。
在一些实施例中,上述基于第三提交数据在当前区块链中的存储编号向第二节点反馈代理结果,包括:使用私钥对第三提交数据在当前区块链中的存储编号签名,得到第三提交数据在当前区块链中的存储编号的签名信息;将第三提交数据在当前区块链中的存储编号的签名信息、第三提交数据在当前区块链中的存储编号和所述第二节点的代理节点的公钥作为代理结果反馈至第二节点。
第二方面,本公开的实施例提供了一种用于处理数据请求的装置,该装置包括:第一接收单元,被配置成接收当前区块链之外的其它区块链中的第一节点发送的查询请求和查询请求的签名信息,其中,当前区块链中存在第一节点的代理节点,查询请求包括查询内容和第一节点的公钥在当前区块链中的存储编号;第一获取单元,被配置成根据第一节点的公钥在当前区块链中的存储编号,从当前区块链中获取第一节点的公钥;第二获取单元,被配置成响应于查询请求的签名信息通过第一节点的公钥的验证,从当前区块链中获取查询内容指示的查询数据;第一反馈单元,被配置成基于查询数据向第一节点反馈查询结果。
在一些实施例中,第二获取单元进一步被配置成:响应于查询请求的签名信息通过第一节点的公钥的验证,确定第一节点的代理节点是否具有查询内容的查询权限;响应于第一节点的代理节点具有查询内容的查询权限,从当前区块链中获取查询内容指示的查询数据。
在一些实施例中,第一反馈单元进一步被配置成:使用私钥对查询数据签名,得到查询数据的签名信息;将查询数据的签名信息、查询数据和公钥作为查询结果反馈至第一节点。
在一些实施例中,第一节点的代理节点与第一节点之间的代理关系是通过执行如下步骤建立的:将接收到的第一节点发送的第一数字证书发送至第一数字证书指示的认证平台,以使认证平台对第一数字证书进行认证,其中,第一数字证书包括第一节点的认证信息、第一节点的认证信息的签名信息和认证平台的公钥,第一节点的认证信息包括第一节点的公钥;响应于认证平台反馈的认证结果指示第一数字证书通过认证,使用私钥对第一节点的公钥签名,得到第一节点的公钥的签名信息;将第一节点的公钥的签名信息和第一节点的公钥作为第一提交数据提交至当前区块链,以使当前区块链中的节点通过所采用的共识机制将第一提交数据存储在当前区块链中;基于第一提交数据在当前区块链中的存储编号向第一节点反馈代理结果。
在一些实施例中,上述向第一节点反馈的代理结果是按照如下方式反馈至第一节点的:使用私钥对第一提交数据在当前区块链中的存储编号签名,得到第一提交数据在当前区块链中的存储编号的签名信息;将第一提交数据在当前区块链中的存储编号的签名信息、第一提交数据在当前区块链中的存储编号和公钥作为代理结果反馈至第一节点。
在一些实施例中,上述装置还包括:第二接收单元,被配置成接收当前区块链之外的其它区块链中的第二节点发送的提交请求和提交请求的签名信息,其中,当前区块链中存在第二节点的代理节点,提交请求包括提交内容和第二节点的公钥在当前区块链中的存储编号;第三获取单元,被配置成根据第二节点的公钥在当前区块链中的存储编号,从当前区块链中获取第二节点的公钥;签名单元,被配置成响应于当前区块链中接收到第二节点发送的提交请求的节点为第二节点的代理节点,将提交请求和提交请求的签名信息作为第二提交数据,以及使用私钥对第二提交数据签名,得到第二提交数据的签名信息;提交单元,被配置成将第二提交数据的签名信息和第二提交数据提交 至当前区块链,以使当前区块链中的节点通过所采用的共识机制将提交内容的处理结果存储在当前区块链中,其中,当前区块链中的节点通过如下步骤对提交内容进行处理:根据第二节点的公钥在当前区块链中的存储编号,从当前区块链中获取第二节点的代理节点的公钥和第二节点的公钥;响应于第二提交数据的签名信息通过第二节点的代理节点的公钥的验证且提交请求的签名信息通过第二节点的公钥的验证,对提交内容进行处理得到处理结果。
在一些实施例中,上述装置还包括:第二反馈单元,被配置成基于处理结果在当前区块链中的存储编号向第二节点反馈提交结果。
在一些实施例中,签名单元进一步被配置成:响应于当前区块链中接收到第二节点发送的提交请求的节点为第二节点的代理节点且提交请求的签名信息通过第二节点的公钥的验证,确定提交内容是否存在异常;响应于提交内容未存在异常,将提交请求和提交请求的签名信息作为第二提交数据,以及使用私钥对第二提交数据签名,得到第二提交数据的签名信息。
在一些实施例中,第二反馈单元进一步被配置成:使用私钥对处理结果在当前区块链中的存储编号签名,得到处理结果在当前区块链中的存储编号的签名信息;将处理结果在当前区块链中的存储编号的签名信息、处理结果在当前区块链中的存储编号和公钥作为提交结果反馈至第二节点。
在一些实施例中,第二节点的代理节点与第二节点之间的代理关系是通过执行如下步骤建立的:将接收到的第二节点发送的第二数字证书发送至第二数字证书指示的认证平台,以使认证平台对第二数字证书进行认证,其中,第二数字证书包括第二节点的认证信息、第二节点的认证信息的签名信息和认证平台的公钥,第二节点的认证信息包括第二节点的公钥;响应于认证平台反馈的认证结果指示第二数字证书通过认证,使用私钥对第二节点的公钥签名,得到第二节点的公钥的签名信息;将第二节点的公钥的签名信息和第二节点的公钥作为第三提交数据提交至当前区块链,以使当前区块链中的节点通过所采用的共识机制将第三提交数据存储在当前区块链中;基于第三提交数 据在当前区块链中的存储编号向第二节点反馈代理结果。
在一些实施例中,上述向第二节点反馈的代理结果是按照如下方式反馈至第二节点的:使用私钥对第三提交数据在当前区块链中的存储编号签名,得到第三提交数据在当前区块链中的存储编号的签名信息;将第三提交数据在当前区块链中的存储编号的签名信息、第三提交数据在当前区块链中的存储编号和公钥作为代理结果反馈至第二节点。
第三方面,本公开的实施例提供了一种电子设备,该电子设备包括:一个或多个处理器;存储装置,其上存储有一个或多个程序;当一个或多个程序被一个或多个处理器执行,使得一个或多个处理器实现如第一方面中任一实现方式描述的方法。
第四方面,本公开的实施例提供了一种计算机可读介质,其上存储有计算机程序,该程序被处理器执行时实现如第一方面中任一实现方式描述的方法。
本公开的实施例提供的用于处理数据请求的方法和装置,首先接收当前区块链之外的其它区块链中的第一节点发送的查询请求和查询请求的签名信息,然后根据第一节点的公钥在当前区块链中的存储编号从当前区块链中获取所述第一节点的公钥,而后在查询请求的签名信息通过第一节点的公钥的验证后,从当前区块链中获取查询内容指示的查询数据,最后基于查询数据向第一节点反馈查询结果。从而在不引入第三方公证人、侧链(或者中继链)的基础上实现其它区块链中的第一节点在当前区块链中查询数据,也即,在区块链所存储的数据被泄露的风险较低和不增加故障点的基础上实现数据的跨链查询。
附图说明
通过阅读参照以下附图所作的对非限制性实施例所作的详细描述,本公开的其它特征、目的和优点将会变得更明显:
图1是本公开的一个实施例可以应用于其中的示例性系统架构图;
图2是根据本公开的用于处理数据请求的方法的一个实施例的流 程图;
图3是根据本公开的实施例的用于处理数据请求的方法的一个应用场景的示意图;
图4是根据本公开的用于处理数据请求的方法的又一个实施例的流程图;
图5是根据本公开的用于处理数据请求的装置的一个实施例的结构示意图;
图6是适于用来实现本公开的实施例的电子设备的结构示意图。
具体实施方式
下面结合附图和实施例对本公开作进一步的详细说明。可以理解的是,此处所描述的具体实施例仅仅用于解释相关发明,而非对该发明的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与有关发明相关的部分。
需要说明的是,在不冲突的情况下,本公开中的实施例及实施例中的特征可以相互组合。下面将参考附图并结合实施例来详细说明本公开。
图1示出了可以应用本公开的用于处理数据请求的方法或用于处理数据请求的装置的示例性架构100。
如图1所示,系统架构100可以包括两个区块链10、20以及网络30。区块链10包括节点101、102、103,区块链20包括节点104、105、106。网络30用以在区块链10中的节点和区块链20中的节点之间提供通信链路的介质。网络30可以包括各种连接类型,例如有线、无线通信链路或者光纤电缆等等。
当区块链20中的节点在区块链10中存在代理节点时,区块链20中的节点可以通过网络30从区块链10所存储的数据中获取所要查询的数据。举例来说,区块链10中的节点102为区块链20中的节点104的代理节点,区块链20中的节点104可以通过网络30向区块链10中的节点101发送查询请求和查询请求的签名信息,区块链10中的节点101可以根据该查询请求和查询请求的签名信息从区块链10中获取 查询数据,而后将所获取的查询数据反馈至区块链20中的节点104。
实践中,节点101、102、103、104、105、106可以是终端设备,也可以是服务器。
当节点101、102、103、104、105、106为终端设备时,可以安装有例如区块链类应用、网页浏览器应用、购物类应用、搜索类应用等各种通讯客户端应用,且可以是硬件,也可以是软件。若节点101、102、103、104、105、106为硬件,可以是支持信息发送的各种电子设备,包括但不限于智能手机、平板电脑、膝上型便携计算机和台式计算机等等。若节点101、102、103、104、105、106为软件,可以安装在上述所列举的电子设备中,其可以实现成多个软件或软件模块,也可以实现成单个软件或软件模块。在此不做具体限定。
当节点101、102、103、104、105、106为服务器时,可以是硬件,也可以是软件。若节点101、102、103、104、105、106为硬件,可以实现成多个服务器组成的分布式服务器集群,也可以实现成单个服务器。若节点101、102、103、104、105、106为软件,可以实现成多个软件或软件模块(例如用来提供分布式服务的多个软件或软件模块),也可以实现成单个软件或软件模块。在此不做具体限定。
需要说明的是,本公开的实施例所提供的用于处理数据请求的方法一般由区块链10中的节点(例如节点101、102、103)执行,相应地,用于处理数据请求的装置一般设置于区块链10中的节点内。
应该理解,图1中的节点和网络的数目仅仅是示意性的。根据实现需要,可以具有任意数目的节点和网络。
继续参考图2,示出了根据本公开的用于处理数据请求的方法的一个实施例的流程200。该用于处理数据请求的方法包括以下步骤:
步骤201,接收当前区块链之外的其它区块链中的第一节点发送的查询请求和查询请求的签名信息。
在本实施例中,用于处理数据请求的方法的执行主体(如图1所示的节点101、102、103)可以接收当前区块链之外的其它区块链中的第一节点发送的查询请求和查询请求的签名信息。实践中,当前区 块链和其它区块链可以是为不同系统提供数据服务的区块链,也可以是为同一系统提供不同的数据服务的不同区块链。可以理解,上述执行主体和第一节点可以是不同的两条区块链中的两个节点。
当前区块链中可以存在第一节点的代理节点。也就是说,第一节点的代理节点可以是上述执行主体,也可以是当前区块链中其它的节点。在这里,第一节点的代理节点可以是预先与第一节点建立代理关系的节点。实践中,第一节点可以向当前区块链中的节点发送建立代理关系的请求,在当前区块链中的节点接受该请求的前提下与之建立代理关系。
查询请求可以包括查询内容和第一节点的公钥在当前区块链中的存储编号。此处,查询内容可以是第一节点需要在当前区块链中查询的内容。查询请求的签名信息可以是第一节点使用其私钥对查询请求签名所得到的签名信息。
在本实施例的一些可选的实现方式中,第一节点的代理节点可以通过执行步骤S1至步骤S4所示的方法与第一节点建立代理关系。
步骤S1,将接收到的第一节点发送的第一数字证书发送至第一数字证书指示的认证平台,以使认证平台对第一数字证书进行认证。
第一数字证书可以包括第一节点的认证信息、第一节点的认证信息的签名信息和认证平台的公钥。第一节点的认证信息例如可以包括第一节点的公钥,例如还可以包括第一节点的名称、编号等。
具体地,第一节点的代理节点可以接收第一节点发送的第一数字证书,并将第一数字证书发送至第一数字证书指示的认证平台对第一数字证书进行认证。需要说明的是,认证平台可以是对区块链中的节点的认证信息进行认证的第三方平台。实践中,认证平台可以使用其私钥对第一节点的认证信息签名,得到第一节点的认证信息的签名信息,并通过对第一节点的认证信息、第一节点的认证信息的签名信息和其公钥进行处理,得到第一数字证书。
步骤S2,响应于认证平台反馈的认证结果指示第一数字证书通过认证,使用私钥对第一节点的公钥签名,得到第一节点的公钥的签名信息。
具体地,若认证平台反馈的认证结果指示第一数字证书通过认证,第一节点的代理节点可以使用其私钥对第一节点的公钥签名,得到第一节点的公钥的签名信息。
需要说明的是,在一些应用场景中,认证结果可以包括指示认证通过的信息,在另一些应用场景中,认证结果可以包括认证平台使用其私钥对指示认证通过的信息签名的签名信息和认证平台的公钥。
步骤S3,将第一节点的公钥的签名信息和第一节点的公钥作为第一提交数据提交至当前区块链,以使当前区块链中的节点通过所采用的共识机制将第一提交数据存储在当前区块链中。
具体地,第一节点的代理节点将第一提交数据提交至当前区块链之后,当前区块链中的节点可以根据当前区块链采用的共识机制争夺第一提交数据的记录权,夺取第一提交数据的记录权的节点可以在当前区块链中记录第一提交数据,未夺取第一提交数据的记录权的节点可以对夺取第一提交数据的记录权的节点所记录的数据进行验证,验证通过之后,便可以完成第一提交数据在当前区块链中的存储。
步骤S4,基于第一提交数据在当前区块链中的存储编号向第一节点反馈代理结果。
具体地,第一节点的代理节点可以将第一提交数据在当前区块链中的存储编号作为代理结果反馈至第一节点。
在这些实现方式中,第一节点的代理节点在认证平台对第一节点的认证信息认证通过后与第一节点建立代理关系,可以在确保第一节点安全的前提下与之建立代理关系。
在本实施例的一些可选的实现方式中,第一节点的代理节点可以通过如下方式执行步骤S4。
首先,第一节点的代理节点可以使用其私钥对第一提交数据在当前区块链中的存储编号签名,得到第一提交数据在当前区块链中的存储编号的签名信息。
然后,第一节点的代理节点可以将第一提交数据在当前区块链中的存储编号的签名信息、第一提交数据在当前区块链中的存储编号和第一节点的代理节点的公钥作为代理结果反馈至第一节点。
在这些实现方式中,在代理结果中增加第一提交数据在当前区块链中的存储编号的签名信息和第一节点的代理节点的公钥,可以避免第一提交数据在当前区块链中的存储编号在反馈至第一节点的过程中被篡改。
步骤202,根据第一节点的公钥在当前区块链中的存储编号,从当前区块链中获取第一节点的公钥。
在本实施例中,当前区块链中存储有与当前区块链中的节点预先建立代理关系的其它区块链中的节点的公钥,且每个节点的公钥按照唯一确定的存储编号所存储。可以理解,第一节点的公钥在当前区块链中按照唯一确定的存储编号所存储。
在本实施例中,接收到查询请求之后,上述执行主体可以获取查询请求所包括的第一节点的公钥在当前区块链中的存储编号,而后从当前区块链中获取该存储编号所指示公钥,即获取第一节点的公钥。
步骤203,响应于查询请求的签名信息通过第一节点的公钥的验证,从当前区块链中获取查询内容指示的查询数据。
在本实施例中,获取第一节点的公钥之后,上述执行主体可以使用第一节点的公钥对查询请求的签名信息进行验证。具体地,上述执行主体可以使用第一节点的公钥对查询请求的签名信息进行解密,若解密得到的结果与查询请求一致,则可以确定查询请求的签名信息通过验证,否则可以确定查询请求的签名信息未通过验证。
在本实施例中,若查询请求的签名信息通过验证,上述执行主体可以从当前区块链中获取查询请求所包括的查询内容指示的数据,即获取到查询数据。
在本实施例的一些可选的实现方式中,上述执行主体可以按照如下方式执行步骤203。
首先,响应于查询请求的签名信息通过第一节点的公钥的验证,上述执行主体可以确定第一节点的代理节点是否具有查询内容的查询权限。
具体地,若查询请求的签名信息通过第一节点的公钥的验证,上 述执行主体可以根据当前区块链中存储的指示第一节点的代理节点的查询权限的数据,确定第一节点的代理节点是否具有查询请求所包括的查询内容的查询权限。
然后,响应于第一节点的代理节点具有查询内容的查询权限,上述执行主体可以从当前区块链中获取查询内容指示的查询数据。
具体地,若确定第一节点的代理节点具有查询请求所包括的查询内容的查询权限,上述执行主体可以从当前区块链中获取该查询内容所指示的查询数据。
在这些实现方式中,在第一节点的代理节点具有查询请求所包括的查询内容的查询权限的前提下,从当前区块链中获取该查询内容指示的查询数据,可以保证第一节点从当前区块链中查询其代理节点的查询权限范围内的数据。
步骤204,基于查询数据向第一节点反馈查询结果。
在本实施例中,获取到查询数据之后,上述执行主体可以将该查询数据作为查询结果反馈至第一节点。
在本实施例的一些可选的实现方式中,获取到查询数据之后,上述执行主体可以按照如下方式执行步骤204。
首先,上述执行主体可以使用其私钥对查询数据签名,得到查询数据的签名信息。
然后,上述执行主体可以将查询数据的签名信息、查询数据和其公钥作为查询结果反馈至第一节点。
在这些实现方式中,在查询结果中增加查询数据的签名信息和上述执行主体的公钥,可以避免查询数据在反馈至第一节点的过程中被篡改。
继续参见图3,图3是根据本实施例的用于处理数据请求的方法的应用场景的一个示意图。在图3的应用场景中,终端设备301为当前区块链中的节点,终端设备302为其它区块链中的节点,且当前区块链中存在终端设备302的代理节点。
首先,终端设备301可以接收终端设备302发送的查询请求303 和查询请求303的签名信息304。其中,查询请求303可以包括查询内容3032和终端设备302的公钥在当前区块链中的存储编号3031。然后,终端设备301可以根据存储编号3031从当前区块链中获取终端设备302的公钥305。而后,终端设备301可以使用所获取的公钥305对签名信息304进行验证。若验证通过,终端设备301可以从当前区块链中获取查询内容3032所指示的查询数据306。最后,终端设备301可以将查询数据306作为查询结果反馈至终端设备302。
目前,在区块链跨链方面,现有技术采用公证人机制引入第三方公证人的方式实现不同区块链之间的交互,可能会增加在跨链过程中区块链所存储的数据被泄露的风险。或者,现有技术采用侧链(或者中继链)模式引入侧链(或者中继链)的方式实现不同区块链之间的交互,可能会增加在跨链过程中的故障点,也即,在侧链(或者中继链)发生故障时,将会导致跨链无法完成。而本公开的上述实施例提供的方法,当前区块链中存在其它区块链中的第一节点的代理节点,上述执行主体可以在第一节点发送的查询请求的签名信息通过验证之后,从当前区块链中获取第一节点发送的查询请求所包括的查询内容指示的查询数据,并向第一节点反馈查询结果。从而在不引入第三方公证人、侧链(或者中继链)的基础上实现其它区块链中的第一节点在当前区块链中查询数据,也即,在区块链所存储的数据被泄露的风险较低和不增加故障点的基础上实现数据的跨链查询。
进一步参考图4,其示出了用于处理数据请求的方法的又一个实施例的流程400。该用于处理数据请求的方法的流程400,包括以下步骤:
步骤401,接收当前区块链之外的其它区块链中的第一节点发送的查询请求和查询请求的签名信息。
步骤402,根据第一节点的公钥在当前区块链中的存储编号,从当前区块链中获取第一节点的公钥。
步骤403,响应于查询请求的签名信息通过第一节点的公钥的验证,从当前区块链中获取查询内容指示的查询数据。
步骤404,基于查询数据向第一节点反馈查询结果。
上述步骤401、步骤402、步骤403、步骤404可以分别按照如图2所示实施例中的步骤201、步骤202、步骤203、步骤204类似的方式执行,上文针对步骤201、步骤202、步骤203、步骤204的描述也适用于401、步骤402、步骤403、步骤404,此处不再赘述。
步骤405,接收当前区块链之外的其它区块链中的第二节点发送的提交请求和提交请求的签名信息。
在本实施例中,用于处理数据请求的方法的执行主体(如图1所示的节点101、102、103)可以接收当前区块链之外的其它区块链中的第二节点发送的提交请求和提交请求的签名信息。
当前区块链中存在第二节点的代理节点。与步骤201中描述的内容类似,第二节点的代理节点可以是上述执行主体,也可以是当前区块链中其它的节点。第二节点的代理节点可以是预先与第二节点建立代理关系的节点。实践中,第二节点可以向当前区块链中的节点发送建立代理关系的请求,在当前区块链中的节点接受该请求的前提下与之建立代理关系。
提交请求可以包括提交内容和第二节点的公钥在当前区块链中的存储编号。此处,提交内容可以是第二节点需要在当前区块链中存储的内容。提交请求的签名信息可以是第二节点使用其私钥对提交请求签名所得到的签名信息。
需要说明的是,在此处,其它区块链与步骤201中所描述的其它区块链可以是同一条区块链,也可以是不同的区块链。第二节点与第一节点可以是同一节点,也可以是不同的节点。此外,上述执行主体可以依次执行步骤401和步骤405,也可以并行地执行步骤401和步骤405。
在本实施例的一些可选的实现方式中,第二节点的代理节点可以通过执行步骤T1至步骤T4所示的方法与第二节点建立代理关系。
步骤T1,将接收到的第二节点发送的第二数字证书发送至第二数字证书指示的认证平台,以使认证平台对第二数字证书进行认证。
第二数字证书可以包括第二节点的认证信息、第二节点的认证信 息的签名信息和认证平台的公钥。第二节点的认证信息例如可以包括第二节点的公钥,例如还可以包括第二节点的名称、编号等。
步骤T2,响应于认证平台反馈的认证结果指示第二数字证书通过认证,使用私钥对第二节点的公钥签名,得到第二节点的公钥的签名信息。
步骤T3,将第二节点的公钥的签名信息和第二节点的公钥作为第三提交数据提交至当前区块链,以使当前区块链中的节点通过所采用的共识机制将第三提交数据存储在当前区块链中。
步骤T4,基于第三提交数据在当前区块链中的存储编号向第二节点反馈代理结果。
需要说明的是,第二节点的代理节点执行步骤T1至步骤T4的方式与第一节点的代理节点执行步骤S1至步骤S4的方式类似,此处不再赘述。
在这些实现方式中,第二节点的代理节点在认证平台对第二节点的认证信息认证通过后与第二节点建立代理关系,可以在确保第二节点安全的前提下与之建立代理关系。
在本实施例的一些可选的实现方式中,第二节点的代理节点可以通过如下方式执行步骤T4。
首先,第二节点的代理节点可以使用其私钥对第三提交数据在当前区块链中的存储编号签名,得到第三提交数据在当前区块链中的存储编号的签名信息。
然后,第二节点的代理节点可以将第三提交数据在当前区块链中的存储编号的签名信息、第三提交数据在当前区块链中的存储编号和其公钥作为代理结果反馈至第二节点。
在这些实现方式中,在代理结果中增加第三提交数据在当前区块链中的存储编号的签名信息和第二节点的代理节点的公钥,可以避免第三提交数据在当前区块链中的存储编号在反馈至第二节点的过程中被篡改。
步骤406,根据第二节点的公钥在当前区块链中的存储编号,从当前区块链中获取第二节点的公钥。
在本实施例中,接收第二节点发送的提交请求和提交请求的签名信息之后,上述执行主体可以根据提交请求所包括的第二节点的公钥在当前区块链中的存储编号,从当前区块链中获取第二节点的公钥。
步骤407,响应于当前区块链中接收到第二节点发送的提交请求的节点为第二节点的代理节点,将提交请求和提交请求的签名信息作为第二提交数据,以及使用私钥对第二提交数据签名,得到第二提交数据的签名信息。
在本实施例中,获取第二节点的公钥之后,上述执行主体可以进一步确定当前区块链中接收到第二节点发送的提交请求的节点是否为第二节点的代理节点,即确定上述执行主体本身是否为第二节点的代理节点。实践中,上述执行主体可以根据当前区块链中存储的第二节点的代理节点的信息,确定其本身是否为第二节点的代理节点。
在本实施例中,上述执行主体在确定其为第二节点的代理节点之后,可以将提交请求和提交请求的签名信息作为第二提交数据。之后,上述执行主体可以使用其私钥对所得到的第二提交数据签名,得到第二提交数据的签名信息。
在本实施例的一些可选的实现方式中,上述执行主体可以通过如下方式执行步骤407。
首先,响应于当前区块链中接收到第二节点发送的提交请求的节点为第二节点的代理节点且提交请求的签名信息通过第二节点的公钥的验证,上述执行主体可以确定提交内容是否存在异常。
具体地,获取第二节点的公钥之后,上述执行主体不仅可以确定其本身是否为第二节点的代理节点,还可以使用第二节点的公钥对提交请求的签名信息进行验证。上述执行主体在确定其为第二节点的代理节点且提交请求的签名信息通过验证之后,可以进一步确定提交请求所包括的提交内容是否存在异常。在这里,提交内容的异常可以指提交内容会对当前区块链造成不良影响(例如,死循环)。
然后,响应于提交内容未存在异常,上述执行主体可以将提交请求和提交请求的签名信息作为第二提交数据,以及使用私钥对第二提交数据签名,得到第二提交数据的签名信息。
具体地,在确定提交内容未存在异常时,上述执行主体可以将提交请求和提交请求的签名信息作为第二提交数据,并使用其私钥对第二提交数据签名,得到第二提交数据的签名信息。
在这些实现方式中,在确定提交内容未存在异常后,对第二提交数据签名,可以保证第二节点提交至当前区块链的数据不会对当前区块链的运行造成影响。
步骤408,将第二提交数据的签名信息和第二提交数据提交至当前区块链,以使当前区块链中的节点通过所采用的共识机制将提交内容的处理结果存储在当前区块链中。
在本实施例中,上述执行主体可以将第二提交数据的签名信息和第二提交数据提交至当前区块链,之后,当前区块链中的节点可以通过如下方式对提交请求中的提交内容进行处理得到处理结果。
首先,当前区块链中的节点可以根据第二节点的公钥在当前区块链中的存储编号,从当前区块链中获取第二节点的代理节点的公钥和第二节点的公钥。
然后,响应于第二提交数据的签名信息通过第二节点的代理节点的公钥的验证且提交请求的签名信息通过第二节点的公钥的验证,当前区块链中的节点可以对提交内容进行处理得到处理结果。
作为示例,提交内容可以是“A的账户余额为1000,B的账户余额为500,A向B转账300”,当前区块链中的节点对提交内容的处理可以是确定转账后A和B的账户余额,那么所得到的处理结果可以是“A的账户余额为700,B的账户余额为800”。
在本实施例中,当前区块链中的节点还可以通过当前区块链所采用的共识机制将所得到的处理结果存储在当前区块链中。
在本实施例的一些可选的实现方式中,在步骤408之后,上述执行主体可以基于处理结果在当前区块链中的存储编号向第二节点反馈提交结果。
具体地,上述执行主体可以将处理结果在当前区块链中的存储编号作为提交结果反馈至第二节点。可以理解,将处理结果在当前区块链中的存储编号作为提交结果反馈至第二节点,一方面可以通知第二 节点已完成在当前区块链中提交数据的过程,另一方面第二节点可以通过所接收到的存储编号在当前区块链中查询所提交的数据。
在本实施例的一些可选的实现方式中,上述执行主体可以通过如下方式向第二节点反馈提交结果。
首先,上述执行主体可以使用其私钥对处理结果在当前区块链中的存储编号签名,得到处理结果在当前区块链中的存储编号的签名信息。
然后,上述执行主体可以将处理结果在当前区块链中的存储编号的签名信息、处理结果在当前区块链中的存储编号和其公钥作为提交结果反馈至第二节点。
在这些实现方式中,在提交结果中增加处理结果在当前区块链中的存储编号的签名信息和上述执行主体的公钥,可以避免处理结果在当前区块链中的存储编号在反馈至第二节点的过程中被篡改。
从图4中可以看出,本实施例中的用于处理数据请求的方法的流程400,当前区块链中存在其它区块链中的第二节点的代理节点,上述执行主体在确定其本身为第二节点的代理节点后,通过将第二节点发送的提交请求和提交请求的签名信息作为第二提交数据并使用其私钥对第二提交数据签名,得到第二提交数据的签名信息,通过将第二提交数据和第二提交数据的签名信息提交至当前区块链,使得当前区块链中的节点通过所采用的共识机制将提交请求所包括的提交内容的处理结果存储在当前区块链中。从而在不引入第三方公证人、侧链(或者中继链)的基础上实现其它区块链中的第二节点在当前区块链中存储数据,也即,在不增加区块链所存储的数据被泄露的风险和故障点的基础上实现数据的跨链存储。
进一步参考图5,作为对上述各图所示方法的实现,本公开提供了用于处理数据请求的装置的一个实施例,该装置实施例与图2所示的方法实施例相对应,该装置具体可以应用于各种电子设备中。
如图5所示,本实施例提供的用于处理数据请求的装置500包括:第一接收单元501、第一获取单元502、第二获取单元503和第一反馈 单元504。第一接收单元501可以被配置成:接收当前区块链之外的其它区块链中的第一节点发送的查询请求和查询请求的签名信息,其中,当前区块链中存在第一节点的代理节点,查询请求包括查询内容和第一节点的公钥在当前区块链中的存储编号。第一获取单元502可以被配置成:根据第一节点的公钥在当前区块链中的存储编号,从当前区块链中获取第一节点的公钥。第二获取单元503可以被配置成:响应于查询请求的签名信息通过第一节点的公钥的验证,从当前区块链中获取查询内容指示的查询数据。第一反馈单元504可以被配置成:基于查询数据向第一节点反馈查询结果。
在本实施例中,用于处理数据请求的装置500中:第一接收单元501、第一获取单元502、第二获取单元503和第一反馈单元504的具体处理及其所带来的技术效果可分别参考图2对应实施例中的步骤201、步骤202、步骤203和步骤204的相关说明,在此不再赘述。
在本实施例的一些可选的实现方式中,第二获取单元503可以进一步被配置成:响应于查询请求的签名信息通过第一节点的公钥的验证,确定第一节点的代理节点是否具有查询内容的查询权限;响应于第一节点的代理节点具有查询内容的查询权限,从当前区块链中获取查询内容指示的查询数据。
在本实施例的一些可选的实现方式中,第一反馈单元504可以进一步被配置成:使用私钥对查询数据签名,得到查询数据的签名信息;将查询数据的签名信息、查询数据和公钥作为查询结果反馈至第一节点。
在本实施例的一些可选的实现方式中,第一节点的代理节点与第一节点之间的代理关系是通过执行如下步骤建立的:将接收到的第一节点发送的第一数字证书发送至第一数字证书指示的认证平台,以使认证平台对第一数字证书进行认证,其中,第一数字证书包括所述第一节点的认证信息、第一节点的认证信息的签名信息和认证平台的公钥,第一节点的认证信息包括第一节点的公钥;响应于认证平台反馈的认证结果指示第一数字证书通过认证,使用私钥对第一节点的公钥签名,得到第一节点的公钥的签名信息;将第一节点的公钥的签名信 息和第一节点的公钥作为第一提交数据提交至当前区块链,以使当前区块链中的节点通过所采用的共识机制将第一提交数据存储在当前区块链中;基于第一提交数据在当前区块链中的存储编号向第一节点反馈代理结果。
在本实施例的一些可选的实现方式中,上述向第一节点反馈的代理结果是按照如下方式反馈至第一节点的:使用私钥对第一提交数据在当前区块链中的存储编号签名,得到第一提交数据在当前区块链中的存储编号的签名信息;将第一提交数据在当前区块链中的存储编号的签名信息、第一提交数据在当前区块链中的存储编号和公钥作为代理结果反馈至第一节点。
在本实施例的一些可选的实现方式中,上述装置500还可以包括:第二接收单元(图中未示出)、第三获取单元(图中未示出)、签名单元(图中未示出)和提交单元(图中未示出)。第二接收单元可以被配置成:接收当前区块链之外的其它区块链中的第二节点发送的提交请求和提交请求的签名信息,其中,当前区块链中存在第二节点的代理节点,提交请求包括提交内容和第二节点的公钥在当前区块链中的存储编号。第三获取单元可以被配置成:根据第二节点的公钥在当前区块链中的存储编号,从当前区块链中获取第二节点的公钥。签名单元可以被配置成:响应于当前区块链中接收到第二节点发送的提交请求的节点为第二节点的代理节点,将提交请求和提交请求的签名信息作为第二提交数据,以及使用私钥对第二提交数据签名,得到第二提交数据的签名信息。提交单元可以被配置成:将第二提交数据的签名信息和第二提交数据提交至当前区块链,以使当前区块链中的节点通过所采用的共识机制将提交内容的处理结果存储在当前区块链中,其中,当前区块链中的节点通过如下步骤对提交内容进行处理:根据第二节点的公钥在当前区块链中的存储编号,从当前区块链中获取第二节点的代理节点的公钥和第二节点的公钥;响应于第二提交数据的签名信息通过第二节点的代理节点的公钥的验证且提交请求的签名信息通过第二节点的公钥的验证,对提交内容进行处理得到处理结果。
在本实施例的一些可选的实现方式中,上述装置500还可以包括 第二反馈单元(图中未示出)。第二反馈单元可以被配置成:基于处理结果在当前区块链中的存储编号向第二节点反馈提交结果。
在本实施例的一些可选的实现方式中,签名单元可以进一步被配置成:响应于当前区块链中接收到第二节点发送的提交请求的节点为第二节点的代理节点且提交请求的签名信息通过第二节点的公钥的验证,确定提交内容是否存在异常;响应于提交内容未存在异常,将提交请求和提交请求的签名信息作为第二提交数据,以及使用私钥对第二提交数据签名,得到第二提交数据的签名信息。
在本实施例的一些可选的实现方式中,第二反馈单元可以进一步被配置成:使用私钥对处理结果在当前区块链中的存储编号签名,得到处理结果在当前区块链中的存储编号的签名信息;将处理结果在当前区块链中的存储编号的签名信息、处理结果在当前区块链中的存储编号和公钥作为提交结果反馈至第二节点。
在本实施例的一些可选的实现方式中,第二节点的代理节点与第二节点之间的代理关系是通过执行如下步骤建立的:将接收到的第二节点发送的第二数字证书发送至第二数字证书指示的认证平台,以使认证平台对第二数字证书进行认证,其中,第二数字证书包括第二节点的认证信息、第二节点的认证信息的签名信息和认证平台的公钥,第二节点的认证信息包括第二节点的公钥;响应于认证平台反馈的认证结果指示第二数字证书通过认证,使用私钥对第二节点的公钥签名,得到第二节点的公钥的签名信息;将第二节点的公钥的签名信息和第二节点的公钥作为第三提交数据提交至当前区块链,以使当前区块链中的节点通过所采用的共识机制将第三提交数据存储在当前区块链中;基于第三提交数据在当前区块链中的存储编号向第二节点反馈代理结果。
在本实施例的一些可选的实现方式中,上述向第二节点反馈的代理结果是按照如下方式反馈至第二节点的:使用私钥对第三提交数据在当前区块链中的存储编号签名,得到第三提交数据在当前区块链中的存储编号的签名信息;将第三提交数据在当前区块链中的存储编号的签名信息、第三提交数据在当前区块链中的存储编号和公钥作为代 理结果反馈至第二节点。
本公开的上述实施例提供的装置,首先通过第一接收单元501,接收当前区块链之外的其它区块链中的第一节点发送的查询请求和查询请求的签名信息,然后通过第一获取单元502,根据第一节点的公钥在当前区块链中的存储编号从当前区块链中获取所述第一节点的公钥,而后通过第二获取单元503,在查询请求的签名信息通过第一节点的公钥的验证后,从当前区块链中获取查询内容指示的查询数据,最后通过第一反馈单元504,基于查询数据向第一节点反馈查询结果。从而在不引入第三方公证人、侧链(或者中继链)的基础上实现其它区块链中的第一节点在当前区块链中查询数据,也即,在区块链所存储的数据被泄露的风险较低和不增加故障点的基础上实现数据的跨链查询。
下面参考图6,其示出了适于用来实现本公开的实施例的电子设备(例如图1中的节点101、102、103)600的结构示意图。图6示出的电子设备仅仅是一个示例,不应对本公开的实施例的功能和使用范围带来任何限制。
如图6所示,电子设备600可以包括处理装置(例如中央处理器、图形处理器等)601,其可以根据存储在只读存储器(ROM)602中的程序或者从存储装置608加载到随机访问存储器(RAM)603中的程序而执行各种适当的动作和处理。在RAM 603中,还存储有电子设备600操作所需的各种程序和数据。处理装置601、ROM 602以及RAM 603通过总线604彼此相连。输入/输出(I/O)接口605也连接至总线604。
通常,以下装置可以连接至I/O接口605:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置606;包括例如液晶显示器(LCD)、扬声器、振动器等的输出装置607;包括例如磁带、硬盘等的存储装置608;以及通信装置609。通信装置609可以允许电子设备600与其它设备进行无线或有线通信以交换数据。虽然图6示出了具有各种装置的电子设备600,但是应理解的是, 并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。图6中示出的每个方框可以代表一个装置,也可以根据需要代表多个装置。
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置609从网络上被下载和安装,或者从存储装置608被安装,或者从ROM 602被安装。在该计算机程序被处理装置601执行时,执行本公开的实施例的方法中限定的上述功能。需要说明的是,本公开的实施例所述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开的实施例中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开的实施例中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。
上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备:接收当前区块链之外的其它区块链中的第一节点发送的查询请求和查询请求的签名信息,其中,当前区块链中存在第一节点的代理节点,查询请求包括查询内容和第一节点的公钥在当前区块链中的存储编号;根据第一节点的公钥在当前区块链中的存储编号,从当前区块链中获取第一节点的公钥;响应于查询请求的签名信息通过第一节点的公钥的验证,从当前区块链中获取查询内容指示的查询数据;基于查询数据向第一节点反馈查询结果。
可以以一种或多种程序设计语言或其组合来编写用于执行本公开的实施例的操作的计算机程序代码,所述程序设计语言包括面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组 合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
描述于本公开的实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。所描述的单元也可以设置在处理器中,例如,可以描述为:一种处理器,包括第一接收单元、第一获取单元、第二获取单元和第一反馈单元。其中,这些单元的名称在某种情况下并不构成对该单元本身的限定,例如,第一反馈单元还可以被描述为“基于查询数据向第一节点反馈查询结果的单元”。
以上描述仅为本公开的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开中所涉及的发明范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述发明构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。

Claims (14)

  1. 一种用于处理数据请求的方法,包括:
    接收当前区块链之外的其它区块链中的第一节点发送的查询请求和所述查询请求的签名信息,其中,当前区块链中存在所述第一节点的代理节点,所述查询请求包括查询内容和所述第一节点的公钥在当前区块链中的存储编号;
    根据所述第一节点的公钥在当前区块链中的存储编号,从当前区块链中获取所述第一节点的公钥;
    响应于所述查询请求的签名信息通过所述第一节点的公钥的验证,从当前区块链中获取所述查询内容指示的查询数据;
    基于所述查询数据向所述第一节点反馈查询结果。
  2. 根据权利要求1所述的方法,其中,所述响应于所述查询请求的签名信息通过所述第一节点的公钥的验证,从当前区块链中获取所述查询内容指示的查询数据,包括:
    响应于所述查询请求的签名信息通过所述第一节点的公钥的验证,确定所述第一节点的代理节点是否具有所述查询内容的查询权限;
    响应于所述第一节点的代理节点具有所述查询内容的查询权限,从当前区块链中获取所述查询内容指示的查询数据。
  3. 根据权利要求1所述的方法,其中,所述基于所述查询数据向所述第一节点反馈查询结果,包括:
    使用私钥对所述查询数据签名,得到所述查询数据的签名信息;
    将所述查询数据的签名信息、所述查询数据和所述第一节点的代理节点的公钥作为所述查询结果反馈至所述第一节点。
  4. 根据权利要求1所述的方法,其中,所述第一节点的代理节点 通过执行如下步骤与所述第一节点建立代理关系:
    将接收到的所述第一节点发送的第一数字证书发送至所述第一数字证书指示的认证平台,以使所述认证平台对所述第一数字证书进行认证,其中,所述第一数字证书包括所述第一节点的认证信息、所述第一节点的认证信息的签名信息和所述认证平台的公钥,所述第一节点的认证信息包括所述第一节点的公钥;
    响应于所述认证平台反馈的认证结果指示所述第一数字证书通过认证,使用私钥对所述第一节点的公钥签名,得到所述第一节点的公钥的签名信息;
    将所述第一节点的公钥的签名信息和所述第一节点的公钥作为第一提交数据提交至当前区块链,以使当前区块链中的节点通过所采用的共识机制将所述第一提交数据存储在当前区块链中;
    基于所述第一提交数据在当前区块链中的存储编号向所述第一节点反馈代理结果。
  5. 根据权利要求4所述的方法,其中,所述基于所述第一提交数据在当前区块链中的存储编号向所述第一节点反馈代理结果,包括:
    使用私钥对所述第一提交数据在当前区块链中的存储编号签名,得到所述第一提交数据在当前区块链中的存储编号的签名信息;
    将所述第一提交数据在当前区块链中的存储编号的签名信息、所述第一提交数据在当前区块链中的存储编号和所述第一节点的代理节点的公钥作为代理结果反馈至所述第一节点。
  6. 根据权利要求1-5中任一所述的方法,其中,所述方法还包括:
    接收当前区块链之外的其它区块链中的第二节点发送的提交请求和所述提交请求的签名信息,其中,当前区块链中存在所述第二节点的代理节点,所述提交请求包括提交内容和所述第二节点的公钥在当前区块链中的存储编号;
    根据所述第二节点的公钥在当前区块链中的存储编号,从当前区块链中获取所述第二节点的公钥;
    响应于当前区块链中接收到所述第二节点发送的提交请求的节点为所述第二节点的代理节点,将所述提交请求和所述提交请求的签名信息作为第二提交数据,以及使用私钥对所述第二提交数据签名,得到所述第二提交数据的签名信息;
    将所述第二提交数据的签名信息和所述第二提交数据提交至当前区块链,以使当前区块链中的节点通过所采用的共识机制将所述提交内容的处理结果存储在当前区块链中,其中,当前区块链中的节点通过如下步骤对所述提交内容进行处理:根据所述第二节点的公钥在当前区块链中的存储编号,从当前区块链中获取所述第二节点的代理节点的公钥和所述第二节点的公钥;响应于所述第二提交数据的签名信息通过所述第二节点的代理节点的公钥的验证且所述提交请求的签名信息通过所述第二节点的公钥的验证,对所述提交内容进行处理得到所述处理结果。
  7. 根据权利要求6所述的方法,其中,所述方法还包括:
    基于所述处理结果在当前区块链中的存储编号向所述第二节点反馈提交结果。
  8. 根据权利要求6所述的方法,其中,所述响应于当前区块链中接收到所述第二节点发送的提交请求的节点为所述第二节点的代理节点,将所述提交请求和所述提交请求的签名信息作为第二提交数据,以及使用私钥对所述第二提交数据签名,得到所述第二提交数据的签名信息,包括:
    响应于当前区块链中接收到所述第二节点发送的提交请求的节点为所述第二节点的代理节点且所述提交请求的签名信息通过所述第二节点的公钥的验证,确定所述提交内容是否存在异常;
    响应于所述提交内容未存在异常,将所述提交请求和所述提交请求的签名信息作为第二提交数据,以及使用私钥对所述第二提交数据签名,得到所述第二提交数据的签名信息。
  9. 根据权利要求7所述的方法,其中,所述基于所述处理结果在当前区块链中的存储编号向所述第二节点反馈提交结果,包括:
    使用私钥对所述处理结果在当前区块链中的存储编号签名,得到所述处理结果在当前区块链中的存储编号的签名信息;
    将所述处理结果在当前区块链中的存储编号的签名信息、所述处理结果在当前区块链中的存储编号和所述第二节点的代理节点的公钥作为提交结果反馈至所述第二节点。
  10. 根据权利要求6所述的方法,其中,所述第二节点的代理节点通过执行如下步骤与所述第二节点建立代理关系:
    将接收到的所述第二节点发送的第二数字证书发送至所述第二数字证书指示的认证平台,以使所述认证平台对所述第二数字证书进行认证,其中,所述第二数字证书包括所述第二节点的认证信息、所述第二节点的认证信息的签名信息和所述认证平台的公钥,所述第二节点的认证信息包括所述第二节点的公钥;
    响应于所述认证平台反馈的认证结果指示所述第二数字证书通过认证,使用私钥对所述第二节点的公钥签名,得到所述第二节点的公钥的签名信息;
    将所述第二节点的公钥的签名信息和所述第二节点的公钥作为第三提交数据提交至当前区块链,以使当前区块链中的节点通过所采用的共识机制将所述第三提交数据存储在当前区块链中;
    基于所述第三提交数据在当前区块链中的存储编号向所述第二节点反馈代理结果。
  11. 根据权利要求10所述的方法,其中,所述基于所述第三提交数据在当前区块链中的存储编号向所述第二节点反馈代理结果,包括:
    使用私钥对所述第三提交数据在当前区块链中的存储编号签名,得到所述第三提交数据在当前区块链中的存储编号的签名信息;
    将所述第三提交数据在当前区块链中的存储编号的签名信息、所述第三提交数据在当前区块链中的存储编号和所述第二节点的代理节 点的公钥作为代理结果反馈至所述第二节点。
  12. 一种用于处理数据请求的装置,包括:
    第一接收单元,被配置成接收当前区块链之外的其它区块链中的第一节点发送的查询请求和所述查询请求的签名信息,其中,当前区块链中存在所述第一节点的代理节点,所述查询请求包括查询内容和所述第一节点的公钥在当前区块链中的存储编号;
    第一获取单元,被配置成根据所述第一节点的公钥在当前区块链中的存储编号,从当前区块链中获取所述第一节点的公钥;
    第二获取单元,被配置成响应于所述查询请求的签名信息通过所述第一节点的公钥的验证,从当前区块链中获取所述查询内容指示的查询数据;
    第一反馈单元,被配置成基于所述查询数据向所述第一节点反馈查询结果。
  13. 一种电子设备,包括:
    一个或多个处理器;
    存储装置,其上存储有一个或多个程序;
    当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1-11中任一所述的方法。
  14. 一种计算机可读介质,其上存储有计算机程序,其中,该程序被处理器执行时实现如权利要求1-11中任一所述的方法。
PCT/CN2020/082670 2019-09-03 2020-04-01 用于处理数据请求的方法和装置 WO2021042713A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
EP20861933.8A EP4027577A4 (en) 2019-09-03 2020-04-01 DATA REQUEST PROCESSING METHOD AND APPARATUS
US17/630,669 US20220271924A1 (en) 2019-09-03 2020-04-01 Method and apparatus for processing data request
JP2022504261A JP7235930B2 (ja) 2019-09-03 2020-04-01 データ要求を処理するための方法及び装置、電子機器、記憶媒体並びにコンピュータプログラム

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910827775.9 2019-09-03
CN201910827775.9A CN110535659B (zh) 2019-09-03 2019-09-03 用于处理数据请求的方法、装置、电子设备和计算机可读介质

Publications (1)

Publication Number Publication Date
WO2021042713A1 true WO2021042713A1 (zh) 2021-03-11

Family

ID=68666463

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/082670 WO2021042713A1 (zh) 2019-09-03 2020-04-01 用于处理数据请求的方法和装置

Country Status (5)

Country Link
US (1) US20220271924A1 (zh)
EP (1) EP4027577A4 (zh)
JP (1) JP7235930B2 (zh)
CN (1) CN110535659B (zh)
WO (1) WO2021042713A1 (zh)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110535659B (zh) * 2019-09-03 2020-11-03 北京海益同展信息科技有限公司 用于处理数据请求的方法、装置、电子设备和计算机可读介质
US11637701B2 (en) * 2020-09-23 2023-04-25 Genesys Cloud Services, Inc. Technologies for conducting a data transaction between enterprises using a permissioned blockchain infrastructure and an oracle system
CN114513526A (zh) * 2020-10-26 2022-05-17 北京荷月科技有限公司 一种跨链访问数据的方法、系统以及第一区块链
CN112995205B (zh) * 2021-04-13 2021-08-20 北京百度网讯科技有限公司 基于区块链的查询方法、装置、设备和存储介质
CN113271565B (zh) * 2021-05-14 2022-12-27 阿波罗智联(北京)科技有限公司 车辆的通信方法、装置、存储介质及程序产品
CN113326290B (zh) * 2021-06-02 2022-03-01 支付宝(杭州)信息技术有限公司 跨网查询控制方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108418795A (zh) * 2018-01-30 2018-08-17 百度在线网络技术(北京)有限公司 跨区块链的数据访问方法、装置、系统及计算机可读介质
CN109903042A (zh) * 2019-01-18 2019-06-18 深圳壹账通智能科技有限公司 基于区块链的信息授权方法、装置、介质及电子设备
CN110035045A (zh) * 2018-11-16 2019-07-19 阿里巴巴集团控股有限公司 跨链数据的可信管理方法及装置、电子设备
US20190251199A1 (en) * 2018-02-14 2019-08-15 Ivan Klianev Transactions Across Blockchain Networks
CN110535659A (zh) * 2019-09-03 2019-12-03 北京海益同展信息科技有限公司 用于处理数据请求的方法和装置

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10007913B2 (en) 2015-05-05 2018-06-26 ShoCard, Inc. Identity management service using a blockchain providing identity transactions between devices
CN107079037B (zh) 2016-09-18 2018-10-23 深圳前海达闼云端智能科技有限公司 基于区块链的身份认证方法、装置、节点及系统
CN107995197A (zh) * 2017-12-04 2018-05-04 中国电子科技集团公司第三十研究所 一种实现跨管理域身份和权限信息共享的方法
CN108712257B (zh) * 2018-04-03 2020-04-17 阿里巴巴集团控股有限公司 跨区块链的认证方法及装置、电子设备
US10250395B1 (en) * 2018-08-29 2019-04-02 Accenture Global Solutions Limited Cryptologic blockchain interoperation
CN112765595B (zh) 2018-11-16 2024-05-10 创新先进技术有限公司 跨区块链的数据处理方法、装置、客户端、区块链系统
EP3602956B1 (en) * 2019-01-31 2021-01-27 Advanced New Technologies Co., Ltd. Cross-asset trading within blockchain networks
CN109948371B (zh) 2019-03-07 2021-06-25 深圳市智税链科技有限公司 为区块链节点发放身份证书的方法及相关装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108418795A (zh) * 2018-01-30 2018-08-17 百度在线网络技术(北京)有限公司 跨区块链的数据访问方法、装置、系统及计算机可读介质
US20190251199A1 (en) * 2018-02-14 2019-08-15 Ivan Klianev Transactions Across Blockchain Networks
CN110035045A (zh) * 2018-11-16 2019-07-19 阿里巴巴集团控股有限公司 跨链数据的可信管理方法及装置、电子设备
CN109903042A (zh) * 2019-01-18 2019-06-18 深圳壹账通智能科技有限公司 基于区块链的信息授权方法、装置、介质及电子设备
CN110535659A (zh) * 2019-09-03 2019-12-03 北京海益同展信息科技有限公司 用于处理数据请求的方法和装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP4027577A4

Also Published As

Publication number Publication date
US20220271924A1 (en) 2022-08-25
CN110535659B (zh) 2020-11-03
EP4027577A4 (en) 2023-08-09
CN110535659A (zh) 2019-12-03
JP2022541835A (ja) 2022-09-27
EP4027577A1 (en) 2022-07-13
JP7235930B2 (ja) 2023-03-08

Similar Documents

Publication Publication Date Title
WO2021042713A1 (zh) 用于处理数据请求的方法和装置
US9363258B2 (en) Secure digital signature system
US20230281607A1 (en) Method and system for mobile cryptocurrency wallet connectivity
US10270757B2 (en) Managing exchanges of sensitive data
WO2021056968A1 (zh) 用于执行智能合约的方法和装置
CN110247917B (zh) 用于认证身份的方法和装置
WO2022108529A1 (zh) 模型构建方法、装置、介质及电子设备
CN112866385B (zh) 接口调用方法、装置、电子设备和存储介质
CN108923925B (zh) 应用于区块链的数据存储方法和装置
WO2021057005A1 (zh) 用于发布智能合约的方法和装置
CN113193961B (zh) 一种数字证书管理方法和装置
WO2021088659A1 (zh) 电子签章载入方法和装置
CN110705985A (zh) 用于存储信息的方法和装置
CN113206746A (zh) 一种数字证书管理方法和装置
WO2023246480A1 (zh) 一种身份认证方法、装置、设备、介质及产品
CN116975810A (zh) 身份验证方法、装置、电子设备及计算机可读存储介质
CN115934640A (zh) 一种数据存储方法、系统、电子设备及存储介质
CN112994882B (zh) 基于区块链的鉴权方法、装置、介质及设备
CN112767142B (zh) 针对交易文件的处理方法、装置、计算设备和介质
CN113206745B (zh) 一种数字证书管理方法和装置
CN113242132B (zh) 一种数字证书管理方法和装置
CN113904773A (zh) Ssl连接建立方法、装置、电子设备及计算机可读存储介质
CN113206738A (zh) 一种数字证书管理方法和装置
CN111614660A (zh) 安全验证缺陷检测的方法、装置以及电子设备
CN113626873B (zh) 鉴权方法、装置、电子设备和计算机可读介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20861933

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2022504261

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2020861933

Country of ref document: EP

Effective date: 20220404