CN110458291A - A kind of best common recognition node selecting method based on genetic algorithm - Google Patents

A kind of best common recognition node selecting method based on genetic algorithm Download PDF

Info

Publication number
CN110458291A
CN110458291A CN201910734335.9A CN201910734335A CN110458291A CN 110458291 A CN110458291 A CN 110458291A CN 201910734335 A CN201910734335 A CN 201910734335A CN 110458291 A CN110458291 A CN 110458291A
Authority
CN
China
Prior art keywords
node
chromosome
common recognition
fitness function
best common
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910734335.9A
Other languages
Chinese (zh)
Inventor
刘明哲
杨晨
王坤
陈薪羽
李由之
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wenzhou University of Technology
Original Assignee
Chengdu Univeristy of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chengdu Univeristy of Technology filed Critical Chengdu Univeristy of Technology
Priority to CN201910734335.9A priority Critical patent/CN110458291A/en
Publication of CN110458291A publication Critical patent/CN110458291A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/12Computing arrangements based on biological models using genetic models
    • G06N3/126Evolutionary algorithms, e.g. genetic algorithms or genetic programming

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biophysics (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Theoretical Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Molecular Biology (AREA)
  • Biomedical Technology (AREA)
  • Genetics & Genomics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Physiology (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a kind of best common recognition node selecting method based on genetic algorithm, mainly solving the problems, such as algorithm existing in the prior art of commonly knowing together when determining best common recognition node, time-consuming there are low efficiency.Multiple participation nodes are separately encoded into corresponding chromosome including (S1) by this method, to obtain multiple chromosomes after coding;(S2) each chromosome in multiple chromosomes selected, intersected, being made a variation and feasibility detection operates;(S3) individual choice for meeting fitness function is come out, optimal solution is solved by fitness function and acquires optimal solution if reaching fitness function requirement, step (S2) is continued to execute if it is not, returning, until obtaining optimal solution.Through the above scheme, the purpose fast invention achieves trading efficiency height and processing time, has very high practical value and promotional value.

Description

A kind of best common recognition node selecting method based on genetic algorithm
Technical field
The invention belongs to Genetic Algorithm Technology fields, in particular, being to be related to a kind of best common recognition based on genetic algorithm Node selecting method.
Background technique
Block chain is substantially the distributed account book by the sustainable growth for participating in, safeguarding in many ways jointly, it main Feature is decentralization or weak center, i.e., without centralized control can reach between trusting relationship, this dependence In distributed common recognition mechanism.Common common recognition algorithm can be divided into two major classes: one kind is the common recognition algorithm based on proof, if any work Amount proves common recognition mechanism (POW), and equity proves algorithm (POS), however this kind of common recognition algorithm handling capacity is low, it is slow to go out block;It is another kind of It is the common recognition algorithm based on ballot, most classic is practical Byzantine failure tolerance algorithm (PBFT), but there is also redundancies, consumption for this method The problem of duration.Therefore the presence for how solving the problems, such as the prior art, is those skilled in the art's urgent problem.
Summary of the invention
The purpose of the present invention is to provide a kind of best common recognition node selecting method based on genetic algorithm mainly solves existing The problem of time-consuming with the presence of algorithm low efficiency of commonly knowing together present in technology when determining best common recognition node.
To achieve the goals above, The technical solution adopted by the invention is as follows:
A kind of best common recognition node selecting method based on genetic algorithm, includes the following steps:
(S1) multiple participation nodes are separately encoded into corresponding chromosome, to obtain multiple chromosomes after coding;
(S2) each chromosome in multiple chromosomes selected, intersected, being made a variation and feasibility detection operates;
(S3) individual choice for meeting fitness function is come out, optimal solution is solved by fitness function, if reached Fitness function requirement, then acquire optimal solution, step (S2) is continued to execute if it is not, returning, until obtaining optimal solution;
Wherein, f (ni) indicates that fitness function, ni indicate that a legal chromosome, N indicate the collection of all chromosomes It closes, Fau indicates that the number that the chromosome i.e. node goes wrong, Com indicate that the chromosome i.e. node and other nodes are handed over Easy efficiency.
It further, in a chromosome is according to one comprising m by each participation nodes encoding in the step (S1) A coding requirement for participating in node obtains the chromosome of a m dimensional vector, this dimension, that is, all numbers for participating in node, and m is Integer is also each number for participating in node, i.e. N={ n1, n2 ..., nm } simultaneously, wherein ni indicates i-th of node.
Further, each chromosome in multiple chromosomes selected in the step (S2), intersected, being made a variation and Feasibility detection operation is to be grouped parent sample two-by-two, to carry out partial mapped crossover, and eliminates the digital number of conflict, appoints Meaning chooses two points, and exchanges value number, generates new group;Verify whether any chromosome is feasible solution, is adapted to meeting The individual choice of degree function comes out, using as parent group.
Further, the fitness function in the step (S3) is by the delay machine number of node and leading to for other nodes The function that the trading efficiency of letter is made.
Specifically, it is to work as Fau (ni) minimum that fitness function requirement is reached in the step (S3), when Com (ni) is maximum, Ni is optimal solution at this time, i.e., node of most preferably knowing together.
Compared with prior art, the invention has the following advantages:
The present invention is the algorithm based on PBFT, and node is divided into common recognition node and backup node, and the common recognition node is as altogether Know node and execute the completion transaction of three stage protocols, the present invention proposes best common recognition node selecting method, only meeting fitness Best common recognition node can be just found out in the case where function, continue to select chromosome in the case where being unsatisfactory for fitness function It selects, intersect, making a variation and feasibility detection operates, therefore the present invention has transaction relative to the method for existing selection common recognition node and imitates The rate high advantage fast with the processing time.
Detailed description of the invention
Fig. 1 is flow diagram of the invention.
Specific embodiment
Present invention will be further explained below with reference to the attached drawings and examples, and embodiments of the present invention include but is not limited to The following example.
Embodiment
As shown in Figure 1, a kind of best common recognition node selecting method based on genetic algorithm, each participation node is most preferably selected Take scheme code at a chromosome, to obtain multiple chromosomes after coding, to each chromosome of the multiple chromosome Intersected, made a variation, feasibility inspection and selection operation, the trading efficiency that the delay machine number of node is communicated with other nodes As the fitness function of model, optimal solution is obtained according to the fitness function, to realize the selection of best common recognition node.
The first step encodes all participation nodes:
The chromosome of a m dimensional vector is obtained according to a coding requirement comprising m participation node, m is integer, this Dimension, that is, all numbers for participating in node, while being also their number.That is N={ n1, n2 ..., nm }, wherein ni indicates i-th A node.
Second step the operation such as is selected, intersects, makes a variation to each chromosome of multiple chromosomes:
Parent sample is grouped two-by-two, to carry out partial mapped crossover, and eliminates the digital number of conflict, arbitrarily chooses two It is a, and value number is exchanged, generate new group;Verify whether any chromosome is feasible solution, and fitness letter will be met Several individual choices come out, using as parent group.
Third step, setting fitness function seek optimal solution:
Wherein: f (ni) is fitness function, and ni represents a legal chromosome, and N then represents the collection of all chromosomes It closes, Fau represents the number that the chromosome i.e. node goes wrong, and Com represents the chromosome i.e. node and other nodes are handed over Easy efficiency.
If reaching fitness function requirement, i.e. Fau (ni) is minimum, and Com (ni) is maximum, then meets fitness function, should Ni is optimal solution (most preferably common recognition node), second step is continued to execute if it is not, returning, until obtaining the optimal solution i.e. most happy festival time Point.
Concrete application based on selection method of the present invention:
The A1 pre-preparation stage:
It trades after having chosen common recognition node according to the above genetic algorithms approach.Common recognition node is received client Request sequence n:<<PRE-PREPARE, v, n, d>, m>, wherein v indicates view number, and the request that m indicates that client is sent disappears Breath, d indicate the eap-message digest of m, and pre-preparation information is broadcast to backup node by node of then knowing together.
The A2 preparation stage:
The backup node pre-preparation message sent of node that will know together is verified.Priori signed certificate name and its correct of d of making a summary Property, guarantee not to be tampered, whether consistent then verify view number, and checks that the backup node never received in view v Serial number n but d different message m of making a summary.
For pre-preparation message after verifying, which enters the preparation stage, and to the broadcast of all backup nodes < PREPARE, v, n, d, i >, i is backup node number, while by pre-preparation message and being prepared in message write-in message logging.
A3 confirmation stage:
Backup node checks received preparation message (digital signature, view number, message sequence number), verifies errorless The message is written in message logging afterwards.If backup node has had received send from different backup nodes and pre-preparation The preparation message that message matches has had 2f, which enters confirmation stage, while true to the broadcast of all backup nodes Recognize message<COMMIT, v, n, d, i>.
Above-described embodiment is merely a preferred embodiment of the present invention, and it is not intended to limit the protection scope of the present invention, as long as using Design principle of the invention, and the non-creative variation worked and made is carried out on this basis, it should belong to of the invention Within protection scope.

Claims (5)

1. a kind of best common recognition node selecting method based on genetic algorithm, which comprises the steps of:
(S1) multiple participation nodes are separately encoded into corresponding chromosome, to obtain multiple chromosomes after coding;
(S2) each chromosome in multiple chromosomes selected, intersected, being made a variation and feasibility detection operates;
(S3) individual choice for meeting fitness function is come out, optimal solution is solved by fitness function, if reaching adaptation Function requirements are spent, then acquire optimal solution, step (S2) are continued to execute if it is not, returning, until obtaining optimal solution;
Wherein, f (ni) indicates that fitness function, ni indicate that a legal chromosome, N indicate the set of all chromosomes, Fau Indicate that the number that the chromosome i.e. node goes wrong, Com indicate the effect of the chromosome i.e. node and the transaction of other nodes Rate.
2. a kind of best common recognition node selecting method based on genetic algorithm according to claim 1, which is characterized in that institute State in step (S1) by it is each participation nodes encoding in a chromosome be according to one comprising m participate in node coding requirement The chromosome of a m dimensional vector is obtained, this dimension, that is, all numbers for participating in node, m is that integer is also each participation simultaneously The number of node, i.e. N={ n1, n2 ..., nm }, wherein ni indicates i-th of node.
3. a kind of best common recognition node selecting method based on genetic algorithm according to claim 2, which is characterized in that institute State in step (S2) each chromosome in multiple chromosomes is selected, is intersected, is made a variation and feasibility detection operation be by Parent sample is grouped two-by-two, to carry out partial mapped crossover, and eliminates the digital number of conflict, arbitrarily chooses two points, and mutually Value number is changed, new group is generated;Verify whether any chromosome is feasible solution, the individual choice for meeting fitness function is gone out Come, using as parent group.
4. a kind of best common recognition node selecting method based on genetic algorithm according to claim 3, which is characterized in that institute Stating the fitness function in step (S3) is made by the trading efficiency of the communication of the delay machine number and other nodes of node Function.
5. a kind of best common recognition node selecting method based on genetic algorithm according to claim 3, which is characterized in that institute State that reach fitness function requirement in step (S3) be when Fau (ni) is minimum, and Com (ni) is maximum, ni is optimal solution at this time, i.e., Best common recognition node.
CN201910734335.9A 2019-08-09 2019-08-09 A kind of best common recognition node selecting method based on genetic algorithm Pending CN110458291A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910734335.9A CN110458291A (en) 2019-08-09 2019-08-09 A kind of best common recognition node selecting method based on genetic algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910734335.9A CN110458291A (en) 2019-08-09 2019-08-09 A kind of best common recognition node selecting method based on genetic algorithm

Publications (1)

Publication Number Publication Date
CN110458291A true CN110458291A (en) 2019-11-15

Family

ID=68485625

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910734335.9A Pending CN110458291A (en) 2019-08-09 2019-08-09 A kind of best common recognition node selecting method based on genetic algorithm

Country Status (1)

Country Link
CN (1) CN110458291A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110990353A (en) * 2019-12-11 2020-04-10 深圳证券交易所 Log extraction method, log extraction device and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108108815A (en) * 2017-12-13 2018-06-01 北京邮电大学 Mapping method of virtual network and device based on improved adaptive GA-IAGA
CN108665365A (en) * 2018-05-16 2018-10-16 四川大学 A kind of mixing block chain architecture system, processing method and processing system
CN108737175A (en) * 2018-05-19 2018-11-02 上海分布信息科技有限公司 A kind of node administration method and its realize system
US20190068380A1 (en) * 2017-08-24 2019-02-28 Alibaba Group Holding Limited Blockchain consensus node selection
WO2019072263A2 (en) * 2018-11-07 2019-04-18 Alibaba Group Holding Limited Facilitating practical byzantine fault tolerance blockchain consensus and node synchronization
CN109800071A (en) * 2019-01-03 2019-05-24 华南理工大学 A kind of cloud computing method for scheduling task based on improved adaptive GA-IAGA
CN110047004A (en) * 2019-04-23 2019-07-23 重庆金窝窝网络科技有限公司 Block chain accounting nodes selection method and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190068380A1 (en) * 2017-08-24 2019-02-28 Alibaba Group Holding Limited Blockchain consensus node selection
CN108108815A (en) * 2017-12-13 2018-06-01 北京邮电大学 Mapping method of virtual network and device based on improved adaptive GA-IAGA
CN108665365A (en) * 2018-05-16 2018-10-16 四川大学 A kind of mixing block chain architecture system, processing method and processing system
CN108737175A (en) * 2018-05-19 2018-11-02 上海分布信息科技有限公司 A kind of node administration method and its realize system
WO2019072263A2 (en) * 2018-11-07 2019-04-18 Alibaba Group Holding Limited Facilitating practical byzantine fault tolerance blockchain consensus and node synchronization
CA3041463A1 (en) * 2018-11-07 2019-04-18 Alibaba Group Holding Limited Facilitating practical byzantine fault tolerance blockchain consensus and node synchronization
CN109800071A (en) * 2019-01-03 2019-05-24 华南理工大学 A kind of cloud computing method for scheduling task based on improved adaptive GA-IAGA
CN110047004A (en) * 2019-04-23 2019-07-23 重庆金窝窝网络科技有限公司 Block chain accounting nodes selection method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王俊等: "遗传算法优化的BP神经网络在EDXRF中对钛铁元素含量的预测", 《原子能科学技术》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110990353A (en) * 2019-12-11 2020-04-10 深圳证券交易所 Log extraction method, log extraction device and storage medium
CN110990353B (en) * 2019-12-11 2023-10-13 深圳证券交易所 Log extraction method, log extraction device and storage medium

Similar Documents

Publication Publication Date Title
CN110011814B (en) A kind of DPoS common recognition method and its system that can verify that
US10838595B2 (en) Stranded blockchain
CN109150598A (en) A kind of BFT common recognition algorithm bandwidth utilization rate improved method based on block piece
CN107147735B (en) Distributed account book system based on hierarchical structure
CN107733855B (en) A kind of block catenary system and application method that can support publicly-owned chain, alliance&#39;s chain and privately owned chain simultaneously
CN109819003A (en) A kind of layering common recognition method and system of block chain
CN108848056A (en) Block chain common recognition method based on verifying
CN109522362A (en) Incomplete markets synchronous method, system and equipment based on block chain data
CN111899002B (en) Method for efficiently performing cross-chain information transaction interaction in blockchain
CN109409887B (en) Method for realizing block chain consensus mechanism
JP5640910B2 (en) Verification device and verification program
CN110766551B (en) Alliance chain based on improved Kafka consensus mechanism and transaction method
CN111464633B (en) Consensus method and system for transaction information of block chain
CN110022231A (en) Block chain common recognition election method
CN112232619A (en) Block output and sequencing method, node and block chain network system of alliance chain
CN110210655A (en) Goods delivery method and device
CN110458291A (en) A kind of best common recognition node selecting method based on genetic algorithm
CN109041010A (en) Vehicle-mounted Delay Tolerant Network data forwarding method based on semi-naive Bayes classifier
CN111798234B (en) Lightweight block chain system and construction method
CN112016919A (en) Data processing method and device for calculating settlement amount
CN114449476A (en) Block link point consensus method for safety communication in Internet of vehicles
WO2024066665A1 (en) Snowman consensus-based consortium blockchain multi-chain system and interaction and deployment method therefor
CN107103360A (en) A kind of reliability application distribution distributed genetic algorithm based on mixed cloud
Elek Asia pacific economic co-operation (APEC)
CN108834058A (en) A kind of indoor positioning signal source Optimization deployment method based on heredity with fireworks combinational algorithm

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20230510

Address after: No. 337, Jinhai 3rd road, Wenzhou Economic and Technological Development Zone, Wenzhou, Zhejiang 325000

Applicant after: Wenzhou Institute of Technology

Address before: Three road 610000 Sichuan city of Chengdu province Chenghua District Erxian Qiaodong No. 1

Applicant before: Chengdu University of Technology

TA01 Transfer of patent application right
RJ01 Rejection of invention patent application after publication

Application publication date: 20191115

RJ01 Rejection of invention patent application after publication