A kind of intelligent terminal, discrimination method and identification system for data interaction
Technical field
The present invention relates to network technique field more particularly to it is a kind of for the intelligent terminal of data interaction, discrimination method and
Identification system.
Background technique
Block chain is substantially the database of a decentralization, be it is a succession of using cryptography method generate it is associated
Data block contains the information that the whole network is traded in a period of time in each data block.
Decentralization application is deployed on block chain, and the data for being related to digital asset can be stored on block chain, is related to
The trade fair of digital asset variation and block chain interact.
The ownership of digital asset is by digital cipher, address, and for digital signature come what is established, digital cipher is by user
It is formed and stored in a file or simple database, referred to as wallet, is generated simultaneously by the local wallet processing terminal of user
Management.Digital signature can be generated by digital cipher, every is related to digital asset variation or the transaction of intelligent contract calling and all needs
Want an effective signature that could interact with block chain.Therefore it all needs when decentralization application sends transaction through this marchantia
Packet processing terminal generates signature, and then the transaction after signature is sent to block chain again and is subsequent behaviour by local wallet processing terminal
Make.
The prior art can be supported:
Decentralization application request trading signature → local wallet processing terminal is signed → issue particular block chain do it is subsequent
Operation, this process.
But if there are multiple decentralization applications, it is deployed on a plurality of block chain, then these applications send transaction to originally
After ground wallet processing terminal, under prior art frame, local wallet processing terminal can not differentiate which decentralization application is deployed in
On block chain, also transaction can not be just sent to specified block chain.When the signature algorithm of different blocks chain is identical, it is not added
The transaction that carrying out transaction broadcast with distinguishing will also result on different chains is reset.
It needs to find friendship more efficient, safer between a kind of decentralization application and local wallet processing terminal as a result,
Mutual method, to overcome the above problem.
Summary of the invention
Since the transaction that decentralization application is sent to block chain needs local wallet processing terminal to sign, the present invention is real
It applies example and a kind of intelligent terminal, discrimination method and identification system for data interaction is provided, solve to solve by decentralization
The problem of block chain is associated is disposed using with it, decentralization is issued in the transaction after wallet processing terminal is signed
Using specified block chain, so as to correctly handle transaction data.
In order to solve the above-mentioned technical problem, the embodiment of the present invention adopts the following technical solutions:
In a first aspect, being applied to intelligence the present invention provides a kind of data interaction discrimination method based on block chain technology
There is on the intelligent terminal terminal local wallet processing terminal and at least one decentralization application module, feature to exist
In, this method comprises: local wallet processing terminal one decentralization application module of opening, and center is gone according to this
The configuration file for changing application module updates the first block chain information and the signature setting of the local wallet processing terminal;Wherein match
Set the incidence relation including the corresponding block chain network of the decentralization application module in file;The decentralization is answered
Data interaction request is sent to corresponding block chain network with module;The local wallet processing terminal, which intercepts the interaction, asks
It asks, is arranged according to the signature, is digitally signed using interaction request of the private key to interception, and by the friendship of the interception after signature
Mutually request is sent to corresponding block chain network.
Further alternative, the decentralization application module corresponds at least one block chain network, each block link network
Network has the unique block chain ID number generated at random.
It is further alternative, it include the ID of corresponding block chain network in the configuration file and the first block chain information
Number, block chain IP address and port numbers.
Further alternative, the decentralization application module sends data interaction request to corresponding block chain network
Before, further comprise: the local wallet processing terminal accesses answering for the decentralization according to the first block chain information
With the corresponding block chain network of module, the second block chain information is obtained from corresponding block chain network, and by described second
Block chain information is compared with the first block chain information;If comparison result is consistent, allow the decentralization application
Module sends data interaction request;If comparison result is inconsistent, terminates the decentralization application module and send data interaction
Request.
Further alternative, the local wallet processing terminal is according to the block chain IP in the first block chain information
Location and port numbers access the corresponding block chain network of application module of the decentralization.
It is further alternative, the second block chain information is compared with the first block chain information specifically:
Block chain ID number in the second block chain information is compared with the block chain ID number in the first block chain information.
Second aspect, the present invention provides a kind of intelligent terminal, the intelligent terminal have local wallet processing terminal with
And at least one decentralization application module, wherein the decentralization application module has a configuration file, the configuration text
Part includes the incidence relation of the corresponding block chain network of the decentralization application module;The local wallet processing is eventually
End is used to open the decentralization application module, and updates institute according to the configuration file of the decentralization application module
State the first block chain information and the signature setting of local wallet processing terminal;The decentralization application module: it is used for correspondence
Block chain network send data interaction request;The local wallet processing terminal intercepts the interaction request, according to the label
Name setting, is digitally signed, and the interaction request of the interception after signature is sent to using interaction request of the private key to interception
Corresponding block chain network.
Further alternative, the decentralization application module corresponds at least one block chain network, each block link network
Network has the unique block chain ID number generated at random.
It is further alternative, in the configuration file and the first block chain information including corresponding block chain ID number,
Block chain IP address and port numbers.
Further alternative, the local wallet processing terminal is further used for, the decentralization application module to
Before corresponding block chain network sends data interaction request, answering for the decentralization is accessed according to the first block chain information
With the corresponding block chain network of module, the second block chain information is obtained from corresponding block chain network, and by described second
Block chain information is compared with the first block chain information;If comparison result is consistent, allow the decentralization application
Module sends data interaction request;If comparison result is inconsistent, terminates the decentralization application module and send data interaction
Request.
Further alternative, the local wallet processing terminal is according to the block chain IP in the first block chain information
Location and port numbers access the corresponding block chain network of application module of the decentralization;By the second block chain information and institute
State the first block chain information be compared specially by the second block chain information block chain ID number and firstth area
Block chain ID number in block chain information is compared.
The third aspect, the present invention provides a kind of data interaction identification systems based on block chain technology, including at least one
A block chain network, local wallet processing terminal and at least one decentralization application module, the decentralization application module
With a configuration file, the configuration file includes that the decentralization application module is closed with the association of corresponding block chain network
System;The local wallet processing terminal, is used to open the decentralization application module, and according to the decentralization application
The configuration file of module updates the first block chain information and the signature setting of the local wallet processing terminal;The decentralization
Application module: for sending data interaction request to corresponding block chain network;Described in the local wallet processing terminal intercepts
Interaction request is arranged according to the signature, is digitally signed using interaction request of the private key to interception, and by blocking after signature
The interaction request cut is sent to corresponding block chain network.
Further alternative, the decentralization application module corresponds at least one block chain network, the block link network
Unique block chain ID number that network generates at random in creation;It include corresponding in the configuration file and the first block chain information
Block chain ID number, block chain IP address and port numbers.
Further alternative, the local wallet processing terminal is further used for, the decentralization application module to
Before corresponding block chain network sends data interaction request, answering for the decentralization is accessed according to the first block chain information
With the corresponding block chain network of module;The corresponding block chain network provides the second block chain letter to local wallet processing terminal
Breath;The second block chain information is compared by the local wallet processing terminal with the first block chain information;If than
It is consistent compared with result, then allow the decentralization application module to send data interaction request;If comparison result is inconsistent, terminate
The decentralization application module sends data interaction request.
Fourth aspect, the present invention provides a kind of computer storage medium, including instruction, for making computer execute such as the
Method described in one embodiment.
At least one above-mentioned technical solution used in the embodiment of the present invention can reach it is following the utility model has the advantages that
The technical solution provided in the embodiment of the present invention, on the one hand can by decentralization apply with its dispose block chain into
Row association, so that the transaction after wallet processing terminal signature can issue the specified block chain of decentralization application, so as to just
Really processing transaction data;On the other hand, specifically, local wallet processing terminal can automatically recognize away the target area of transaction
Block chain, and based on target block chain update trading signature so that transaction data can accurately be distinguished hand over
Easily broadcast, effectively avoids the transaction on different chains from reusing.
Detailed description of the invention
In order to illustrate more clearly of this specification embodiment or technical solution in the prior art, below will to embodiment or
Attached drawing needed to be used in the description of the prior art is briefly described, it should be apparent that, the accompanying drawings in the following description is only
The some embodiments recorded in this specification embodiment are not paying creative labor for those of ordinary skill in the art
Under the premise of dynamic property, it is also possible to obtain other drawings based on these drawings.
Fig. 1 is for the intelligent terminal provided in an embodiment of the present invention for the data interaction based on block chain technology;
Fig. 2 is for a kind of data interaction discrimination method based on block chain technology provided in an embodiment of the present invention;
Fig. 3 is another data interaction identification system based on block chain technology provided in an embodiment of the present invention.
Specific embodiment
To keep the purposes, technical schemes and advantages of this specification embodiment clearer, have below in conjunction with this specification
The technical solution of this specification embodiment is clearly and completely described in body embodiment and corresponding attached drawing.Obviously, described
Embodiment be only this specification a part of the embodiment, instead of all the embodiments.The embodiment of base in this manual, this
Field those of ordinary skill every other embodiment obtained without making creative work, belongs to this explanation
The range of book embodiment protection.
Below in conjunction with attached drawing, the technical solution that each embodiment of this specification provides is described in detail.
Embodiment one
Fig. 1 is provided in an embodiment of the present invention in a first aspect, a kind of intelligent terminal 1 is provided, at least one block chain
Network carries out data interaction, and each block chain creation generates ID number when creating generation block at random --- ChainID, the intelligent terminal tool
Have:
The application module of the application module 2 of at least one decentralization, each decentralization is configured with portion manifest
Configuration file, configuration file include the incidence relation of the corresponding block chain network of the decentralization application module, at least
ID number, block chain IP address and port numbers (http-provider) including corresponding block chain network, for example, each block
The corresponding ID number of chain network and one group of block chain IP address and port numbers (http-provider).
The local wallet processing terminal 3, which is configured that, is used to open the decentralization application module, and according to this
The configuration file of decentralization application module updates the first block chain information and the signature setting of the local wallet processing terminal,
First block chain information includes at least ID number, block chain IP address and the port numbers (http- of corresponding block chain network
provider);
The decentralization application module: for sending data interaction request to corresponding block chain network;
The local wallet processing terminal intercepts the interaction request, is arranged according to the signature, using private key to interception
Interaction request be digitally signed, and the interaction request after signature is sent to corresponding block chain network.
Further alternative, the decentralization application module corresponds at least one block chain network.
It is further alternative, data interaction request is sent to corresponding block chain network in the decentralization application module
Before, the application module that the local wallet processing terminal accesses the decentralization according to the first block chain information is corresponding
Block chain network, obtains the second block chain information from corresponding block chain network, and by the second block chain information with
The first block chain information is compared;If comparison result is consistent, the decentralization application module is allowed to send data
Interaction request;If comparison result is inconsistent, terminates the decentralization application module and send data interaction request.
Wherein, the local wallet processing terminal according in the first block chain information block chain IP address and port
Number (http-provider) accesses the corresponding block chain network of application module of the decentralization;From corresponding block link network
The second block chain information is obtained in network, by the ID number of the block chain network in the second block chain information and firstth area
Block chain ID number in block chain information is compared, and is judged whether consistent.
Embodiment two
Fig. 2 is second aspect provided in an embodiment of the present invention, provides a kind of data interaction based on block chain technology and distinguishes
Knowledge method is applied to intelligent terminal, has local wallet processing terminal and at least one decentralization on the intelligent terminal
Application module, carry out data interaction at least one block chain, when each block chain creation wound generation block generates ID at random
Number --- the application module of ChainID, each decentralization are configured with portion manifest configuration file, and configuration file includes institute
The incidence relation for stating the corresponding block chain network of decentralization application module, including at least the ID of corresponding block chain network
Number, block chain IP address and port numbers (http-provider);The described method includes:
The local wallet processing terminal opens a decentralization application module, and according to the decentralization application
The configuration file of module updates the first block chain information and the signature setting of the local wallet processing terminal;Wherein configuration file
In include the corresponding block chain network of the decentralization application module incidence relation;
The decentralization application module sends data interaction request to corresponding block chain network;
The local wallet processing terminal intercepts the interaction request, is arranged according to the signature, using private key to interception
Interaction request be digitally signed, and the interaction request after signature is sent to corresponding block chain network.
Further alternative, the decentralization application module corresponds at least one block chain network, each block link network
Network has the unique block chain ID number generated at random;
Including the ID number of corresponding block chain network, block chain IP in the configuration file and the first block chain information
Location and port numbers.
It is further alternative, data interaction request is sent to corresponding block chain network in the decentralization application module
Before, the application module that the local wallet processing terminal accesses the decentralization according to the first block chain information is corresponding
Block chain network, obtains the second block chain information from corresponding block chain network, and by the second block chain information with
The first block chain information is compared;If comparison result is consistent, the decentralization application module is allowed to send data
Interaction request;If comparison result is inconsistent, terminates the decentralization application module and send data interaction request.
Wherein, the local wallet processing terminal according in the first block chain information block chain IP address and port
The corresponding block chain network of application module of number access decentralization;Secondth area is obtained from corresponding block chain network
Block chain information, by the block in the ID number of the block chain network in the second block chain information and the first block chain information
Chain ID number is compared, and is judged whether consistent.
Embodiment three
Fig. 3 is the third aspect provided in an embodiment of the present invention, provides a kind of data interaction based on block chain technology and distinguishes
Knowledge system, the application module including at least one block chain network 4, local wallet processing terminal and at least one decentralization;
The application module of the application module 2 of at least one decentralization, each decentralization is configured with portion manifest
Configuration file, configuration file include the incidence relation of the corresponding block chain network of the decentralization application module, at least
ID number, block chain IP address and port numbers (http-provider) including corresponding block chain network;
The local wallet processing terminal 3, which is configured that, is used to open the decentralization application module, and according to this
The configuration file of decentralization application module updates the first block chain information and the signature setting of the local wallet processing terminal,
First block chain information includes at least ID number, block chain IP address and the port numbers (http- of corresponding block chain network
provider);
The decentralization application module: for sending data interaction request to corresponding block chain network;
The local wallet processing terminal intercepts the interaction request, is arranged according to the signature, using private key to interception
Interaction request be digitally signed, and the interaction request of the interception after signature is sent to corresponding block chain network.
Further alternative, the decentralization application module corresponds at least one block chain network, each block link network
Network has the unique block chain ID number generated at random;
Including the ID number of corresponding block chain network, block chain IP in the configuration file and the first block chain information
Location and port numbers.
It is further alternative, data interaction request is sent to corresponding block chain network in the decentralization application module
Before, the application module that the local wallet processing terminal accesses the decentralization according to the first block chain information is corresponding
Block chain network, obtains the second block chain information from corresponding block chain network, and by the second block chain information with
The first block chain information is compared;If comparison result is consistent, the decentralization application module is allowed to send data
Interaction request;If comparison result is inconsistent, terminates the decentralization application module and send data interaction request.
Wherein, the local wallet processing terminal according in the first block chain information block chain IP address and port
The corresponding block chain network of application module of number access decentralization;Secondth area is obtained from corresponding block chain network
Block chain information, by the block in the ID number of the block chain network in the second block chain information and the first block chain information
Chain ID number is compared, and is judged whether consistent.
Example IV
This specification embodiment also provides a kind of computer readable storage medium, the computer-readable recording medium storage
One or more programs, one or more of programs are when the electronic equipment for being included multiple application programs executes, so that institute
It states electronic equipment and executes method described in embodiment two.Details are not described herein.
Wherein, the computer readable storage medium, such as read-only memory (Read-Only Memory, ROM), at random
Access memory (Random Access Memory, RAM), magnetic or disk etc..
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability
It include so that the process, method, commodity or the equipment that include a series of elements not only include those elements, but also to wrap
Include other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic want
Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including described want
There is also other identical elements in the process, method of element, commodity or equipment.
Various embodiments are described in a progressive manner in this specification embodiment, identical phase between each embodiment
As partially may refer to each other, each embodiment focuses on the differences from other embodiments.Especially for
For system embodiment, since it is substantially similar to the method embodiment, so being described relatively simple, related place is referring to method
The part of embodiment illustrates.