Data processing method and device based on block chain and electronic equipment
1. A data processing method based on block chains is applied to a management platform, and the management platform is used for managing a block chain service network consisting of a plurality of block chains; the block chain service network provides a block chain evidence storage service for a user; a plurality of block chains forming the block chain service network respectively correspond to different service areas; the method comprises the following steps:
receiving a query request aiming at service data sent by the user terminal; the query request comprises the evidence storage information of the service data; the certificate storage information comprises: the returned receipt of the data after the data is stored with the certificate;
responding to the query request, and determining whether the certificate storing information carries identification information of a service area;
if so, sending the query request to node equipment in a block chain corresponding to the service area indicated by the identification information so as to query service data corresponding to the receipt;
and if not, sending the query request to the node equipment in the block chain corresponding to the target service area allocated to the user so as to query the service data corresponding to the certificate receipt.
2. The method of claim 1, further comprising:
receiving service data sent by a user terminal and user information of a user;
determining a target service area corresponding to the user based on the user information;
determining a block chain corresponding to the target service area in the block chain service network as a target block chain for providing block chain service for the user;
and sending the service data to the node equipment of the target block chain so as to store the service data on the target block chain.
3. The method of claim 2, further comprising:
receiving a receipt returned by the node equipment of the target block chain and corresponding to the service data;
and splicing the identification information of the target service area corresponding to the user with the certificate receipt and then returning the spliced identification information to the user terminal.
4. The method of claim 2, wherein the user information comprises identification information corresponding to a service area allocated to the user; or, the user information includes user identification information for inquiring a service area allocated to the user.
5. The method of claim 2, further comprising:
receiving a service request which is sent by the user terminal and corresponds to the block link credit storage service;
in response to the service request, allocating a service area for the user upon determining that the user has completed a service purchase payment corresponding to the blockchain credentialing service.
6. The method of claim 1, the management platform comprising a cloud service management platform; the plurality of block chains comprise block chains constructed based on cloud storage resources managed by the cloud service management platform.
7. A data processing method based on block chains is applied to a management platform, and the management platform is used for managing a block chain service network consisting of a plurality of block chains; the block chain service network provides a block chain evidence storage service for a user; a plurality of block chains forming the block chain service network respectively correspond to different service areas; the method comprises the following steps:
receiving a service request which is sent by a user terminal of a user and corresponds to a block chain credit card storage service;
in response to the service request, allocating a service area for the user upon determining that the user has completed a service purchase payment corresponding to a blockchain credentialing service;
when receiving service data sent by a user terminal of the user, searching the service area allocated to the user, and sending the service data to a node device of a target block chain corresponding to the service area so as to store the service data on the target block chain.
8. The method of claim 7, further comprising:
receiving a receipt returned by the node equipment of the target block chain and corresponding to the service data;
and splicing the identification information of the target service area corresponding to the user with the certificate receipt and then returning the spliced identification information to the user terminal.
9. The method of claim 7, further comprising:
receiving a query request aiming at the service data sent by the user terminal; the query request comprises the evidence storage information of the service data; the certificate storage information comprises: the returned receipt of the data after the data is stored with the certificate;
responding to the query request, and determining whether the certificate storing information carries identification information of a service area;
if so, sending the query request to node equipment in a block chain corresponding to the service area indicated by the identification information so as to query service data corresponding to the receipt;
and if not, sending the query request to the node equipment in the block chain corresponding to the target service area allocated to the user so as to query the service data corresponding to the certificate receipt.
10. The method of claim 7, the management platform comprising a cloud service management platform; the plurality of block chains comprise block chains constructed based on cloud storage resources managed by the cloud service management platform.
11. A data processing device based on block chains is applied to a management platform, and the management platform is used for managing a block chain service network consisting of a plurality of block chains; the block chain service network provides a block chain evidence storage service for a user; a plurality of block chains forming the block chain service network respectively correspond to different service areas; the device comprises:
a receiving module, configured to receive a query request for service data sent by the user terminal; the query request comprises the evidence storage information of the service data; the certificate storage information comprises: the returned receipt of the data after the data is stored with the certificate;
a determining module, configured to determine, in response to the query request, whether the certificate storing information carries identification information of a service area;
the query module is used for sending the query request to the node equipment in the block chain corresponding to the service area indicated by the identification information if the service area is the same as the service area indicated by the identification information, so as to query the service data corresponding to the receipt; and if not, sending the query request to the node equipment in the block chain corresponding to the target service area allocated to the user so as to query the service data corresponding to the certificate receipt.
12. The apparatus of claim 11, the receiving module is further configured to receive service data sent by a user terminal and user information of a user;
the determining module is further configured to determine a target service area corresponding to the user based on the user information; determining a block chain corresponding to the target service area in the block chain service network as a target block chain for providing block chain service for the user;
the device further comprises:
and the sending module is used for sending the service data to the node equipment of the target block chain so as to store the service data on the target block chain.
13. The apparatus of claim 12, the apparatus further comprising:
a return module, configured to receive a receipt returned by the node device of the target block chain and corresponding to the service data; and splicing the identification information of the target service area corresponding to the user with the certificate receipt and then returning the spliced identification information to the user terminal.
14. The apparatus of claim 12, the user information comprising identification information corresponding to a service area allocated to the user; or, the user information includes user identification information for inquiring a service area allocated to the user.
15. The apparatus of claim 12, the apparatus further comprising:
the distribution module is used for receiving a service request which is sent by the user terminal and corresponds to the block link credit storage service; in response to the service request, allocating a service area for the user upon determining that the user has completed a service purchase payment corresponding to the blockchain credentialing service.
16. The apparatus of claim 11, the management platform comprising a cloud service management platform; the plurality of block chains comprise block chains constructed based on cloud storage resources managed by the cloud service management platform.
17. A data processing device based on block chains is applied to a management platform, and the management platform is used for managing a block chain service network consisting of a plurality of block chains; the block chain service network provides a block chain evidence storage service for a user; a plurality of block chains forming the block chain service network respectively correspond to different service areas; the device comprises:
the receiving module is used for receiving a service request which is sent by a user terminal of a user and corresponds to the block chain evidence storage service;
the allocation module is used for responding to the service request, and allocating a service area for the user when the user is determined to complete service purchase payment corresponding to the blockchain credit card service;
and the sending module is used for searching the service area allocated to the user when receiving the service data sent by the user terminal of the user, and sending the service data to the node equipment of the target block chain corresponding to the service area so as to store and verify the service data on the target block chain.
18. The apparatus of claim 17, the apparatus further comprising:
a return module, configured to receive a receipt returned by the node device of the target block chain and corresponding to the service data; and splicing the identification information of the target service area corresponding to the user with the certificate receipt and then returning the spliced identification information to the user terminal.
19. The apparatus of claim 17, the apparatus further comprising:
the query module is used for receiving a query request aiming at the service data sent by the user terminal; the query request comprises the evidence storage information of the service data; the certificate storage information comprises: the returned receipt of the data after the data is stored with the certificate; responding to the query request, and determining whether the certificate storing information carries identification information of a service area; if so, sending the query request to node equipment in a block chain corresponding to the service area indicated by the identification information so as to query service data corresponding to the receipt; and if not, sending the query request to the node equipment in the block chain corresponding to the target service area allocated to the user so as to query the service data corresponding to the certificate receipt.
20. The apparatus of claim 17, the management platform comprising a cloud service management platform; the plurality of block chains comprise block chains constructed based on cloud storage resources managed by the cloud service management platform.
21. An electronic device, comprising:
a processor;
a memory for storing processor-executable instructions; wherein the processor implements the method of any one of claims 1-6 by executing the executable instructions.
22. An electronic device, comprising:
a processor;
a memory for storing processor-executable instructions; wherein the processor implements the method of any one of claims 7-10 by executing the executable instructions.
Background
The block chain technology, also called distributed ledger technology, is an emerging technology in which several computing devices participate in "accounting" together, and a complete distributed database is maintained together. The blockchain technology has been widely used in many fields due to its characteristics of decentralization, transparency, participation of each computing device in database records, and rapid data synchronization between computing devices.
Disclosure of Invention
According to a first aspect of the present description, there is provided a data processing method based on blockchains, the method being applied to a management platform, the management platform being configured to manage a blockchain service network composed of a plurality of blockchains; the block chain service network provides a block chain evidence storage service for a user; the method comprises the following steps:
receiving service data sent by a user terminal and user information of a user;
determining a target block chain for providing block chain service for the user from the block chain service network based on the user information;
and sending the service data to the node equipment of the target block chain so as to store the service data on the target block chain.
Optionally, a plurality of block chains forming the block chain service network correspond to different service areas respectively;
determining a target blockchain for providing blockchain service for the user from the blockchain service network based on the user information, comprising:
determining a target service area corresponding to the user based on the user information;
and determining a block chain corresponding to the target service area in the block chain service network as a target block chain for providing block chain service for the user.
Optionally, the user information includes identification information corresponding to a service area allocated to the user; or, the user information includes user identification information for inquiring a service area allocated to the user.
Optionally, the method further includes:
receiving a service request which is sent by the user terminal and corresponds to the block link credit storage service;
in response to the service request, allocating a service area for the user upon determining that the user has completed a service purchase payment corresponding to the blockchain credentialing service.
Optionally, the management platform includes a cloud service management platform; the plurality of block chains comprise block chains constructed based on cloud storage resources managed by the cloud service management platform.
Optionally, the method further includes:
receiving a receipt returned by the node equipment of the target block chain and corresponding to the service data;
and splicing the identification information of the target service area corresponding to the user with the certificate receipt and then returning the spliced identification information to the user terminal.
Optionally, the method further includes:
receiving a query request aiming at the service data sent by the user terminal; the query request comprises the evidence storage information of the service data;
responding to the query request, analyzing the certificate storing information of the service data, and determining whether the certificate storing information carries identification information of a service area;
when the identification information of the service area is determined to be carried in the evidence storage information, the query request is sent to the node equipment in the block chain corresponding to the service area indicated by the identification information, the service data is queried by the node equipment based on the evidence storage receipt carried in the evidence storage information of the service data, the query result is returned to the management platform, and the management platform further returns the query result to the user terminal;
and when the evidence storing information is determined not to carry the identification information of the service area, sending the query request to the node equipment in the block chain corresponding to the target service area allocated to the user, so that the node equipment queries the service data based on the evidence storing receipt carried in the evidence storing information of the service data, and returning the query result to the management platform, and the management platform further returns the query result to the user terminal.
According to a second aspect of the present specification, there is provided a blockchain-based data processing apparatus, the apparatus being applied to a management platform for managing a blockchain service network composed of a plurality of blockchains; the block chain service network provides a block chain evidence storage service for a user; the device comprises:
the receiving module is used for receiving the service data sent by the user terminal and the user information of the user;
a determining module, configured to determine, from the blockchain service network, a target blockchain for providing a blockchain service for the user based on the user information;
and the sending module is used for sending the service data to the node equipment of the target block chain so as to store the service data on the target block chain.
Optionally, a plurality of block chains forming the block chain service network correspond to different service areas respectively;
the determining module is used for determining a target service area corresponding to the user based on the user information; and determining a block chain corresponding to the target service area in the block chain service network as a target block chain for providing block chain service for the user.
Optionally, the user information includes identification information corresponding to a service area allocated to the user; or, the user information includes user identification information for inquiring a service area allocated to the user.
Optionally, the apparatus further comprises:
the distribution module is used for receiving a service request which is sent by the user terminal and corresponds to the block link credit storage service; in response to the service request, allocating a service area for the user upon determining that the user has completed a service purchase payment corresponding to the blockchain credentialing service.
Optionally, the management platform includes a cloud service management platform; the plurality of block chains comprise block chains constructed based on cloud storage resources managed by the cloud service management platform.
Optionally, the apparatus further comprises:
a return module, configured to receive a receipt returned by the node device of the target block chain and corresponding to the service data; and splicing the identification information of the target service area corresponding to the user with the certificate receipt and then returning the spliced identification information to the user terminal.
Optionally, the apparatus further comprises:
the query module is used for receiving a query request aiming at the service data sent by the user terminal; the query request comprises the evidence storage information of the service data; responding to the query request, analyzing the certificate storing information of the service data, and determining whether the certificate storing information carries identification information of a service area; when the identification information of the service area is determined to be carried in the evidence storage information, the query request is sent to the node equipment in the block chain corresponding to the service area indicated by the identification information, the service data is queried by the node equipment based on the evidence storage receipt carried in the evidence storage information of the service data, the query result is returned to the management platform, and the management platform further returns the query result to the user terminal; and when the evidence storing information is determined not to carry the identification information of the service area, sending the query request to the node equipment in the block chain corresponding to the target service area allocated to the user, so that the node equipment queries the service data based on the evidence storing receipt carried in the evidence storing information of the service data, and returning the query result to the management platform, and the management platform further returns the query result to the user terminal.
According to a third aspect of the present specification, there is provided an electronic apparatus comprising:
a processor;
a memory for storing processor-executable instructions; and the processor executes the executable instructions to realize the data processing method based on the block chain.
As can be seen from the above description, the management platform may allocate, in the multiple block chains, a block chain for performing service processing to the user based on the user information of the user in the case that the user does not perceive, thereby implementing the data processing method in which the multiple block chains are combined without perception of the user.
For a user, although the bottom layer implementation is a plurality of block chains, the complexity of joint use of the plurality of block chains is shielded through the management platform, so that the user can perform read-write operation on a multi-chain environment as if one chain is used.
Drawings
FIG. 1 is a schematic diagram of a blockchain system shown in an exemplary embodiment of the present description;
FIG. 2 is a flow chart illustrating a method of data processing based on blockchains in accordance with an exemplary embodiment of the present description;
FIG. 3 is a flow chart illustrating a business data query method in an exemplary embodiment of the present description;
fig. 4 is a schematic diagram illustrating a block chain-based service data certification method according to an exemplary embodiment of the present specification;
fig. 5 is a schematic diagram illustrating a service query method based on a blockchain according to an exemplary embodiment of the present disclosure;
FIG. 6 is a diagram illustrating a hardware configuration of an electronic device in accordance with an exemplary embodiment of the present disclosure;
fig. 7 is a block diagram of a data processing apparatus based on a blockchain according to an exemplary embodiment of the present disclosure.
Detailed Description
It should be noted that: in other embodiments, the steps of the corresponding methods are not necessarily performed in the order shown and described herein. In some other embodiments, the method may include more or fewer steps than those described herein. Moreover, a single step described in this specification may be broken down into multiple steps for description in other embodiments; multiple steps described in this specification may be combined into a single step in other embodiments.
Before introducing this solution, the lower blockchain technique is introduced.
Blockchains are generally divided into three types: public chain (Public Blockchain), Private chain (Private Blockchain) and alliance chain (Consortium Blockchain). Furthermore, there may be a combination of the above types, such as private chain + federation chain, federation chain + public chain, and so on.
Among them, the most decentralized is the public chain. The public chain is represented by bitcoin and ether house, and participants (also called nodes in the block chain) joining the public chain can read data records on the chain, participate in transactions, compete for accounting rights of new blocks, and the like. Moreover, each node can freely join or leave the network and perform related operations.
Private chains are the opposite, with the network's write rights controlled by an organization or organization and the data read rights specified by the organization. Briefly, a private chain may be a weakly centralized system with strict restrictions on nodes and a small number of nodes. This type of blockchain is more suitable for use within a particular establishment.
A federation chain is a block chain between a public chain and a private chain, and "partial decentralization" can be achieved. Each node in a federation chain typically has a physical organization or organization corresponding to it; the nodes are authorized to join the network and form a benefit-related alliance, and block chain operation is maintained together.
Based on the basic characteristics of a blockchain, a blockchain is usually composed of several blocks. The time stamps corresponding to the creation time of the block are recorded in the blocks respectively, and all the blocks form a time-ordered data chain according to the time stamps recorded in the blocks strictly.
The real data generated by the physical world can be constructed into a standard transaction (transaction) format supported by a block chain, then is issued to the block chain, the node equipment in the block chain performs consensus processing on the received transaction, and after the consensus is achieved, the node equipment serving as an accounting node in the block chain packs the transaction into a block and performs persistent evidence storage in the block chain.
The consensus algorithm supported in the blockchain may include:
the first kind of consensus algorithm, namely the consensus algorithm that the node device needs to contend for the accounting right of each round of accounting period; consensus algorithms such as Proof of Work (POW), Proof of equity (POS), Proof of commission rights (DPOS), etc.;
the second kind of consensus algorithm, namely the consensus algorithm which elects accounting nodes in advance for each accounting period (without competing for accounting right); for example, a consensus algorithm such as a Practical Byzantine Fault Tolerance (PBFT) is used.
In a blockchain network employing a first type of consensus algorithm, node devices competing for billing rights can execute a transaction upon receipt. One of the node devices competing for the accounting right may win in the process of competing for the accounting right in the current round, and become an accounting node. The accounting node may package the received transaction with other transactions to generate a latest block and send the generated latest block or a block header of the latest block to other node devices for consensus.
In the block chain network adopting the second type of consensus algorithm, the node equipment with the accounting right is agreed before accounting in the current round. Thus, the node device, after receiving the transaction, may send the transaction to the accounting node if it is not the accounting node of its own round. For the accounting node of the current round, the transaction may be performed during or before packaging the transaction with other transactions to generate the latest block. After generating the latest block, the accounting node may send the latest block or a block header of the latest block to other node devices for consensus.
As described above, regardless of which consensus algorithm is used by the blockchain, the accounting node of the current round may pack the received transaction to generate the latest block, and send the generated latest block or the block header of the latest block to other node devices for consensus verification. If no problem is verified after other node equipment receives the latest block or the block header of the latest block, the latest block can be added to the tail of the original block chain, so that the accounting process of the block chain is completed. The transaction contained in the block may also be performed by other nodes in verifying the new block or block header sent by the accounting node.
Referring to fig. 1, fig. 1 is a schematic diagram of a blockchain system according to an exemplary embodiment of the present disclosure.
The block chain system comprises: a management platform and a plurality of block chains.
The plurality of block chains form a block chain service network, and the block chain service network can provide various block chain services for users. Such as a chain of blocks' evidence storage service, etc.
The management platform can be used for managing the block chain service network. The management platform may interface with a user terminal, which may use blockchain services through the management platform. For example, the management platform may be a BaaS (block chain as a Service) platform. This is merely an example and is not particularly limited.
Specifically, the management platform can be in butt joint with the user terminal through the upper-layer service, so that the user terminal can establish a platform account on the management platform and carry out operations such as purchase and management of the block chain service.
For example, the upper layer service and the user terminal may adopt a BS (Browser/Server) architecture, and the upper layer service provides a Web page for the user terminal. The user can create a platform account on the management platform based on the Web page, and purchase and manage the block chain service.
Of course, the upper layer service and the user terminal may also adopt a CS (Client/Server) architecture. And the user interacts with the upper-layer service through the client of the user terminal to realize the purchase and management of the block chain service.
In addition, the management platform can also forward the interactive data of the user to different block chains for processing through the bottom layer service.
By adopting the structure, the user is made to perceive the blockchain service network providing the blockchain service through the upper layer service, and the distribution of the user service data in a plurality of blockchains can be realized through the lower layer service, so that the user has no perception that a background has a plurality of blockchains.
In addition, the management platform may be built by a single physical device, or may be built by a plurality of physical devices. For example, the upper layer service of the management platform may be built by an OC (open chain) platform, and the lower layer service may be built by a gateway device interfacing with a plurality of block chains, where the building of the management platform is only exemplarily described and is not specifically limited.
The block chain-based data processing method provided by the present specification is exemplarily described below from both the platform account creation and the data processing.
1) Platform account creation
When the method is implemented, a user can send a platform account creation request to the management platform through the user terminal. After receiving the platform account creation request sent by the user terminal, the management platform can create a platform account for the user on the management platform.
When creating a platform account, the management platform may assign a platform account identifier to the user terminal and assign key information to the user account. The key information may include: a public key and a private key.
The management platform can return the platform account identifier and the key information distributed for the user to the user terminal, so that the user terminal adopts the platform account identifier and the key information as a certificate for using the management platform to perform service processing.
The user account identification is used for identifying a platform account created for the user.
And the key information distributed to the user account is used for verifying and signing the message sent by the user by the management platform so as to ensure the legality of the user identity.
2) Block chain based data processing
Referring to fig. 2, fig. 2 is a flowchart illustrating a method for processing data based on blockchains according to an exemplary embodiment of the present disclosure, where the method is applicable to a management platform for managing a blockchain service network composed of a plurality of blockchains; the block chain service network provides a block chain credit service for users, and the method can comprise the following steps.
Step 202: and the management platform receives the service data sent by the user terminal and the user information of the user.
When the method is realized, when a user needs to use the certificate storing service of the block chain, the user can send a certificate storing request to the management platform through the user terminal. The certificate storing request carries service data to be stored and user information.
When sending, the user terminal can sign the certificate storing request by using the private key returned by the management platform, and send the signature and the certificate storing request to the management platform. The management platform can verify the signature by adopting a public key corresponding to the private key, and respond to the certificate storage request after the signature passes the verification.
Of course, the user terminal may also send a transaction including the service data to be stored, and the management platform forwards the transaction to the node of the block chain after determining the target block chain corresponding to the user information.
Step 204: and the management platform determines a target block chain for providing the block chain service for the user from the block chain service network based on the user information.
In the embodiment of the present specification, since the management platform manages the blockchain service network composed of a plurality of blockchains, the management of the blockchains is facilitated. The management platform creates a plurality of service areas and records at least one block chain included in each service area. After the user purchases the blockchain service, the management platform can allocate a service area corresponding to the user for the user, and provide the blockchain service for the user by using the blockchain in the service area.
Specifically, the user terminal may send a service request corresponding to the blockchain credit card service to the management platform.
After receiving a service request sent by a user terminal, the management platform may respond to the service request and allocate a service area to the user when determining that the user completes service purchase payment corresponding to the block chaining evidence storage service.
For example, the service area may be divided into geographical areas. Such as service areas including: eastern China, southern China, northeast China, and the like. Each service area corresponds to at least one block chain.
After the user purchases the blockchain service, the management platform may allocate a service area matching the location of the user to the user according to the location of the user.
For example, if the user is located in the state of hangzhou, the service area allocated to the user is the east china area.
Of course, the management platform may also allocate the service area to the user in other manners, for example, the management platform may allocate the service area with the lowest current load to the user, and of course, the management platform may also allocate the service area specified by the user to the user.
Here, the allocation of the service area to the user by the management platform is only exemplarily described, and is not specifically limited.
After determining the service area allocated to the user, the management platform may record a correspondence between a user identifier (such as a user account identifier) and the service area.
Based on this, step 204 is described in detail below through step 2041 to step 2042.
Step 2041: the management platform determines a target service area corresponding to each user based on the user information in the service area allocated to the user.
The user information may be user identification information used for querying a service area allocated to the user, such as a platform account identifier of the user, and the management platform may search the service area allocated to the user based on the platform account identifier of the user. Of course, the user information may also be identification information of a service area allocated to the user, and the user information is only exemplarily illustrated here and is not specifically limited.
In an alternative implementation, the user information is user identification information for querying a service area allocated to the user, such as a platform account identification of the user. The management platform can determine a service area corresponding to the user platform account identifier in the corresponding relationship between the locally stored user platform account identifier and the service area, and the service area is used as a target service area. And if the platform account identification corresponds to a plurality of service areas, taking a default service area in the plurality of service areas or a service area firstly allocated to the user as a target service area.
In another optional implementation manner, the user information includes identification information corresponding to a service area allocated to the user, and the management platform may determine the service area indicated by the identification information as a target service area.
Step 2042: the management platform may determine a blockchain corresponding to the target service area in the blockchain service network as a target blockchain providing blockchain service for the user.
When the block chain corresponding to the target service area is a block chain, the management platform can determine the block chain as a target block chain.
When the block chain corresponding to the target service area is a plurality of block chains, the management platform may use a default block chain or a block chain with the smallest load as the target block chain.
Of course, in practical applications, the management platform may also directly allocate a block chain to the user and base the block chain allocated to the user. When receiving the service data and the user information sent by the user terminal, the target block chain for providing the block chain service for the user from the block chain service network can be determined directly based on the user information.
Here, the determination method of the target blockchain is only exemplified and not specifically limited.
Step 206: and the management platform sends the service data to the node equipment of the target block chain so as to store and verify the service data on the target block chain.
In an optional implementation manner, when the user terminal sends a yes authentication deposit request to the management platform, the management platform may construct a first transaction based on the service data in the authentication deposit request, and send the first transaction to the node device of the target blockchain, so that the node device of the target blockchain deposits the service data on the target blockchain.
In another optional implementation manner, when the user terminal sends a second transaction carrying service data to be certified to the management platform, the management platform may send the second transaction to the node device of the target block chain, so that the node device of the target block chain certifies the service data on the target block chain.
In addition, in this specification, since the management platform manages a plurality of block chains, the management platform stores the service data sent by the user terminal in the block chain included in the target service area matched with the user terminal, so as to facilitate the user terminal to query the service data stored in the block chain. The management platform not only returns the receipt of the business data to the user terminal, but also returns the identification of the target service area corresponding to the user terminal.
During implementation, when receiving the certificate receipt corresponding to the service data returned by the node device of the target block chain, the management platform may splice the identification information of the target service area corresponding to the user with the certificate receipt, and return the spliced certificate receipt to the user terminal.
For example, the node device of the target block chain returns a certificate receipt carrying a hash. Assume that the identification information of the target service area is domain1.
After receiving the certificate receipt returned by the node device of the target block chain, the management platform can splice domain1 with the hash to obtain the certificate receipt of the domain1. hash. And then the receipt with the 'domain 1. hash' is returned to the user terminal as the certificate storage information.
In addition, in this specification, after the user has certified the service data on the blockchain through the management platform, the user may also query the certified service data on the blockchain through the management platform.
The service data query method is described in detail below with reference to fig. 3.
Referring to fig. 3, fig. 3 is a flowchart illustrating a business data query method according to an exemplary embodiment of the present disclosure, which may be applied to a management platform and may include the following steps.
Step 302: a management platform receives a query request aiming at the service data sent by the user terminal; the query request comprises the evidence storage information of the service data.
As can be seen from the foregoing, after receiving the receipt spliced with the target service area identifier, the user terminal may analyze the receipt, and obtain the receipt before splicing and the target service area identifier carried by the spliced receipt. Therefore, the user can obtain the evidence storage information such as the evidence storage receipt of the business data, the target service area identification and the like.
Since the user can know in which block chain of the service area the service data certificate is stored, when the user inquires the service data of the certificate, the user can inquire the service data stored by the user based on the certificate storage receipt, or the certificate storage receipt and the target service area identifier, and the like, and can also inquire the service data of other user certificates through the certificate storage receipt and the service area identifier.
When the user wants to inquire the service data, the user terminal can construct an inquiry request aiming at the service data based on the certificate storing information of the service data. The certificate storage information may only carry a certificate storage receipt, or may also carry a certificate storage receipt and service area identification information. Here, the certification information is merely exemplary and is not particularly limited.
Then, the user terminal can sign the query request by using a private key returned by the management platform, and return the signed query request to the management platform.
The management platform can verify the signature by adopting a public key corresponding to the private key, and respond to the query request after the signature passes the verification.
Step 304: and the management platform responds to the query request, analyzes the certificate storing information of the service data and determines whether the certificate storing information carries the identification information of the service area.
Step 306: when the management platform determines that the certificate storage information carries identification information of a service area, the management platform sends the query request to the node equipment in the block chain corresponding to the service area indicated by the identification information, so that the node equipment queries the service data based on the certificate storage receipt carried in the certificate storage information of the service data, and returns the query result to the management platform, and the management platform further returns the query result to the user terminal.
Step 308: and when the management platform determines that the certificate storage information does not carry identification information of a service area, the management platform sends the query request to the node equipment corresponding to the target service area allocated to the user, so that the node equipment queries the service data based on the certificate storage receipt carried in the certificate storage information of the service data, and returns the query result to the management platform, and the management platform further returns the query result to the user terminal.
When the verification is successful, the management platform can respond to the query request, analyze the certificate storage information of the service data, determine whether the certificate storage information carries the identification information of the service area, and acquire the certificate storage receipt carried by the certificate storage information.
And if the certificate storing information carries identification information of the service area, sending the query request to the node equipment in the block chain corresponding to the service area indicated by the identification information. And the node equipment in the block chain can inquire the service data based on the evidence receipt and return the service data to the management platform. The management platform can return the inquired service data to the user terminal.
And if the certificate storing information does not carry the identification information of the service area, sending the query request to the node equipment in the block chain corresponding to the target service area allocated to the user terminal. And the node equipment in the block chain can inquire the service data based on the evidence receipt and return the service data to the management platform. The management platform can return the inquired service data to the user terminal.
As can be seen from the above description, the management platform may allocate, in the multiple block chains, a block chain for performing service processing to the user based on the user information of the user in the case that the user does not perceive, thereby implementing the data processing method in which the multiple block chains are combined without perception of the user.
For a user, although the bottom layer implementation is a plurality of block chains, the complexity of joint use of the plurality of block chains is shielded through the management platform, so that the user can perform read-write operation on a multi-chain environment as if one chain is used.
In another embodiment, the management platform may be built from an OC platform and a gateway device. The OC platform may be responsible for managing the upper services of the platform as described above. The gateway device may be responsible for the underlying services of the management platform described above.
The following describes an exemplary data processing method based on a block chain, which is provided in this specification, by taking an example in which a physical platform is built up from an OC platform and a gateway device.
Referring to fig. 4, fig. 4 is a schematic diagram illustrating a block chain based service data certification method according to an exemplary embodiment of the present disclosure, where the method may include the following steps.
Step 401: and the user terminal of the user sends a certificate storing request to the gateway equipment.
The credentialing request carries the platform account identification and signature of the user. The signature is obtained by the user terminal by adopting a private key to sign the certificate storing request.
Step 402: and the gateway equipment verifies the signature by adopting a public key corresponding to the private key, and acquires the platform account identifier in the certificate storage request after the verification is passed.
Step 403: the gateway equipment can send a service area query request to the OC platform; the service area query request carries the platform account identifier.
Step 404: the OC platform searches a default service area corresponding to the platform account identification and determines a block chain identification corresponding to the default service area.
Step 405: and the OC platform returns the determined block chain identification to the gateway equipment.
Step 406: and the gateway equipment sends the authentication request to the block chain link point equipment indicated by the block chain identification.
Step 407: and the block chain node equipment stores the business data and returns a storage receipt to the gateway equipment.
Step 408: and the gateway equipment splices the default block chain identification and the evidence storage receipt.
Step 409: and the gateway equipment returns the spliced certificate storage receipt to the user terminal.
Referring to fig. 5, fig. 5 is a schematic diagram illustrating a service query method based on a blockchain according to an exemplary embodiment of the present disclosure, where the method may include the following steps.
Step 501: and the user terminal of the user sends an inquiry request aiming at the service data to the gateway equipment. The inquiry request carries the certificate information of the service data and the signature of the inquiry request.
Step 502: and the gateway equipment checks the signature of the query request, analyzes the certificate storing information after the signature passes the check, and determines whether the certificate storing information carries the identification information of the service area.
Step 503: and if the certificate storage information carries identification information of the first service area, sending the query request to the block link node equipment of the first service area indicated by the identification information.
Step 504: and the block link point equipment of the first service area returns the service data to the user terminal through the gateway.
Step 505: and if the certificate storing information does not carry identification information of the service area, sending a service area query request to the OC platform, wherein the service area query request carries a platform account identification.
Step 506: and the OC platform searches a second service area corresponding to the platform account identification and determines a block chain identification corresponding to the second service area.
And when the platform account identifier corresponds to a plurality of service areas, determining a default service area corresponding to the platform account identifier as a second service area. And when the platform account identification corresponds to a service area, determining the service area as a second service area.
Step 507: and the OC platform returns the block chain identification corresponding to the second service area to the gateway equipment.
Step 508: the gateway device sends the query request to the blockchain link point device indicated by the blockchain identifier.
Step 509: and the block link point equipment in the second service area returns the inquired service data to the user terminal through the gateway.
As can be seen from the above description, the OC platform and the gateway device may allocate, in a plurality of block chains, a block chain for performing service processing to a user based on user information of the user in a case where the user is unaware, thereby implementing a data processing method in which the plurality of block chains are combined without the user awareness.
For a user, although the bottom layer implementation is a plurality of blockchains, the complexity of joint use of the plurality of blockchains is shielded through the OC platform and the gateway device, so that the user can perform transaction reading and writing on a multi-chain environment like using one chain.
Corresponding to the above embodiment of the data processing method based on the blockchain, the present specification also provides an embodiment of a data processing apparatus based on the blockchain.
Corresponding to the above method embodiments, the present specification also provides an embodiment of a data processing apparatus based on a block chain. Embodiments of the block chain based data processing apparatus of the present description may be applied to an electronic device. The device embodiments may be implemented by software, or by hardware, or by a combination of hardware and software. Taking a software implementation as an example, as a logical device, the device is formed by reading, by a processor of the electronic device where the device is located, a corresponding computer program instruction in the nonvolatile memory into the memory for operation. From a hardware aspect, as shown in fig. 6, the block chain-based data processing apparatus in this specification is a hardware structure diagram of an electronic device in which the data processing apparatus is located, and except for the processor, the memory, the network interface, the internal bus, and the nonvolatile memory shown in fig. 6, the electronic device in which the apparatus is located in the embodiment may also include other hardware according to an actual function of the electronic device, which is not described again.
Referring to fig. 7, fig. 7 is a block diagram of a block chain based data processing apparatus according to an exemplary embodiment of the present disclosure, which is applicable to a management platform for managing a block chain service network composed of a plurality of block chains; the block chain service network provides a block chain credit-keeping service for users, and the device can comprise the following modules.
A receiving module 701, configured to receive service data sent by a user terminal and user information of a user;
a determining module 702, configured to determine, from the blockchain service network, a target blockchain for providing a blockchain service for the user based on the user information;
a sending module 703 is configured to send the service data to the node device of the target block chain, so as to store the service data on the target block chain.
Optionally, a plurality of block chains forming the block chain service network correspond to different service areas respectively;
the determining module 702 is configured to determine a target service area corresponding to the user based on the user information; and determining a block chain corresponding to the target service area in the block chain service network as a target block chain for providing block chain service for the user.
Optionally, the user information includes identification information corresponding to a service area allocated to the user; or, the user information includes user identification information for inquiring a service area allocated to the user.
Optionally, the apparatus further comprises:
an allocating module 704 (not shown in fig. 7) configured to receive a service request corresponding to the blockchain credentialing service sent by the user terminal; in response to the service request, allocating a service area for the user upon determining that the user has completed a service purchase payment corresponding to the blockchain credentialing service.
Optionally, the management platform includes a cloud service management platform; the plurality of block chains comprise block chains constructed based on cloud storage resources managed by the cloud service management platform.
Optionally, the apparatus further comprises:
a returning module 705 (not shown in fig. 7) configured to receive a receipt returned by the node device of the target block chain and corresponding to the service data; and splicing the identification information of the target service area corresponding to the user with the certificate receipt and then returning the spliced identification information to the user terminal.
Optionally, the apparatus further comprises:
a query module 706 (not shown in fig. 7) configured to receive a query request for the service data sent by the user terminal; the query request comprises the evidence storage information of the service data; responding to the query request, analyzing the certificate storing identification of the service data, and determining whether the certificate storing information carries identification information of a service area; when the identification information of the service area is determined to be carried in the evidence storage information, the query request is sent to the node equipment in the block chain corresponding to the service area indicated by the identification information, the service data is queried by the node equipment based on the evidence storage receipt carried in the evidence storage information of the service data, the query result is returned to the management platform, and the management platform further returns the query result to the user terminal; and when the evidence storing information is determined not to carry the identification information of the service area, sending the query request to the node equipment in the block chain corresponding to the target service area allocated to the user, so that the node equipment queries the service data based on the evidence storing receipt carried in the evidence storing information of the service data, and returning the query result to the management platform, and the management platform further returns the query result to the user terminal.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. A typical implementation device is a computer, which may take the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email messaging device, game console, tablet computer, wearable device, or a combination of any of these devices.
In a typical configuration, a computer includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic disk storage, quantum memory, graphene-based storage media or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
It should be understood that although the terms first, second, third, etc. may be used in one or more embodiments of the present description to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of one or more embodiments herein. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
The above description is only for the purpose of illustrating the preferred embodiments of the one or more embodiments of the present disclosure, and is not intended to limit the scope of the one or more embodiments of the present disclosure, and any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the one or more embodiments of the present disclosure should be included in the scope of the one or more embodiments of the present disclosure.
- 上一篇:石墨接头机器人自动装卡簧、装栓机
- 下一篇:用于数据交易的密文解析方法及系统