CN103888250B - A kind of key sequence generation method based on self feed back evolutionary series - Google Patents

A kind of key sequence generation method based on self feed back evolutionary series Download PDF

Info

Publication number
CN103888250B
CN103888250B CN201410111331.2A CN201410111331A CN103888250B CN 103888250 B CN103888250 B CN 103888250B CN 201410111331 A CN201410111331 A CN 201410111331A CN 103888250 B CN103888250 B CN 103888250B
Authority
CN
China
Prior art keywords
individual
population
feed back
self feed
sequence
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.)
Active
Application number
CN201410111331.2A
Other languages
Chinese (zh)
Other versions
CN103888250A (en
Inventor
李康顺
张丽霞
左磊
杨磊
张楚湖
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
South China Agricultural University
Original Assignee
South China Agricultural University
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 South China Agricultural University filed Critical South China Agricultural University
Priority to CN201410111331.2A priority Critical patent/CN103888250B/en
Publication of CN103888250A publication Critical patent/CN103888250A/en
Application granted granted Critical
Publication of CN103888250B publication Critical patent/CN103888250B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Complex Calculations (AREA)

Abstract

The invention discloses a kind of key sequence generation method based on self feed back evolutionary series, the present invention is ranked up to the individuality in population according to the frequency adaptive value and sequence adaptive value size of population, and breeding pond is set up on the basis of based on ranking sampling, obtain being dominant in wherein preferably individual new individual by the evolution operation bred in pond, and the best individuality in breeding pond and population is replaced using new individual, and the best individuality in population is carried out into self feed back search and self feed back migration, when population reaches maximum iteration time, using the best individuality in population as final key sequence, individuality best in population is selected as final key sequence by evolution algorithmic and self feed back, have the advantages that safe and execution efficiency is high and random to strong.

Description

A kind of key sequence generation method based on self feed back evolutionary series
Technical field
The present invention relates to a kind of generation method of key sequence, more particularly to a kind of key sequence based on reflexive evolutionary series Column-generation method.
Background technology
In transaction and the field of circulation of commodity, it is the important of logistics Antiforge system using the merchandise news of the expressions such as bar code Data, therefore its data must possess certain security.Usually ensure the safety of data, can be from the angle of data encoding Strengthened, corresponding merchandise news is encrypted using key sequence.Key sequence is led in information security also known as stream cipher In domain, data encoding safety can be realized with AES in data encoding.Main close of some of field of information encryption Key sequence generating method, such as DES Cipher algorithm, high-level data Encryption Standard AES algorithm, big number decompose and disposition inspection RSA Algorithm etc. is surveyed, the key that the merchandise news of the expressions such as bar code is encrypted can be generated as.
(1) DES algorithms:Simple calculations and conversion are constituted the non-linear of data flow by circulation and iteration by DES algorithms Conversion, the core of its algorithm design be exactly allow all of secret to reside in key among.Major defect is 56 keys that DES is used Too short, security is not high.
(2) aes algorithm:Aes algorithm re-starts arrangement based on arrangement and in-place computation to data, and by a data Unit replaces with another, through some wheel iterative cryptographics, finally gives ciphertext.For in terms of security, aes algorithm is better than DES algorithms, but still it is vulnerable to the impact of attack.On the other hand, AES has well-regulated Algebraic Structure, although related Algebraic Attacks not yet occur, but have many scholars to think, security is created in without being have wind in the structure thoroughly studied Danger.
(3) RSA Algorithm:Difficulty of the security of RSA Algorithm based on factoring problem in number theory is at present in each neck Domain application AES widely.Its shortcoming is mainly reflected in the execution efficiency of algorithm.What is carried out due to RSA is all big Integer calculations, therefore either software or hardware realize that speed is not ideal, are typically only applicable to low volume data encryption. With the development of big number decomposition technique, the big integer scale that RSA is required is increasing, so operation time can also increase, it is unfavorable In the standardization of data form.
Evolution algorithmic (Evolutionary Algorithm, EA) is that a class is lost with Darwin natural evolvements opinion and Mendel The biomimetic type algorithm of the solving complexity Global Optimal Problem based on biography variability theory, is taught in 20 by U.S. Holland J.H. Century, the mid-1960s were proposed first.Evolution algorithmic is the evolution principle based on the survival of the fittest, the survival of the fittest, by comprising can The colony's Reusability science of heredity basic operation that can be solved, is allowed to constantly generate new colony, finally promotes population constantly to develop. Meanwhile, the optimum individual that evolution algorithmic is come in chess game optimization colony with global parallel search technology is required most in the hope of meeting Excellent solution or quasi-optimal solution.Evolution algorithmic realize substantially technology include coding, individual adaptation degree evaluation and develop operation three parts. Coding refers to the feasible solution of the problem described in evolution algorithmic, i.e., the feasible solution of a problem is calculated from its spatial transformation to developing The treatable search space of method institute.Fitness is used for measuring the optimal solution that each individuality is likely to be breached in optimization is calculated in colony Excellent degree.In general, the higher individual inheritance of fitness is larger to follow-on probability, and the relatively low individuality of fitness It is genetic to follow-on probability less.One feature of evolution algorithmic is that it is only just obtained using the object function of required problem The relevant search information of next step, and to target function value using being embodying by evaluating individual fitness.Develop The task of operation is that adaptedness of the individuality to colony according to them to environment applies certain operation, winning bad so as to realize The evolutionary process eliminated.From the point of view of Optimizing Search angle, operation of developing can make the solution of problem by generation optimization, finally approach optimal solution. Operation of developing includes three evolutive operators:Select, intersect and variation.Selection operation is used to select optimum individual to be copied directly to down A generation is intersected and is made a variation;The individuality of selection is carried out mating restructuring by crossover operation, forms new individuality;Mutation operation Simulation living nature genetic mutation, so as to produce new individuality.
The characteristics of evolution algorithmic, causes which to become a kind of technology of suitable encryption merchandise news.Generated using evolution algorithmic Evolutionary series encrypt merchandise news, can preferably protect the security of data message in merchandise news, and can improve plus solution The operational efficiency of close algorithm, so as to improve the production efficiency of manufacturer, is allowed to obtain bigger profit.
The content of the invention
It is an object of the invention to overcome the shortcoming and deficiency of prior art, there is provided a kind of security and execution efficiency are high Key sequence generation method based on self feed back evolutionary series.
The purpose of the present invention is achieved through the following technical solutions:A kind of key sequence based on self feed back evolutionary series is generated Method, comprises the following steps:
(1) parameter that initialization is run in developing;
(2) population in evolution is initialized using self feed back mapping function, it is random to generate containing certain amount individuality Initial population;
(3) it is used for checking frequency adaptive value η of each individual frequency and for checking each individual in calculating current population Sequence adaptive value p of sequence;
(4) each individuality and other individual adaptive values of population which is located are contrasted, each is individual in calculating current population Order;
(5) each individuality Hamming distance corresponding with other each individual chromosome length in current population is calculated, according to Hamming distance obtains each individual crowding distance;
(6) descending arrangement is carried out to the individuality in population according to rank value first, then on the basis of above-mentioned sequence, according still further to Crowding distance value carries out ascending order arrangement to the individuality in population;
(7) to sequence after current population be sampled, individual quilt is calculated according to sequence individual in current population Probable range is chosen, the random number R being then sequentially generated at random between M 0 to 1, and successively by M random number R and individuality Selected probable range be compared, M individuality of probable range that M random number R is fallen into correspondence ranking is put into In breeding pond;
Individual cropped probable range in breeding pond is calculated according to individual sequence, multiple 0 to 1 is then sequentially generated Between random number S, and random number S being sequentially generated is compared with individual cropped probable range respectively, is obtained The corresponding individuality of the fallen into probable range of each random number S, selects in breeding pond that these are individual, is left M in breeding pond Individuality, the then selected individuality of cutting;
Intersected and mutation operation to breeding the best individuality in pond according to crossover probability and mutation probability, if produce New individual is dominant the best individuality in current breeding pond, then replace the best individuality in current breeding pond using new individual;If The new individual of generation is dominant the individual of current population, then an individual for current population is replaced using new individual;Its In middle breeding pond, best individuality refers to the minimum individuality of frequency adaptive value η and sequence adaptive value p;
(8) individual in the current population after step (7) process is carried out using self feed back mapping function Self feed back is searched for, and calculates individual frequency adaptive value η and sequence adaptive value p after the self feed back search;If calculated Frequency adaptive value η and sequence adaptive value p are little than former adaptive value, then replaced in current population using the individuality after self feed back search An individual, frequency adaptive value η and sequence adaptive value p in current population is replaced using the individuality after self feed back search otherwise Maximum individuality;Then calculate the diversity metric of current population after self feed back is searched for;Currently plant after judging self feed back search Whether the diversity metric of group is less than threshold value W;
If so, then according to the result of self feed back search using in the current population of self feed back function pair in addition to an individual Individuality carry out self feed back migration, obtain new population, subsequently into step (9);
If it is not, the current population after then search for self feed back is used as new population, subsequently into step (9);
(9) each individual adaptive value η and p in new population is calculated, and respectively calculates novel species to (5) according to step (4) Individual sum of ranks crowding distance in group, then according to step (6) is ranked up;Judge whether the renewal iterations of population reaches Greatest iteration number;
If so, then enter step (10);
If it is not, then iterations adds 1, subsequently into step (7).
(10) using sort in the population for finally obtaining first individual sequence as key sequence.
Preferably, frequency adaptive value η in the step (3) for checking individual frequency is:
Wherein D represents individual sequence length, n0Represent in individual sequence 0 number, n1Represent in individual sequence 1 Number;
It is used for checking in the step (3) sequence adaptive value p of individual sequence be:
Wherein n00、n01、n10、n11The number of 00,01,10,11 these four patterns appearance in individual sequence is represented respectively.
Preferably, when frequency adaptive value η≤3.841, then individual frequency test passes through;When the sequence adaptive value During p≤5.991, then individual sequential test passes through.
Preferably, in the step (4), the calculating process of each individual order is as follows:Contrast each individuality and population which is located In other individual adaptive values;If it is individual that two adaptive values η of the individuality and p are both less than certain in contrast, then it represents that this Body is dominant the individuality contrasted in which, then the individual order adds 1;If two adaptive values η of the individuality and p are both greater than in contrast Certain is individual, then it represents that be dominant with certain individuality that the individuality is contrasted, then by contrasted with the individuality certain each and every one The order of body adds 1;It is individual for each in current population, current population is traveled through once, current population is obtained by above-mentioned steps In each individual order.
Preferably, in the step (5), each individual crowding distance acquisition process of current population is as follows:Calculate per each and every one The body Hamming distance corresponding with other individual chromosome length in current population, it is individual for each in current population, time Go through once current population, by calculated individuality and currently in population between other individualities Hamming distance according to the suitable of ascending order Sequence is ranked up, using ranking K Hamming distance as the individual crowding distance;In the step (5)Wherein NP is population scale.
Preferably, in the step (1), initialized parameter includes, population scale NP, greatest iteration number, individual sequence are long Degree D, breeding pond size M, crossover probability pc and mutation probability pm parameters:Wherein population scale be NP=100, greatest iteration number MAX_GEN=1000, individual sequence length D=432, breed pond size M=50, crossover probability pc=0.8, mutation probability pm= 0.2;It is random in the step (2) to generate one containing 100 individual populations.
Preferably, selected probable range individual in step (7) population is:
Wherein I represents the individual ranking in population, and P (i) is:
In step (7) the breeding pond, individual cropped probable range is:
Wherein I represents the individual ranking in population, and Q (i) is:
The M is breeding pond size.
Preferably, the self feed back mapping function employed in the step (2) and (8) is:
Further, the detailed process in the step (8) is as follows:
(8-1) using self feed back mapping function produce scope (0, random number sequence λ 1)k, according to random number sequence λk Obtain
Wherein k represents that the current individual of current population carries out the number of times of self feed back search;Wherein λkRepresent current to plant Group's individual carries out the random sequence produced when kth time self feed back is searched for,Represent random number sequence λkIn jth dimension According to;
A wherein current population individual is carried out RepresentThe maximum that jth dimension data is allowed in sequence;RepresentThe minimum of a value that jth dimension data is allowed in sequence;
(8-2) basisTo an individual in current populationSelf feed back search is carried out, after obtaining self feed back search An individualData value in sequence:
RepresentJth dimension data value in sequence,RepresentObtain after self feed back searchIn sequence J dimension data values, βg=1- ((g-1)/g)m, g is evolutional coefficient, and m is used to control contraction speed;
(8-3) individual obtained after calculating above-mentioned self feed back searchFrequency adaptive value η and sequence adaptive value p;If calculated frequency adaptive value and sequence adaptive value p are little than former adaptive value, using after self feed back search first Individual P0An individual in the current population of ' replacement, is otherwise replaced in current population using the individuality after self feed back search Worst individuality, wherein worst individuality refers to the maximum individuality of frequency adaptive value η and sequence adaptive value p;
(8-4) judge whether the number of times k of current population self feed back search reaches F;
If so, then current population self feed back search terminates, and obtains the current population after self feed back search;
If it is not, then k adds 1, step (8-1) is then return to;
(8-5) calculate the diversity metric diversity of population:
Wherein:
Wherein D represents individual sequence length, and NP is population scale;Wherein xi1,xi2,...,xiDCurrent kind is represented respectively The 1st, 2 in i-th individual sequence after group's self feed back search ..., the data of D dimensions;x1,max,x2,max,...,xD,maxRepresent respectively Each individual sequence the 1st, 2 ... after current population self feed back search, the maximum that D dimension datas are allowed;x1,min,x2,min,..., xD,minThe each individual sequence the 1st, 2 ... after current population self feed back search, the minimum of a value that D dimension datas are allowed are represented respectively;
(8-6) judge the diversity metric diversity of population whether less than threshold value W;
If so, then execution step (8-7), obtains new population, then execution step (9);
If it is not, current population after then search for self feed back is used as new population, then execution step (9);
(8-7) self feed back mapping function is adopted to produce array t λ=[t λ of the length for D1,tλ2,...,tλD], by the number Group obtains reflexive feedforward coefficient s λ=[s λ1,sλ2,...,sλD], wherein:
j=t λj* 2-1, j=1,2 ..., D, s λ ∈ (- 1,1);
According to reflexive feedforward coefficient, other individualities in current population in addition to an individual are carried out into self feed back migration, The individuality after self feed back migration is obtained, the original replaced using the individuality after self feed back migration in population is individual, obtains new population; Individual SP wherein after self feed back migration, wherein jth dimension data SP individual after migrationjFor:
Wherein Pbest is the best individuality after current population self feed back search, i.e., sort after current population self feed back search First individuality, PbestjJth dimension data during expression Pbest is individual, s λjExpression is the jth dimension of self feed back coefficient array s λ According to.
Further, in the step (8-5), threshold value W is 0.01, and the F is 0.1*NP.
The present invention is had the following advantages relative to prior art and effect:
(1) present invention generate key sequence with the basis of self feed back based on developing, by evolution algorithmic and self feed back Function selects best individuality in population as final key sequence, due to evolution algorithmic intersection and variation be based on general Rate, and self feed back function pair initial value is sensitive, with not repeated and iterative, can avoid precocity and obtain global optimum Solution;Two important indicator frequency adaptive values η and sequence adaptive value of evaluating key stream are included into evolution algorithmic of the present invention simultaneously Adapt to, in value function, as the two important indicators are to postulate what is drawn according to the randomness of Golomb, ensure that pseudorandom Sequence has random performance as well as possible so that the key sequence production method of self feed back evolutionary series is with synchronization Inside possess equally distributed characteristic, therefore the inventive method has very strong randomness and security.Other the inventive method is only By performing once generate random length key, not key sequence generate length restriction, therefore have perform effect The high advantage of rate.The inventive method checks the diversity of population in an iterative process, migrates with reference to self feed back search, self feed back, Automatic adjusument algorithm is searched for by diversity, self feed back and feeds back migration in the genetic operator parameter for selecting, intersect and make a variation Make every effort to, in the global exploring ability and local development ability in balance evolution algorithmic, strengthen the search performance of evolution algorithmic.
(2) the inventive method is that breeding pond is set up on the basis of sampling based on ranking, during its core is probability sampling Good and bad individual distribution, and the present invention can cause adaptive value preferably individual based on the quality individuality reasonable distribution that ranking is sampled It is selected with larger probability, and poor individuality is sampled with relatively low probability, so by operation of developing obtain it is new Individuality had both remained outstanding gene, maintained the diversity of population again.
(3), after the inventive method self feed back search, when the diversity metric of population is relatively low, the individuality in population is entered Row self feed back migration operation, the operation produce new according to reflexive feedforward coefficient in individual each dimension data on more excellent individuality Body, is replaced the original individuality with new individual relatively with these new individuals, the diversity of population is maintained with this, the present invention is prevented The evolution algorithmic Premature Convergence of method.After iterating to up to certain number of times, prevent because the similarity of the individuality in population it is higher with And the otherness between individuality is less and cause the impact of crossover operator not enough obvious phenomenon.
(4) the inventive method, can be by controlling self feed back compressibility factor β when self feed back is searched forgAlgorithm is made with generation Several increases is gradually reduced around more excellent individual search space, big in the initial stage mutation scaling that develops, and is conducive to algorithm wide Space search globally optimal solution;And it is little in the later stage mutation scaling that develops, finely search close around local extreme points in little space Rope, is conducive to improving the precision of solution.
(5) select self feed back mapping function to initialize population in the inventive method, adopted due to the inventive method Self feed back function has randomness, ergodic and regularity, initializes population using which so that population meets dispersed, together Whole comparable the characteristics of, neither change randomness individual during initialization of population, the diversity and individuality for improving initial population again is searched The ergodic of rope.
Description of the drawings
Fig. 1 is the flow chart of key sequence generation method of the present invention.
Specific embodiment
With reference to embodiment and accompanying drawing, the present invention is described in further detail, but embodiments of the present invention are not limited In this.
Embodiment
As shown in figure 1, present embodiment discloses a kind of key sequence generation method based on self feed back evolutionary series, the party Method is comprised the following steps:
(1) initialization is run in developing population scale NP, greatest iteration number, individual sequence length D, breeding pond size M, Crossover probability pc and mutation probability pm parameters;It is 100 wherein to initialize population scale NP in the present embodiment, greatest iteration number MAX_GEN=1000, individual sequence length D=432, breed pond size M=50, crossover probability pc=0.8, mutation probability pm= 0.2。
(2) population in evolution is initialized using self feed back mapping function, it is random generate containing 100 it is individual just Beginning population;In wherein concrete population, certain individual initialization procedure is as follows:
First, arbitrarily generate random number λ1:λ1=rand ()/(double) (RAND_MAX), in the present embodiment mistake Random number λ is generated in journey1=0.1;
Secondth, according to random number λ1Generate the 1st data in individuality:
(int)(λ1* RAND_MAX) %BIT_BASE+0x30;
3rd, second random number λ is generated according to self feed back function2, second random number λ for generating in the present embodiment2 =0.1/0.4=0.25;
4th, according to random number λ2Generate the 2nd data in individuality:
(int)(λ2* RAND_MAX) %BIT_BASE+0x30;
5th, by that analogy, the 3rd, 4 is generated according to self feed back function ..., 432 random numbers λ34,...,λ432, so as to By (int) (λi* RAND_MAX) %BIT_BASE+0x30, λi34,...,λ432Obtain the 3rd, 4 in individuality ..., 432 data.
Wherein adopt self feed back mapping function in the present embodiment for:
(3) it is used for checking frequency adaptive value η of each individual frequency and for checking each individual in calculating current population Sequence adaptive value p of sequence;
Wherein it is used for checking frequency adaptive value η of individual frequency be:
Wherein D=432 represents individual sequence length, n0Represent in individual sequence 0 number, n1Represent 1 in individual sequence Number;It can be seen that frequency test is for counting the number for producing in stream cipher 0 and 1.
Sequence adaptive value p for checking individual sequence is:
Wherein n00、n01、n10、n11The number of 00,01,10,11 these four patterns appearance in individual sequence is represented respectively.
When in the present embodiment when frequency adaptive value η≤3.841, then individual frequency test passes through;When sequence in the present embodiment During row adaptive value p≤5.991, then individual sequential test passes through.
(4) each individuality is contrasted with other individual frequency adaptive values η and sequence adaptive value p in current population;If this It is individual that body frequency adaptive value η and sequence p are both less than certain in contrast, then it represents that the individuality is dominant in contrast Body, then the individual order adds 1;If it is individual that two adaptive values η of the individuality and p are both greater than certain in contrast, then it represents that with Certain individuality that the individuality is contrasted is dominant, then add 1 by certain the individual order contrasted with the individuality;For population In each is individual, the traversal once individual place population obtains each individual order in population by above-mentioned steps.
(5) each individual Hamming distance corresponding with other individual chromosome length in population which is located is calculated, for Each in population is individual, travels through the once individual place population, by the calculated individuality and other individualities in population Between Hamming distance be ranked up according to the order of ascending order, using ranking K Hamming distance as the individual crowding distance.Its In middle the present embodiment
(6) each individual sum of ranks crowding distance in population is calculated by step (4) and step (5), first according to order Value carries out descending arrangement to the individuality in population, then on the basis of above-mentioned sequence, according still further to crowding distance value in population Individuality carry out ascending order arrangement.First it is ranked up according to order, it is after sorting according to order, individual for order identical, according still further to Crowding distance is ranked up.
(7) to sequence after current population be sampled, calculated according to sequence individual in current population and be sampled The selected probable range of body, the random number R being then sequentially generated at random between M 0 to 1, and successively by M random number R It is compared with the selected probable range for being sampled individuality, the M of the probable range correspondence ranking fallen into by M random number R Individuality is put in breeding pond;
Probable range cropped in breeding pond is calculated according to individual sequence in breeding pond, is then sequentially generated at random Random number S between multiple 0 to 1, and random number S being sequentially generated is compared with individual cropped probable range respectively Compared with, obtain the corresponding individuality of the fallen into probable range of each random number S, breeding pond diverse location on select individuality respectively, directly It is left have M individual in breeding pond, then the selected individuality of cutting;
Intersected and mutation operation to breeding the best individuality in pond according to crossover probability and mutation probability, if produce New individual is dominant the best individuality in current breeding pond, then replace the best individuality in current breeding pond using new individual;If The new individual of generation is dominant the best individuality of current population, then the best individuality of current population is replaced using new individual;
Wherein in the selected probable range of each individuality of this step population it is:
I represents the individual ranking in population, and P (i) is:
In breeding pond in this step, individual cropped probable range is:
Wherein I represents the individual ranking in population, and Q (i) is:
Wherein M is breeding pond size.
(8) individual in the current population after step (7) process is carried out using self feed back mapping function Self feed back is searched for, and calculates individual frequency adaptive value η and sequence adaptive value p after the self feed back search;If calculated Frequency adaptive value η and sequence adaptive value p are little than former adaptive value, then replaced in current population using the individuality after self feed back search An individual, individuality worst in current population, i.e. frequency adaptive value η are replaced using the individuality after self feed back search otherwise The maximum individuality with sequence adaptive value p;Then calculate the diversity metric diversity of current population after self feed back is searched for; Judge diversity metric diversity whether less than 0.01;
If so, then according to the result of self feed back search using in the current population of self feed back function pair in addition to an individual Individuality carry out self feed back migration, obtain new population, subsequently into step (9);
If it is not, the population after then search for self feed back is used as new population, subsequently into step (9).
(9) each individual adaptive value η and p in new population is calculated, and respectively calculates novel species to (5) according to step (4) Individual sum of ranks crowding distance in group, then according to step (6) is ranked up;Judge whether the renewal iterations of population reaches Greatest iteration number;
If so, then enter step (10);
If it is not, then iterations adds 1, subsequently into step (7).
(10) using sort in the population for finally obtaining first individual sequence as key sequence.
It is wherein as follows in the concrete implementation procedure of the present embodiment step (8):
(8-1) using self feed back mapping function produce scope (0, random number sequence λ 1)k, according to random number sequence λk Obtain
Wherein k represents that current population individual in current iteration renewal process carries out the number of times of self feed back search; Wherein λkRepresent that a current population individual carries out the random sequence produced when kth time self feed back is searched for,Represent random number Sequence λkIn jth dimension data;
A wherein current population individual is carried out RepresentThe maximum that jth dimension data is allowed in sequence;RepresentThe minimum of a value that jth dimension data is allowed in sequence;
(8-2) basisTo an individual in current populationSelf feed back search is carried out, after obtaining self feed back search An individualData value in sequence:
RepresentJth dimension data value in sequence,RepresentObtain after self feed back searchIn sequence J dimension data values, βg=1- ((g-1)/g)m, g is evolutional coefficient, and m is used to control contraction speed;The present embodiment can be by control Self feed back compressibility factor βgAlgorithm is made to be gradually reduced around more excellent individual search space with the increase of algebraically, wherein developing Initial stage mutation scaling is big, is conducive to algorithm in wide space search globally optimal solution;And it is little in the later stage mutation scaling that develops, Close around local extreme points fine search in little space, be conducive to improving the precision of solution.
(8-3) individual obtained after calculating above-mentioned self feed back searchFrequency adaptive value η and sequence adaptive value p;If calculated frequency adaptive value and sequence adaptive value p are little than former adaptive value, using after self feed back search first IndividualityThe individual in current population is replaced, is otherwise replaced in current population using the individuality after self feed back search Worst individuality, wherein worst individuality refers to the maximum individuality of frequency adaptive value η and sequence adaptive value p;
(8-4) judge whether the number of times k of current population self feed back search reaches F;
If so, then current population self feed back search terminates, and obtains the current population after self feed back search;
If it is not, then k adds 1, step (8-1) is then return to;
Wherein F is 0.1*NP in the present embodiment;
(8-5) calculate the diversity metric diversity of population:
Wherein:
Wherein D represents individual sequence length, and NP is population scale;Wherein xi1,xi2,...,xiDCurrent kind is represented respectively The 1st, 2 in i-th individual sequence after group's self feed back search ..., the data of D dimensions;x1,max,x2,max,...,xD,maxRepresent respectively Each individual sequence the 1st, 2 ... after current population self feed back search, the maximum that D dimension datas are allowed, in the present embodiment these It is worth for 1;x1,min,x2,min,...,xD,minThe each individual sequence the 1st, 2 ... after current population self feed back search, D dimensions are represented respectively The minimum of a value that data are allowed, these values are 0 in the present embodiment.
(8-6) judge the diversity metric diversity of population whether less than threshold value W;
If so, then execution step (8-7), obtains new population, then execution step (9);
If it is not, current population after then search for self feed back is used as new population, then execution step (9);
(8-7) self feed back mapping function is adopted to produce array t λ=[t λ of the length for D1,tλ2,...,tλD], by the number Group obtains reflexive feedforward coefficient s λ=[s λ1,sλ2,...,sλD], wherein:
j=t λj* 2-1, j=1,2 ..., D, s λ ∈ (- 1,1);
According to reflexive feedforward coefficient, other individualities in current population in addition to an individual are carried out into self feed back migration, The individuality after self feed back migration is obtained, the original replaced using the individuality after self feed back migration in population is individual, obtains new population; Individual SP wherein after self feed back migration, wherein jth dimension data SP individual after migrationjFor:
Wherein Pbest is the best individuality after current population self feed back search, i.e., sort after current population self feed back search First individuality, PbestjJth dimension data during expression Pbest is individual, s λjExpression is the jth dimension of self feed back coefficient array s λ According to.The operation produces multiple new individualities according to from reciprocal coefficient in individual each dimension data on more excellent individuality, a few with this Body replaces individual with individual original relatively, and the diversity of population is maintained with this.
Random number sequence λ is obtained in the present embodimentkWhen, the initial value between first randomly choosing 0 to 1(j=1), Then obtained according to above-mentioned self feed back mapping functionValue, to obtain random number sequence λk.Wherein the present embodiment step (8-1) when in current population currently updates iterative process, each self feed back is searched for, selected random number sequence is likely to be not Identical.
If the key sequence of the present embodiment is generated bar code, in encrypting stage, first with the present embodiment obtain it is close The information data that key sequence and generation bar code need carries out XOR and obtains ciphertext data, then for ciphertext data genaration bar Shape code is simultaneously printed.In decryption phase, the personnel for having corresponding authority first obtain the above-mentioned key sequence for encryption, then adopt Then corresponding tool scans bar code carries out XOR ciphertext data and key sequence, just can to obtain ciphertext data Data before obtaining original encryption.
The key sequence obtained using the present embodiment above-mentioned steps method is carried out to the information data of one case 24 bottled milk Encryption generates bar code, wherein every bottle of milk includes 6 information datas for generating bar code needs.Wherein 24 bottles milk are generated Bar code necessary information data is combined as follows:
000001000002000003000004000005000006000007000010000011000012000013000 014000015000016000017000020000021000022000023000024000025000026000027000030。
The individual sequence sorted in last population first is obtained wherein in the present embodiment according to above-mentioned steps, i.e., it is best Individuality is:
010110100110111010110011100100010110000010011001100111110100100010001 11110001001110010010100110100100100100110101011100110110100101010001010101110 01100101001110011111110111000110111001111111100100000011101110000010010111000 11010001000101111100100001101101000010100101000010001110001111100011010011101 10010001011000000101101110011100111001010111111000100111111101100011011010001 0110110111101110100101111110000000000101011000010000110。
In the individual sequence that statistics is produced, 0 and 1 number is respectively n0=216 and n1=216,00,01,10,11 these four Number n that pattern occurs00=107, n01=108, n10=108, n11=108, frequency adaptive value=0.00 is less than frequency test value 3.841, sequence adaptive value is 0.00696 less than sequential test value 5.991, it is evident that all passed through frequency test and sequence inspection Test, corresponding individual order is 91, and crowding distance is 199.
The information data of the key sequence that then the present embodiment is obtained and 24 bottles of milk is carried out after XOR encrypted Bar code it is as follows:
264673634424023144644213423440151117527152124243462460773421477633167 005343205574403502447216154323565260111471606761153306667667542576027530236。
Above-described embodiment is the present invention preferably embodiment, but embodiments of the present invention not by above-described embodiment Limit, other any Spirit Essences without departing from the present invention and the change, modification, replacement made under principle, combine, simplification, Equivalent substitute mode is should be, is included within protection scope of the present invention.

Claims (10)

1. a kind of key sequence generation method based on self feed back evolutionary series, it is characterised in that comprise the following steps:
(1) parameter that initialization is run in developing;
(2) population in evolution is initialized using self feed back mapping function, it is random to generate containing the first of certain amount individuality Beginning population;
(3) it is used for checking frequency adaptive value η of each individual frequency and for checking each individual sequence in calculating current population Sequence adaptive value p;
(4) each individuality and other individual adaptive values of population which is located are contrasted, each individual order in current population is calculated;
(5) each individuality Hamming distance corresponding with other each individual chromosome length in current population is calculated, according to Hamming Distance obtains each individual crowding distance;
(6) descending arrangement is carried out to the individuality in population according to order first, then on the basis of above-mentioned sequence, according still further to it is crowded away from Individuality in population carries out ascending order arrangement;
(7) to sequence after current population be sampled, calculated according to sequence individual in current population individual selected Probable range, the random number R being then sequentially generated at random between M 0 to 1, and successively by M random number R and individual quilt Probable range is chosen to be compared, M of the selected probable range correspondence ranking of the individuality fallen into by M random number R Body is put in breeding pond;Wherein M is breeding pond size;
Individual cropped probable range in breeding pond is calculated according to individual sequence, is then sequentially generated between multiple 0 to 1 Random number S, and random number S being sequentially generated is compared with individual cropped probable range respectively, obtain it is each with The cropped corresponding individuality of probable range of the fallen into individualities of machine number S, selects these individualities, in breeding pond in breeding pond Remaining M individual, then the selected individuality of cutting;
Intersected and mutation operation to breeding the best individuality in pond according to crossover probability and mutation probability, if new produced Body is dominant in the current best individuality bred in pond, then replace the best individuality in current breeding pond using new individual;If produced Raw new individual is dominant in an individual for current population, then an individual for current population is replaced using new individual;Its In middle breeding pond, best individuality refers to the minimum individuality of frequency adaptive value η and sequence adaptive value p;
(8) individual in the current population after step (7) process is carried out using self feed back mapping function reflexive Feedback search, and calculate individual frequency adaptive value η and sequence adaptive value p after the self feed back search;If calculated frequency Adaptive value η and sequence adaptive value p are little than former adaptive value, then the in current population is replaced using the individuality after self feed back search An individual, otherwise replaces frequency adaptive value η and sequence adaptive value p in current population using the individuality after self feed back search maximum Individuality;Then calculate the diversity metric of current population after self feed back is searched for;Judge current population after self feed back search Whether diversity metric is less than threshold value W;
If so, then adopt individual in addition to an individual in the current population of self feed back function pair according to the result of self feed back search Body carries out self feed back migration, obtains new population, subsequently into step (9);
If it is not, the current population after then search for self feed back is used as new population, subsequently into step (9);
(9) each individual adaptive value η and p in new population is calculated, and is calculated in new population respectively according to step (4) to (5) Individual sum of ranks crowding distance, then according to step (6) is ranked up;Judge whether the renewal iterations of population reaches maximum Number of iterations;
If so, then enter step (10);
If it is not, then iterations adds 1, subsequently into step (7);
(10) using sort in the population for finally obtaining first individual sequence as key sequence.
2. the key sequence generation method based on self feed back evolutionary series according to claim 1, it is characterised in that described It is used for checking in step (3) frequency adaptive value η of individual frequency be:
η = ( n 0 - n 1 ) 2 D ;
Wherein D represents individual sequence length, n0Represent in individual sequence 0 number, n1Represent in individual sequence 1 number;
It is used for checking in the step (3) sequence adaptive value p of individual sequence be:
p = 4 D - 1 Σ i = 0 1 Σ j = 0 1 n i j 2 - 2 D Σ i = 0 1 n i 2 + 1 ;
Wherein n00、n01、n10、n11The number of 00,01,10,11 these four patterns appearance in individual sequence is represented respectively.
3. the key sequence generation method based on self feed back evolutionary series according to claim 1 and 2, it is characterised in that When frequency adaptive value η≤3.841, then individual frequency test passes through;It is when sequence adaptive value p≤5.991, then individual The sequential test of body passes through.
4. the key sequence generation method based on self feed back evolutionary series according to claim 1, it is characterised in that described In step (4), the calculating process of each individual order is as follows:Contrast each individuality and other individual adaptive values in population which is located; If two adaptive values η of the individuality and p to be both less than certain in contrast individual, then it represents that the individuality be dominant in its contrast Body, then the individual order adds 1;If it is individual that two adaptive values η of the individuality and p are both greater than certain in contrast, then it represents that with Certain individuality that the individuality is contrasted is dominant, then add 1 by certain the individual order contrasted with the individuality;For current Each in population is individual, travels through once current population, obtains each individual order in current population by above-mentioned steps.
5. the key sequence generation method based on self feed back evolutionary series according to claim 1, it is characterised in that described In step (5), current each individual crowding distance acquisition process of population is as follows:Calculate in each individuality and current population other The corresponding Hamming distance of individual chromosome length, it is individual for each in current population, current population is traveled through once, will meter In the individuality for obtaining and current population, between other individualities, Hamming distance is ranked up according to the order of ascending order, and ranking is existed The Hamming distance of K is used as the individual crowding distance;In the step (5)Wherein NP is population scale.
6. the key sequence generation method based on self feed back evolutionary series according to claim 1, it is characterised in that described In step (1), initialized parameter includes, population scale NP, greatest iteration number, individual sequence length D, breeding pond size M, friendship Fork Probability p c and mutation probability pm:Wherein population scale be NP=100, greatest iteration number MAX_GEN=1000, individual sequence Length D=432, breeds pond size M=50, crossover probability pc=0.8, mutation probability pm=0.2;It is random in the step (2) One is generated containing 100 individual populations.
7. the key sequence generation method based on self feed back evolutionary series according to claim 1, it is characterised in that described In step (7) population, individual selected probable range is:
( Σ i = 0 I - 1 P ( i ) , Σ i = 0 I P ( i ) ] ;
In step (7) the breeding pond, individual cropped probable range is:
( Σ i = 0 I - 1 Q ( i ) , Σ i = 0 I Q ( i ) ] ;
Wherein I represents the individual ranking in population;
Wherein P (i) is:
P ( i ) = 2 * ( M + 1 - i ) ( M + 1 ) * M ;
Wherein Q (i) is:
Q ( i ) = 2 * i ( 2 * M + 1 ) * 2 * M ;
M is breeding pond size.
8. the key sequence generation method based on self feed back evolutionary series according to claim 1, it is characterised in that described Self feed back mapping function employed in step (2) and (8) is:
&lambda; n + 1 = &lambda; n / 0.4 , 0 < &lambda; &le; 0.4 ( 1 - &lambda; n ) / 0.6 , 0.4 < &lambda; n &le; 1 , n = 1 , 2 , ... .
9. the key sequence generation method based on self feed back evolutionary series according to claim 8, it is characterised in that described Detailed process in step (8) is as follows:
(8-1) using self feed back mapping function produce scope (0, random number sequence λ 1)k, according to random number sequence λkObtain
p j k = x j , m i n + &lambda; j k ( x j , m a x - x j , m i n ) , j = 1 , 2 , ... D , k &Element; &lsqb; 1 , F &rsqb; ;
Wherein k represents the number of times of current population individual self feed back search;Wherein λkRepresent that a current population individual enters The random sequence that row kth time self feed back is produced when searching for,Represent random number sequence λkIn jth dimension data;
An individual wherein before the currently each self feed back search of population is P0=[xj, j=1,2 ... D];xj,maxRepresent P0 The maximum that jth dimension data is allowed in sequence;xj,minRepresent P0The minimum of a value that jth dimension data is allowed in sequence;
(8-2) basisTo individual P in current population0Self feed back search is carried out, first after self feed back search is obtained Individual P '0Data value in sequence:
x j &prime; = ( 1 - &beta; g ) x j + &beta; g p j k , j = 1 , 2 , ... D , k &Element; &lsqb; 1 , F &rsqb; ;
xjRepresent P0Jth dimension data value in sequence, x 'jRepresent P0The P ' obtained after self feed back search0Jth dimension data in sequence Value, βg=1- ((g-1)/g)m, g is evolutional coefficient, and m is used to control contraction speed;
(8-3) calculate the individual P ' after each self feed back search of current population0Frequency adaptive value η and sequence adaptive value p;If meter Frequency adaptive value η for obtaining and sequence adaptive value p are than the P before each self feed back of current population0It is little, then using P '0Replace P0, otherwise using P '0Worst individuality in current population is replaced, wherein worst individuality refers to frequency adaptive value η and sequence adaptive value P maximum individuality;
(8-4) whether the number of times k for calculating current population self feed back search reaches F;
If so, then current population self feed back search terminates, and obtains the current population after self feed back search;
If it is not, then k adds 1, step (8-1) is then return to;
(8-5) calculate the diversity metric diversity of population:
d i v e r s i t y = ( &Sigma; i = 1 D ts i ) / ( D * N P ) ;
Wherein:
t s = &lsqb; ts 1 , ts 2 , ... , ts D &rsqb; = &lsqb; &Sigma; i = 1 N P ( x i 1 - avgs 1 ) 2 ( x 1 , m a x - x 1 , m i n ) , &Sigma; i = 1 N P ( x i 2 - avgs 2 ) 2 ( x 2 , m a x - x 2 , m i n ) , ... , &Sigma; i = 1 N P ( x i D - avgs D ) 2 ( x D , m a x - x D , min ) &rsqb; ;
a v g s u m = &lsqb; avgs 1 , avgs 2 , ... , avgs D &rsqb; = &lsqb; &Sigma; i = 1 N P x i 1 , &Sigma; i = 1 N P x i 2 , ... , &Sigma; i = 1 N P x i D &rsqb; / N P ;
Wherein D represents individual sequence length, and NP is population scale;Wherein xi1,xi2,...,xiDRepresent current population certainly respectively The 1st, 2 in i-th individual sequence after feedback search ..., the data of D dimensions;x1,max,x2,max,...,xD,maxRepresent respectively current Each individual sequence the 1st, 2 ... after population self feed back search, the maximum that D dimension datas are allowed;x1,min,x2,min,...,xD,min The each individual sequence the 1st, 2 ... after current population self feed back search, the minimum of a value that D dimension datas are allowed are represented respectively;
(8-6) judge the diversity metric diversity of population whether less than threshold value W;
If so, then execution step (8-7), obtains new population, then execution step (9);
If it is not, current population after then search for self feed back is used as new population, then execution step (9);
(8-7) self feed back mapping function is adopted to produce array t λ=[t λ of the length for D1,tλ2,...,tλD], asked by the array Come from feedback factor s λ=[s λ1,sλ2,...,sλD], wherein:
j=t λj* 2-1, j=1,2 ..., D, s λ ∈ (- 1,1);
According to reflexive feedforward coefficient, other individualities in current population in addition to an individual are carried out into self feed back migration, is obtained Individuality after self feed back migration, the original replaced using the individuality after self feed back migration in population are individual, obtain new population;Wherein Individual SP after self feed back migration, wherein jth dimension data SP individual after migrationjFor:
SP j = Pbest j + s&lambda; j * ( Pbest j - x j , min ) , s&lambda; j < 0 Pbest j + s&lambda; j * ( x j , min - Pbest j ) , s&lambda; j &GreaterEqual; 0 , j = 1 , 2 , ... , D ;
Wherein Pbest is the best individuality after current population self feed back search, i.e., sort first after current population self feed back search Individuality, PbestjJth dimension data during expression Pbest is individual, s λjExpression is the jth dimension data of self feed back coefficient array s λ.
10. the key sequence generation method based on self feed back evolutionary series according to claim 9, it is characterised in that institute In stating step (8-6), threshold value W is 0.01, and the F is 0.1*NP.
CN201410111331.2A 2014-03-24 2014-03-24 A kind of key sequence generation method based on self feed back evolutionary series Active CN103888250B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410111331.2A CN103888250B (en) 2014-03-24 2014-03-24 A kind of key sequence generation method based on self feed back evolutionary series

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410111331.2A CN103888250B (en) 2014-03-24 2014-03-24 A kind of key sequence generation method based on self feed back evolutionary series

Publications (2)

Publication Number Publication Date
CN103888250A CN103888250A (en) 2014-06-25
CN103888250B true CN103888250B (en) 2017-04-05

Family

ID=50956978

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410111331.2A Active CN103888250B (en) 2014-03-24 2014-03-24 A kind of key sequence generation method based on self feed back evolutionary series

Country Status (1)

Country Link
CN (1) CN103888250B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105429987A (en) * 2015-11-25 2016-03-23 西安科技大学 Security system for computer network
CN107291422B (en) * 2017-06-09 2020-08-11 中国电子科技集团公司第四十一研究所 Method for generating user-defined length zero-replacement PRBS graph

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008015817A (en) * 2006-07-06 2008-01-24 Yokohama National Univ Evolutionary computation system and evolutionary computation method
CN102394812A (en) * 2011-10-21 2012-03-28 南京邮电大学 Self-feedback dynamic self-adaption resource distribution method of cognitive network
CN103199992A (en) * 2013-03-14 2013-07-10 上海大学 Safe frequency hopping sequence construction method based on evolution codes

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110264614A1 (en) * 2010-04-23 2011-10-27 Gardner Richard D Human Expert Assisted Evolutionary Computational Model

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008015817A (en) * 2006-07-06 2008-01-24 Yokohama National Univ Evolutionary computation system and evolutionary computation method
CN102394812A (en) * 2011-10-21 2012-03-28 南京邮电大学 Self-feedback dynamic self-adaption resource distribution method of cognitive network
CN103199992A (en) * 2013-03-14 2013-07-10 上海大学 Safe frequency hopping sequence construction method based on evolution codes

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
一种基于GEP演化布尔函数的流密钥算法;康岚兰等;《四川大学学报(自然科学版)》;20120728;第49卷(第4期);正文第771-776页 *
基于多目标演化算法的序列密钥生成方法;李康顺等;《武汉理工大学学报》;20080825;第30卷(第8期);正文第69-73页 *

Also Published As

Publication number Publication date
CN103888250A (en) 2014-06-25

Similar Documents

Publication Publication Date Title
Sun et al. MILP‐aided bit‐based division property for primitives with non‐bit‐permutation linear layers
WO2020177475A1 (en) Secure feature engineering method and apparatus
CN104380245B (en) random number generator and stream cipher
CN102938767B (en) The fuzzy keyword search methodology that efficiently can verify that based on the outer packet system of cloud data
CN106952213B (en) New chaotic image encryption method based on bit permutation Yu dynamic DNA encoding
CN108768986A (en) A kind of encryption traffic classification method and server, computer readable storage medium
CN103444124B (en) Cipher processing apparatus, cipher processing method
Tariq et al. A hybrid genetic algorithm for machine-part grouping
CN107733655B (en) APUF security authentication method based on polynomial reconstruction
Omran et al. A cryptanalytic attack on Vigenère cipher using genetic algorithm
CN109274485A (en) A kind of data ciphering method, data authentication method and relevant device and system
CN106651735A (en) Chaos theory-based digital image parallel encryption method
Yasutake et al. Online rank aggregation
CN103888250B (en) A kind of key sequence generation method based on self feed back evolutionary series
Picek et al. Maximal nonlinearity in balanced boolean functions with even number of inputs, revisited
CN104618098B (en) Cryptography building method and system that a kind of set member&#39;s relation judges
Manzoni et al. Tip the balance: Improving exploration of balanced crossover operators by adaptive bias
Al-Janabi et al. Intelligent techniques in cryptanalysis: Review and future directions
Liu et al. Hiding multiple solutions in a hard 3-SAT formula
CN105718804B (en) A kind of hardware instruction calling control system
CN103618601A (en) Preselected integer factorization-based RSA (Rivest, Shamir and Adleman) password cracking system and method
Xuelong et al. A symmetric cryptography based on extended cellular automata
Li et al. Automatic preimage attack framework on Ascon using a linearize-and-guess approach
Zahednejad et al. An improved integral distinguisher scheme based on neural networks
Gavinho Filho et al. A public key compression method for Fully Homomorphic Encryption using Genetic Algorithms

Legal Events

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