CN110460471A - A kind of super node polling method, device and storage medium - Google Patents

A kind of super node polling method, device and storage medium Download PDF

Info

Publication number
CN110460471A
CN110460471A CN201910757152.9A CN201910757152A CN110460471A CN 110460471 A CN110460471 A CN 110460471A CN 201910757152 A CN201910757152 A CN 201910757152A CN 110460471 A CN110460471 A CN 110460471A
Authority
CN
China
Prior art keywords
node
latitude
super
longitude
distance
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN201910757152.9A
Other languages
Chinese (zh)
Other versions
CN110460471B (en
Inventor
孙大伟
张锦喜
彭奕填
叶亚芳
马利平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Ant Bit Block Chain Technology Co Ltd
Original Assignee
Guangzhou Ant Bit Block Chain Technology Co Ltd
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 Guangzhou Ant Bit Block Chain Technology Co Ltd filed Critical Guangzhou Ant Bit Block Chain Technology Co Ltd
Priority to CN201910757152.9A priority Critical patent/CN110460471B/en
Publication of CN110460471A publication Critical patent/CN110460471A/en
Application granted granted Critical
Publication of CN110460471B publication Critical patent/CN110460471B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/30Decision processes by autonomous network management units using voting and bidding
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources
    • H04L63/107Network architectures or network communication protocols for network security for controlling access to devices or network resources wherein the security policies are location-dependent, e.g. entities privileges depend on current location or allowing specific operations only from locally connected terminals
    • 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/52Network services specially adapted for the location of the user terminal
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Business, Economics & Management (AREA)
  • Computer Security & Cryptography (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • General Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Computer Hardware Design (AREA)
  • Economics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • Technology Law (AREA)
  • Strategic Management (AREA)
  • Marketing (AREA)
  • Development Economics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the present application is designed to provide a kind of super node polling method, device and storage medium, is applied to node, which comprises determines the node and initiates at a distance from the node traded;Judge whether the distance is more than preset distance;If so, node determines itself for super node by can verify that random function campaigns for super node, and after satisfaction can verify that random function requirement.

Description

A kind of super node polling method, device and storage medium
Technical field
This application involves block chain technical fields, in particular to a kind of super node polling method, device and storage Medium.
Background technique
Currently, the choosing method of super node is usually to randomly select, for example, participating in election contest super node from 100 Multiple nodes are randomly selected in node as super node, but this method randomly selected is likely to cause the super section of selection The node that point and transaction are initiated is excessively close, and then causes the problem of practising fraud.
Summary of the invention
The embodiment of the present application is designed to provide a kind of super node polling method, device and storage medium, for solving The node that the super node certainly randomly selected and transaction are initiated is excessively close, and then causes the problem of practising fraud.
To achieve the goals above, it is as follows that this application provides following technical schemes:
First aspect: this application provides a kind of super node polling methods, are applied to node, which comprises
Determine the node at a distance from the node for initiating transaction;
Judge whether the distance is more than preset distance;
If so, the node is by can verify that random function campaigns for super node, and can verify that described in the satisfaction random Determine itself to be super node after function requirements.
The method of above scheme design first passes through determining node and initiates the section of transaction before node campaigns for super node The distance of point is screened, will with the closer knot-removal of nodal distance of initiating transaction, then after removing nearlyr node Super node is chosen in node, the super node for solving selection is asked with the excessively close bring cheating of nodal distance for initiating transaction Topic, so that the selection of super node is more just.
In the optional embodiment of first aspect, the determination node and it is described initiate transaction node away from From, comprising:
It is determined according to the longitude and latitude of the longitude and latitude of the node and the node for initiating transaction by Google S2 algorithm The node is at a distance from the node for initiating transaction.
The method of above scheme design, by Google's S2 distance algorithm come the sky between the calculation of longitude & latitude node according to node Between distance, the algorithm consumption calculation resources it is smaller, meet the performance requirement of node server.
In the optional embodiment of first aspect, trade in the longitude and latitude according to the node and the initiation Node longitude and latitude by Google's S2 algorithm determine the node with it is described initiate transaction node at a distance from before, the side Method further include:
Obtain the longitude and latitude of the node and the longitude and latitude of the node for initiating transaction, the longitude and latitude of the node by The Internet protocol IP address of the node generates, and the longitude and latitude of the node for initiating transaction is by the node for initiating transaction Internet protocol IP address generates.
The method of above scheme design generates the corresponding longitude and latitude of node by the Internet protocol IP address of node, uses Existing IP conversion longitude and latitude method can be achieved with, and operation is fast, and performance is stablized.
In the optional embodiment of first aspect, in the longitude and latitude for obtaining the node and initiation transaction Node longitude and latitude after, the method also includes:
The longitude and latitude of the longitude and latitude of the node and the node for initiating transaction is sent to the verifying on block chain Node;
Receive the verifying node return is proved to be successful information.
The method of above scheme design is verified by verifying node pair warp and weft degree, and reaching prevents data to be tampered Effect.
It is described by can verify that random function campaigns for super node in the optional embodiment of first aspect, and full Become super node after can verify that random function requirement described in foot, comprising:
According to the private key of the node and the new random number of common recognition generating random number received, the common recognition random number by The last round of successful super node of block out is generated when election contest is super node and is broadcasted on block chain;
Judge whether the new random number meets defined numerical requirements;
If so, the public key of the new random number and the node is broadcasted on the block chain, so that institute The node in addition to the node stated on block chain verifies the new random number according to the public key of the node, and It is determined as super node after the node verification success in addition to the node on the block chain.
The method of above scheme design, determines super node by can verify that random function, so that other are saved when verifying Point is without knowing that the private key of the node can achieve the effect that verifying.
In the optional embodiment of first aspect, it is described by the public key of the new random number and the node in institute It states after being broadcasted on block chain, the method also includes:
Block is judged whether to out according to the block agreement that goes out with the super node other than the node;
If so, carrying out out block.
The method of above scheme design, judges whether super node goes out block by going out block agreement, makes to show that block is more fast Speed is convenient.
Second aspect: the application provides a kind of super node election contest device, is applied to node, described device includes:
Determining module, for determining the node at a distance from the node for initiating transaction;
Judgment module, for judging whether the distance is more than preset distance;
Module is campaigned for, for judge the distance more than after preset distance, by can verify that in the judgment module Random function campaigns for super node, and is determined as super node after can verify that random function requirement described in the satisfaction.
The device of above scheme design first passes through determining node and initiates the section of transaction before node campaigns for super node The distance of point is screened, will with the closer knot-removal of nodal distance of initiating transaction, then after removing nearlyr node Super node is chosen in node, the super node for solving selection is asked with the excessively close bring cheating of nodal distance for initiating transaction Topic, so that the selection of super node is more just.
In the optional embodiment of second aspect, the determining module determines the node and the section for initiating transaction The distance of point, comprising:
It is determined according to the longitude and latitude of the longitude and latitude of the node and the node for initiating transaction by Google S2 algorithm The node is at a distance from the node for initiating transaction.
In the optional embodiment of second aspect, described device further includes obtaining module, and the acquisition module is used for The determining module passes through Google S2 algorithm according to the longitude and latitude of the node and the longitude and latitude of the node for initiating transaction Before determining the node at a distance from the node for initiating transaction, the longitude and latitude and the initiation for obtaining the node are handed over The longitude and latitude of the longitude and latitude of easy node, the node is generated by the Internet protocol IP address of the node, the initiation transaction Node longitude and latitude by it is described initiate transaction node Internet protocol IP address generate.
In the optional embodiment of second aspect, described device further includes sending module and receiving module, the transmission Module, for it is described acquisition module obtain the node longitude and latitude and it is described initiate transaction node longitude and latitude it Afterwards, the longitude and latitude of the longitude and latitude of the node and the node for initiating transaction is sent to the verifying node on block chain;
The receiving module, for receive it is described verifying node return be proved to be successful information.
The third aspect: the application also provides a kind of electronic equipment, comprising: processor, memory connected to the processor are deposited Reservoir is stored with the executable machine readable storage medium of processor, and when calculating equipment operation, processor executes the machine Device readable storage medium storing program for executing executes the method in any optional implementation of first aspect, first aspect when executing.
Fourth aspect: the application provides a kind of non-transient computer readable storage medium, the computer readable storage medium On be stored with computer program, when which is run by processor execute first aspect, first aspect it is any optional Implementation in the method.
5th aspect: the application provides a kind of computer program product, and the computer program product is transported on computers When row, so that computer executes the method in any optional implementation of first aspect, first aspect.
Other feature and advantage of the application will be illustrated in subsequent specification, also, partly be become from specification It is clear that being understood and implementing the embodiment of the present application.The purpose of the application and other advantages can be by written Specifically noted structure is achieved and obtained in specification and attached drawing.
Detailed description of the invention
Technical solution in ord to more clearly illustrate embodiments of the present application will make below to required in the embodiment of the present application Attached drawing is briefly described, it should be understood that the following drawings illustrates only some embodiments of the application, therefore should not be seen Work is the restriction to range, for those of ordinary skill in the art, without creative efforts, can be with Other relevant attached drawings are obtained according to these attached drawings.
Fig. 1 is the super node polling method first pass schematic diagram that the application first embodiment provides;
Fig. 2 is the super node polling method second procedure schematic diagram that the application first embodiment provides;
Fig. 3 is the super node polling method third flow diagram that the application first embodiment provides;
Fig. 4 is the 4th flow diagram of super node polling method that the application first embodiment provides;
Fig. 5 is that the super node that the application second embodiment provides campaigns for apparatus structure schematic diagram;
Fig. 6 is the electronic devices structure schematic diagram that the application 3rd embodiment provides.
Specific embodiment
In order to facilitate the understanding of those skilled in the art, the word in the embodiment of the present application is explained and illustrated below.
In several embodiments provided herein, it should be understood that disclosed device and method can also pass through Other modes are realized.The apparatus embodiments described above are merely exemplary, for example, flow chart and block diagram in attached drawing Show the device of multiple embodiments according to the application, the architectural framework in the cards of method and computer program product, Function and operation.In this regard, each box in flowchart or block diagram can represent the one of a module, section or code Part, a part of the module, section or code, which includes that one or more is for implementing the specified logical function, to be held Row instruction.It is also noted that each box in block diagram and or flow chart and the box in block diagram and or flow chart Combination, can be used for executing as defined in the dedicated hardware based system of function or movement realize, or can be with dedicated The combination of hardware and computer instruction is realized.
In addition, each functional module in each embodiment of the application can integrate one independent portion of formation together Point, it is also possible to modules individualism, an independent part can also be integrated to form with two or more modules.
It, can be with if the function is realized and when sold or used as an independent product in the form of software function module It is stored in a computer readable storage medium.Based on this understanding, the technical solution of the application is substantially in other words The part of the part that contributes to existing technology or the technical solution can be embodied in the form of software products, the meter Calculation machine software product is stored in a storage medium, including some instructions are used so that a computer equipment (can be a People's computer, server or network equipment etc.) execute each embodiment the method for the application all or part of the steps.
First embodiment
As shown in Figure 1, the application provides a kind of super node polling method, it is applied to node, which refers to the block Except any one node server for the node for initiating transaction in chain, below with any one node serve except the node for initiating transaction Device is that executing subject executes following methods step, comprising:
Step S100: determine the node at a distance from the node for initiating transaction.
Step S102: judge whether the distance is more than preset distance, if so, going to step S104.
Step S104: the node can verify that described in the satisfaction random by can verify that random function campaigns for super node Determine itself to be super node after function requirements.
What the node of the initiation transaction in above-mentioned steps S100~S104 indicated is the transaction hair in a transaction record Side is played, for example, the node A and node B on block chain have carried out primary transaction, if current transaction is that node A is initiated, that A can be denoted as the node for initiating transaction;Super node is to refer to collect, be packaged, node of the verifying Transaction Information into block; It can verify that random function (Verifiable Random Function, VRF) refers to the Hash letter in conjunction with unsymmetrical key technology Number, such as result=VRF_Hash (SK, info), SK are private keys, info is any one number, the node A on the block chain A result result is generated by private key and info, whether just other nodes on the block chain want verification result result Really, it is only necessary to know that the corresponding public key of the private key SK of this result result, info and node A can be carried out verifying.Separately Outside, what needs to be explained here is that, the super node polling method in the present embodiment does not limit its algorithm of knowing together, such as workload card Bright (Proof of Work, POW), equity prove that (Proof of Stake, POS) and commission equity prove (Delegated Proof of Stake, DPOS) it can be applicable in.
Wherein, what determination node in step S100 indicated at a distance from the node for initiating transaction is determined except the initiation Any one node of transaction node and the space length for initiating the node traded.
Step S102 expression be meant that except the initiation transaction node any one node and initiate transaction node away from Require could participate in campaigning for super node from a certain distance need to be met, in required distance i.e. S102 it is preset away from From meaning of the preset distance expression can be following several situations: first, it can will be nearest with a distance from the initiation transaction node Node distance as the preset distance, express at this time be meant that participate in election contest super node node cannot be from hair The nearest node of the node of transaction is played, for example, the node for initiating transaction is the 5th node in the block chain, by calculating the 6th Node is nearest at a distance from the 5th node, then the node for participating in election contest super node is being somebody's turn to do in addition to the five, the 6th nodes All nodes on block chain;Second, can be set a distance range, the distance range be greater than from the initiation transaction node away from With a distance from nearest node, multiple nodes that certain distance around the node of initiation transaction may occur at this time are removed The qualification of election contest super node is participated in, for example, the node for initiating transaction is the 5th node in the block chain, by calculating the 6th Node is nearest at a distance from the 5th node, and distance is 500km, then the distance range being arranged is greater than the 500km, the model Enclose to be adjusted according to the actual situation, it is assumed that the distance range of setting is 800km, at this point, the 7th node and the 8th node The distance of the 5th node of distance of calculating is respectively 600km and 700km, then in addition to the 6th node cannot participate in campaigning for it is super Outside node, the 7th node and the 8th node can not participate in election contest super node;Third can calculate all nodal distance hairs The distance for playing transaction node, to being counted at a distance from all nodes and initiation transaction node, by these distance values according to from small To being ranked up greatly, the node of the certain percentage of removal sequence earlier above participates in the qualification of election contest super node.By above-mentioned Required distance setting solves the node space hypotelorism that the super node of selection may trade with initiation, and then may The problem of bringing super node mutual with the corresponding user of node for initiating transaction leaguing together for some evil end.
After having chosen the node for participating in election contest super node in step s 102, S104 is thened follow the steps, these nodes By can verify that random function campaigns for super node again, satisfaction can verify that the node of the requirement of random function becomes super section Point, what needs to be explained here is that, it can be multiple for finally campaigning for the quantity of successful super node, as long as participating in election contest super node Node in meet and can verify that the requirement of random function can become super node.
The method of above scheme design first passes through determining node and initiates the section of transaction before node campaigns for super node The distance of point is screened, will with the closer knot-removal of nodal distance of initiating transaction, then after removing nearlyr node Super node is chosen in node, solves the node space hypotelorism that the super node of selection may trade with initiation, in turn The problem of super node mutual with the corresponding user of node for initiating transaction leaguing together for some evil end may be brought, so that super node It chooses more just.
In the optional embodiment of the present embodiment, as shown in Fig. 2, determination node and initiation in step S100 are traded Node distance, concretely:
Step S1002: Google S2 algorithm is passed through according to the longitude and latitude of the longitude and latitude of the node and the node for initiating transaction Determine node at a distance from the node for initiating transaction.
In step S1002, Google's S2 distance algorithm is synchronized in the block chain program, as a result, the section on block chain Point can be according to after obtaining the longitude and latitude of node, and executing Google S2 distance algorithm program can be with the distance between calculate node.
The method of above scheme design, can be by Google's S2 distance algorithm come between the calculation of longitude & latitude node according to node Space length, Google's S2 distance algorithm consumption calculation resources it is smaller, meet the performance requirement of node server.
In the optional embodiment of the present embodiment, as shown in Fig. 2, before step S1002, this method further include:
Step S1000: obtaining the longitude and latitude of the node and initiates the longitude and latitude of the node of transaction, the longitude and latitude of the node It is generated by the Internet protocol IP address of the node, initiates the longitude and latitude of the node of transaction by the Internet protocol for the node for initiating to trade IP address generates.
The node in step S1000 also is indicated as any one node except the initiation transaction node, aforementioned longitude and latitude Generate include following two mode: first, except any one node of the initiation transaction node longitude and latitude and initiate transaction The longitude and latitude of node can be calculated by the specific node on the block chain, before this, all sections on the block chain Respective Internet protocol IP address is published on block chain by point, and then the specific node is according to the Internet protocol IP of each node The longitude and latitude of each node of address calculation and storage, between subsequent step S1002 needs calculate node apart from when, then this is specific Node is sent to the longitude and latitude of each node in addition to the initiation transaction node they itself and initiates the warp of the node of transaction Latitude, due to unifiedly calculating longitude and latitude by a specific node, which is easy to be tampered, so on the block chain Verifying node can also be set, after the specific node calculates longitude and latitude, longitude and latitude is sent to verifying node to test Card is proved to be successful and then is sent to each node in addition to the initiation transaction node they itself by the specific node Longitude and latitude and the longitude and latitude for initiating the node traded.
Second, it can except the longitude and latitude of the node of the longitude and latitude and initiation transaction of any one node of the initiation transaction node To be calculated by any one node oneself except the initiation transaction node, without calculating to specific node, the initiation is removed Any one node of transaction node calculates certainly according to the Internet protocol IP of the Internet protocol IP of oneself and the node of initiation transaction Oneself longitude and latitude and the longitude and latitude for initiating the node traded, further according to calculation of longitude & latitude space length, due to longitude and latitude It is node oneself to be calculated, node is practised fraud in order to prevent, then except any one node of the initiation transaction node can will calculate Obtained longitude and latitude is sent to verifying node to be verified, and the verifying that verifying node is sent is received after verifying node verification After success message, continue any one node and the node of initiation transaction according to calculation of longitude & latitude except the initiation transaction node Distance, it is subsequent that the distance of calculating can also be sent to verifying node to verify, to guarantee fairness.Wherein, aforementioned Internet protocol IP address generate longitude and latitude method can for Logstash conversion method or using Baidu accurate IP position Method.
In the optional embodiment of the present embodiment, as shown in figure 3, in step S104 by can verify that random function is competing Super node is selected, and is determined as super node after satisfaction can verify that random function requirement, it is super to participate in election contest with any one The node of node is executing subject, concretely:
Step S1040: according to the private key of the node and the new random number of common recognition generating random number received, the common recognition with Machine number is generated when election contest is super node and is broadcasted on block chain by the last round of successful super node of block out.
Step S1042: judging whether new random number meets defined numerical requirements, if so, going to step 1044.
Step S1044: the public key of new random number and the node is broadcasted on block chain, so that on the block chain The node in addition to the node the new random number that the node generates is verified according to the public key of the node, the area Bing Gai Determine itself to be super node after the node verification success in addition to the node on block chain.
Above-mentioned steps S1040~S1044 can be expressed as can verify that the implementation procedure of random function, can verify that random letter in fact We can regard lot process as to number, such as can understand in this way above-mentioned steps, it is assumed that be that the 10th wheel is taken out now Label can be 100 according to the number of nodes after distance screening, this 100 nodes are all known with respective private key plus a whole network The random number (namely aforementioned described common recognition random number) in road generates a new random number, the random number which both knows about The super node of final block is confirmed as the before the 9th by the block generated in multiple super nodes of last round of namely the 9th wheel New random number that wheel election contest generates when be super node (for example it is numerical value that the random number that both knows about of the whole network, which is the round that this takes turns, 10).One condition is set before this, and the new random number of the generation meets defined numerical requirements, for example, whose generation is new The numerical value of random number be greater than 10, then the random number generated can become super node greater than 10 node, it is assumed that No. 5 are saved The new random number that point generates is numerical value 11, but only has No. 5 nodes oneself just to know at this time and oneself be extracted into the satisfaction of numerical value 11 Defined numerical requirements, receiving No. 5 nodes to other nodes becomes super node, then No. 5 nodes then need to produce oneself Raw new random number and the public key broadcasts of oneself is on block chain, and after other node verifications, other nodes are also known that No. 5 Node is really to produce 11, then other nodes, which also just receive No. 5 nodes, becomes the super node of this 10th wheel, wherein every The super node that one wheel lot generates can be multiple, for example, after the super node that No. 5 nodes become the 10th wheel, other Node can also also become the super node of the 10th wheel, it is only necessary to the new random number that they generate meet as defined in numerical value want It asks.
In the optional embodiment of the present embodiment, as shown in figure 4, in step S104 by can verify that random function is campaigned for Super node, and after being determined as super node after satisfaction can verify that random function requirement, this method further include:
Step S106: judging whether to out block according to the block agreement that goes out with the super node other than the node, if so, Go to step S108.
Step S108: the node carries out out block.
Above-mentioned steps S106~S108 expression is meant that, after abovementioned steps S104 has selected multiple super nodes, The corresponding transaction record of node for needing that a super node is selected to trade the initiation in this multiple super node come into Row record, and by the record storage and synchronize on the block chain, that is, so-called block out.It is multiple super in step s 106 Grade node can be according to the agreement set in advance, and it is to this friendship that this multiple super node is discussed jointly for which super node Easily record carries out out block, such as the super node that step S104 is selected has No. 5, No. 11, No. 23, No. 33, No. 44, No. 55 nodes, The block agreement out that these nodes are set before discusses this wheel and carries out out block to transaction record by No. 5 super nodes, So No. 5 nodes then carry out out block, and after the super node of block has been determined out, which is campaigning for super node before Shi Shengcheng simultaneously broadcasts the common recognition random number that the new random number on block chain is then used as next round election contest super node, before undertaking Described in the example stated, the new random number 11 that No. 5 nodes are generated when campaigning for super node then campaigns for super section as next round The common recognition random number of point.Wherein, determine that super node goes out the mode of block in addition to above-mentioned described according to preset block association out View can also be determined as POW mechanism according to the workload of these super nodes to determine.
In addition, any one super node in this multiple super node to this transaction record carry out out block it Afterwards, then this multiple super node cancels, and the election contest again of super node, example are carried out after transaction record next time generates Such as, accept described in example above-mentioned, No. 5 nodes to initiate transaction node transaction record go out block after, this 10th wheel Super node 5, No. 11, No. 23, No. 33, No. 44, No. 55 all cancel, after transaction record next time generates, again The super node election contest of 11th round is carried out, that is, repeats all step process above-mentioned.
Second embodiment
As shown in figure 5, the application provides a kind of super node election contest device, it is applied to node, which includes:
Determining module 200, for determining node at a distance from the node for initiating transaction;
Judgment module 202, for judging whether distance is more than preset distance;
Campaign for module 204, for judgment module 202 judgement distance be more than preset distance after, by can verify that with Machine function campaigns for super node, and determining after satisfaction can verify that random function requirement itself is super node.
The device of above scheme design first passes through determining node and initiates the section of transaction before node campaigns for super node The distance of point is screened, will with the closer knot-removal of nodal distance of initiating transaction, then after removing nearlyr node Super node is chosen in node, the super node for solving selection is asked with the excessively close bring cheating of nodal distance for initiating transaction Topic, so that the selection of super node is more just.
In the optional embodiment of second embodiment, determining module 200 determine node and initiate transaction node away from From, comprising:
Node and hair are determined by Google's S2 algorithm according to the longitude and latitude of the longitude and latitude of node and the node for initiating transaction Play the distance of the node of transaction.
In the optional embodiment of second embodiment, which further includes obtaining module 206, in determining module 200 determine node by Google's S2 algorithm according to the longitude and latitude of the node of the longitude and latitude and initiation transaction of node and initiate to trade Node distance before, obtain node longitude and latitude and initiate transaction node longitude and latitude, the longitude and latitude of node is by saving The Internet protocol IP address of point generates, and initiates the longitude and latitude of the node of transaction by the Internet protocol IP address for the node for initiating to trade It generates.
In the optional embodiment of second embodiment, which further includes sending module 208 and receiving module 210.
Sending module 208, in the longitude and latitude for obtaining the node that module 206 obtains the longitude and latitude of node and initiation is traded After degree, the longitude and latitude of the longitude and latitude of node and the node for initiating transaction is sent to the verifying node on the block chain.
Receiving module 210, for receive verifying node return be proved to be successful information.
The device of above scheme design is verified by verifying node pair warp and weft degree, and reaching prevents data to be tampered Effect.
3rd embodiment
As shown in fig. 6, the application provides a kind of electronic equipment, comprising: processor 301, memory connected to the processor 302, memory 302 is stored with the executable storage medium 303 of processor 301, when calculating equipment operation, processor 301 execute the storage medium 303, in any optional implementation that first embodiment, first embodiment are executed when executing Method.
The application provides a kind of storage medium 303, is stored with computer program on the storage medium 303, the computer journey The method in any optional implementation of first embodiment, first embodiment is executed when sequence is run by processor.
Wherein, storage medium 303 can be by any kind of volatibility or non-volatile memory device or their group It closes and realizes, such as static random access memory (Static Random Access Memory, abbreviation SRAM), electric erasable can Program read-only memory (Electrically Erasable Programmable Read-Only Memory, referred to as EEPROM), Erasable Programmable Read Only Memory EPROM (Erasable Programmable Read Only Memory, abbreviation EPROM), programmable read only memory (Programmable Red-Only Memory, abbreviation PROM), read-only memory (Read-Only Memory, abbreviation ROM), magnetic memory, flash memory, disk or CD.
The application provides a kind of computer program product, when the computer program product is run on computers, so that The method that computer executes in any optional implementation of first embodiment, first embodiment is set.
The above, the only specific embodiment of the application, but the protection scope of the application is not limited thereto, it is any Those familiar with the art within the technical scope of the present application, can easily think of the change or the replacement, and should all contain Lid is within the scope of protection of this application.Therefore, the protection scope of the application shall be subject to the protection scope of the claim.

Claims (10)

1. a kind of super node polling method, which is characterized in that be applied to node, which comprises
Determine the node at a distance from the node for initiating transaction;
Judge whether the distance is more than preset distance;
If so, the node is by can verify that random function campaigns for super node, and it can verify that random function described in the satisfaction Determine itself to be super node after it is required that.
2. method according to claim 1, which is characterized in that the determination node and the node for initiating transaction Distance, comprising:
Passed through described in the determination of Google S2 algorithm according to the longitude and latitude of the longitude and latitude of the node and the node for initiating transaction Node is at a distance from the node for initiating transaction.
3. method according to claim 2, which is characterized in that in the longitude and latitude according to the node and the initiation Before the longitude and latitude of the node of transaction determines the node at a distance from the node for initiating transaction by Google's S2 algorithm, institute State method further include:
The longitude and latitude of the node and the longitude and latitude of the node for initiating transaction are obtained, the longitude and latitude of the node is by described The Internet protocol IP address of node generates, and the longitude and latitude of the node for initiating transaction is by the internet of the node for initiating transaction Protocol IP address generates.
4. method according to claim 3, which is characterized in that in the longitude and latitude for obtaining the node and the initiation After the longitude and latitude of the node of transaction, the method also includes:
The longitude and latitude of the longitude and latitude of the node and the node for initiating transaction is sent to the verifying node on block chain;
Receive the verifying node return is proved to be successful information.
5. method according to claim 1, which is characterized in that it is described by can verify that random function campaigns for super node, and Determine itself to be super node after can verify that random function requirement described in the satisfaction, comprising:
According to the new random number of the private key of the node and the common recognition generating random number received, the common recognition random number is by upper one The successful super node of block is taken turns out to generate and broadcasted on block chain when election contest is super node;
Judge whether the new random number meets defined numerical requirements;
If so, the public key of the new random number and the node is broadcasted on the block chain, so that the area The node in addition to the node on block chain verifies the new random number according to the public key of the node, and in institute Determine itself to be super node after stating the node verification success in addition to the node on block chain.
6. method according to claim 1, which is characterized in that in the node by can verify that random function campaigns for super section Point, and can verify that described in the satisfaction determine after random function requirement itself for after super node, the method also includes:
Block is judged whether to out according to the block agreement that goes out with the super node other than the node;
If so, carrying out out block.
7. a kind of super node campaigns for device, which is characterized in that be applied to node, described device includes:
Determining module, for determining the node at a distance from the node for initiating transaction;
Judgment module, for judging whether the distance is more than preset distance;
Campaign for module, for the judgment module judge distance be more than preset distance after, by can verify that at random Function campaigns for super node, and determines itself to be super node after can verify that random function requirement described in the satisfaction.
8. according to claim 7 super node campaign for device, which is characterized in that the determining module determine the node with The distance of the node for initiating transaction, comprising:
Passed through described in the determination of Google S2 algorithm according to the longitude and latitude of the longitude and latitude of the node and the node for initiating transaction Node is at a distance from the node for initiating transaction.
9. a kind of electronic equipment, including memory, processor and it is stored on the memory and can transports on the processor Capable storage medium, which is characterized in that the processor realizes any one of claim 1 to 6 institute when executing the storage medium The step of method stated.
10. a kind of storage medium, which is characterized in that the storage medium is stored with machine-executable instruction, and the machine can be held When being called and being executed by processor, the machine-executable instruction promotes the processor to realize claim 1-6 for row instruction Described in any item methods.
CN201910757152.9A 2019-08-15 2019-08-15 Super node election method, device and storage medium Active CN110460471B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910757152.9A CN110460471B (en) 2019-08-15 2019-08-15 Super node election method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910757152.9A CN110460471B (en) 2019-08-15 2019-08-15 Super node election method, device and storage medium

Publications (2)

Publication Number Publication Date
CN110460471A true CN110460471A (en) 2019-11-15
CN110460471B CN110460471B (en) 2022-07-08

Family

ID=68487160

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910757152.9A Active CN110460471B (en) 2019-08-15 2019-08-15 Super node election method, device and storage medium

Country Status (1)

Country Link
CN (1) CN110460471B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110505313A (en) * 2019-09-25 2019-11-26 广东卓启投资有限责任公司 A kind of super node choosing method, device and equipment
CN111416843A (en) * 2020-03-06 2020-07-14 厦门区块链云科技有限公司 Super node election method for block chain community
CN111698218A (en) * 2020-05-20 2020-09-22 厦门区块链云科技有限公司 Super node election system of block chain community

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105323818A (en) * 2015-11-04 2016-02-10 天津理工大学 Energy-saving clustering routing method based on network regional division and distances
US20170346833A1 (en) * 2016-05-27 2017-11-30 Sony Corporation Blockchain-based system, and electronic apparatus and method in the system
CN109426567A (en) * 2017-08-22 2019-03-05 汇链丰(北京)科技有限公司 A kind of node deployment and electoral machinery of block chain
CN109785130A (en) * 2018-12-17 2019-05-21 金蝶软件(中国)有限公司 Block chain is known together method, apparatus, computer equipment and storage medium at random

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105323818A (en) * 2015-11-04 2016-02-10 天津理工大学 Energy-saving clustering routing method based on network regional division and distances
US20170346833A1 (en) * 2016-05-27 2017-11-30 Sony Corporation Blockchain-based system, and electronic apparatus and method in the system
CN109426567A (en) * 2017-08-22 2019-03-05 汇链丰(北京)科技有限公司 A kind of node deployment and electoral machinery of block chain
CN109426952A (en) * 2017-08-22 2019-03-05 汇链丰(北京)科技有限公司 A kind of block chain framework
CN109785130A (en) * 2018-12-17 2019-05-21 金蝶软件(中国)有限公司 Block chain is known together method, apparatus, computer equipment and storage medium at random

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王秀娟等: "P2P网络中的超级节点选取算法研究", 《计算机与现代化》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110505313A (en) * 2019-09-25 2019-11-26 广东卓启投资有限责任公司 A kind of super node choosing method, device and equipment
CN110505313B (en) * 2019-09-25 2022-04-15 广东卓启投资有限责任公司 Super node selection method, device and equipment
CN111416843A (en) * 2020-03-06 2020-07-14 厦门区块链云科技有限公司 Super node election method for block chain community
CN111698218A (en) * 2020-05-20 2020-09-22 厦门区块链云科技有限公司 Super node election system of block chain community

Also Published As

Publication number Publication date
CN110460471B (en) 2022-07-08

Similar Documents

Publication Publication Date Title
CN109165945B (en) Representative node device election method and device, computer device and storage medium
CN108717630B (en) Block output method and implementation system thereof
CN108596623B (en) Block chain consensus achieving method
US11126659B2 (en) System and method for providing a graph protocol for forming a decentralized and distributed graph database
CN110460471A (en) A kind of super node polling method, device and storage medium
CN108985774A (en) A kind of motivational techniques, device, equipment and the storage medium of block chain network
CN110648139B (en) Block chain transaction verification and expansion method and device based on fragmentation technology and game theory
CN109481936A (en) Block chain accounting node selection method and device and computer readable storage medium
CN110868441A (en) Block chain public link maintenance method and device, node and block chain public link
CN109146484A (en) Common recognition verification method, digging mine machine and block catenary system based on block chain
CN109242299A (en) Distribution digs mine method, digs mine machine and block catenary system
CN108848055A (en) A kind of block chain common recognition method, accounting nodes and node
CN108846673A (en) A kind of processing method of block data, device, equipment and storage medium
CN108665363B (en) Block chain consensus achieving device
CN108629588B (en) Computer readable medium for block chain consensus achievement
CN108650291A (en) A kind of GPU task common recognition method and device based on calculation power
CN109395394B (en) Forecast guess game deployment method and game method, equipment and storage medium
CN110659901B (en) Game model-based block chain complex transaction verification method and device
CN109246084A (en) New block generation method, device, electronic equipment and storage medium
CN108898440A (en) Flow exchanging method and device
CN109146146A (en) Event prediction method and device, electronic equipment
CN110298657A (en) A kind of block chain common recognition method, relevant apparatus and system
CN108961055A (en) A kind of rewards and punishments method, apparatus, equipment and the storage medium of block common recognition
CN112862303A (en) Crowdsourcing quality evaluation system and method based on block chain
CN114372589A (en) Federated learning method and related device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant