Specific embodiment
The application is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched
The specific embodiment stated is used only for explaining related invention, rather than the restriction to the invention.It also should be noted that in order to
Convenient for description, part relevant to invention is illustrated only in attached drawing.
It should be noted that in the absence of conflict, the features in the embodiments and the embodiments of the present application can phase
Mutually combination.The application is described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
Fig. 1 is a kind of flow chart for logical card distribution method that one embodiment of the invention provides.As shown in Figure 1, in this implementation
In example, the present invention provides a kind of logical card distribution method, comprising:
S12: the first request for obtaining public information is sent to each block chain node according to the node scan rule of pre-configuration
Information receives and stores the public information that each block chain node is generated and returned;Wherein, public information includes the ground of corresponding node
Location;
S14: several drop target nodes are gone out according to the air-drop Rules Filtering of each public information, pre-configuration;
S16: it generates the air-drop that several logical cards are provided to each drop target node and trades, and is each to each block chain node broadcasts
Air-drop transaction.
Specifically, using public information as the address of corresponding node;The node scan rule of pre-configuration is that daily zero hour is opened
Begin scanning, and only run-down;The air-drop rule of pre-configuration is and right for using all nodes scanned as drop target node
For the logical card quantity of each drop target node granting is consistent;Assuming that being currently zero hour on January 1st, 2000;
In step s 12, lead to card issue server to be sent according to the node scan rule of pre-configuration to each block chain node
The first solicited message for obtaining public information, receives and stores the public information that each block chain node is generated and returned;Due to pre-
The node scan rule of configuration starts to scan for daily zero hour, and only run-down, therefore logical card issue server is according to each
Block chain node sends the first solicited message for obtaining address, receives and stores the corresponding section that each block chain node is generated and returned
The address of point;
In step S14, logical card issue server goes out several skies according to the air-drop Rules Filtering of each public information, pre-configuration
Throw destination node;Since the air-drop rule of pre-configuration is drops all nodes scanned, and to each drop target
The logical card quantity of node granting is consistent, therefore logical card issue server screens each node of the address of the corresponding node scanned
For drop target node;
In step s 16, lead to card issue server to generate to the logical card consistent air-drop of quantity of each drop target node granting
Transaction, and transaction is respectively dropped to each block chain node broadcasts.
Above-described embodiment is using public information as the address of corresponding node;The node scan rule of pre-configuration is daily zero hour
Start to scan, and only run-down;The air-drop rule of pre-configuration for using all nodes scanned as drop target node, and
Logical card distribution method provided by the invention is done for consistent to the logical card quantity of each drop target node granting exemplary
Elaboration.
In more embodiments, the public key information that public information can be configured to corresponding node according to actual needs can be realized
Identical technical effect.
In more embodiments, the node scan rule of pre-configuration can configure different scanning weeks according to actual needs
Phase, for example, once scan round process always after scanning, or several durations being configured to after terminating scanning are laggard
Row scanning (such as being scanned after terminating 2 hours after scanning) is, it can be achieved that identical technical effect.
In more embodiments, the air-drop rule of pre-configuration can also be configured to scan all according to actual needs
Several nodes in node are as drop target node, such as randomly select from all nodes scanned 50% node and make
To drop node;The air-drop rule of pre-configuration can also be configured to send for different drop target nodes according to actual needs
Logical card quantity it is different, such as obtain drop target node synchronize block elevation information, configuration synchronized block height and
The quantity for providing logical card is positively correlated, it can be achieved that identical technical effect.
For above-described embodiment by motivating user to dispose public chain node to the method for disposing the logical card of public chain node granting, enhancing is public
The robustness of chain.
Fig. 2 is the flow chart of step S12 in a kind of preferred embodiment of method shown in Fig. 1.As shown in Fig. 2, excellent one
It selects in embodiment, step S12 includes:
S122: it is sent according to the node scan rule of pre-configuration to each first node for being connected and obtains public information and the
First solicited message of the IP address list for each second node that one node is connected, so that each first node generates disclosure respectively
Information and IP address list simultaneously return;
S124: public information and IP address list that each first node is generated and returned are received;
S126: judge whether that the third section of not sent first solicited message is arrived in scanning according to each received IP address list
Point: being, then sends the first solicited message to third node, so that third node generates public information and IP address list and returns
It returns;Circulation current procedures are until be judged as NO.
Specifically, it is assumed that each section that the first node that logical card issue server is connected only has node A, node A to be connected
Point is node B, node C, node D, and each node that node B is connected is node A and node C, and each node that node C is connected is
Node A and node B, the node that node D is connected are node A;
The public information of node A is addr (A), the IP address list of each second node that node A is connected be IP_B,
IP_C,IP_D;
The public information of node B is addr (B), the IP address list of each second node that node B is connected be IP_A,
IP_C;
The public information of node C is addr (C), the IP address list of each second node that node C is connected be IP_A,
IP_B;
The public information of node D is addr (D), and the IP address list for each second node that node D is connected is IP_A;
In step S122, leads to card issue server according to the node scan rule of pre-configuration and send acquisition public affairs to node A
It opens information and the first solicited message of the IP address list of each second node that node A is connected, node A generates public information
Addr (A) and IP address list IP_B, IP_C, IP_D are simultaneously returned;
In step S124, addr (A) and IP address list that logical card issue server receiving node A is generated and returned
IP_B,IP_C,IP_D;
In step S126, logical card issue server is according to received IP address list IP_B, IP_C, IP_D judgement of institute
The third node of not sent first solicited message is arrived in no scanning:
Since the node that logical card issue server is connected is node A, leads to card issue server and locally only have IP_A, receive
To IP address list in IP address be IP_B, IP_C, IP_D, therefore scan arrive not sent first solicited message node
(node B, node C, node D);Logical card issue server sends the first solicited message to node B, node C, node D, and node B is raw
At and return to public information addr (B) and IP address list IP_A, IP_C, node C generate and return public information addr (C) and
IP address list IP_A, IP_B, node D are generated and are returned to public information addr (D) and IP address list IP_A;
Due to logical card issue server local existing IP_A, IP_B, IP_C, IP_D, in the IP address list received
IP address is IP_A, IP_B, IP_C, IP_D, therefore does not scan the node of not sent first solicited message, and circulation terminates.
In more embodiments, if the IP address list and open letter of the node that logical card issue server storage is connected
Breath, the above method are configurable to:
It is sent according to the node scan rule of pre-configuration to each first node connected and obtains what first node was connected
First solicited message of the IP address list for each second node that the public information and first node of each second node are connected, with
It generates the public information of each second node connected respectively for each first node and IP address list and returns;
Receive public information and IP address list that each first node is generated and returned;
Judge whether scanning to not sent first solicited message according to each received public information or IP address list
Third node: being, then the first solicited message is sent to third node, so that third node generates public information and IP address respectively
List simultaneously returns;Circulation current procedures are until be judged as NO.
Specifically, lead to card issue server and acquisition company, node A institute is sent to node A according to the node scan rule of pre-configuration
First solicited message of the IP address list for each second node that the public information and node A of each second node connect are connected,
Node A generation public information addr (B), addr (C), addr (D) and IP address list IP_B, IP_C, IP_D are simultaneously returned;
Addr (B), addr (C), addr (D) and the IP address column that logical card issue server receiving node A is generated and returned
Table I P_B, IP_C, IP_D;
Logical card issue server is according to the received public information addr (B) of institute, addr (C), addr (D) or IP address list
IP_B, IP_C, IP_D judge whether that the third node of not sent first solicited message is arrived in scanning:
Since the node that logical card issue server is connected is node A, only IP_A is locally stored in logical card issue server
And addr (A);Since existing embodiment is illustrated the principle for using IP address list to be judged, only illustrates and use herein
Public address is judged:
The public information that logical card issue server receives is addr (B), addr (C), addr (D), therefore is scanned to not
Send the node (node B, node C, node D) of the first solicited message;Logical card issue server is sent out to node B, node C, node D
The first solicited message is sent, node B generates and return public information addr (A), addr (C) and IP address list IP_A, IP_C, section
Point C generates and returns public information addr (A), addr (B) and IP address list IP_A, IP_B, and node D is generated and returned to disclosure
Information addr (A) and IP address list IP_A;
Since logical card issue server locally has addr (A), addr (B), addr (C), addr (D), the IP received
IP address in address list is addr (A), addr (B), addr (C), addr (D), therefore does not scan not sent first and ask
The node of information is sought, circulation terminates.
In more embodiments, if node generates and broadcasts the friendship of the IP address including this section point when block chain is added
Easily, the IP address of each block chain node is recorded on block chain, the above method is configurable to:
The corresponding node of each IP address recorded according to the node scan rule of pre-configuration on block chain, which is sent, obtains public affairs
The first solicited message of information is opened, so that each node generates respectively and return public information and returns.
Specifically, the IP address recorded on block chain is IP_A, IP_B, IP_C, IP_D;
Notify issue server according to the node scan rule of pre-configuration to the corresponding node of IP_A, IP_B, IP_C, IP_D
The first solicited message for obtaining public information is sent, the corresponding node A of IP_A generates public information addr (A), and IP_B pairs
The node B answered generates public information addr (B), and the corresponding node C of IP_C generates public information addr (C), IP_D
Corresponding node D generates public information addr (D).
Fig. 3 is the flow chart of step S14 in a kind of preferred embodiment of method shown in Fig. 1.As shown in figure 3, excellent one
It selects in embodiment, public information includes the public key information of corresponding node, and step S14 includes:
S142: corresponding address is generated according to the public key information of each block chain node;
S144: several drop target nodes are gone out according to the air-drop Rules Filtering of each address, pre-configuration.
Fig. 4 is a kind of flow chart of preferred embodiment of method shown in Fig. 1.As shown in figure 4, in a preferred embodiment
In, public information further includes that corresponding node has synchronized block height, the above method further include:
S17: to the checking solicited message for the first block of fourth node request for having returned to public information, for the 4th
Node returns to the first block data of the first block;Wherein, the first block height of the first block has been not more than fourth node
Synchronous block height;
S18: whether verifying fourth node returns the first block data of correct first block:
It is no, then follow the steps S19: not to the logical card of fourth node granting.
Specifically, the first block height of the first block has synchronized block height no more than fourth node, with the firstth area
For block number evidence is the block Hash of the first block, it is assumed that fourth node is node B, and the first block is block (100_B);
In step S17, logical card issue server obtains block (100_B) to the Node B requests for having returned to public information
Checking solicited message, node B return block (100_B) the first block data hash (100_B);
In step S18: whether logical card issue server verifying node B returns correct hash (100_B):
It is no, it thens follow the steps S19: not providing logical card to node B.
In more embodiments, the first block data can be additionally configured to the other parameters for identifying the first block,
Such as the block ID of the first block is configured to, it can be achieved that identical technical effect.
Above-described embodiment passes through the correctness of comparison block data, not to the public chain node for possessing incorrect block data
The method for providing logical card further motivates the public chain node of user's deployment correctly to participate in the construction and maintenance of public chain, increases
The robustness of Qiang Gonglian.
Fig. 5 is the flow chart of step S14 in a kind of preferred embodiment of method shown in Fig. 4.As shown in figure 5, excellent one
It selects in embodiment, step S14 includes:
S146: according to each block chain node, corresponding to have synchronized block height, the air-drop Rules Filtering of pre-configuration several out
Drop target node.
Specifically, it is assumed that the air-drop rule of pre-configuration is sieved will to have synchronized the node scanned of the block height greater than 1000
It is selected as drop target node;Node A, node B, node C the block height that synchronized be 1001, node D synchronize block high
Degree is 500;
In step S146, since the block height that synchronized of node A, node B, node C are 1001, node D together
Walking block height is 500, and the air-drop rule of pre-configuration is screened will to have synchronized the node scanned of the block height greater than 1000
For drop target node, therefore block height, the air-drop rule of pre-configuration have been synchronized according to each block chain node is corresponding
Several drop target nodes are filtered out, drop target node is node A, node B, node C.
In more embodiments, will can also synchronize block level configurations according to actual needs is other integers, for example,
500,2000;Or block level configurations will have been synchronized as the percentage of the highest block height through knowing together and rounded up, for example,
Highest block height is 1001, configures 80% for percentage, then having synchronized block altimeter and having calculated is 801;Or by synchronization zone
Block level configurations are the percentage of the highest block height through knowing together and round up, for example, highest block height is 1001, it will
Percentage is configured to 80%, then has synchronized block altimeter and calculated as 800, it can be achieved that identical technical effect.
Fig. 6 is the flow chart of step S18 in a kind of preferred embodiment of method shown in Fig. 4.As shown in fig. 6, excellent one
It selects in embodiment, step S18 includes:
S182: Xiang Ruogan the 5th node request and the verifying of identical second block of block height of the first block are asked
Information is sought, so that each 5th node returns to the second block data of the second block;
S184: the second block data that each 5th node returns is received, and is known together to each second block data;
S186: it is according to the first block data and the first block data of whether identical verifying of the second block data through knowing together
It is no correct.
Specifically, it is assumed that several 5th nodes are respectively node A, node C, node D, and node A, node C, node D are returned
The second block the second block data it is identical;
In step S182, lead to card issue server to node A, node C, node D request and the first block area
The checking solicited message of identical second block of block height, node A return to hash (100_A), and node C returns to hash (100_C),
Node D returns to hash (100_D);
In step S184, leads to card issue server and receive hash (100_A), hash (100_C), hash (100_D), and
It knows together to hash (100_A), hash (100_C), hash (100_D);
In step S186, it is assumed that the second block data through knowing together is hash (100) ' (hash (100) ' and hash
(100_A), hash (100_C), hash (100_D) are identical) lead to card issue server according to hash (100_B) and hash (100) '
Whether whether the first block data of identical verifying is correct.
In more embodiments, other nodes can be configured by several 5th nodes, for example, it is configured to node A, it can be real
Existing identical technical effect.
In more embodiments, due to configuring the 5th node to the mechanism of fixed node, it be easy to cause the 5th node
It is attacked, if the 5th node is attacked, the block data of the 5th node is the block data forged, and leading to card issue server will
It is logical to demonstrate,prove the node for being issued to block data identical with the block data for possessing forgery, logical card can not be issued to correct participation
To the node in the construction and maintenance of public chain;It is asked at random to several 5th nodes in view of the above-mentioned problems, step S182 is configured that
Ask the checking solicited message for obtaining identical second block with the block of the first block height, it can be achieved that identical technical effect.
In more embodiments, since block chain node has going after profit or gain property, different blocks chain node is closed since interests are conspired
The node of scheme will forge block data jointly;If having more node in randomly selected several 5th nodes is the section conspired
Point, then can not be by the logical node demonstrate,proved and be issued in the construction and maintenance for correctly participating in public chain.In view of the above-mentioned problems, by the 5th
Node is the node of official's configuration, and the block data of the node of official's configuration is genuine block data, while by step
S182 is configured that the checking request to identical second block of the block of several 5th node requests and the first block height
Letter is, it can be achieved that identical technical effect.
In a preferred embodiment, when the first block data is identical as the second block data, block height and hair have been synchronized
The quantity for putting logical card is positively correlated.
The public chain node that above-described embodiment further motivates user to dispose correctly participates in the construction and maintenance of public chain,
Enhance the robustness of public chain.
Fig. 7 is a kind of structural schematic diagram for equipment that one embodiment of the invention provides.
As shown in fig. 7, present invention also provides a kind of equipment 700, including one or more centres as on the other hand
Unit (CPU) 701 is managed, can be added according to the program being stored in read-only memory (ROM) 702 or from storage section 708
The program that is downloaded in random access storage device (RAM) 703 and execute various movements appropriate and processing.In RAM703, also deposit
It contains equipment 700 and operates required various programs and data.CPU701, ROM702 and RAM703 pass through the phase each other of bus 704
Even.Input/output (I/O) interface 705 is also connected to bus 704.
I/O interface 705 is connected to lower component: the importation 706 including keyboard, mouse etc.;It is penetrated including such as cathode
The output par, c 707 of spool (CRT), liquid crystal display (LCD) etc. and loudspeaker etc.;Storage section 708 including hard disk etc.;
And the communications portion 709 of the network interface card including LAN card, modem etc..Communications portion 709 via such as because
The network of spy's net executes communication process.Driver 710 is also connected to I/O interface 705 as needed.Detachable media 711, such as
Disk, CD, magneto-optic disk, semiconductor memory etc. are mounted on as needed on driver 710, in order to read from thereon
Computer program be mounted into storage section 708 as needed.
Particularly, in accordance with an embodiment of the present disclosure, the logical card distribution method of any of the above-described embodiment description can be implemented
For computer software programs.For example, embodiment of the disclosure includes a kind of computer program product comprising be tangibly embodied in
Computer program on machine readable media, the computer program include the program code for executing logical card distribution method.
In such embodiments, which can be downloaded and installed from network by communications portion 709, and/or from
Detachable media 711 is mounted.
As another aspect, present invention also provides a kind of computer readable storage medium, the computer-readable storage mediums
Matter can be computer readable storage medium included in the device of above-described embodiment;It is also possible to individualism, it is unassembled
Enter the computer readable storage medium in equipment.Computer-readable recording medium storage has one or more than one program, should
Program is used to execute the logical card distribution method for being described in the application by one or more than one processor.
Flow chart and block diagram in attached drawing are illustrated according to the system of various embodiments of the invention, method and computer journey
The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation
A part of one module, program segment or code of table, a part of the module, program segment or code include one or more use
The executable instruction of the logic function as defined in realizing.It should also be noted that in some implementations as replacements, being marked in box
The function of note can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are actually
It can be basically executed in parallel, they can also be executed in the opposite order sometimes, this is depending on related function.Also it wants
It is noted that the combination of each box in block diagram and or flow chart and the box in block diagram and or flow chart, Ke Yitong
The dedicated hardware based system of functions or operations as defined in executing is crossed to realize, or by specialized hardware and can be calculated
The combination of machine instruction is realized.
Being described in the embodiment of the present application involved unit or module can be realized by way of software, can also be with
It is realized by way of hardware.Described unit or module also can be set in the processor, for example, each unit can
To be the software program being arranged in computer or intelligent movable equipment, it is also possible to the hardware device being separately configured.Wherein, this
The title of a little units or module does not constitute the restriction to the unit or module itself under certain conditions.
Above description is only the preferred embodiment of the application and the explanation to institute's application technology principle.Those skilled in the art
Member is it should be appreciated that invention scope involved in the application, however it is not limited to technology made of the specific combination of above-mentioned technical characteristic
Scheme, while should also cover in the case where not departing from the application design, appointed by above-mentioned technical characteristic or its equivalent feature
Other technical solutions of meaning combination and formation.Such as features described above and (but being not limited to) disclosed herein have similar functions
Technical characteristic replaced mutually and the technical solution that is formed.