CN108108152B - Automatic optimization method for true random number generator - Google Patents

Automatic optimization method for true random number generator Download PDF

Info

Publication number
CN108108152B
CN108108152B CN201611049403.0A CN201611049403A CN108108152B CN 108108152 B CN108108152 B CN 108108152B CN 201611049403 A CN201611049403 A CN 201611049403A CN 108108152 B CN108108152 B CN 108108152B
Authority
CN
China
Prior art keywords
random number
true random
number generator
population
chromosome
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
CN201611049403.0A
Other languages
Chinese (zh)
Other versions
CN108108152A (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.)
Ziguang Tongxin Microelectronics Co Ltd
Original Assignee
Ziguang Tongxin Microelectronics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ziguang Tongxin Microelectronics Co Ltd filed Critical Ziguang Tongxin Microelectronics Co Ltd
Priority to CN201611049403.0A priority Critical patent/CN108108152B/en
Publication of CN108108152A publication Critical patent/CN108108152A/en
Application granted granted Critical
Publication of CN108108152B publication Critical patent/CN108108152B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/58Random or pseudo-random number generators
    • G06F7/588Random number generators, i.e. based on natural stochastic processes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/004Artificial life, i.e. computing arrangements simulating life
    • G06N3/006Artificial life, i.e. computing arrangements simulating life based on simulated virtual individual or collective life forms, e.g. social simulations or particle swarm optimisation [PSO]
    • 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/123DNA computing

Landscapes

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

Abstract

The invention provides an automatic optimization method of a true random number generator. According to the automatic optimization method of the true random number generator, parameters of the true random number generator can be selected according to differences of different processes, and circuits for calculating and designing the true random number do not need to be designed again manually in the process of process transformation, so that the product design and production period is accelerated. Meanwhile, aiming at the special scene of the random number generator, the population definition is described again, the genetic algorithm is improved, and the crossing process is the crossing of chromosomes instead of gene replacement; in addition, the mutation process of the chromosome is divided into two steps, the mutation condition of the chromosome number is increased, and the automatic optimization method improves the convergence rate of the genetic algorithm, so that the effect of optimizing the area and the power consumption of the true random number generator is achieved.

Description

Automatic optimization method for true random number generator
Technical Field
The invention relates to the technical field of true random number generators, in particular to an automatic optimization method of a true random number generator.
Background
True Random Number Generators (TRNGs) use the randomness of physical phenomena in nature to generate random sequences. As shown in fig. 1, a conventional random number generator is shown, wherein fig. 1 (a) is a random number generator based on a ring oscillator implementation, and the randomness of the ring oscillator is firstly determined by the randomness of thermal noise of the inverters on the ring oscillator, and secondly is determined by the number of loops of the ring oscillator and the number of inverters on the loop. Thus, when the random number generator of the same implementation is replaced by an integrated circuit design process, the randomness of the true random number generator is different due to the different thermal noise performance of the devices. The problem frequently occurs is that the true random number generator can provide more reliable random numbers in the product under the process A without replacing the device and the combination scheme, but the requirement of randomness can not be met when the product is transplanted to the process B. Deviations in randomness due to deviations between different processes are not taken into account during the implantation process. To increase the robustness of true random numbers, it is often an option to increase the randomness by increasing the number of loops and changing the number of inverters on the loops, as shown in fig. 1 (b), but this approach, while increasing the entropy (i.e., randomness) of the random number generator, creates a waste of larger area and power consumption. Therefore, a method is needed to provide any combination mode of true random number generators under different process conditions, so that the design scheme with good randomness and optimal area and power consumption can be achieved.
Disclosure of Invention
Aiming at the defects in the prior art, the invention aims to provide an automatic optimization method of a true random number generator, which can automatically select parameters of the true random number generator according to the differences of different processes and provide an optimal scheme meeting the requirements.
In order to achieve the technical purpose, the invention adopts the following technical scheme:
an automatic optimizing method of a true random number generator comprises the following specific steps:
the first step: the method comprises the following steps of initializing a population, wherein the content comprises: (1) the number of total groups; (2) maximum and minimum values of chromosomes in the population; (3) maximum and minimum gene values; (4) maximum number of iterations; (5) crossover rate and mutation rate; (6) primary individuals in the initial population of random numbers;
and a second step of: carrying out first generation inheritance, so that the iteration number is increased by 1;
and a third step of: calculating an adaptation function of an individual in the generation;
fourth step: selecting by using a roulette algorithm according to the value of the adaptation function;
fifth step: crossing with the selected individuals;
sixth step: carrying out variation on chromosome number gene values by using the selected and crossed individuals;
seventh step: performing variation of chromosome number by using the individual subjected to variation in the sixth step;
eighth step: judging whether the optimal value of 10 rounds has not changed; if the optimal value 10 rounds are unchanged, ending the algorithm; otherwise, performing an eighth step;
ninth step: judging whether the round is larger than or equal to the maximum iteration times, and if so, ending the algorithm; if not, the present generation genetic algorithm ends, and the second step is returned.
Preferably, in the automatic optimization method of a true random number generator, the population is defined as: assuming a population number of m, n chromosomes per individual, one gene per chromosome, and a value of q, each individual in the population is expressed as: xm= [ q1, q2, q3 … … qn ].
According to the invention, parameters of the true random number generator can be selected according to different process differences, and in the process of process transformation, a circuit for calculating and designing the true random number does not need to be designed again manually, so that the product design and production period is accelerated. Meanwhile, aiming at the special scene of the random number generator, the population definition is described again, the genetic algorithm is improved, and the crossing process is the crossing of chromosomes instead of gene replacement; the variation process of the chromosome is divided into two steps, the variation condition of the chromosome quantity is increased, and the automatic optimization method improves the convergence speed of the genetic algorithm, so that the effect of optimizing the area and the power consumption of the true random number generator is achieved.
The invention is further described below with reference to the drawings and the detailed description.
Drawings
Fig. 1 is a schematic diagram of a conventional random number generator.
FIG. 2 is a flow chart of a method for automatically optimizing a true random number generator in accordance with an embodiment of the present invention.
Detailed Description
Referring to FIG. 2, a flow chart of a method for automatically optimizing a true random number generator embodying the present invention is shown. Wherein, the population is defined as: assuming a population number of m, n chromosomes per individual, one gene per chromosome, and a value of q, each individual in the population is expressed as:
Xm = [q1,q2,q3……qn]。
(1) The adaptation function: two optimization objectives include randomness and power consumption.
The function of randomness is R (xm), and different oscillator loop models have different randomness functions, but the larger the randomness is, the larger the value of the randomness function is; in the technical scheme, the function of randomness is represented by utilizing an entropy function.
Prob ue : the random number oscillator outputs a probability of 1.
(2) The power consumption function is P (xm), devices in different process libraries are different, and the calculation modes of the power consumption function are also different, but the larger the power consumption is, the larger the value of the power consumption function is.
(3) Fitness function: the higher the fitness function, the better the fitness of the individual, and according to the present solution, the better the randomness, the larger the value of the fitness function of the individual with lower power consumption. The fitness function is therefore:
f(xm) = z R(xm)/P(xm)
where z is a dependence parameter such that the maximum value of f (xm) is 1.
(4) Selecting: many methods of selecting individuals, roulette, etc., are not specifically referred to herein as a scheme;
the roulette method comprises the steps of:
a: calculating the sum of fitness of all individuals in the population
B: calculating the probability that each individual is inherited into the next generation group, wherein the sum of all probability values is 1;
c: calculating cumulative probability of each individual
D: generating a random number r between 0 and 1, selecting individual 1 if r < q [1], otherwise selecting individual k such that: q k-1 < r < q k is true.
(5) Crossing: the chromosomes are swapped in a way that the two ancestor chromosomes that cross are single-point crossed. Generating random numbers r1, r2 and r3 when r1< p (selectivity), crossing from the r2 position in the individual selected in the step (4), wherein the crossing chromosome length is r3;
for example: the ith and jth individuals of the nth generation are selected for exchange, resulting in the ith and jth individuals of the n+1th generation as follows:
X n,i =[q 1 ,q 2 ,q 3 …q r2 …q r2+r3 …q n ]X n+1,i = [q 1 ,q 2 ,q 3 …p r2 …p r2+r3 …q n ]
X n,j =[p 1 ,p 2 ,p 3 …p r2 …p r2+r3 …p n ] X n+1,j =[p 1 ,p 2 ,p 3 …q r2 …q r2+r3 …p n ]
(6) Variation: because of the specificity of the protocol, the variation of the protocol is divided into two steps:
a, a chromosome is changed in such a manner that a single point mutation of a variant child chromosome is performed. Generating random numbers r1 and r2, and performing chromosome mutation at the r2 position in the individual after the fifth step crossing when r1< q (mutation rate); for example, the ith individual of the nth generation is selected for variation a, and the ith individual of the (n+1) th generation is obtained as follows:
X n,i =[q 1 ,q 2 ,q 3 …q r2 …q n ] X n+1,i =[q 1 ,q 2 ,q 3 …m r2 …q n ]
the number of child chromosomes subjected to mutation increases. Generating a random number r1 and r2; when r1< q (mutation rate), the variant increases one chromosome, the value of the increased chromosome gene is r1>1-q (mutation rate), the variant decreases one chromosome, the value of the gene of the chromosome is 0, and the chromosome is increased. For example, the ith individual of the nth generation is selected for mutation B, one chromosome is added, and the ith individual of the n+1th generation is obtained as follows:
X n,i =[q 1 ,q 2 ,q 3 ……q n ] X n+1,i =[q 1 ,q 2 ,q 3 ……q n ,q n+1 ,]
the ith individual of the nth generation was selected for variation B, one chromosome was reduced, and the ith individual of the n+1th generation was obtained as follows:
X n,i =[q 1 ,q 2 ,q 3 ……q n ] X n+1,i =[q 1 ,q 2 ,q 3 ……q n-1 ,0]。
from the above, it can be seen that, due to the improvement of the genetic algorithm, the crossover process is the crossover of the chromosomes, rather than the replacement of the genes, so that the mutation process of the chromosomes is divided into two steps, the mutation condition of the number of the chromosomes is increased, the convergence rate of the genetic algorithm is obviously improved, and the effect of optimizing the area and the power consumption of the true random number generator is achieved.
The invention is not limited to the embodiments discussed above, and the above description of specific embodiments is intended to describe and illustrate the technical solutions to which the invention relates. Obvious variations or substitutions based on the teachings of the present invention should also be considered to fall within the scope of the present invention; the above description is provided to disclose a best mode for practicing the invention, so as to enable any person skilled in the art to utilize the invention in various embodiments and with various alternatives.

Claims (2)

1. An automatic optimizing method of a true random number generator is characterized by comprising the following specific steps:
the first step: the method comprises the following steps of initializing a population, wherein the content comprises: (1) the number of total groups; (2) maximum and minimum values of chromosomes in the population; (3) maximum and minimum gene values; (4) maximum number of iterations; (5) crossover rate and mutation rate; (6) primary individuals in the initial population of random numbers;
and a second step of: carrying out first generation inheritance, so that the iteration number is increased by 1;
and a third step of: in the generation, the adaptive function of an individual is calculated, and two optimization targets comprise randomness and power consumption; wherein entropy function is utilized
H=-Prob ue ·log 2 (Prob ue )-(1-Prob ue )·log 2 (1-Prob ue )
To represent a randomness function, where Prob ue A probability of 1 for the output of the random number oscillator; according to devices in the process library, calculating to obtain a power consumption function;
fourth step: selecting by using a roulette algorithm according to the value of the adaptation function;
fifth step: crossing with the selected individuals;
sixth step: carrying out variation on chromosome number gene values by using the selected and crossed individuals;
seventh step: performing variation of chromosome number by using the individual subjected to variation in the sixth step;
eighth step: judging whether the optimal value of 10 rounds has not changed; if the optimal value 10 rounds are unchanged, ending the algorithm; otherwise, performing an eighth step;
ninth step: judging whether the round is larger than or equal to the maximum iteration times, and if so, ending the algorithm; if not, the present generation genetic algorithm ends, and the second step is returned.
2. The method for automatic optimization of true random number generators of claim 1, wherein the population is defined as:
assuming a population number of m, n chromosomes per individual, one gene per chromosome, and a value of q, each individual in the population is expressed as: xm= [ q1, q2, q3 … … qn ].
CN201611049403.0A 2016-11-25 2016-11-25 Automatic optimization method for true random number generator Active CN108108152B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611049403.0A CN108108152B (en) 2016-11-25 2016-11-25 Automatic optimization method for true random number generator

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611049403.0A CN108108152B (en) 2016-11-25 2016-11-25 Automatic optimization method for true random number generator

Publications (2)

Publication Number Publication Date
CN108108152A CN108108152A (en) 2018-06-01
CN108108152B true CN108108152B (en) 2023-08-18

Family

ID=62203896

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611049403.0A Active CN108108152B (en) 2016-11-25 2016-11-25 Automatic optimization method for true random number generator

Country Status (1)

Country Link
CN (1) CN108108152B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111456958B (en) * 2020-01-19 2022-08-16 追觅科技(上海)有限公司 Fan rotating speed control method and computer readable storage medium
CN111427541B (en) * 2020-03-30 2022-03-04 太原理工大学 Machine learning-based random number online detection system and method

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104135363A (en) * 2014-07-28 2014-11-05 河海大学 Method of generating pseudo random number based on regular cellular automation

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6766497B2 (en) * 2002-01-25 2004-07-20 Hewlett-Packard Development Company, L.P. Method and system for reproduction in a genetic optimization process

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104135363A (en) * 2014-07-28 2014-11-05 河海大学 Method of generating pseudo random number based on regular cellular automation

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于遗传算法的TSP优化问题;文明瑶;《电脑与信息技术》;20090815(第04期);全文 *

Also Published As

Publication number Publication date
CN108108152A (en) 2018-06-01

Similar Documents

Publication Publication Date Title
CN106647262B (en) Differential evolution method for agile satellite multi-target task planning
CN106355292B (en) Cascade reservoir optimal scheduling method and system based on quantum particle swarm optimization
Subbaraj et al. Enhancement of self-adaptive real-coded genetic algorithm using Taguchi method for economic dispatch problem
Boettcher Extremal optimization for Sherrington-Kirkpatrick spin glasses
Hussain et al. Hierarchical cluster-based routing in wireless sensor networks
Karimi et al. Optimizing cluster-head selection in wireless sensor networks using genetic algorithm and harmony search algorithm
CN108365608B (en) Uncertain optimization scheduling method and system for regional energy Internet
CN108108152B (en) Automatic optimization method for true random number generator
CN106610867B (en) On-chip network task scheduling method and device
JP6724576B2 (en) Multi-target optimization method and apparatus
Singh et al. Performance of a hybrid EA-DE-memetic algorithm on CEC 2011 real world optimization problems
Zhang et al. Stochastic dynamic economic emission dispatch with unit commitment problem considering wind power integration
CN108665068A (en) The improved adaptive GA-IAGA of water distribution hydraulic model automatic Check problem
CN109413710A (en) The cluster-dividing method and device of wireless sensor network based on genetic algorithm optimization
CN108229755A (en) Based on the active distribution network space truss project for improving binary system invasive weed optimization algorithm
Yang et al. Genetic algorithm optimized training for neural network spectrum prediction
CN111861137A (en) Parallel multi-target scheduling method for cascade reservoir groups
CN112163808A (en) Method for solving logistics center addressing problem by self-adaptive whale algorithm based on opponent learning
Yaguchi et al. Basic study of proximate optimality principle based combinatorial optimization method
Mallipeddi et al. Surrogate model assisted ensemble differential evolution algorithm
CN110635486B (en) Load frequency modulation optimal scheduling method considering constraint conditions of power distribution network
CN106598197B (en) The method and apparatus for determining devices in system power
CN112183843B (en) Load optimization distribution method for thermal power plant based on hybrid intelligent algorithm
Chen et al. Research on adaptive genetic algorithm based on multi-population elite selection strategy
CN113141272A (en) Network security situation analysis method based on iteration optimization RBF neural network

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 100083 18 floor, West Tower, block D, Tongfang science and Technology Plaza, 1 Wang Zhuang Road, Wudaokou, Haidian District, Beijing.

Applicant after: ZIGUANG TONGXIN MICROELECTRONICS CO.,LTD.

Address before: 100083 18 floor, West Tower, block D, Tongfang science and Technology Plaza, 1 Wang Zhuang Road, Wudaokou, Haidian District, Beijing.

Applicant before: BEIJING TONGFANG MICROELECTRONICS Co.,Ltd.

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant