Thresholding voting method, system and relevant device based on EC-Schnoor signature algorithm

文档序号:1744538 发布日期:2019-11-26 浏览:22次 中文

阅读说明:本技术 基于EC-Schnoor签名算法的门限投票方法、系统及相关设备 (Thresholding voting method, system and relevant device based on EC-Schnoor signature algorithm ) 是由 辛佳骏 张骁 来鑫 于 2019-07-26 设计创作,主要内容包括:本发明公开了基于EC-Schnoor签名算法的门限投票方法、系统及相关设备。在当前投票周期内接收投票节点发送的承诺信息并向对应的投票节点回复挑战信息;获取当前投票周期内有效投票节点发送的签名数据;若有效投票节点的数目N与所有投票节点的总数目M的比值超过第一阈值T,则确认投票通过,并采用贪心算法从有效投票节点中选出第一预设数目A个优选节点;采用EC-Schnoor签名算法对所有的优选节点发送的签名数据进行聚合,生成对应的聚合签名数据;将聚合签名数据及对应的优选节点的身份信息发送给验证节点设备。(The invention discloses thresholding voting method, system and relevant devices based on EC-Schnoor signature algorithm.The commitment information that ballot node is sent is received within the current ballot period and to corresponding ballot node reverts back challenge information;Obtain the signed data for node transmission of effectively voting in the current ballot period;If the ratio of the total number M of the number N of effectively ballot node and all ballot nodes is more than first threshold T, confirmation is voted through, and A preferred nodes of the first preset number are selected from effective ballot node using greedy algorithm;It is polymerize using the signed data that EC-Schnoor signature algorithm sends all preferred nodes, generates corresponding aggregate signature data;The identity information of aggregate signature data and corresponding preferred node is sent to verifying node device.)

1. a kind of thresholding voting method based on EC-Schnoor signature algorithm, which is characterized in that apply to aggregation equipment, The described method includes:

Obtain the signed data for node transmission of effectively voting in the current ballot period;

If the ratio of the total number M of the number N of effectively ballot node and all ballot nodes is more than first threshold T, confirmation is worked as It is voted through in preceding polling cycle, and selects first from node of effectively voting in the current ballot period using greedy algorithm and preset A preferred nodes of number, the A is no more than N and not less than the product of M and T;

Gathered using the signed data that EC-Schnoor signature algorithm sends preferred node all in the current ballot period It closes, generates corresponding aggregate signature data;

The identity information of the aggregate signature data and corresponding preferred node is sent to verifying node device, so that verifying Node device verifies the aggregate signature data.

2. the method according to claim 1, wherein described effective out of current ballot the period using greedy algorithm A preferably nodes of the first preset number are selected in ballot node includes:

It is most from number of effectively voting in nearest W history polling cycle is selected in node of effectively voting in the current ballot period Preceding A preferred nodes.

3. method according to claim 2, which is characterized in that described to be selected from node of effectively voting in the current ballot period Number most preceding A preferred node of effectively voting in nearest W history polling cycle include:

First kind voting results vector is constructed according to the identity information for node of effectively voting in the current ballot period received, In the corresponding first kind voting results vector of each polling cycle, each ballot node is in first kind voting results vector For one dimension values of middle correspondence to indicate whether ballot node votes, the corresponding dimension values of all effective ballot nodes are identical, The corresponding dimension values of remaining ballot node are identical;

The corresponding voting results vector of nearest W history polling cycle is preserved in aggregation equipment, forms the matrix of M × W, mI, jFor i-th of ballot node in jth time polling cycle corresponding dimension values, according to formulaCalculate each effectively throwing The corresponding weight of ticket node, wherein all effective ballot nodes form set R, i ∈ R in the current ballot period;

The weighted value preferred section of the first preset number A in the top is determined according to each effective corresponding weight of node of voting Point.

4. the method as described in claim 1, which is characterized in that stored when in verifying node device and the aggregation equipment Have a W identical history polling cycles, each history polling cycle corresponding A preferably the identity information of node when, the use Greedy algorithm selects A preferably nodes of the first preset number from node of effectively voting in the current ballot period

Judge to whether there is first object polling cycle in the W history polling cycle, in the first object polling cycle The set that all preferred nodes are formedWherein set Q is the set of node of effectively voting in the current ballot period;

The first object polling cycle if it exists, it is determined that the corresponding preferred node of the first object polling cycle is current The corresponding preferred node of polling cycle;

The first object polling cycle if it does not exist then judges in the W history polling cycle with the presence or absence of the second target Polling cycle, there are the A-1 preferred set that are formed of nodes in the second target polling cycle

The second target polling cycle if it exists then selects a destination node and the set R in the set Q2In Node is as current ballot period corresponding A preferred node, wherein the destination node and set R2In each node it is different.

5. such as method of any of claims 1-4, which is characterized in that further include:

The newest public key data of all ballot nodes is obtained, and judges whether newest public key data has update, it, will if there is update Newest public key data is synchronized to all verifying node devices, and determines that the corresponding ballot node of the public key being not present is used as and leave Node;

If described in the first history polling cycle there are the first history polling cycle in the W history polling cycle Leaving node is effective ballot node or the preferred node, then deletes described first stored in the aggregation equipment and go through The identity information of the identity information of all preferred nodes or all effective ballot nodes in history polling cycle.

6. a kind of thresholding voting method based on EC-Schnoor signature algorithm, which is characterized in that apply to verify node device, The corresponding polymerization public key of W history polling cycle is stored in the verifying node device, which comprises

Receive the aggregate signature data in the current ballot period that aggregation equipment is sent and the identity letter of corresponding preferred node Breath;

From the corresponding polymerization public key of nearest W history polling cycle, determine that node corresponding with the aggregate signature data is public The most like polymerization public key of key set is as optimal polymerization public key;

Progress elliptic curve point adds on the basis of the optimal polymerization public key and/or point subtracts operation and obtains in the current ballot period The effectively corresponding newest polymerization public key of ballot node, and the aggregate signature data according to the newest polymerization public key verifications.

7. according to the method described in claim 6, it is characterized in that, described from the corresponding polymerization of nearest W history polling cycle In public key, determine that the most like polymerization public key of node public key set corresponding with the aggregate signature data is public as optimal polymerization Key includes:

Current ballot period corresponding second class voting results are constructed according to the identity information of the preferred node in current ballot period Vector VR, wherein the corresponding second class voting results vector of each polling cycle, each ballot node are thrown in the second class A corresponding dimension values are to indicate whether ballot node votes in ticket result vector, the corresponding dimension values phase of all preferred nodes Together, remaining corresponding dimension values of ballot node is identical;

Calculate corresponding W the second class voting results vector V of W history polling cycle being locally storedkWith the VRHamming distance From, wherein 1≤k≤W, and the determining and VRThe smallest V of Hamming distancekPolymerization public key in corresponding history polling cycle As optimal polymerization public key.

8. the method for claim 7, which is characterized in that further include:

The newest public key data of all ballot nodes is synchronized, and judges whether the newest public key data has update, if there is update, It then determines that the corresponding ballot node of the public key being not present is used as and leaves node;

If described in the first history polling cycle there are the first history polling cycle in the W history polling cycle Leaving node is effective ballot node or the preferred node, then deletes described first stored in the verifying node device and go through The identity information and polymerization public key of the corresponding all preferred nodes of history polling cycle.

9. a kind of block catenary system, which is characterized in that the block catenary system include aggregation equipment and verifying node device, Wherein,

The aggregation equipment is used to execute being signed as described in any one of claims 1 to 5 based on EC-Schnoor and calculated Step in the thresholding voting method of method;

The verifying node device is used to execute being signed as described in any one of claim 6 to 8 based on EC-Schnoor and calculated Step in the thresholding voting method of method.

10. a kind of terminal device, which is characterized in that the terminal device includes memory and processor, is deposited on the memory The computer program that can be run on the processor is contained, is realized when the computer program is executed by the processor as weighed Benefit requires the step in the thresholding voting method described in any one of 1-8 based on EC-Schnoor signature algorithm.

11. a kind of thresholding ballot system based on EC-Schnoor signature algorithm characterized by comprising

Receiving unit, for obtaining the signed data for node transmission of effectively voting in the current ballot period;

Selecting unit, if the ratio of the total number M of the number N of effectively ballot node and all ballot nodes is more than first threshold T, Then confirmation is voted through, then the first preset number A is selected from node of effectively voting in the current ballot period using greedy algorithm A preferred node, the A is no more than N and not less than the product of M and T;

Polymerized unit, the number of signature that preferred node all in the current ballot period is sent using EC-Schnoor signature algorithm According to being polymerize, corresponding aggregate signature data are generated;

Transmission unit is set for the identity information of the aggregate signature data and corresponding preferred node to be sent to verifying node It is standby, so that verifying node device verifies the aggregate signature data.

12. a kind of computer readable storage medium, which is characterized in that be stored with computer on the computer readable storage medium Program, the computer program can be executed by one or more processor, to realize such as any one of claims 1 to 8 institute The step in the thresholding voting method based on EC-Schnoor signature algorithm stated.

13. a kind of computer program product, which is characterized in that including computer instruction, when run on a computer, so that Computer can execute the ballot of the thresholding described in any one of the claims 1 to 8 based on EC-Schnoor signature algorithm Step in method.

Technical field

The present invention relates to information security fields, more particularly to the thresholding voting method based on EC-Schnoor signature algorithm, System and relevant device.

Background technique

With the rapid development of network, network-based ballot mode is on a large scale instead of original paper ballot side Formula.

Existing network voting mode, is often based on digital signature technology, by the private key pair of each ballot node itself Vote information is digitally signed, and signing messages is sent to statistics node, finally by the digital signature of all ballot nodes Verifying node is sent to be verified.

The digital signature data for needing aggregation to send all ballot nodes in existing scheme gives verifying node, especially When applying to block chain network, it is also necessary to which block chain network stores the digital signature of all ballot nodes, waste bandwidth and storage Resource.

Summary of the invention

The offer thresholding voting method that the embodiment of the invention provides a kind of based on EC-Schnoor signature algorithm, system and Relevant device, for saving network system resources.

First aspect of the embodiment of the present invention provides a kind of thresholding voting method based on EC-Schnoor signature algorithm, It is characterized in that, applies to aggregation equipment, which comprises

Obtain the signed data for node transmission of effectively voting in the current ballot period;

If the ratio of the total number M of the number N of effectively ballot node and all ballot nodes is more than first threshold T, really Recognize and vote through, and it is excellent to use greedy algorithm to select the first preset number A from node of effectively voting in the current ballot period Node is selected, the A is no more than N and not less than the product of M and T;

The signed data that all preferred node in the current ballot period is sent using EC-Schnoor signature algorithm into Row polymerization, generates corresponding aggregate signature data;

The identity information of the aggregate signature data and corresponding preferred node is sent to verifying node device, so that It verifies node device and verifies the aggregate signature data.

Optionally, as a kind of possible embodiment, it is thrown using greedy algorithm from current described in the embodiment of the present invention It effectively votes in the ticket period and selects A preferably nodes of the first preset number in node and include:

Optionally, as a kind of possible embodiment, described effective out of current ballot the period in the embodiment of the present invention Most preceding A preferably node of number of effectively voting in nearest W history polling cycle is selected in ballot node includes:

According to the identity information for node of effectively voting in the current ballot period received construct first kind voting results to Amount, wherein the corresponding first kind voting results vector of each polling cycle, each ballot node are tied in first kind ballot A corresponding dimension values are to indicate whether ballot node votes in fruit vector, the corresponding dimension values phase of all effective ballot nodes Together, remaining corresponding dimension values of ballot node is identical;

The corresponding voting results vector of nearest W history polling cycle is preserved in aggregation equipment, forms M × W's Matrix, mI, jFor i-th of ballot node in jth time polling cycle corresponding dimension values, according to formulaCalculating each has The corresponding weight of effect ballot node, wherein all effective ballot nodes form set R, i ∈ R in the current ballot period;

A in the top preferred nodes of weighted value are determined according to the corresponding weight of each effective ballot node.

Optionally, as a kind of possible embodiment, when verifying node device polymerize with described in the embodiment of the present invention It is stored with W identical history polling cycles in node device, it is described when the preferred node of each history polling cycle corresponding A Selecting A preferably nodes of the first preset number from node of effectively voting in the current ballot period using greedy algorithm includes:

Judge in the W history polling cycle with the presence or absence of first object polling cycle, the first object ballot week The set that all preferred nodes are formed in phaseWherein set Q is the set of node of effectively voting in the current ballot period;

The first object polling cycle if it exists, it is determined that the corresponding preferred node of the first object polling cycle is Current ballot period corresponding preferred node;

The first object polling cycle if it does not exist then judges in the W history polling cycle with the presence or absence of second Target polling cycle, there are the A-1 preferred set that are formed of nodes in the second target polling cycle

The second target polling cycle if it exists then selects a destination node and the set in the set Q R2In node as current ballot period corresponding A preferred node, wherein the destination node and set R2In each node It is different.

Optionally, as a kind of possible embodiment, in the embodiment of the present invention based on EC-Schnoor signature algorithm Thresholding voting method can also include:

The newest public key data of all ballot nodes is obtained, and judges whether newest public key data has update, if there is update, Newest public key data is then synchronized to all verifying node devices, and determines the corresponding ballot node conduct of public key being not present Leave node;

If there are the first history polling cycle in the W history polling cycle, in the first history polling cycle The node that leaves is effective ballot node or the preferred node, then deletes described the stored in the aggregation equipment The identity information of the identity information of all preferred nodes or all effective ballot nodes in one history polling cycle.

Second aspect of the embodiment of the present invention provides a kind of thresholding voting method based on EC-Schnoor signature algorithm, It is characterized in that, applies to verify node device, be stored with the corresponding polymerization of W history polling cycle in the verifying node device Public key, which comprises

Receive the aggregate signature data in the current ballot period that aggregation equipment is sent and the body of corresponding preferred node Part information;

From the corresponding polymerization public key of nearest W history polling cycle, section corresponding with the aggregate signature data is determined The most like polymerization public key of point public key set is as optimal polymerization public key;

Progress elliptic curve point adds on the basis of the optimal polymerization public key and/or point subtracts operation and obtains current ballot week The corresponding newest polymerization public key of node of effectively voting in phase, and the aggregate signature number according to the newest polymerization public key verifications According to.

Current ballot period corresponding second class is constructed according to the identity information of the preferred ballot node in current ballot period Voting results vector VR, wherein the corresponding second class voting results vector of each polling cycle, each ballot node exist A corresponding dimension values in second class voting results vector, the corresponding dimension values of all preferred ballot nodes are identical, remaining is voted The corresponding dimension values of node are identical;

Calculate corresponding W the second class voting results vector V of W history polling cycle being locally storedkWith the VRThe Chinese Prescribed distance, wherein 1≤k≤W, and the determining and VRThe smallest V of Hamming distancekPolymerization in corresponding history polling cycle Public key is as optimal polymerization public key;

Optionally, as a kind of possible embodiment, in the embodiment of the present invention based on EC-Schnoor signature algorithm Thresholding voting method can also include:

The newest public key data of all ballot nodes is synchronized, and judges whether the newest public key data has update, if having It updates, it is determined that the corresponding ballot node of the public key being not present, which is used as, leaves node;

If there are the first history polling cycle in the W history polling cycle, in the first history polling cycle The node that leaves is effective ballot node or the preferred node, then deletes described the stored in the verifying node device The identity information and polymerization public key of the corresponding all preferred nodes of one history polling cycle.

The third aspect of the embodiment of the present invention provides a kind of block catenary system, which is characterized in that the block catenary system packet Include aggregation equipment and verifying node device, wherein

The aggregation equipment is used to execute the thresholding throwing such as any one of first aspect institute EC-Schnoor signature algorithm Step in ticket method embodiment;

The verifying node device is used to execute the thresholding of the EC-Schnoor signature algorithm as described in any one of second aspect Step in voting method embodiment.

Fourth aspect of the embodiment of the present invention provides a kind of terminal device, which is characterized in that the terminal device includes depositing Reservoir and processor are stored with the computer program that can be run on the processor, the computer journey on the memory When sequence is executed by the processor realize as described in any one of claim first aspect and second aspect based on EC- Step in the thresholding voting method embodiment of Schnoor signature algorithm.

Optionally, as a kind of possible embodiment, the terminal device in the embodiment of the present invention be composition CDN network or The node of person's block chain network.

The 5th aspect of the embodiment of the present invention provides a kind of thresholding ballot system based on EC-Schnoor signature algorithm, It is characterized in that, comprising:

Receiving unit, for obtaining the signed data for node transmission of effectively voting in the current ballot period;

Selecting unit, if the ratio of the total number M of the number N of effectively ballot node and all ballot nodes is more than the first threshold Value T, then confirmation is voted through, then selects the first present count from node of effectively voting in the current ballot period using greedy algorithm A preferred nodes of mesh, the A is no more than N and not less than the product of M and T;

Polymerized unit, the label that preferred node all in the current ballot period is sent using EC-Schnoor signature algorithm Name data are polymerize, and corresponding aggregate signature data are generated;

Transmission unit, for the identity information of the aggregate signature data and corresponding preferred node to be sent to verifying section Point device, so that verifying node device verifies the aggregate signature data.

The 5th aspect of the embodiment of the present invention provides a kind of computer readable storage medium, which is characterized in that the calculating Computer program is stored on machine readable storage medium storing program for executing, the computer program can be executed by one or more processor, with Realize that the thresholding based on EC-Schnoor signature algorithm as described in any one of claim first aspect and second aspect is thrown Step in ticket method embodiment.

The 6th aspect of the embodiment of the present invention provides a kind of computer program product, which is characterized in that refers to including computer It enables, when run on a computer, computer is executed described in any one of above-mentioned first aspect and second aspect The thresholding voting method embodiment based on EC-Schnoor signature algorithm in step.

As known from the above:

It, can be from working as after aggregation equipment determines voting through in the current ballot period in the embodiment of the present invention It effectively votes in preceding polling cycle and selects the preferred node of the first preset number in node, and use EC-Schnoor signature algorithm The signed data sent to preferred node all in the current ballot period polymerize, and generates corresponding aggregate signature data, Since the occupied storage of all signed datas that the occupied memory space of aggregate signature data is less than composition aggregate signature is empty The sum of between, thus bandwidth and memory space that data transmission occupies can be saved.Secondly, being used during choosing preferred node Greedy algorithm, the preferred node group which can choose global optimum close, save optimal polymerization public key and polymerize with newest The public key aminated polyepichlorohydrin of public key same composition member, and then reduce verifying node device and calculate the corresponding polymerization of current ballot period The calculation amount of public key.

Detailed description of the invention

Fig. 1 is a kind of thresholding voting method one embodiment based on EC-Schnoor signature algorithm in the embodiment of the present invention Schematic diagram;

Fig. 2 is a kind of another implementation of the thresholding voting method based on EC-Schnoor signature algorithm in the embodiment of the present invention It illustrates and is intended to;

Fig. 3 is a kind of implementation of the thresholding ballot system based on EC-Schnoor signature algorithm in the embodiment of the present invention It illustrates and is intended to;

Fig. 4 is a kind of one embodiment schematic diagram of terminal device in the embodiment of the present invention.

The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.

Specific embodiment

In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right The present invention is further elaborated.It should be appreciated that described herein, specific examples are only used to explain the present invention, not For limiting the present invention.Based on the embodiments of the present invention, those of ordinary skill in the art are not before making creative work Every other embodiment obtained is put, shall fall within the protection scope of the present invention.

The description and claims of this application and term " first ", " second ", " third ", " in above-mentioned attached drawing The (if present)s such as four " are to be used to distinguish similar objects, without being used to describe a particular order or precedence order.It should manage The data that solution uses in this way are interchangeable under appropriate circumstances, so that the embodiments described herein can be in addition to illustrating herein Or the sequence other than the content of description is implemented.In addition, term " includes " and " having " and their any deformation, it is intended that Cover it is non-exclusive include, for example, containing the process, method, system, product or equipment of a series of steps or units need not limit In step or unit those of is clearly listed, but may include be not clearly listed or for these process, methods, produce The other step or units of product or equipment inherently.

It should be noted that the description for being related to " first ", " second " etc. in the present invention is used for description purposes only, and cannot It is interpreted as its relative importance of indication or suggestion or implicitly indicates the quantity of indicated technical characteristic.Define as a result, " the One ", the feature of " second " can explicitly or implicitly include at least one of the features.In addition, the skill between each embodiment Art scheme can be combined with each other, but must be based on can be realized by those of ordinary skill in the art, when technical solution Will be understood that the combination of this technical solution is not present in conjunction with there is conflicting or cannot achieve when, also not the present invention claims Protection scope within.

Multi-signature is a kind of special Digital Signature Algorithm.On the basis of general digital signature, multi-signature is additional It is required that different user can polymerize the signature of the same information.Signature size after polymerization should be less than all different users Summation before signature polymerization, while verifying the signature after polymerization can make verifier believe that signature group is signed really. In a multi-signature system, there are Three role, signer, polymerization person, verifiers.Signer includes multiple user's sections Point, they have respectively different public keys, private key, and sign to a shared information.Polymerization person is often by some User node undertakes, it is polymerize after collecting the signature from signer.Verifier may include any number of user's section Point.Verifier determines whether that the signer of all participations all signs to the information by the signature after verifying polymerization.

Applicant have observed that during multi-signature algorithm being applied to network voting, such as can be by all ballots The signed data of person carries out polymerization and generates aggregate signature data, needs the public key by all voters to polymerize in verification process And according to the polymerization public key verifications aggregate signature data.Although however this mode can reduce the occupied network of signed data Resource, but still have the space advanced optimized.For example, signature polymerization is carried out using EC-Schnoor signature algorithm, it is N number of when having When ballot node, in order to verify aggregate signature, verifying each time calculates to be required to carry out about n times corresponding each verifying node Point add operation (two Point addition operations of elliptic curve in finite field) is to obtain polymerization public key, each when the value of N is huge Polymerization public key is calculated in secondary verification process can all expend a large amount of computing resource and time, and for multiple authentication, then the wasting of resources is more Add serious.

Wherein, the EC-Schnoor signature algorithm in the embodiment of the present invention refers to based on elliptic curve construction Schnoor signature algorithm, the public key of each user are a point on elliptic curve, and each verifying node gathers public key It closes, is equal to and calculates the point add operation that all public keys correspond to Point on Elliptic Curve, the interaction of the EC-Schnoor algorithm and user Process can be abstracted as four steps: 1, signature node sends commitment information (Commitment) to aggregation;2, polymerization section Point sends challenge information (Challenge) and gives signature node;3, signature node generates echo message (Response) according to challenge; 4, aggregation generates aggregate signature according to the promise and response of signature node, and broadcasts aggregate signature and test to all signatures Demonstrate,prove node.During step 1 arrives step 3, repeatedly interacting between aggregation and signature node is in order to ensure each label Name node is the owner of the corresponding public key of signature, prevents signature node from doing evil.

For ease of understanding, the detailed process in the embodiment of the present invention is described below, referring to Fig. 1, the present invention is real It applies in example and includes: based on EC-Schnoor signature algorithm thresholding voting method one embodiment

101, the signed data for node transmission of effectively voting in the current ballot period is obtained;

In the embodiment of the present invention, when ballot node proposal information corresponding to polled data is agreed with during network voting When, commitment information can be sent and give aggregation equipment.In order to ensure each ballot node is possessing for the corresponding public key of signature Person prevents ballot node from doing evil, when receiving commitment information that ballot node is sent and to corresponding ballot node reverts back challenge Information, to further confirm that the validity of signature.

In the embodiment of the present invention, if receiving the corresponding echo message of challenge information, the corresponding throwing of echo message is confirmed Ticket node is that effectively ballot node, aggregation equipment can be according to the commitment information that effective ballot node is sent and corresponding times Information is answered to generate corresponding signed data.

If 102, the effectively ratio of the total number M of the number N of ballot node and all ballot nodes is more than first threshold T, A preferred nodes of the first preset number are then selected from node of effectively voting in the current ballot period using greedy algorithm;

After ballot is completed, aggregation equipment can count the number N and all ballots for calculating effectively ballot node The ratio of the total number M of node illustrates ballot not by without carrying out if the ratio is not above preset first threshold T Signed data polymerization, if the ratio is more than preset first threshold T, illustrates to vote through, needs to carry out signed data polymerization. The number of node of effectively voting in practice is likely larger than the product of M and T, however applicant have observed that confirmation is voted through only Need to verify the authenticity of the signature of at least M*T nodes of effectively voting.Such as T is set in 1000 ballot nodes and is 0.5, the number for node of effectively voting in the current ballot period is 800, then at least only needs to verify 500 effectively ballot nodes Signature authenticity, polymerize without the signed data to all 800 ballots nodes.In view of this, the application is real The preferred section of the first preset number A can be selected using greedy algorithm from node of effectively voting in the current ballot period by applying in example Point, A is no more than N and not less than the product of M and T.

Secondly, applicant have observed that, effective ballot node in each of multiple voting process polling cycle is not It is effective ballot node set that is entirely different, i.e., being formed in voting process each time, multiple history polling cycles are corresponding Effectively there are overlapping interval between ballot node set, between the forming member of the corresponding polymerization public key of multiple history polling cycles There is also overlappings.In view of this, greedy algorithm can be used from effective ballot in the current ballot period in the embodiment of the present application The selection ballot higher first preset number A of probability preferred nodes in node, and by A preferred corresponding signed datas of node It is polymerize, so that corresponding polymerization public key and the history polling cycle of the aggregate signature data in current ballot period polymerize public key Forming member's degree of overlapping it is higher.Greedy algorithm always can obtain locally optimal solution, this hair in the case where minimum computing cost Bright embodiment can be by using greedy algorithm, and the node calculation amount of selection verifying in advance is minimum before carrying out signed data polymerization Preferred node set so that originally need the calculating of n times discrete logarithm multiplication to become very little, it is optimal to be optimized to 0 time.It is poly- Nearest W history ballot week can be selected using greedy algorithm from node of effectively voting in the current ballot period by closing node device Preceding A at most preferred node of number of effectively voting in phase.The way of realization of specific greedy algorithm is herein without limitation.

Optionally, as a kind of possible embodiment, aggregation equipment is all from current ballot in the embodiment of the present invention Effectively vote in phase select in node most preceding A preferably node of number is effectively voted in nearest W history polling cycle can To include:

According to the identity information for node of effectively voting in the current ballot period received construct first kind voting results to Amount, wherein the corresponding first kind voting results vector of each polling cycle, each ballot node are tied in first kind ballot A corresponding dimension values in fruit vector, the corresponding dimension values of all effective ballot nodes are identical, remaining corresponding dimension of node of voting Angle value is identical;

The corresponding voting results vector of nearest W history polling cycle is preserved in aggregation equipment, forms M × W's Matrix, mI, jFor i-th of ballot node in jth time polling cycle corresponding dimension values, according to formulaCalculating each has The corresponding weight of effect ballot node, wherein all effective ballot nodes form set R, i ∈ R in the current ballot period;

Weighted value the first preset number A in the top is determined preferably according to each effective corresponding weight of node of voting Node.

It can be understood that weighted value in above-described embodiment calculation be only exemplary, can be according to reality Demand is reasonably arranged, it is only necessary to meet greedy principle.

Optionally, as a kind of possible embodiment, when being stored with the identical history ballot of W in verifying node device Period, when each history polling cycle corresponding A preferred node, using greedy algorithm from current ballot week in the embodiment of the present invention It effectively votes in phase and selects A preferably nodes of the first preset number in node and include:

Judge to whether there is first object polling cycle in W history polling cycle, own in first object polling cycle It is preferred that the set that node is formedWherein set Q is the set of node of effectively voting in the current ballot period;

First object polling cycle if it exists, it is determined that the corresponding preferred node of first object polling cycle is current ballot Period corresponding preferred node;

First object polling cycle if it does not exist then judges to vote in W history polling cycle with the presence or absence of the second target In the period, there are the A-1 preferred set that are formed of nodes in the second target polling cycle

The second target polling cycle if it exists then selects a destination node and the set in the set Q R2In node as current ballot period corresponding A preferred node, wherein the destination node and set R2In each node It is different.

Specifically, multiple second target polling cycles if it exists, then can take any one, for example, can take with The smallest second target polling cycle of current ballot periodic intervals.

The second above-mentioned target polling cycle if it does not exist, can also further find third target polling cycle, this There are the set that A-2 preferred nodes are formed in three target polling cyclesAnd so on may finally search out preferably Polling cycle.

It is understood that the data of W history polling cycle of the preservation in verifying node device are set with aggregation The data of W history polling cycle of standby middle preservation, although all using the number of same letter mark history polling cycle, it can The data of the history polling cycle of different number to be arranged according to actual needs, i.e. the value of the two W can be different, tool Body can according to actual needs and hardware resource is reasonably arranged, herein without limitation.

Optionally, the confidence level that ballot is improved in the embodiment of the present invention can choose multiple verifying node devices, example If optional multiple node devices in block chain network are as verifying node device, specifically herein without limitation.

103, the number of signature that preferred node all in the current ballot period is sent using EC-Schnoor signature algorithm According to being polymerize, corresponding aggregate signature data are generated;

After determining preferred node all in the current ballot period, aggregation equipment can use EC-Schnoor The signed data that signature algorithm sends preferred node all in the current ballot period polymerize, and generates corresponding polymerization label Name data.

104, the identity information of aggregate signature data and corresponding preferred node is sent to verifying node device.

The identity information of aggregate signature data and corresponding preferred node can be sent to verifying section by aggregation equipment Point device, so that verifying node device verifies aggregate signature data.

It is set it is understood that the identity information of the preferred node in the embodiment of the present invention can be corresponding ballot node Standby unique number is also possible to the corresponding public key of node device of voting, specifically herein without limitation.

It, can be from working as after aggregation equipment determines voting through in the current ballot period in the embodiment of the present invention It effectively votes in preceding polling cycle and selects the preferred node of the first preset number in node, and use EC-Schnoor signature algorithm The signed data sent to preferred node all in the current ballot period polymerize, and generates corresponding aggregate signature data, Since the occupied storage of all signed datas that the occupied memory space of aggregate signature data is less than composition aggregate signature is empty The sum of between, thus bandwidth and memory space that data transmission occupies can be saved.Secondly, being used during choosing preferred node Greedy algorithm, the preferred node group which can choose global optimum close, save optimal polymerization public key and polymerize with newest The public key aminated polyepichlorohydrin of public key same composition member, and then reduce verifying node device and calculate the corresponding polymerization of current ballot period The calculation amount of public key.

Optionally, as a kind of possible embodiment, it on the basis of above-mentioned embodiment shown in FIG. 1, is carrying out often Before primary polled data statistics, and judge whether newest public key data has update, if there is update, by newest public key data All verifying node devices are synchronized to, and determines that the corresponding ballot node of the public key being not present is used as and leaves node;

If leaving section in the first history polling cycle there are the first history polling cycle in W history polling cycle Point is effective ballot node or preferred node, then deletes all in the first history polling cycle stored in aggregation equipment It is preferred that the identity information of the identity information of node or all effective ballot nodes.

It is illustrated below in conjunction with verifying process of the detailed process to the verifying node device side in the embodiment of the present invention. It wherein verifies in node device and is stored with the corresponding polymerization public key of W history polling cycle, referring to Fig. 2, the embodiment of the present invention A kind of another embodiment of middle thresholding voting method based on EC-Schnoor signature algorithm can include:

201, the aggregate signature data in the current ballot period that reception aggregation equipment is sent and corresponding preferred node Identity information;

202, from the corresponding polymerization public key of nearest W history polling cycle, section corresponding with aggregate signature data is determined The most like polymerization public key of point public key set is as optimal polymerization public key;

Node device is verified from the corresponding polymerization public key of nearest W history polling cycle, determining and aggregate signature data The most like polymerization public key of corresponding node public key set is as optimal polymerization public key.Specific identification aggregate signature data are corresponding The method of the most like polymerization public key of node public key set herein without limitation, such as can be overlapped according to the public key for participating in party Degree carries out calculating phase knowledge and magnanimity, and degree of overlapping is higher, and phase knowledge and magnanimity are higher.

Illustratively, verifying node device can be constructed according to the identity information of the preferred ballot node in current ballot period Current ballot period corresponding second class voting results vector VR, it is W corresponding to calculate W history polling cycle being locally stored Second class voting results vector VkWith VRHamming distance, and determining and VRThe smallest V of Hamming distancekCorresponding history ballot Polymerization public key in period is as optimal polymerization public key.

Specifically, when verifying node device receive current ballot period corresponding aggregate signature data and it is corresponding preferably After the identity information of node, the verifying node device in the embodiment of the present invention can be according to the preferred ballot in current ballot period The identity information construction current ballot period corresponding second class voting results vector V of nodeR, wherein each polling cycle pair A second class voting results vector is answered, each ballot node corresponding dimension values in the second class voting results vector, The corresponding dimension values of all preferred ballot nodes are identical, remaining corresponding dimension values of ballot node is identical.Illustratively, it is assumed that whole A system shares M ballot node, without loss of generality it is assumed that each node can be indicated with a serial number, each second There are class voting results vector M dimension values to correspond respectively with M ballot node, wherein it is preferred that the corresponding dimension values of node It is 1, the dimension values of remaining node are 0, then the second class voting results vector of the corresponding M dimension of each polling cycle.Its In, current ballot period corresponding second class voting results vector VRIt indicates, corresponding second class of other history polling cycles Voting results vector VkIt indicates, wherein 1≤k≤W.

When verifying node device receives current ballot period corresponding aggregate signature data and corresponding preferred node After identity information, it is only necessary to find out an optimal history polling cycle in the data of itself storage, the optimal history ballot Period preferred node set and the similarity of the preferred node set in current ballot period are very big, are based on the history polling cycle pair The polymerization public key answered can carry out that elliptic curve point adds and/or point subtracts operation and obtains current ballot period corresponding newest polymerization public affairs Key can further reduced the calculation amount calculated in the current ballot period in signed data verification process.Such as current ballot The preferred node serial number in period is respectively 1,3,5,7,9, verifies in node device and is stored with the corresponding polymerization of history polling cycle The corresponding preferred node serial number of public key E, polymerization public key E is 1,3,5,7,8, then only needs to carry out polymerization public key E primary ellipse Circular curve point subtracts operation (subtracting the corresponding public key of preferred node 8), then carries out an elliptic curve point add operation (plus preferred section 9 corresponding public keys of point) current ballot period corresponding newest polymerization public key can be obtained.

Verifying in order to select an optimal history polling cycle from W history polling cycle, in the embodiment of the present invention Node device can calculate corresponding W the second class voting results vector V of W history polling cycle being locally storedkWith it is newest The Hamming distance of voting results vector, and determining and VRThe smallest V of Hamming distancekPolymerization in corresponding history polling cycle Public key is as optimal polymerization public key.

203, progress elliptic curve point adds on the basis of optimal polymerization public key and/or point subtracts operation and obtains current ballot week The corresponding newest polymerization public key of node of effectively voting in phase, and according to newest polymerization public key verifications aggregate signature data.

In the embodiment of the present invention, it is W second corresponding that verifying node device calculates W history polling cycle being locally stored Class voting results vector VkWith the Hamming distance of newest voting results vector, and determining and VRThe smallest V of Hamming distancekIt is corresponding History polling cycle in polymerization public key as optimal polymerization public key;Elliptic curve is carried out on the basis of optimal polymerization public key Point plus and/or point subtract operation and obtain current ballot period corresponding newest polymerization public key, save optimal polymerization public key with it is newest It polymerize the public key aminated polyepichlorohydrin of public key same composition member, it is corresponding poly- reduces the verifying node device calculating current ballot period Close the calculation amount of public key.

In order to make it easy to understand, below in conjunction with specifically with example to the thresholding voting method in the embodiment of the present invention into Row description.

Assuming that whole system shares M ballot node, each node has public key known to the overall situation.When there is arbitrary node to change When becoming public key, meeting the whole network synchronizes newest public key.Without loss of generality it is assumed that each node can be indicated with a serial number. The result of each verifying node maintenance nearest W times different public key polymerization.The size of W depend on verifying node storage and Computing capability, for example, being determined between 5 to 10 by each verifying node oneself, each node can be different.Each result all makes It is indicated with the 0 of a M-bit, 1 vector v.There are some public keys in the result of public key polymerization, then vector corresponds to position in the public key Setting is 1, is otherwise 0.

Result of the aggregation maintenance apart from current time nearest W times each node ballot.The result voted every time uses 0,1 vector of one M-bit indicates, if the node is voted, otherwise it is 0 that vector, which is 1 on the node corresponding position,.The W A vector forms the matrix of a M × W together.Element m in matrixi,jIndicate the ballot node of serial number i in jth before Whether vote in secondary effective ballot.

Whether newest aggregation first checks for public key when receiving ballot every time.If public key be not it is newest, explanation has Node is dynamically added, leaves network.The ballot history for leaving node should be emptied, and is numbered and distributes to new addition network Node.Then judge whether votes N is greater than tM.If it is less than tM, illustrates votes deficiency, exit this ballot.If N is big In being equal to tM, tM node is selected from N number of ballot node using following greedy algorithm and is polymerize.

Greedy algorithm can always obtain locally optimal solution in the case where minimum computing cost, and the embodiment of the present invention can lead to It crosses using greedy algorithm, the smallest preferred node collection of node calculation amount of selection verifying in advance before carrying out signed data polymerization It closes, so that need the calculating of n times discrete logarithm multiplication to become very little originally, it is optimal to be optimized to 0 time.

We indicate the set of effectively ballot node with R, and r is equally distributed random number in [0,1] range, and e is number Constant is learned, then optional greedy algorithm implementation can be with are as follows:

Calculating process is: when i be definite value when, calculate each node probability andIt selects wherein in the top The public key of tM node carries out signature aminated polyepichlorohydrin.Finally, will be related in multi-signature and signature after aggregation polymerization Node serial number or public key broadcasts are to all verifying nodes.

After signature after verifying node and receiving polymerization, extracted first according to the node serial number or list of public keys that receive The vector of one corresponding M-bit of current polymerization result, then successively calculates the Hamming distance of the vector Yu previously stored vector From (Hamming Distance).The calculation method of Hamming distance is as follows:

The vector of two M-bits can be considered as two M dimensional vectors, and each element in vector is 0 or 1.It is opened from the 1st dimension Begin to M to tie up, if two vector corresponding position elements are different, Hamming distance+1.

After verifying node device calculates the vector of current polymerization result and the Hamming distance of previously stored vector, the Chinese is selected The corresponding public key polymerization of the smallest vector of prescribed distance, then the polymerization of the public key is calculated as the calculation amount of current public key polymerization most It is small.

Referring to Fig. 3, the embodiment of the invention also provides a kind of, the thresholding ballot based on EC-Schnoor signature algorithm is System comprising:

Receiving unit 301, for obtaining the signed data for node transmission of effectively voting in the current ballot period;

Selecting unit 302, if the ratio of the total number M of the number N of effectively ballot node and all ballot nodes is more than the One threshold value T, then confirmation is voted through, then it is pre- first to be selected from node of effectively voting in the current ballot period using greedy algorithm If A preferred nodes of number, A is no more than N and not less than the product of M and T;

Polymerized unit 303 sends preferred node all in the current ballot period using EC-Schnoor signature algorithm Signed data polymerize, generate corresponding aggregate signature data;

Transmission unit 304, for the identity information of aggregate signature data and corresponding preferred node to be sent to verifying section Point device, so that verifying node device verifies aggregate signature data.

It, can be from working as after aggregation equipment determines voting through in the current ballot period in the embodiment of the present invention It effectively votes in preceding polling cycle and selects the preferred node of the first preset number in node, and use EC-Schnoor signature algorithm The signed data sent to preferred node all in the current ballot period polymerize, and generates corresponding aggregate signature data, Since the occupied storage of all signed datas that the occupied memory space of aggregate signature data is less than composition aggregate signature is empty The sum of between, thus bandwidth and memory space that data transmission occupies can be saved.Secondly, being used during choosing preferred node Greedy algorithm, the preferred node group which can choose global optimum close, save optimal polymerization public key and polymerize with newest The public key aminated polyepichlorohydrin of public key same composition member, and then reduce verifying node device and calculate the corresponding polymerization of current ballot period The calculation amount of public key.

Optionally, as a kind of possible embodiment, the selecting unit in the embodiment of the present invention may further include:

Module is constructed, the first kind is constructed according to the identity information for node of effectively voting in the current ballot period received and is thrown Ticket result vector, wherein each polling cycle corresponds to a first kind voting results vector, each ballot node is first A corresponding dimension values in class voting results vector, the corresponding dimension values of all effective ballot nodes are identical, remaining node of voting Corresponding dimension values are identical;

Computing module preserves the corresponding voting results vector of nearest W history polling cycle, shape in aggregation equipment At the matrix of M × W, mI, jFor i-th of ballot node in jth time polling cycle corresponding dimension values, according to formulaMeter The corresponding weight of each effectively ballot node is calculated, wherein all effective ballot nodes form set R, i ∈ in the current ballot period R;

Selecting module determines weighted value the first present count in the top according to the corresponding weight of each effective ballot node A preferred nodes of mesh.

Optionally, as a kind of possible embodiment, it votes when being stored with identical W history in verifying node device When period corresponding preferred node, the selecting unit in the embodiment of the present invention be may further include:

First judgment module, for judging in W history polling cycle with the presence or absence of first object polling cycle, the first mesh Mark the set that all preferred nodes are formed in polling cycleWherein set Q is that effectively ballot saves in the current ballot period The set of point;

First determining module, if it exists first object polling cycle, it is determined that first object polling cycle is corresponding preferably Node is current ballot period corresponding preferred node;

Second judgment module, first object polling cycle, then judge to whether there is in W history polling cycle if it does not exist Second target polling cycle, there are the A-1 preferred set that are formed of nodes in the second target polling cycle

Second confirmation module, the second target polling cycle, then select a target section in the set Q if it exists Point and the set R2In node as current ballot period corresponding A preferred node, wherein the destination node and collection Close R2In each node it is different.

Optionally, as a kind of possible embodiment, the thresholding ballot system in the embodiment of the present invention can also include:

Updating unit for obtaining the newest public key data of all ballot nodes, and judges whether newest public key data has It updates, if there is update, newest public key data is synchronized to all verifying node devices, and determine that the public key being not present is corresponding Ballot node as leaving node;If there are the first history polling cycles, described first to go through in the W history polling cycle The node that leaves in history polling cycle is effective ballot node or the preferred node, then deletes the aggregation equipment The identity information of all preferred nodes or all effective ballot nodes in the first history polling cycle of middle storage Identity information.

Optionally, as a kind of possible embodiment, thresholding ballot system can also include: in the embodiment of the present invention

Second receiving unit, for receiving the aggregate signature data in current ballot period of aggregation equipment transmission and right The identity information for the preferred node answered;

Second construction unit, the identity information for the preferred ballot node according to the current ballot period construct current ballot Period corresponding second class voting results vector VR, wherein each polling cycle corresponds to a second class voting results vector, Each ballot node corresponding dimension values in the second class voting results vector, the corresponding dimension of all preferred ballot nodes It is worth identical, remaining corresponding dimension values of ballot node is identical;

Second computing unit calculates corresponding W the second class voting results vector of W history polling cycle being locally stored VkWith the Hamming distance of newest voting results vector, wherein 1≤k≤W, and determining and VRThe smallest V of Hamming distancekIt is corresponding Polymerization public key in history polling cycle is as optimal polymerization public key;

Second polymerized unit, progress elliptic curve point adds on the basis of optimal polymerization public key and/or point subtracts operation and obtains The corresponding newest polymerization public key of node of effectively voting in the current ballot period.

It is apparent to those skilled in the art that for convenience and simplicity of description, in the embodiment of the present invention The specific work process of the system, apparatus, and unit of description, can refer to corresponding processes in the foregoing method embodiment, herein not It repeats again.

Referring to Fig. 4, additionally providing a kind of terminal device in the present embodiment, terminal device 1 can be PC (Personal Computer, PC), be also possible to smart phone, tablet computer, palm PC, portable computer, intelligent router, Mine machine, network storage equipment terminal device.

The terminal device 1 can be the node of composition CDN network or block chain network.

The terminal device 1 may include memory 11, processor 12 and bus 13.When processor 11 executes computer program Realize the step in above-mentioned thresholding voting method embodiment shown in FIG. 1, such as step 101 shown in FIG. 1 is to 104.Alternatively, place Reason device realizes each module or the function of unit in above-mentioned each Installation practice when executing computer program.

In some embodiments of the present invention, processor is specifically used for realizing following steps:

Obtain the signed data for node transmission of effectively voting in the current ballot period;

If the ratio of the total number M of the number N of effectively ballot node and all ballot nodes is more than first threshold T, really Recognize and vote through, and it is excellent to use greedy algorithm to select the first preset number A from node of effectively voting in the current ballot period Node is selected, A is no more than N and not less than the product of M and T;

The signed data that all preferred node in the current ballot period is sent using EC-Schnoor signature algorithm into Row polymerization, generates corresponding aggregate signature data;

The identity information of aggregate signature data and corresponding preferred node is sent to verifying node device, so that verifying Node device verifies aggregate signature data.

Optionally, in some embodiments of the present invention, processor can be also used for realizing following steps:

Number is effectively voted most from selecting in nearest W history polling cycle in node of effectively voting in the current ballot period Preceding A more preferred nodes.

Optionally, in some embodiments of the present invention, processor can be also used for realizing following steps:

According to the identity information for node of effectively voting in the current ballot period received construct first kind voting results to Amount, wherein the corresponding first kind voting results vector of each polling cycle, each ballot node are tied in first kind ballot A corresponding dimension values in fruit vector, the corresponding dimension values of all effective ballot nodes are identical, remaining corresponding dimension of node of voting Angle value is identical;

The corresponding voting results vector of nearest W history polling cycle is preserved in aggregation equipment, forms M × W's Matrix, mI, jFor i-th of ballot node in jth time polling cycle corresponding dimension values, according to formulaCalculating each has The corresponding weight of effect ballot node, wherein all effective ballot nodes form set R, i ∈ R in the current ballot period;

Weighted value the first preset number A in the top is determined preferably according to each effective corresponding weight of node of voting Node.

When verify the corresponding preferred node of identical W history polling cycle is stored in node device when, optionally, In some embodiments of invention, processor can be also used for realizing following steps:

Judge to whether there is first object polling cycle in W history polling cycle, own in first object polling cycle It is preferred that the set that node is formedWherein set Q is the set of node of effectively voting in the current ballot period;

First object polling cycle if it exists, it is determined that the corresponding preferred node of first object polling cycle is current ballot Period corresponding preferred node;

First object polling cycle if it does not exist then judges to vote in W history polling cycle with the presence or absence of the second target In the period, there are the A-1 preferred set that are formed of nodes in the second target polling cycle

The second target polling cycle if it exists then selects a destination node and the set in the set Q R2In node as current ballot period corresponding A preferred node, wherein the destination node and set R2In each node It is different.

Optionally, in some embodiments of the present invention, processor can be also used for realizing following steps:

The newest public key data of all ballot nodes is obtained, and judges whether newest public key data has update, if there is update, Newest public key data is then synchronized to all verifying node devices, and determines the corresponding ballot node conduct of public key being not present Leave node;

If leaving node in the first history polling cycle there are the first history polling cycle in W history polling cycle It is effective ballot node or preferred node, then deletes all excellent in the first history polling cycle stored in aggregation equipment Select the identity information of node or the identity information of all effective ballot nodes.

Optionally, in some embodiments of the present invention, processor can be also used for realizing following steps:

Receive the aggregate signature data in the current ballot period that aggregation equipment is sent and the body of corresponding preferred node Part information;

From the corresponding polymerization public key of nearest W history polling cycle, section corresponding with the aggregate signature data is determined The most like polymerization public key of point public key set is as optimal polymerization public key;

Progress elliptic curve point adds on the basis of optimal polymerization public key and/or point subtracts operation and obtains in the current ballot period The effectively corresponding newest polymerization public key of ballot node, and according to newest polymerization public key verifications aggregate signature data.

Optionally, in some embodiments of the present invention, processor can be also used for realizing following steps:

Current ballot period corresponding second class is constructed according to the identity information of the preferred ballot node in current ballot period Voting results vector VR, wherein the corresponding second class voting results vector of each polling cycle, each ballot node exist A corresponding dimension values in second class voting results vector, the corresponding dimension values of all preferred ballot nodes are identical, remaining is voted The corresponding dimension values of node are identical;

Calculate corresponding W the second class voting results vector V of W history polling cycle being locally storedkWith newest ballot The Hamming distance of result vector, wherein 1≤k≤W, and determining and VRThe smallest V of Hamming distancekCorresponding history polling cycle Interior polymerization public key is as optimal polymerization public key.

Optionally, in some embodiments of the present invention, processor can be also used for realizing following steps:

The newest public key data of all ballot nodes is synchronized, and judges whether newest public key data has update, if there is update, It then determines that the corresponding ballot node of the public key being not present is used as and leaves node;

If leaving node in the first history polling cycle there are the first history polling cycle in W history polling cycle It is effective ballot node or preferred node, then it is corresponding all deletes the first history polling cycle stored in verifying node device Preferred node identity information and polymerization public key.

Wherein, memory 11 includes at least a type of readable storage medium storing program for executing, and readable storage medium storing program for executing includes flash memory, hard Disk, multimedia card, card-type memory (for example, SD or DX memory etc.), magnetic storage, disk, CD etc..Memory 11 exists It can be the internal storage unit of terminal device 1, such as the hard disk of the terminal device 1 in some embodiments.Memory 11 is another It is also possible to the plug-in type hard disk being equipped on the External memory equipment of terminal device 1, such as terminal device 1 in some embodiments, Intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, flash card (Flash Card) etc..Further, memory 11 can also both include the internal storage unit of terminal device 1 or set including external storage It is standby.Memory 11 can be not only used for storage and be installed on the application software and Various types of data of terminal device 1, such as * * program 01 Code etc. can be also used for temporarily storing the data that has exported or will export.

Processor 12 can be in some embodiments a central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor or other data processing chips, the program for being stored in run memory 11 Code or processing data, such as execute computer program 01 etc..

The bus 13 can be Peripheral Component Interconnect standard (peripheral component interconnect, abbreviation PCI) bus or expanding the industrial standard structure (extended industry standard architecture, abbreviation EISA) Bus etc..The bus can be divided into address bus, data/address bus, control bus etc..For convenient for indicating, in Fig. 4 only with one slightly Line indicates, it is not intended that an only bus or a type of bus.

Further, terminal device can also include network interface 14, and network interface 14 optionally may include wired connects Mouthful and/or wireless interface (such as WI-FI interface, blue tooth interface), commonly used in the terminal device 1 and other electronic equipments it Between establish communication connection.

Optionally, the terminal device 1 can also include user interface, user interface may include display (Display), Input unit such as keyboard (Keyboard), optional user interface can also include standard wireline interface and wireless interface.It can Selection of land, in some embodiments, display can be light-emitting diode display, liquid crystal display, touch-control liquid crystal display and OLED (Organic Light-EmittingDiode, Organic Light Emitting Diode) touches device etc..Wherein, display can also be appropriate Referred to as display screen or display unit, for being shown in the information handled in terminal device 1 and for showing visual user Interface.

Fig. 4 illustrates only the terminal device 1 with component 11-14 and computer program 01, and those skilled in the art can With understanding, the structure shown in Fig. 4 does not constitute the restriction to terminal device 1, may include less or more than illustrating Component, perhaps combine certain components or different component layouts.

The present invention also provides a kind of computer readable storage medium, calculating is stored on the computer readable storage medium When computer program is executed by processor, following steps are may be implemented in machine program:

Obtain the signed data for node transmission of effectively voting in the current ballot period;

If the ratio of the total number M of the number N of effectively ballot node and all ballot nodes is more than first threshold T, really Recognize and vote through, and it is excellent to use greedy algorithm to select the first preset number A from node of effectively voting in the current ballot period Node is selected, A is no more than N and not less than the product of M and T;

The signed data that all preferred node in the current ballot period is sent using EC-Schnoor signature algorithm into Row polymerization, generates corresponding aggregate signature data;

The identity information of aggregate signature data and corresponding preferred node is sent to verifying node device, so that verifying Node device verifies aggregate signature data.

Optionally, in some embodiments of the present invention, processor can be also used for realizing following steps:

Number is effectively voted most from selecting in nearest W history polling cycle in node of effectively voting in the current ballot period Preceding A more preferred nodes.

Optionally, in some embodiments of the present invention, processor can be also used for realizing following steps:

According to the identity information for node of effectively voting in the current ballot period received construct first kind voting results to Amount, wherein the corresponding first kind voting results vector of each polling cycle, each ballot node are tied in first kind ballot A corresponding dimension values in fruit vector, the corresponding dimension values of all effective ballot nodes are identical, remaining corresponding dimension of node of voting Angle value is identical;

The corresponding voting results vector of nearest W history polling cycle is preserved in aggregation equipment, forms M × W's Matrix, mI, jFor i-th of ballot node in jth time polling cycle corresponding dimension values, according to formulaCalculating each has The corresponding weight of effect ballot node, wherein all effective ballot nodes form set R, i ∈ R in the current ballot period;

Weighted value the first preset number A in the top is determined preferably according to each effective corresponding weight of node of voting Node.

When verify the corresponding preferred node of identical W history polling cycle is stored in node device when, optionally, In some embodiments of invention, processor can be also used for realizing following steps:

Judge to whether there is first object polling cycle in W history polling cycle, own in first object polling cycle It is preferred that the set that node is formedWherein set Q is the set of node of effectively voting in the current ballot period;

First object polling cycle if it exists, it is determined that the corresponding preferred node of first object polling cycle is current ballot Period corresponding preferred node;

First object polling cycle if it does not exist then judges to vote in W history polling cycle with the presence or absence of the second target In the period, there are the A-1 preferred set that are formed of nodes in the second target polling cycle

The second target polling cycle if it exists then selects a destination node and the set in the set Q R2In node as current ballot period corresponding A preferred node, wherein the destination node and set R2In each node It is different.

Optionally, in some embodiments of the present invention, processor can be also used for realizing following steps:

The newest public key data of all ballot nodes is obtained, and judges whether newest public key data has update, if there is update, Newest public key data is then synchronized to all verifying node devices, and determines the corresponding ballot node conduct of public key being not present Leave node;

If leaving node in the first history polling cycle there are the first history polling cycle in W history polling cycle It is effective ballot node or preferred node, then deletes all excellent in the first history polling cycle stored in aggregation equipment Select the identity information of node or the identity information of all effective ballot nodes.

Optionally, in some embodiments of the present invention, processor can be also used for realizing following steps:

Receive the aggregate signature data in the current ballot period that aggregation equipment is sent and the body of corresponding preferred node Part information;

From the corresponding polymerization public key of nearest W history polling cycle, section corresponding with the aggregate signature data is determined The most like polymerization public key of point public key set is as optimal polymerization public key;

Progress elliptic curve point adds on the basis of optimal polymerization public key and/or point subtracts operation and obtains in the current ballot period The effectively corresponding newest polymerization public key of ballot node, and according to newest polymerization public key verifications aggregate signature data.

Optionally, in some embodiments of the present invention, processor can be also used for realizing following steps:

Current ballot period corresponding second class is constructed according to the identity information of the preferred ballot node in current ballot period Voting results vector VR, wherein the corresponding second class voting results vector of each polling cycle, each ballot node exist A corresponding dimension values in second class voting results vector, the corresponding dimension values of all preferred ballot nodes are identical, remaining is voted The corresponding dimension values of node are identical;

Calculate corresponding W the second class voting results vector V of W history polling cycle being locally storedkWith newest ballot The Hamming distance of result vector, wherein 1≤k≤W, and determining and VRThe smallest V of Hamming distancekCorresponding history polling cycle Interior polymerization public key is as optimal polymerization public key.

Optionally, in some embodiments of the present invention, processor can be also used for realizing following steps:

The newest public key data of all ballot nodes is synchronized, and judges whether newest public key data has update, if there is update, It then determines that the corresponding ballot node of the public key being not present is used as and leaves node;

If leaving node in the first history polling cycle there are the first history polling cycle in W history polling cycle It is effective ballot node or preferred node, then it is corresponding all deletes the first history polling cycle stored in verifying node device Preferred node identity information and polymerization public key.

In the above-described embodiments, can come wholly or partly by software, hardware, firmware or any combination thereof real It is existing.When implemented in software, it can entirely or partly realize in the form of a computer program product.

The computer program product includes one or more computer instructions.Load and execute on computers the meter When calculation machine program instruction, entirely or partly generate according to process or function described in the embodiment of the present invention.The computer can To be general purpose computer, special purpose computer, computer network or other programmable devices.The computer instruction can be deposited Storage in a computer-readable storage medium, or from a computer readable storage medium to another computer readable storage medium Transmission, for example, the computer instruction can pass through wired (example from a web-site, computer, server or data center Such as coaxial cable, optical fiber, Digital Subscriber Line (DSL)) or wireless (such as infrared, wireless, microwave) mode to another website Website, computer, server or data center are transmitted.The computer readable storage medium can be computer and can deposit Any usable medium of storage either includes that the data storages such as one or more usable mediums integrated server, data center are set It is standby.The usable medium can be magnetic medium, (for example, floppy disk, hard disk, tape), optical medium (for example, DVD) or partly lead Body medium (such as solid state hard disk Solid State Disk (SSD)) etc.

It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description, The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.

In several embodiments provided herein, it should be understood that disclosed system, device and method can be with It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, the unit It divides, only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or components It can be combined or can be integrated into another system, or some features can be ignored or not executed.Another point, it is shown or The mutual coupling, direct-coupling or communication connection discussed can be through some interfaces, the indirect coupling of device or unit It closes or communicates to connect, can be electrical property, mechanical or other forms.

The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.

It, can also be in addition, each functional unit in each embodiment of the application can integrate in one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated list Member both can take the form of hardware realization, can also realize in the form of software functional units.

If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent product When, it can store in a computer readable storage medium.Based on this understanding, the technical solution of the application is substantially The all or part of the part that contributes to existing technology or the technical solution can be in the form of software products in other words It embodies, which is stored in a storage medium, including some instructions are used so that a computer Equipment (can be personal computer, server or the network equipment etc.) executes the complete of each embodiment the method for the application Portion or part steps.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic or disk etc. are various can store journey The medium of sequence code.

It should be noted that the serial number of the above embodiments of the invention is only for description, do not represent the advantages or disadvantages of the embodiments.And The terms "include", "comprise" herein or any other variant thereof is intended to cover non-exclusive inclusion, so that packet Process, device, article or the method for including a series of elements not only include those elements, but also including being not explicitly listed Other element, or further include for this process, device, article or the intrinsic element of method.Do not limiting more In the case where, the element that is limited by sentence "including a ...", it is not excluded that including process, device, the article of the element Or there is also other identical elements in method.

The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills Art field, is included within the scope of the present invention.

22页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种可信时间戳添加方法、装置和存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!