CN114047905B - Pseudo-random sequence generation method, device, medium and equipment - Google Patents

Pseudo-random sequence generation method, device, medium and equipment Download PDF

Info

Publication number
CN114047905B
CN114047905B CN202210024473.XA CN202210024473A CN114047905B CN 114047905 B CN114047905 B CN 114047905B CN 202210024473 A CN202210024473 A CN 202210024473A CN 114047905 B CN114047905 B CN 114047905B
Authority
CN
China
Prior art keywords
sequence
current
random
value
pseudo
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
CN202210024473.XA
Other languages
Chinese (zh)
Other versions
CN114047905A (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.)
Barrot Wireless Co Ltd
Original Assignee
Barrot Wireless 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 Barrot Wireless Co Ltd filed Critical Barrot Wireless Co Ltd
Priority to CN202210024473.XA priority Critical patent/CN114047905B/en
Publication of CN114047905A publication Critical patent/CN114047905A/en
Application granted granted Critical
Publication of CN114047905B publication Critical patent/CN114047905B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/582Pseudo-random number generators

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Measuring Or Testing Involving Enzymes Or Micro-Organisms (AREA)

Abstract

The application discloses a method, a device, a medium and equipment for generating a pseudorandom sequence, and belongs to the technical field of automatic driving computers. The method mainly comprises the steps of arranging all values in a preset value range according to one of all possible arrangement modes to obtain a current basic period sequence; according to a current random seed value and a current basic periodic sequence which are obtained in advance, calculating the value of each arrangement position of the pseudorandom periodic sequence which is generated at present one by one to obtain the current pseudorandom periodic sequence comprising all the values in a preset value range; and taking the current pseudo-random periodic sequence as a next basic periodic sequence to continue generating a next pseudo-random periodic sequence. The method and the device can quickly and efficiently generate the pseudorandom sequences which belong to the preset numerical range and are completely evenly distributed, and the completely same situation can not occur in the pseudorandom sequences generated twice.

Description

Pseudo-random sequence generation method, device, medium and equipment
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, a medium, and a device for generating a pseudorandom sequence.
Background
The pseudo-random sequence generator in the prior art generates pseudo-random sequences, most of which do not meet the true average distribution and cannot set the range of generated numbers. Therefore, some random numbers to be generated must be within a certain range and meet the application scenario requirement of a certain average distribution rule.
Disclosure of Invention
In view of the problems in the prior art, the present application mainly provides a method, an apparatus, a medium, and a device for generating a pseudorandom sequence.
In order to achieve the above object, the present application adopts a technical solution that: there is provided a pseudo random sequence generation method, comprising:
arranging all values in a preset value range according to one of all possible arrangement modes to obtain a current basic period sequence; according to a current random seed value and a current basic periodic sequence which are obtained in advance, calculating the value of each arrangement position of the pseudorandom periodic sequence which is generated at present one by one to obtain the current pseudorandom periodic sequence comprising all the values in a preset value range; and taking the current pseudo-random periodic sequence as a next basic periodic sequence to continue generating a next pseudo-random periodic sequence.
Another technical scheme adopted by the application is as follows: there is provided a pseudo random sequence generating device, comprising:
a module for arranging all values in a preset value range according to one of all possible arrangement modes to obtain a current basic period sequence; a module for calculating the value of each arrangement position of the pseudorandom periodic sequence which is generated at present one by one according to the current random seed value and the current basic periodic sequence which are obtained in advance to obtain the current pseudorandom periodic sequence including all the values in the preset value range; and continuing to generate a next pseudo-random periodic sequence using the current pseudo-random periodic sequence as a next base periodic sequence.
Another technical scheme adopted by the application is as follows: there is provided a pseudo-random sequence generator, a pseudo-random sequence generating device thereof, for performing the pseudo-random sequence generating method in the above-described scheme.
Another technical scheme adopted by the application is as follows: there is provided a computer readable storage medium storing computer instructions operable to perform the pseudo-random sequence generation method of the above-described scheme.
Another technical scheme adopted by the application is as follows: there is provided a computer device comprising a processor and a memory, the memory storing computer instructions operable to perform the pseudo-random sequence generation method of the above scheme.
The technical scheme of the application can reach the beneficial effects that: a pseudo-random sequence generation method, apparatus, medium, and device. The method and the device can quickly and efficiently generate the pseudorandom sequences which belong to the preset numerical range and are completely evenly distributed, and the completely same situation can not occur in the pseudorandom sequences generated twice.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to these drawings without inventive exercise.
FIG. 1 is a schematic flow chart diagram illustrating one embodiment of a pseudo-random sequence generation method according to the present application;
FIG. 2 is a schematic diagram of an embodiment of a pseudo-random sequence generating apparatus according to the present application;
with the foregoing drawings in mind, certain embodiments of the disclosure have been shown and described in more detail below. These drawings and written description are not intended to limit the scope of the disclosed concepts in any way, but rather to illustrate the concepts of the disclosure to those skilled in the art by reference to specific embodiments.
Detailed Description
The following detailed description of the preferred embodiments of the present application, taken in conjunction with the accompanying drawings, will provide those skilled in the art with a better understanding of the advantages and features of the present application, and will make the scope of the present application more clear and definite.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
It is impractical for a machine to truly generate a "probabilistically" random "number to you. Thus "pseudo" of "pseudo-random" means that the pseudo-random number generated by the computer is both random (not "pseudo-random") and regular. A pseudo-random sequence is a deterministic sequence with some random property. They are defined sequences generated by shift registers, but they have random sequences with some random character. Because of the random property, it is impossible to judge whether the sequence is true random or pseudo random from the property of an already generated sequence, and the judgment can be only made according to the generation method of the sequence. The series of pseudo-random sequences has good randomness and correlation function close to self-noise, and has advanced determinability and repeatability. These properties make the pseudorandom sequence widely used.
In the prior art, a pseudo-random sequence generator generates a pseudo-random sequence, or a hardware pseudo-random number generator generates a 32-bit random number by collecting a series of environment variables and adding a calculation method, the range of the random number is extremely large, the random number is inconvenient to use in scenes with requirements on the range and needs special treatment, but the number after the special treatment does not meet the average distribution, which is troublesome. There are also some pseudo-random numbers generated by software methods, these software methods mainly use function formula, and obtain a pseudo-random number by calculating this function, so the generated pseudo-sequence still has a problem that the result range cannot be limited, or the even distribution cannot be completely satisfied. Most do not meet a true average distribution and cannot set the range of numbers produced. For example: if it is desired to generate a random number of 0-10, the range of random numbers obtained using prior art random number generators is large, for example 10531, and therefore it is left over 10, resulting in a 1. Then continue to obtain a random number, such as 205631, and then leave 10 and get 1 again, thus getting 1 in the two past and back, which does not satisfy some unrepeatable scenes. Or a value within 0 to 1000 needs to be generated, if 1 ten thousand random numbers are acquired, statistics shows that the 1 ten thousand random numbers are distributed just too much instead of evenly distributed, which means that the probability of some numbers appearing is higher, while others are smaller, even completely absent, and the use scene requiring even distribution cannot be satisfied.
In the prior art, although the random number generated by the random number generator can also be processed to obtain a random sequence which meets the requirement of a numerical range and is evenly distributed, the processing process is too complicated.
The pseudo-random sequence generation method, the pseudo-random sequence generation device, the pseudo-random sequence generation medium and the pseudo-random sequence generation equipment can quickly and efficiently generate the pseudo-random sequences which belong to the preset numerical value range and are completely and evenly distributed, and the pseudo-random sequences generated twice cannot be completely identical.
The technical solution of the present application will be described in detail with reference to the accompanying drawings by specific embodiments. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments.
FIG. 1 shows an embodiment of a pseudo-random sequence generation method according to the present application
In the embodiment of the pseudo-random sequence generation method shown in fig. 1, the method includes a process S101 of arranging all values in a predetermined value range according to one of all possible arrangement modes to obtain a current basic periodic sequence; the process S102 is that according to the current random seed value and the current basic period sequence which are obtained in advance, the value of each arrangement position of the pseudo-random period sequence which is generated at present is calculated one by one, and the current pseudo-random period sequence which comprises all the values in the preset value range is obtained; and, the process S103 continues to generate the next pseudo-random periodic sequence with the current pseudo-random periodic sequence as the next basic periodic sequence.
The method and the device can quickly and efficiently generate the pseudorandom sequences which belong to the preset numerical range and are completely evenly distributed, and the completely same situation can not occur in the pseudorandom sequences generated twice.
The process S101 is to arrange all values in the predetermined value range according to one of all possible arrangement manners to obtain a current basic period sequence, so as to obtain a pseudo-random sequence of one period according to the basic period sequence.
In a specific embodiment of the present application, the process of obtaining the current basic periodic sequence by arranging all values in the predetermined value range according to one of all possible arrangement manners includes arranging all values in the predetermined value range according to all possible arrangement manners to obtain a plurality of periodic sequences with different arrangement manners; and determining one of the plurality of periodic sequences as a current base periodic sequence.
In one embodiment of the present application, the predetermined range of values is 1-4, and values within the range of 1-4 are arranged in all possible permutations to provide 24
Figure 714550DEST_PATH_IMAGE001
Periodic sequence of permutations:
1 2 3 4
1 2 4 3
1 3 2 4
1 3 4 2
1 4 2 3
1 4 3 2
2 1 3 4
2 1 4 3
2 3 1 4
2 3 4 1
2 4 1 3
2 4 3 1
3 1 2 4
3 1 4 2
3 2 1 4
3 2 4 1
3 4 1 2
3 4 2 1
4 1 2 3
4 1 3 2
4 2 1 3
4 2 3 1
4 3 1 2
4321, determine the first sequence 1234 of the sequence as the base periodic sequence.
The process S102 represents that the numerical values at each arrangement position of the currently generated pseudorandom periodic sequence are calculated one by one according to the current random seed numerical value and the current basic periodic sequence obtained in advance, so as to obtain the current pseudorandom periodic sequence including all the numerical values within the predetermined numerical value range, obtain the pseudorandom sequence of one period within the predetermined range, and facilitate to continuously obtain the pseudorandom sequence of the next period within the predetermined range, thereby obtaining the completely evenly distributed pseudorandom sequence.
In an optional specific embodiment of the present application, the step of calculating, one by one, a value at each permutation position of the currently generated pseudorandom periodic sequence according to the pre-obtained current random seed value and the current basic periodic sequence to obtain the current pseudorandom periodic sequence including all values within a predetermined value range includes exchanging, according to the pre-obtained current random seed value, values at each permutation position of the current basic periodic sequence to obtain values at each permutation position of the current pseudorandom periodic sequence.
In an optional specific embodiment of the present application, the step of calculating, one by one, a value at each permutation position of a currently generated pseudorandom periodic sequence according to a current random seed value and a current basic periodic sequence obtained in advance to obtain a current pseudorandom periodic sequence including all values in a predetermined value range includes calculating, in order from small to large, a position reference number of a corresponding permutation rank value corresponding to each permutation rank value according to the current random seed value, a maximum value of the predetermined value range, and each permutation rank value of the current pseudorandom periodic sequence; and extracting corresponding numerical values of arrangement positions corresponding to the position reference numbers from the reference numerical value sequence obtained according to the current basic periodic sequence to serve as numerical values of positions corresponding to the corresponding arrangement order values of the current pseudorandom periodic sequence, and obtaining the reference numerical value sequence without the corresponding numerical values.
In an optional specific embodiment of the present application, in the above process of calculating, one by one, a value at each permutation position of a currently generated pseudorandom periodic sequence according to a current random seed value and a current basic periodic sequence obtained in advance to obtain a current pseudorandom periodic sequence including all values in a predetermined value range, the method may further include calculating, in order from large to small for each permutation rank value, a position reference number of a corresponding permutation rank value according to the current random seed value, a maximum value of the predetermined value range, and each permutation rank value of the current pseudorandom periodic sequence; and extracting corresponding numerical values of arrangement positions corresponding to the position reference numbers from the reference numerical value sequence obtained according to the current basic periodic sequence to serve as numerical values of positions corresponding to the corresponding arrangement order values of the current pseudorandom periodic sequence, and obtaining the reference numerical value sequence without the corresponding numerical values.
In an optional specific embodiment of the present application, the step of sequentially calculating, according to the current random seed value, the maximum value of the predetermined value range, and each permutation order value of the current pseudorandom periodic sequence, the position reference number of the position corresponding to each permutation order value according to the sequence from small to large of each permutation order value includes calculating by using the following calculation formula:
(JN)/ (AX-N X-N/(X-N))=Y……JN+1
wherein Y represents the position reference number; n represents the permutation order value of the current pseudorandom periodic sequence; x represents the maximum value of the predetermined numerical range; j initial value is obtained according to the current random seed value I, JInitial=I-1。
In an alternative embodiment of the present application, the predetermined value range is 1-4, the current fundamental period sequence is 1234, the reference value sequence is 1234, the pre-obtained current random seed value is 10, and the initial value of J is JInitial= I-1 = 10-1 = 9. The calculation process at each permutation position (from the first position (bit 0), starting) of the current pseudo-random periodic sequence includes,
calculating the position reference number corresponding to the first position (the position order value N = 0), and J = JInitial=9。
Figure 349111DEST_PATH_IMAGE003
Thus, the position reference number 1 is obtained.
From the reference value sequence 1234, the corresponding value of the arrangement position corresponding thereto is extracted based on the position reference number 1. Specifically, the first position is a 0 position, and 1 indicates the second position, i.e., a value 2 at the second position is extracted as the value of the first position corresponding to the 0 bit of the current pseudorandom periodic sequence. Resulting in a new sequence of reference values 134 that does not include the value 2.
Calculating the position reference number corresponding to the second position (the position order value N = 1): j at this time is the remainder of calculating the position reference number corresponding to the first position, i.e., J = 3:
Figure 931271DEST_PATH_IMAGE004
according to the position reference number 1, the corresponding value of the arrangement position corresponding to the position reference number is extracted from the reference value sequence 134, that is, the value 3 at the second position is extracted as the value at the second position corresponding to the bit order 1 of the current pseudo-random periodic sequence. While a new sequence of reference values 14 is obtained which does not include the value 2.
Calculating the position reference number corresponding to the second position (the position order value N = 2): when J is the remainder of calculating the position reference number corresponding to the second position, i.e., J = 1:
Figure 683326DEST_PATH_IMAGE005
according to the position reference number 1, extracting the corresponding value of the arrangement position corresponding to the position reference number from the reference value sequence 14, namely extracting the value 4 at the second position as the value of the second position corresponding to the bit order 1 of the current pseudorandom periodic sequence.
Now that 3 values have been generated, 234, the last one being 1, the current pseudo-random periodic sequence 2341 is obtained.
This allows the next pseudo-random periodic sequence to be derived based on the current pseudo-random periodic sequence 2341.
In a specific embodiment of the present application, the first random seed value is manually set, and the other random seed values are obtained according to the previous random seed value and the previous pseudorandom periodic sequence.
In an optional specific embodiment of the present application, the current random seed value is calculated according to a preset rule by using each value in the previous random seed value and the previous pseudorandom periodic sequence.
Specifically, the following calculation formula can be used to calculate the remainder of the result as the seed value of the next period:
(last random seed value + value at position 1 of previous cycle). + -. value at position 2 of previous cycle + (last random seed value + value at position 2 of previous cycle). + -. value at position 3 of previous cycle + … + …
Figure 214712DEST_PATH_IMAGE006
The process S103 continues to generate the next pseudo-random periodic sequence by using the current pseudo-random periodic sequence as the next basic periodic sequence, so that a completely evenly distributed pseudo-random sequence within a predetermined range can be obtained.
In an optional specific embodiment of the present application, the above one pseudorandom period sequence is used as a basic period sequence, and according to a preset rule, the current random seed value is obtained by calculation using the previous random seed value and each value in the previous pseudorandom period sequence, so as to perform calculation of a next pseudorandom period sequence. For example, with the base sequences 2, 3, 4, 1, the resulting 24 orderings will be located at positions different from the positions of the preceding 24 periodic sequences. This results in that even if the seed values generated two times before and after are the same, the end result will not generate the same sequence. Thus, once the random number generator is started, the longer it is running, the more difficult it is to deduce what the next random value is. Unless 4 requirements are grasped: the initial seed value, how many cycles the random number generator has run, how many numbers are ordered therein, which reverse derivation is used and the specific method of derivation is clear and how to choose which direction derivation formula to use. This provides a certain level of security.
FIG. 2 shows an embodiment of a pseudo-random sequence generator according to the present application
In the embodiment of the pseudo-random sequence generating apparatus of the present application shown in fig. 2, the pseudo-random sequence generating apparatus includes a module 201 for arranging all values in a predetermined range of values according to one of all possible arrangement manners to obtain a current basic periodic sequence; a module 202, configured to perform one-to-one calculation on the value of the pseudorandom sequence generation apparatus at each permutation position of the currently generated pseudorandom periodic sequence according to a current random seed value and a current basic periodic sequence obtained in advance, to obtain a current pseudorandom periodic sequence including all values within a predetermined value range; and a module 203 for continuing to generate a next pseudo-random periodic sequence with the current pseudo-random periodic sequence as a next basic periodic sequence.
The device can quickly and efficiently generate the pseudorandom sequences which belong to the preset numerical range and are completely evenly distributed, and the completely same condition can not occur in the pseudorandom sequences generated twice.
The module 201 for obtaining the current basic period sequence by arranging all values in the predetermined value range according to one of all possible arrangement modes can conveniently obtain a periodic pseudorandom sequence according to the basic period sequence.
The module 202 is configured to calculate, one by one, a value at each arrangement position of a currently generated pseudorandom periodic sequence according to a current random seed value and a current basic periodic sequence obtained in advance, to obtain a current pseudorandom periodic sequence including all values within a predetermined value range, and is capable of obtaining a pseudorandom sequence of one period within the predetermined range, and facilitating to continuously obtain a next pseudorandom sequence of one period within the predetermined range, thereby obtaining a completely evenly distributed pseudorandom sequence.
The module 203 for continuing to generate the next pseudo-random periodic sequence by taking the current pseudo-random periodic sequence as the next basic periodic sequence can obtain the pseudo-random sequences which are completely evenly distributed in a preset range, and the pseudo-random sequences generated twice are not completely the same.
In an optional embodiment of the present application, the pseudo-random sequence generating apparatus further includes a module configured to obtain a current random seed value according to a previous random seed value and a previous pseudo-random periodic sequence, which is further beneficial to improving the security of the pseudo-random sequence generating apparatus.
The extended pseudo-random sequence generating apparatus provided in the present application may be configured to execute the extended pseudo-random sequence generating method described in any of the above embodiments, and the implementation principle and the technical effect are similar, which are not described herein again.
In a specific embodiment of the present application, the functional blocks of a pseudo-random sequence generation apparatus of the present application may be directly in hardware, in a software module executed by a processor, or in a combination of both.
The software modules may reside in RAM memory, flash memory, ROM memory, EPRO0M memory, EEPROM memory, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium.
The Processor may be a Central Processing Unit (CPU), other general-purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA), other Programmable logic devices, discrete Gate or transistor logic, discrete hardware components, or any combination thereof. A general purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. A processor may also be implemented as a combination of computing devices, e.g., a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a DSP core, or any other such configuration. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an ASIC. The ASIC may reside in a user terminal. In the alternative, the processor and the storage medium may reside as discrete components in a user terminal.
Another technical scheme adopted by the application is as follows: there is provided a pseudo-random sequence generator, a pseudo-random sequence generating device thereof, for performing the pseudo-random sequence generating method in the above-described scheme.
In another embodiment of the present application, a computer-readable storage medium stores computer instructions operable to perform the method of expanding a pseudorandom sequence generation method as described above.
In another embodiment of the present application, a computer device comprises a processor and a memory, the memory storing computer instructions operable to perform the pseudo-random sequence generation method of the above scheme.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of a unit is merely a logical division, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
The above embodiments are merely examples, which are not intended to limit the scope of the present disclosure, and all equivalent structural changes made by using the contents of the specification and the drawings, or any other related technical fields, are also included in the scope of the present disclosure.

Claims (10)

1. A method for generating a pseudorandom sequence comprising:
arranging all values in a preset value range according to one of all possible arrangement modes to obtain a current basic period sequence;
according to the current random seed value and the current basic periodic sequence which are obtained in advance, calculating the value of each arrangement position of the pseudorandom periodic sequence which is generated at present one by one to obtain the current pseudorandom periodic sequence including all the values in the preset value range; and the number of the first and second groups,
taking the current pseudo-random periodic sequence as a next basic periodic sequence to continuously generate a next pseudo-random periodic sequence;
the process of calculating the numerical value at each arrangement position of the currently generated pseudo-random periodic sequence one by one according to the pre-obtained current random seed numerical value and the current basic periodic sequence to obtain the current pseudo-random periodic sequence including all the numerical values in the preset numerical value range includes exchanging the numerical values at each arrangement position of the current basic periodic sequence according to the pre-obtained current random seed numerical value to obtain the numerical values at each arrangement position of the current pseudo-random periodic sequence.
2. The method according to claim 1, wherein the step of calculating the value at each permutation position of the currently generated pseudo-random periodic sequence one by one according to the current random seed value obtained in advance and the current basic periodic sequence to obtain the current pseudo-random periodic sequence including all values in the predetermined range of values comprises,
according to the current random seed value, the maximum value of the preset value range and each arrangement order value of the current pseudorandom periodic sequence, sequentially calculating to obtain a position reference number of a position corresponding to each arrangement order value according to the sequence from small to large of each arrangement order value;
and extracting corresponding numerical values of arrangement positions corresponding to the position reference numbers from a reference numerical value sequence obtained according to the current basic periodic sequence to serve as numerical values of positions corresponding to the corresponding arrangement position order values of the current pseudorandom periodic sequence, and obtaining the reference numerical value sequence without the corresponding numerical values.
3. The method according to claim 2, wherein the step of sequentially calculating the position reference number of the corresponding position of each permutation bit order according to the sequence from small to large of each permutation bit order according to the current random seed value, the maximum value of the predetermined value range, and each permutation bit order value of the current pseudorandom periodic sequence comprises calculating by using the following calculation formula:
(JN)/ (AX-N X-N/(X-N))=Y……JN+1
wherein Y represents the position reference number; n represents the permutation order value of the current pseudorandom periodic sequence; x represents the maximum value of the predetermined numerical range; j initial value is obtained according to the current random seed value I, JInitial=I-1。
4. The method of claim 1, wherein said step of arranging all values in a predetermined range of values in one of all possible arrangements to obtain the current fundamental periodic sequence comprises
All values in the preset value range are arranged according to all possible arrangement modes to obtain a plurality of periodic sequences with different arrangement modes; and
determining one of the plurality of periodic sequences as the current base periodic sequence.
5. The pseudo-random sequence generation method of claim 1, further comprising,
manually setting a first random seed value; and the number of the first and second groups,
and obtaining the current random seed value according to the last random seed value and the last pseudorandom periodic sequence.
6. The method of claim 1, wherein said deriving the current random seed value from a previous random seed value and a previous pseudorandom periodic sequence comprises,
and calculating to obtain the current random seed value by using the last random seed value and each value in the last pseudorandom periodic sequence according to a preset rule.
7. A pseudo-random sequence generating apparatus, comprising,
a module for arranging all values in a preset value range according to one of all possible arrangement modes to obtain a current basic period sequence;
a module, configured to calculate, one by one, a value at each permutation position of a pseudorandom periodic sequence currently being generated according to a current random seed value obtained in advance and the current basic periodic sequence, so as to obtain a current pseudorandom periodic sequence including all values in the predetermined value range; and the number of the first and second groups,
and continuing to generate a next pseudo-random periodic sequence by taking the current pseudo-random periodic sequence as a next basic periodic sequence.
8. A pseudo-random sequence generator comprising pseudo-random sequence generating means, characterized in that said pseudo-random sequence generating means is adapted to perform the pseudo-random sequence generating method of any of claims 1-6.
9. A computer-readable storage medium storing computer instructions, wherein the computer instructions are operable to perform the pseudo-random sequence generation method of any one of claims 1-6.
10. A computer apparatus comprising a processor and a memory, the memory storing computer instructions, wherein the processor operates the computer instructions to perform the pseudo-random sequence generation method of any one of claims 1-6.
CN202210024473.XA 2022-01-11 2022-01-11 Pseudo-random sequence generation method, device, medium and equipment Active CN114047905B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210024473.XA CN114047905B (en) 2022-01-11 2022-01-11 Pseudo-random sequence generation method, device, medium and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210024473.XA CN114047905B (en) 2022-01-11 2022-01-11 Pseudo-random sequence generation method, device, medium and equipment

Publications (2)

Publication Number Publication Date
CN114047905A CN114047905A (en) 2022-02-15
CN114047905B true CN114047905B (en) 2022-04-12

Family

ID=80196192

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210024473.XA Active CN114047905B (en) 2022-01-11 2022-01-11 Pseudo-random sequence generation method, device, medium and equipment

Country Status (1)

Country Link
CN (1) CN114047905B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117785388B (en) * 2024-02-27 2024-04-26 牛芯半导体(深圳)有限公司 Method, device, medium and equipment for generating pseudo random sequence calculation program

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1496055A (en) * 2002-02-12 2004-05-12 ��۳��д�ѧ Sequence generator and generation method of pseudo-random sequence
CN1858999A (en) * 2005-08-17 2006-11-08 华为技术有限公司 Pseudo-random sequence generating device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7512645B2 (en) * 2004-03-19 2009-03-31 Texas Instruments Incorporated System and method for generating pseudorandom numbers

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1496055A (en) * 2002-02-12 2004-05-12 ��۳��д�ѧ Sequence generator and generation method of pseudo-random sequence
CN1858999A (en) * 2005-08-17 2006-11-08 华为技术有限公司 Pseudo-random sequence generating device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
一种基于符号动力学的伪随机序列发生器设计方法;张伟等;《计算机科学》;20050625(第06期);全文 *

Also Published As

Publication number Publication date
CN114047905A (en) 2022-02-15

Similar Documents

Publication Publication Date Title
EP1840731B1 (en) A system and method for generating pseudo-random numbers
CN114047905B (en) Pseudo-random sequence generation method, device, medium and equipment
CN107203365B (en) Random number generation and acquisition method and device
CN103812596B (en) The generation method and device of pseudo-random sequence
CN110430045A (en) A kind of random digit generation method based on distributed common recognition algorithm
US20240097883A1 (en) Systems and computer-implemented methods for generating pseudo random numbers
TWI652963B (en) Method and device for receiving and transmitting physical random access channel preamble sequence
CN109375897B (en) Method for generating pseudo-random sequence
CN102520908B (en) Pseudo-random number generator and pseudo-random number generating method
CN111262686A (en) Security verification method for RSSP-I secure communication
CN111190570A (en) High-quality random number generator and random number generation method
TWI672967B (en) Method for generating auxiliary synchronization sequence, detection method, base station and user equipment
Hameed et al. Utilizing Hopfield neural network for pseudo-random number generator
CN116962438A (en) Gradient data synchronization method, system, electronic equipment and readable storage medium
CN110784315A (en) Block chain-based shaking method and device, computer equipment and storage medium
CN116185341A (en) True random number generation device, method, equipment and storage medium
CN110191077A (en) A kind of method, apparatus, equipment and storage medium reducing PAPR
CN113556228B (en) Pseudo-random number generation and corresponding unique code generation method capable of being used as seed
Mukherjee et al. Non-uniform nonlinear cellular automata with large cycles and their application in pseudo-random number generation
CN103124438B (en) A kind of generation method of random access guiding and device
CN116301724B (en) Method, device, equipment and storage medium for generating non-repeated pseudo random number
CN111400377B (en) Method and device for determining target data set
Wang et al. Generating high-quality random numbers by cellular automata with PSO
CN114281830B (en) Rule mapping table construction method, rule matching method and device for multi-attribute conditions
AL-khatib et al. Comparative analysis of SLA-LFSR with traditional pseudo random number generators

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
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: A1009, floor 9, block a, No. 9, Shangdi Third Street, Haidian District, Beijing 100085

Patentee after: Beijing Bairui Internet Technology Co.,Ltd.

Address before: A1009, floor 9, block a, No. 9, Shangdi Third Street, Haidian District, Beijing 100085

Patentee before: BARROT WIRELESS Co.,Ltd.