True random number acquisition method, device and system
By collecting truly random number signals, converting them into numerical sequences, and counting the number of occurrences, the problem of low quality of truly random numbers is solved, and the security of data encryption is improved.
Patent Information
- Application Number
- CN202211321147.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-26
- Publication Date
- 2026-08-25
- Estimated Expiration
- 2042-10-26
AI Technical Summary
The quality of truly random numbers generated by existing encryption devices is low, resulting in insufficient data encryption security.
By collecting true random number signals, converting them into numerical sequences, counting the number of consecutive occurrences of the values, and determining the true random numbers based on the sampling frequency and the sequence of occurrences.
It improves the quality of true random number collection and enhances the security of data encryption.
Smart Images

Figure CN115562624B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer science, specifically to a method, apparatus, and system for acquiring true random numbers. Background Technology
[0002] With the rapid development of technology, random numbers play a vital role in many areas such as secure communication, network verification codes, statistical analysis, and information security. These random numbers can include true random numbers and pseudo-random numbers. True random numbers have a higher degree of randomness than pseudo-random numbers; therefore, data encrypted using true random numbers is more secure than data encrypted using pseudo-random numbers.
[0003] However, when the quality of truly random numbers generated by encryption devices is low, the security of data encrypted using those numbers is also low. Therefore, there is an urgent need for a scheme capable of collecting truly random numbers, thereby enabling the evaluation of their quality. Summary of the Invention
[0004] This invention aims to at least partially solve one of the technical problems in related technologies. To this end, one objective of this invention is to provide a true random number acquisition method, apparatus, and system. In this method, after converting the sampled values of each sampling point into numerical values to obtain a numerical sequence, the true random number acquisition device can count the number of consecutive occurrences of the first and second values in the numerical sequence, thereby obtaining a frequency sequence. Then, based on the sampling frequency and the frequency sequence, a true random number can be determined, thus achieving true random number acquisition.
[0005] Firstly, a method for collecting truly random numbers is provided, the method including:
[0006] Multiple sampling points are collected from a truly random signal generated by a truly random number source based on the sampling frequency;
[0007] The sampled value of each of the multiple sampling points is converted into a numerical value to obtain a numerical sequence, which includes a first numerical value and a second numerical value.
[0008] The frequency sequence is obtained by counting the number of consecutive occurrences of the first and second values in a numerical sequence. The frequency sequence includes the numerical values and the number of consecutive occurrences of the values.
[0009] True random numbers are determined based on the sampling frequency and number of times sequence.
[0010] In some embodiments, determining true random numbers based on a sampling frequency and frequency sequence includes:
[0011] For each value in the frequency sequence, the actual frequency corresponding to the value is determined based on the number of consecutive occurrences of the value and the sampling multiplier. The actual frequency is negatively correlated with the sampling multiplier and positively correlated with the number of consecutive occurrences of the value.
[0012] Based on the actual number of times the value is calculated, a truly random number corresponding to the value is determined.
[0013] In some embodiments, the actual number K corresponding to the i-th value in the number sequence is... i for Integers;
[0014] Among them, w i F is the number of consecutive occurrences of the i-th value in the frequency sequence, v is the sampling rate, i is an integer, i is greater than or equal to 0, and less than the total number of values in the frequency sequence.
[0015] In some embodiments, v is 1 or 0.
[0016] In some embodiments, before determining the actual number of occurrences corresponding to a numerical value based on the number of consecutive occurrences of the value and the sampling rate, the method further includes:
[0017] Obtain the reference frequency of a pre-stored true random signal;
[0018] The sampling ratio is determined based on the sampling frequency and the reference frequency. The sampling ratio is positively correlated with the sampling frequency and negatively correlated with the reference frequency.
[0019] In some embodiments, the sampling rate F satisfies:
[0020] Where fc is the sampling frequency and fs is the reference frequency.
[0021] In some embodiments, before determining the actual number of occurrences corresponding to a numerical value based on the number of consecutive occurrences of the value and the sampling rate, the method further includes:
[0022] Determine the minimum frequency among the first reference number of frequencies in the frequency sequence;
[0023] If the minimum number of times is greater than or equal to the threshold of the first number, the sampling rate is determined based on the sum of the minimum number of times and the reference frequency.
[0024] If the minimum number of times is less than the threshold of the first count, a prompt message will be issued, which will suggest increasing the sampling frequency.
[0025] In some embodiments, the sampling rate F satisfies:
[0026] F = N0 + Δn, where N0 is the minimum frequency and Δn is the reference frequency.
[0027] In some embodiments, after determining that the minimum number of times is greater than or equal to the first number threshold, the method further includes:
[0028] If the minimum number of times is greater than the threshold of the second number, then the reciprocal of the minimum number of times is determined as the reference frequency, where the threshold of the second number is greater than the threshold of the first number.
[0029] If the minimum number of occurrences is greater than or equal to the first number threshold and less than or equal to the second number threshold, then multiple target values are determined from the previous reference number of values in the number sequence. The difference between the number of consecutive occurrences of each target value and the minimum number of occurrences is greater than or equal to the first difference threshold and less than or equal to the second difference threshold.
[0030] The probability of the first value appearing among multiple target values is determined as the reference frequency.
[0031] In some embodiments, the first value is 1 and the second value is 0.
[0032] In some embodiments, the sampled value of each of the multiple sampled points is converted into a numerical value to obtain a numerical sequence, including:
[0033] For each sampling point, if the sampled value of the sampling point is greater than or equal to the reference value, then the sampled value is converted into the first value.
[0034] If the sampled value at a sampling point is less than the reference value, the sampled value is converted to a second value.
[0035] In some embodiments, the method further includes:
[0036] Store true random numbers according to the reference format.
[0037] Secondly, a computer-readable storage medium is provided, on which a true random number acquisition program is stored, which, when executed by a processor, implements the true random number acquisition method described above.
[0038] Thirdly, a true random number acquisition device is provided, including a memory, a processor, and a true random number acquisition program stored in the memory and executable on the processor. When the processor executes the true random number acquisition program, it implements the true random number acquisition program method described above.
[0039] Fourthly, a true random number acquisition device is provided, the device comprising:
[0040] The acquisition module is used to acquire multiple sampling points from a true random number signal source generated according to the sampling frequency;
[0041] The first determining module is used to convert the sampled value of each of the multiple sampling points into a numerical value to obtain a numerical sequence, which includes a first numerical value and a second numerical value.
[0042] The statistics module is used to count the number of times the first value and the second value appear consecutively in a numerical sequence, resulting in a frequency sequence, which includes the value and the number of consecutive occurrences of the value.
[0043] The second determining module is used to determine truly random numbers based on the sampling frequency and the sequence of times.
[0044] Optionally, a second determining module is used for:
[0045] For each value in the frequency sequence, the actual frequency corresponding to the value is determined based on the number of consecutive occurrences of the value and the sampling multiplier. The actual frequency is negatively correlated with the sampling multiplier and positively correlated with the number of consecutive occurrences of the value.
[0046] Based on the actual number of times the value is calculated, a truly random number corresponding to the value is determined.
[0047] Optionally, the actual number K corresponding to the i-th value in the number sequence. i for Integers;
[0048] Among them, w i F is the number of consecutive occurrences of the i-th value in the frequency sequence, v is the sampling rate, i is an integer, i is greater than or equal to 0, and less than the total number of values in the frequency sequence.
[0049] Optionally, the device further includes: a third determining module, used for:
[0050] Before determining the actual number of occurrences corresponding to a value based on the number of consecutive occurrences of the value and the sampling rate, the reference frequency of a pre-stored true random signal is obtained.
[0051] The sampling ratio is determined based on the sampling frequency and the reference frequency. The sampling ratio is positively correlated with the sampling frequency and negatively correlated with the reference frequency.
[0052] Optionally, the sampling rate F satisfies:
[0053] Where fc is the sampling frequency and fs is the reference frequency.
[0054] Optionally, the device further includes: a third determining module, used for:
[0055] Before determining the actual number of times a value corresponds to a value based on the number of consecutive occurrences of the value and the sampling rate, determine the minimum number of times among the first reference number of times in the number sequence;
[0056] If the minimum number of times is greater than or equal to the threshold of the first number, the sampling rate is determined based on the sum of the minimum number of times and the reference frequency.
[0057] If the minimum number of times is less than the threshold of the first count, a prompt message will be issued, which will suggest increasing the sampling frequency.
[0058] Optionally, the sampling rate F satisfies:
[0059] F = N0 + Δn, where N0 is the minimum frequency and Δn is the reference frequency.
[0060] Optionally, the third determining module is also used for:
[0061] After determining that the minimum number of times is greater than or equal to the first number threshold, if the minimum number of times is greater than the second number threshold, then the reciprocal of the minimum number of times is determined as the reference frequency, where the second number threshold is greater than the first number threshold;
[0062] If the minimum number of occurrences is greater than or equal to the first number threshold and less than or equal to the second number threshold, then multiple target values are determined from the previous reference number of values in the number sequence. The difference between the number of consecutive occurrences of each target value and the minimum number of occurrences is greater than or equal to the first difference threshold and less than or equal to the second difference threshold.
[0063] The probability of the first value appearing among multiple target values is determined as the reference frequency.
[0064] Optionally, the first determining module is used for:
[0065] For each sampling point, if the sampled value of the sampling point is greater than or equal to the reference value, then the sampled value is converted into the first value.
[0066] If the sampled value at a sampling point is less than the reference value, the sampled value is converted to a second value.
[0067] Fifthly, a true random number acquisition system is provided, including: a true random number signal source and a true random number acquisition device;
[0068] A true random number generator is used to generate true random signals.
[0069] True random number acquisition equipment is used for:
[0070] Multiple sampling points are collected from a truly random signal generated by a truly random number source based on the sampling frequency;
[0071] The sampled value of each of the multiple sampling points is converted into a numerical value to obtain a numerical sequence, which includes a first numerical value and a second numerical value.
[0072] The frequency sequence is obtained by counting the number of consecutive occurrences of the first and second values in a numerical sequence. The frequency sequence includes the numerical values and the number of consecutive occurrences of the values.
[0073] True random numbers are determined based on the sampling frequency and number of times sequence.
[0074] In some embodiments, the true random number acquisition device includes: a data acquisition sub-device and a true random number determination sub-device;
[0075] Data acquisition sub-device, used for:
[0076] Multiple sampling points are collected from a truly random signal generated by a truly random number source based on the sampling frequency;
[0077] The sampled value of each of the multiple sampling points is converted into a numerical value to obtain a numerical sequence, and the numerical sequence is sent to the true random number determination sub-device. The numerical sequence includes a first numerical value and a second numerical value.
[0078] True random number determination sub-device, used for:
[0079] The frequency sequence is obtained by counting the number of consecutive occurrences of the first and second values in a numerical sequence. The frequency sequence includes the numerical values and the number of consecutive occurrences of the values.
[0080] True random numbers are determined based on the sampling frequency and number of times sequence.
[0081] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0082] Figure 1 This is a schematic diagram of the structure of a true random number acquisition system provided in an embodiment of the present invention;
[0083] Figure 2 This is a flowchart of a true random number acquisition method provided in an embodiment of the present invention;
[0084] Figure 3 This is a flowchart of another true random number acquisition method provided in an embodiment of the present invention;
[0085] Figure 4 This is a flowchart of a method for determining a reference frequency of a truly random signal, provided by an embodiment of the present invention;
[0086] Figure 5 This is a schematic diagram of the structure of a true random number acquisition device provided in an embodiment of the present invention;
[0087] Figure 6This is a block diagram of a true random number acquisition device provided in an embodiment of the present invention;
[0088] Figure 7 This is a block diagram of another true random number acquisition device provided in an embodiment of the present invention;
[0089] Figure 8 This is a block diagram of another true random number acquisition device provided in an embodiment of the present invention;
[0090] Figure 9 This is a schematic diagram of another true random number acquisition system provided in an embodiment of the present invention. Detailed Implementation
[0091] Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain the present invention, and should not be construed as limiting the present invention.
[0092] Figure 1 This is a schematic diagram of a true random number acquisition system provided in an embodiment of the present invention, as shown below. Figure 1 As shown, the system may include a true random number signal source 10 and a true random number acquisition device 20.
[0093] The true random number signal source 10 is used to generate a true random signal, which may include a sine wave signal or an irregular square wave signal, etc. Optionally, the true random number signal source 10 can be a microcontroller unit (MCU).
[0094] The true random number acquisition device 20 is connected to the true random number signal source 10. The device 20 acquires multiple sampling points from the true random signal generated by the signal source 10 according to a sampling frequency to obtain a numerical sequence, which may include a first value and a second value. Then, the device 20 counts the number of consecutive occurrences of the first value and the second value in the numerical sequence to obtain a frequency sequence, which may include the value and the number of consecutive occurrences of that value. Based on the sampling frequency and the frequency sequence, a true random number is determined, thereby achieving the acquisition of a true random number.
[0095] Figure 2 This is a flowchart of a true random number acquisition method provided in an embodiment of the present invention. This method can be applied to... Figure 1 The true random number acquisition device 20 shown is an example. Figure 2 As shown, the method includes:
[0096] Step 201: Collect multiple sampling points from the true random signal generated by the true random number signal source according to the sampling frequency.
[0097] A true random number acquisition device can acquire multiple sampling points from a true random signal generated by a true random number signal source according to the sampling frequency after receiving an acquisition command. Alternatively, the true random number acquisition device can periodically acquire multiple sampling points from a true random signal generated by a true random number signal source according to the sampling frequency.
[0098] The true random signal can be a sine wave signal or an irregular square wave signal, etc., and the sampling frequency can be pre-stored in the true random number acquisition device. For example, the sampling frequency can be 60 Hz.
[0099] Step 202: Convert the sampled value of each of the multiple sampling points into a numerical value to obtain a numerical sequence.
[0100] After acquiring multiple sampling points, the true random number acquisition device can convert the sampled value of each sampling point into a numerical value, thereby obtaining a numerical sequence. This numerical sequence may include a first numerical value and a second numerical value, and the multiple numerical values in the sequence correspond one-to-one with the sampled values of the multiple sampling points. Optionally, the first numerical value can be 1, and the second numerical value can be 0.
[0101] Step 203: Count the number of consecutive occurrences of the first value and the second value in the numerical sequence to obtain the frequency sequence.
[0102] After determining a numerical sequence, a true random number acquisition device can count the number of consecutive occurrences of the first and second values in the sequence, thus obtaining a frequency sequence. This frequency sequence can include both the numerical values and the number of consecutive occurrences of those values.
[0103] Step 204: Determine the true random number based on the sampling frequency and number sequence.
[0104] After determining the number of iterations, a true random number acquisition device can determine true random numbers based on the sampling frequency and the number of iterations, thereby achieving the acquisition of true random numbers.
[0105] In summary, the embodiments of the present invention provide a true random number acquisition method. In this method, after the true random number acquisition device converts the sampled value of each sampling point into a numerical value and obtains a numerical sequence, it can count the number of consecutive occurrences of the first numerical value and the second numerical value in the numerical sequence to obtain a frequency sequence. Then, based on the sampling frequency and the frequency sequence, a true random number can be determined, thereby realizing true random number acquisition.
[0106] Figure 3This is a flowchart of another true random number acquisition method provided in an embodiment of the present invention. This method can be applied to... Figure 1 The true random number acquisition device 20 shown is an example. Figure 3 As shown, the method may include:
[0107] Step 301: Collect multiple sampling points from the true random signal generated by the true random number signal source according to the sampling frequency.
[0108] In this embodiment of the invention, the true random number acquisition device can, upon receiving an acquisition command, acquire multiple sampling points from the true random signal generated by the true random number signal source according to the sampling frequency. Alternatively, the true random number acquisition device can periodically acquire multiple sampling points from the true random signal generated by the true random number signal source according to the sampling frequency.
[0109] The true random signal can be a sine wave signal or an irregular square wave signal, etc. For example, the true random signal can be a sine wave voltage signal or a sine wave current signal. The sampling frequency can be pre-stored in the true random number acquisition device. For example, the sampling frequency can be 60Hz, that is, the true random number acquisition device can acquire 60 sampling points per second.
[0110] Step 302: Convert the sampled value of each of the multiple sampling points into a numerical value to obtain a numerical sequence.
[0111] After acquiring multiple sampling points of a true random signal, the true random number acquisition device can convert the sampled value of each sampling point into a numerical value, thereby obtaining a numerical sequence. The sampled value can be a voltage value or a current value. The numerical sequence can include a first numerical value and a second numerical value. Optionally, the first numerical value can be 1, and the second numerical value can be 0.
[0112] In this embodiment of the invention, after acquiring multiple sampling points, the true random number acquisition device can determine a reference value based on the sampled values of these multiple sampling points. This reference value can be the mean or median of the sampled values from these multiple sampling points. Then, for each sampling point, the true random number acquisition device can detect whether the sampled value of that sampling point is greater than or equal to the reference value. If the true random number acquisition device detects that the sampled value of that sampling point is greater than or equal to the reference value, it can convert the sampled value into a first value; if it detects that the sampled value of that sampling point is less than the reference value, it can convert the sampled value into a second value, thereby obtaining a numerical sequence.
[0113] Among them, the value S(x) obtained by transforming the sampled value d(x) of the x-th sampled point among the multiple sampled points by the true random number acquisition device can satisfy: d0 is a reference value, x is an integer, and x is greater than or equal to 0 and less than the total number of multiple sampling points.
[0114] For example, assuming a true random number acquisition device collects 30 sampling points, the numerical sequence determined by the true random number acquisition device based on the sampling values of these 30 sampling points can include 30 values: {0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0}. These 30 values correspond one-to-one with the sampling values of the 30 sampling points.
[0115] Step 303: Count the number of consecutive occurrences of the first value and the second value in the numerical sequence to obtain the frequency sequence.
[0116] After determining the numerical sequence, a true random number acquisition device can count the number of consecutive occurrences of the first value and the second value in the numerical sequence, thereby obtaining the frequency sequence.
[0117] The sequence of occurrences can include a numerical value and the number of times that value appears consecutively, where w is the number of consecutive occurrences of the i-th numerical value in the sequence. i It can be represented as h i =(i, w i ), h i (0) = i, h i (1) = w i The i can be an integer, which is greater than or equal to 0 and less than the total number of values in the exponent sequence.
[0118] For example, if the numerical sequence includes 30 values: {0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0}, then the true random number acquisition device can obtain the following results by counting the number of consecutive occurrences of the first and second values in the numerical sequence: The 0th value in the sequence is 0, and the 0th value 0 appears consecutively 5 times, i.e., h0 = (0, 5). The 1st value in the sequence is 1, and the 1st value 1 appears consecutively 15 times, i.e., h1 = (1, 15). The 2nd value in the sequence is 0, and the 2nd value 0 appears consecutively 10 times, i.e., h2 = (0, 10).
[0119] Step 304: Determine the sampling ratio.
[0120] In this embodiment of the invention, after determining the number sequence, the true random number acquisition device can also determine the sampling multiplier.
[0121] In one optional implementation of this invention, the true random number acquisition device may pre-store a reference frequency of a true random signal. The true random number acquisition device may directly acquire the pre-stored reference frequency of the true random signal and determine the sampling rate based on the reference frequency and the sampling frequency.
[0122] Optionally, the true random number acquisition device can determine the sampling ratio based on the ratio of the sampling frequency to the reference frequency of the true random signal. For example, the true random number acquisition device can determine the sampling ratio F as the ratio of the sampling frequency fc to the reference frequency fs of the true random signal, that is, the sampling ratio F can satisfy:
[0123] In another optional implementation of this invention, the true random number acquisition device can determine the sampling rate of the true random signal based on the number sequence, with reference to... Figure 4 The process may include steps A1 to A4 as described below.
[0124] Step A1: Determine the minimum number of times among the first reference number of times in the number sequence.
[0125] After determining the sequence of occurrences, a true random number acquisition device can determine the minimum occurrence among the first reference number of occurrences in the sequence. This reference number can be pre-stored in the device and can be greater than 0, and less than or equal to the total number of occurrences in the sequence. For example, this reference number can be 100.
[0126] For example, if the reference quantity is 100, and the sequence of occurrences includes 200 occurrences, then the true random number acquisition device can determine the minimum occurrence among the first 100 occurrences of the 200 occurrences as the minimum occurrence. That is, N0 = min[h1(1), h2(1), h3(1)......h z (1)], the h z (1) represents h z The number of times z is in the equation, where z is a positive integer less than or equal to 100.
[0127] Step A2: Check if the minimum number of attempts is greater than or equal to the threshold for the first attempt.
[0128] After determining the minimum number of occurrences among the first reference number of occurrences in the sequence, the true random number acquisition device can check whether this minimum number is greater than or equal to a first-order threshold. If the minimum number is greater than or equal to the first-order threshold, it can be determined that the sampling frequency is relatively high, and the accuracy of the true random numbers determined based on the sampling points sampled at this sampling frequency is relatively high; therefore, step A3 can be executed. If the minimum number is less than the first-order threshold, it can be determined that the sampling frequency is relatively low, and the accuracy of the true random numbers determined based on the sampling points sampled at this sampling frequency is relatively low; therefore, step A4 can be executed. The true random number acquisition device can pre-store the first-order threshold. For example, the first-order threshold can be 3.
[0129] Step A3: Determine the sampling rate based on the sum of the minimum number of times and the reference frequency.
[0130] If a true random number acquisition device detects that the minimum number of occurrences is greater than or equal to the threshold of the first occurrence, it can determine a reference frequency and then determine the sampling multiplier based on the sum of the minimum number of occurrences and the reference frequency. Optionally, the true random number acquisition device can determine the sampling multiplier as the sum of the minimum number of occurrences and the reference frequency. This sampling multiplier F can satisfy: F = N0 + Δn, where N0 is the minimum number of occurrences and Δn is the reference frequency.
[0131] In this embodiment of the invention, after determining that the minimum number of occurrences is greater than or equal to the first number threshold, the true random number acquisition device can further detect whether the minimum number of occurrences is greater than the second number threshold. If the minimum number of occurrences is detected to be greater than the second number threshold, the reciprocal of the minimum number of occurrences can be determined as the reference frequency, that is, the reference frequency Δn can satisfy:
[0132] The second number threshold is greater than the first number threshold, and the second number threshold is pre-stored in the true random number acquisition device. For example, the second number threshold can be 10, that is, the minimum number of attempts N0 > 10.
[0133] If a true random number acquisition device detects that the minimum number of occurrences is greater than or equal to the first threshold and less than or equal to the second threshold, it can determine multiple target values from the first reference number of values in the number sequence, and determine the probability of the first value appearing among the multiple target values as the reference frequency. That is, this reference frequency Δn can satisfy: Where r can be the number of the first values among multiple target values, and L is the total number of the multiple target values.
[0134] For example, the threshold for the first count can be 3, and the threshold for the second count can be 10, meaning the minimum number of counts is 3 ≤ N0 ≤ 10. The total number of target values is greater than or equal to 10.
[0135] Specifically, the difference between the number of consecutive occurrences of each target value and the minimum number of occurrences is greater than or equal to a first difference threshold and less than or equal to a second difference threshold. The true random number acquisition device can pre-store the first and second difference thresholds. For example, the first difference threshold can be 0, and the second difference threshold can be 1, i.e., 0 ≤ h u (1) -N0≤1, where u is a positive integer greater than or equal to 1 and less than or equal to the total number of multiple target values, and h u (1) refers to the number of consecutive occurrences of the u-th target value among multiple target values.
[0136] In this embodiment of the invention, the set Q of the plurality of target values can satisfy: Q = {h1(0), h2(0), h3(0)......h L (0)}, where h L (0) refers to the Lth value among the multiple target values.
[0137] Step A4: Issue a prompt message.
[0138] If the true random number acquisition device detects that the minimum number of attempts is less than the threshold for the first attempt, it can issue a prompt message suggesting an increase in the sampling frequency. This allows developers to promptly increase the sampling frequency, ensuring the accuracy of the collected true random numbers. For example, the prompt message could be "Please increase the sampling frequency."
[0139] Optionally, the true random number acquisition device can display the prompt message in text, or the true random number acquisition device can play the prompt message via voice.
[0140] Step 305: For each value in the frequency sequence, determine the actual frequency corresponding to the value based on the number of consecutive occurrences of the value and the sampling rate.
[0141] After determining the sampling rate, the true random number acquisition device can determine the actual number of occurrences of each value in the sequence of occurrences based on the number of consecutive occurrences of that value and the sampling rate. This actual number of occurrences is negatively correlated with the sampling rate and positively correlated with the number of consecutive occurrences of that value.
[0142] Optionally, the actual number K corresponding to the i-th value in the number sequence. i for An integer. Optional, the actual count K corresponding to the i-th value in the count sequence. i It can satisfy: in, It means to Rounding to the nearest integer, v can be a preset value, which can be pre-stored in the true random number acquisition device. Optionally, v can be 0 or 1.
[0143] Optionally, if the sampling rate determined by the sampling frequency and the reference frequency is used in the above steps, then v is 1, that is, the... If the sampling rate determined by the number sequence is used in the above steps, then v is 0, which means that...
[0144]
[0145] For example, if v is 1, the sampling rate F is 5, h0 = (0, 5), h1 = (1, 15), and h2 = (0, 10), then the actual number of times the 0th value 0 in the number sequence can be determined. The first value 1 in this sequence corresponds to the actual number of times. The actual number of times the second value 0 in this sequence of counts
[0146] Step 306: For each value, determine the true random number corresponding to the value based on the actual number of values.
[0147] After determining the actual number of occurrences corresponding to each value in the sequence, the true random number acquisition device can, for each value, determine a true random number corresponding to that value based on the actual number of occurrences, thereby obtaining true random numbers for multiple values. Optionally, the true random number acquisition device can determine the actual number of occurrences as the true random number corresponding to that value.
[0148] For example, if the actual number of occurrences corresponding to the 0th value 0 in the sequence is 1, then this 1 0 can be identified as the true random number corresponding to that value 0, i.e., the true random number corresponding to this value 0 is 0. If the actual number of occurrences corresponding to the 1st value 1 in the sequence is 3, then these 3 1s can be identified as the true random number corresponding to that value 1, i.e., the true random number is 111. If the actual number of occurrences corresponding to the 2nd value 0 in the sequence is 2, then these 2 0s can be identified as the true random number corresponding to that value 0, i.e., the true random number is 00. Therefore, the true random number corresponding to these three values is 0 111 00.
[0149] Step 307: Store the true random numbers according to the reference format.
[0150] After determining a truly random number, the true random number acquisition device can store the number according to a reference format, which can be a .bin file. After storing the number, the device can send it to a quality inspection device, which can then inspect the quality of the number.
[0151] In summary, the embodiments of the present invention provide a true random number acquisition method. In this method, after the true random number acquisition device converts the sampled value of each sampling point into a numerical value and obtains a numerical sequence, it can count the number of consecutive occurrences of the first numerical value and the second numerical value in the numerical sequence to obtain a frequency sequence. Then, based on the sampling frequency and the frequency sequence, a true random number can be determined, thereby realizing true random number acquisition.
[0152] This invention provides a computer-readable storage medium storing a true random number acquisition program. When executed by a processor, this program implements the true random number acquisition method described in the above embodiments, for example, implementing... Figure 2 or Figure 3 The method for collecting true random numbers is shown.
[0153] Figure 5 This is a schematic diagram of the structure of a true random number acquisition device provided in an embodiment of the present invention, as shown below. Figure 5 As shown, the true random number acquisition device 20 includes a memory 211, a processor 212, and a true random number acquisition program stored in the memory 211 and executable on the processor 212. When the processor 212 executes the true random number acquisition program, it implements the true random number acquisition method described in the above embodiments, for example, implementing the following... Figure 2 or Figure 3 The method for collecting true random numbers is shown.
[0154] Figure 6 This is a block diagram of a true random number acquisition device provided in an embodiment of the present invention, such as... Figure 6 As shown, the device includes:
[0155] The acquisition module 601 is used to acquire multiple sampling points from a true random signal generated by a true random number signal source according to the sampling frequency.
[0156] The first determining module 602 is used to convert the sampled value of each of the multiple sampling points into a numerical value to obtain a numerical sequence, the numerical sequence including a first numerical value and a second numerical value.
[0157] The statistics module 603 is used to count the number of times the first value and the second value appear consecutively in a numerical sequence, so as to obtain a frequency sequence, which includes the value and the number of times the value appears consecutively.
[0158] The second determining module 604 is used to determine true random numbers based on the sampling frequency and the sequence of times.
[0159] In summary, the embodiments of the present invention provide a true random number acquisition device. In this device, after converting the sampled value of each sampling point into a numerical value and obtaining a numerical sequence, the true random number acquisition device can count the number of consecutive occurrences of the first value and the second value in the numerical sequence, thereby obtaining a frequency sequence. Then, based on the sampling frequency and the frequency sequence, a true random number can be determined, thereby realizing true random number acquisition.
[0160] Optionally, the second determining module 604 is used for:
[0161] For each value in the frequency sequence, the actual frequency corresponding to the value is determined based on the number of consecutive occurrences of the value and the sampling rate. The actual frequency is negatively correlated with the sampling rate and positively correlated with the number of consecutive occurrences of the value.
[0162] Based on the actual number of times the value is calculated, a truly random number corresponding to the value is determined.
[0163] Optionally, the actual number K corresponding to the i-th value in the number sequence. i for Integers;
[0164] Among them, w i F is the number of consecutive occurrences of the i-th value in the frequency sequence, v is the sampling rate, i is an integer, i is greater than or equal to 0, and less than the total number of values in the frequency sequence.
[0165] Optional, v can be 1 or 0.
[0166] refer to Figure 7 The third determining module 605 is used for:
[0167] Before determining the actual number of occurrences corresponding to a value based on the number of consecutive occurrences of the value and the sampling rate, the reference frequency of a pre-stored true random signal is obtained.
[0168] The sampling ratio is determined based on the sampling frequency and the reference frequency. The sampling ratio is positively correlated with the sampling frequency and negatively correlated with the reference frequency.
[0169] Optionally, the sampling rate F satisfies:
[0170] Where fc is the sampling frequency and fs is the reference frequency.
[0171] refer to Figure 7 The third determining module 605 is used for:
[0172] Before determining the actual number of times a value corresponds to a value based on the number of consecutive occurrences of the value and the sampling rate, determine the minimum number of times among the first reference number of times in the number sequence.
[0173] If the minimum number of times is greater than or equal to the threshold of the first number, the sampling rate is determined based on the sum of the minimum number of times and the reference frequency.
[0174] If the minimum number of times is less than the threshold of the first count, a prompt message will be issued, which will suggest increasing the sampling frequency.
[0175] Optionally, the sampling rate F satisfies:
[0176] F = N0 + Δn, where N0 is the minimum frequency and Δn is the reference frequency.
[0177] Optional, see reference Figure 7 The third determining module 605 is used for:
[0178] After determining that the minimum number of occurrences is greater than or equal to the first number threshold, if the minimum number of occurrences is greater than the second number threshold, then the reciprocal of the minimum number of occurrences is determined as the reference frequency, where the second number threshold is greater than the first number threshold.
[0179] If the minimum number of occurrences is greater than or equal to the first number threshold and less than or equal to the second number threshold, then multiple target values are determined from the previous reference number of values in the number sequence. The difference between the number of consecutive occurrences of each target value and the minimum number of occurrences is greater than or equal to the first difference threshold and less than or equal to the second difference threshold.
[0180] The probability of the first value appearing among multiple target values is determined as the reference frequency.
[0181] Optionally, the first value is 1 and the second value is 0.
[0182] The first determining module 602 is used for:
[0183] For each sampling point, if the sampled value is greater than or equal to the reference value, the sampled value is converted into the first value.
[0184] If the sampled value at a sampling point is less than the reference value, the sampled value is converted to a second value.
[0185] refer to Figure 8 Storage module 606 is used to store true random numbers in a reference format.
[0186] In summary, the embodiments of the present invention provide a true random number acquisition device. In this device, after converting the sampled value of each sampling point into a numerical value and obtaining a numerical sequence, the true random number acquisition device can count the number of consecutive occurrences of the first value and the second value in the numerical sequence, thereby obtaining a frequency sequence. Then, based on the sampling frequency and the frequency sequence, a true random number can be determined, thereby realizing true random number acquisition.
[0187] refer to Figure 1 The true random number signal source 10 in the true random number acquisition system provided in this embodiment of the invention is used to generate true random signals.
[0188] True random number acquisition device 20, used for:
[0189] Multiple sampling points are collected from a truly random signal generated by a truly random number source based on the sampling frequency.
[0190] The sampled value of each of the multiple sampling points is converted into a numerical value, resulting in a numerical sequence, which includes a first numerical value and a second numerical value.
[0191] The frequency sequence is obtained by counting the number of consecutive occurrences of the first and second values in a numerical sequence. The frequency sequence includes the values and the number of consecutive occurrences of the values.
[0192] True random numbers are determined based on the sampling frequency and number of times sequence.
[0193] In summary, the embodiments of the present invention provide a true random number acquisition system. In this system, after the true random number acquisition device converts the sampled value of each sampling point into a numerical value and obtains a numerical sequence, it can count the number of consecutive occurrences of the first value and the second value in the numerical sequence to obtain a frequency sequence. Then, based on the sampling frequency and the frequency sequence, a true random number can be determined, thereby realizing true random number acquisition.
[0194] refer to Figure 9 The true random number acquisition device 20 may include a data acquisition sub-device 21 and a true random number determination sub-device 22. The data acquisition sub-device 21 may be a logic analyzer or oscilloscope, etc., and the true random number determination sub-device 22 may be a device capable of data processing, such as a tablet computer or personal computer.
[0195] The data acquisition sub-device 21 is connected to the true random number signal source 10 and the true random number determination sub-device 22 respectively. The data acquisition sub-device 21 is used for:
[0196] Multiple sampling points are collected from a truly random signal generated by a truly random number source based on the sampling frequency.
[0197] The sampled value of each of the multiple sampling points is converted into a numerical value to obtain a numerical sequence, and the numerical sequence is sent to the true random number determination sub-device. The numerical sequence includes a first numerical value and a second numerical value.
[0198] True random number determination sub-device 22, used for:
[0199] The frequency sequence is obtained by counting the number of consecutive occurrences of the first and second values in a numerical sequence. The frequency sequence includes the values and the number of consecutive occurrences of the values.
[0200] True random numbers are determined based on the sampling frequency and number of times sequence.
[0201] Optional, true random number determination sub-device 22, used for:
[0202] For each value in the frequency sequence, the actual frequency corresponding to the value is determined based on the number of consecutive occurrences of the value and the sampling rate. The actual frequency is negatively correlated with the sampling rate and positively correlated with the number of consecutive occurrences of the value.
[0203] Based on the actual number of times the value is calculated, a truly random number corresponding to the value is determined.
[0204] Optionally, the actual number K corresponding to the i-th value in the number sequence. i for Integers;
[0205] Among them, w i F is the number of consecutive occurrences of the i-th value in the frequency sequence, v is the sampling rate, i is an integer, i is greater than or equal to 0, and less than the total number of values in the frequency sequence.
[0206] Optional, v can be 1 or 0.
[0207] Optionally, the true random number determination sub-device 22 is also used for:
[0208] Before determining the actual number of occurrences corresponding to a value based on the number of consecutive occurrences of the value and the sampling rate, the reference frequency of a pre-stored true random signal is obtained.
[0209] The sampling ratio is determined based on the sampling frequency and the reference frequency. The sampling ratio is positively correlated with the sampling frequency and negatively correlated with the reference frequency.
[0210] Optionally, the sampling rate F satisfies:
[0211] Where fc is the sampling frequency and fs is the reference frequency.
[0212] Optionally, the true random number determination sub-device 22 is also used for:
[0213] Before determining the actual number of times a value corresponds to a value based on the number of consecutive occurrences of the value and the sampling rate, determine the minimum number of times among the first reference number of times in the number sequence.
[0214] If the minimum number of times is greater than or equal to the threshold of the first number, the sampling rate is determined based on the sum of the minimum number of times and the reference frequency.
[0215] If the minimum number of times is less than the threshold of the first count, a prompt message will be issued, which will suggest increasing the sampling frequency.
[0216] Optionally, the sampling rate F satisfies:
[0217] F = N0 + Δn, where N0 is the minimum frequency and Δn is the reference frequency.
[0218] Optionally, the true random number determination sub-device 22 is also used for:
[0219] After determining that the minimum number of occurrences is greater than or equal to the first number threshold, if the minimum number of occurrences is greater than the second number threshold, then the reciprocal of the minimum number of occurrences is determined as the reference frequency, where the second number threshold is greater than the first number threshold.
[0220] If the minimum number of occurrences is greater than or equal to the first number threshold and less than or equal to the second number threshold, then multiple target values are determined from the previous reference number of values in the number sequence. The difference between the number of consecutive occurrences of each target value and the minimum number of occurrences is greater than or equal to the first difference threshold and less than or equal to the second difference threshold.
[0221] The probability of the first value appearing among multiple target values is determined as the reference frequency.
[0222] Optionally, the first value is 1 and the second value is 0.
[0223] Optionally, the data acquisition sub-device 21 is used for:
[0224] For each sampling point, if the sampled value is greater than or equal to the reference value, the sampled value is converted into the first value.
[0225] If the sampled value at a sampling point is less than the reference value, the sampled value is converted to a second value.
[0226] Optionally, the true random number determination sub-device 22 is also used for:
[0227] Store true random numbers according to the reference format.
[0228] In summary, the embodiments of the present invention provide a true random number acquisition system. In this system, after the true random number acquisition device converts the sampled value of each sampling point into a numerical value and obtains a numerical sequence, it can count the number of consecutive occurrences of the first value and the second value in the numerical sequence to obtain a frequency sequence. Then, based on the sampling frequency and the frequency sequence, a true random number can be determined, thereby realizing true random number acquisition.
[0229] It should be noted that the logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Alternatively, the computer-readable medium may be paper or other suitable media on which the program can be printed, since the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in a computer memory.
[0230] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0231] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "optional," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0232] Furthermore, the terms "first," "second," etc., used in the embodiments of this invention are for descriptive purposes only and should not be construed as indicating or implying relative importance, or implicitly specifying the number of technical features indicated in this embodiment. Therefore, features defined with terms such as "first" and "second" in the embodiments of this invention can explicitly or implicitly indicate that the embodiment includes at least one of those features. In the description of this invention, the word "multiple" means at least two or more, such as two, three, four, etc., unless otherwise explicitly specified in the embodiments.
[0233] In this invention, unless otherwise explicitly specified or limited in the embodiments, the term "connection" and similar terms appearing in the embodiments should be interpreted broadly. For example, a connection can be a fixed connection, a detachable connection, or an integral part; it can also be a mechanical connection, an electrical connection, etc. Of course, it can also be a direct connection, or an indirect connection through an intermediate medium, or it can be the internal communication of two components, or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific implementation.
[0234] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.
Claims
1. A method for collecting truly random numbers, characterized in that, The method includes: Multiple sampling points are collected from a truly random signal generated by a truly random number source based on the sampling frequency; The sampled value of each of the plurality of sampling points is converted into a numerical value to obtain a numerical sequence, the numerical sequence including a first numerical value and a second numerical value; The number of consecutive occurrences of the first value and the second value in the numerical sequence are counted to obtain a frequency sequence, which includes the value and the number of consecutive occurrences of the value. The true random number is determined based on the sampling frequency and the sequence of occurrences. The step of determining the true random number based on the sampling frequency and the number sequence includes: For each value in the frequency sequence, the actual frequency corresponding to the value is determined based on the number of consecutive occurrences of the value and the sampling multiplier, wherein the actual frequency is negatively correlated with the sampling multiplier and positively correlated with the number of consecutive occurrences of the value; Based on the actual number of times the value is calculated, a true random number corresponding to the value is determined.
2. The method according to claim 1, characterized in that, With the number sequence in the above sequence The actual number of times corresponding to each value for Integers; Among them, the The number in the sequence of times The number of times a value appears consecutively, the For the sampling magnification, the As a preset value, the The integer, the It is greater than or equal to 0, and less than the total number of values in the sequence of occurrences.
3. The method according to claim 2, characterized in that, The It can be 1 or 0.
4. The method according to claim 1, characterized in that, Before determining the actual number of occurrences corresponding to the value based on the number of consecutive occurrences of the value and the sampling rate, the method further includes: Obtain the reference frequency of the pre-stored true random signal; The sampling ratio is determined based on the sampling frequency and the reference frequency, wherein the sampling ratio is positively correlated with the sampling frequency and negatively correlated with the reference frequency.
5. The method according to claim 4, characterized in that, The sampling rate satisfy: , wherein For the sampling frequency, the The reference frequency is denoted as .
6. The method according to claim 1, characterized in that, Before determining the actual number of occurrences corresponding to the value based on the number of consecutive occurrences of the value and the sampling rate, the method further includes: Determine the minimum number of occurrences among the first reference number of occurrences in the sequence of occurrences; If the minimum number of times is greater than or equal to the threshold of the first number, then the sampling multiplier is determined based on the sum of the minimum number of times and the reference frequency; If the minimum number of times is less than the first number threshold, a prompt message is issued, which prompts the user to increase the sampling frequency.
7. The method according to claim 6, characterized in that, The sampling rate satisfy: , wherein For the minimum number of times, the The reference frequency is [reference frequency].
8. The method according to claim 6, characterized in that, After determining that the minimum number of times is greater than or equal to the threshold of the first number, the method further includes: If the minimum number of times is greater than the second number threshold, then the reciprocal of the minimum number of times is determined as the reference frequency, wherein the second number threshold is greater than the first number threshold; If the minimum number of occurrences is greater than or equal to the first number threshold and less than or equal to the second number threshold, then multiple target values are determined from the previous reference number of values in the number sequence. The difference between the number of consecutive occurrences of each target value and the minimum number of occurrences is greater than or equal to the first difference threshold and less than or equal to the second difference threshold. The probability of the first value occurring among multiple target values is determined as the reference frequency.
9. The method according to any one of claims 1 to 8, characterized in that, The first value is 1, and the second value is 0.
10. The method according to any one of claims 1 to 8, characterized in that, The step of converting the sampled value of each of the plurality of sampled points into a numerical value to obtain a numerical sequence includes: For each sampling point, if the sampled value of the sampling point is greater than or equal to the reference value, then the sampled value is converted into a first value. If the sampled value of the sampling point is less than the reference value, then the sampled value is converted into the second value.
11. The method according to any one of claims 1 to 8, characterized in that, The method further includes: The true random numbers are stored according to the reference format.
12. A computer-readable storage medium, characterized in that, It stores a true random number acquisition program, which, when executed by a processor, implements the true random number acquisition method according to any one of claims 1-11.
13. A true random number acquisition device, characterized in that, The method includes a memory, a processor, and a true random number acquisition program stored in the memory and executable on the processor. When the processor executes the true random number acquisition program, it implements the true random number acquisition program method according to any one of claims 1-11.
14. A true random number acquisition device, characterized in that, The device includes: The acquisition module is used to acquire multiple sampling points from a true random number signal source generated according to the sampling frequency; The first determining module is used to convert the sampled value of each of the plurality of sampling points into a numerical value to obtain a numerical sequence, wherein the numerical sequence includes a first numerical value and a second numerical value. The statistics module is used to count the number of times the first value and the second value appear consecutively in the numerical sequence to obtain a frequency sequence, wherein the frequency sequence includes the value and the number of times the value appears consecutively; The second determining module is used to determine the true random number based on the sampling frequency and the number sequence; The second determining module is used for: For each value in the frequency sequence, the actual frequency corresponding to the value is determined based on the number of consecutive occurrences of the value and the sampling multiplier, wherein the actual frequency is negatively correlated with the sampling multiplier and positively correlated with the number of consecutive occurrences of the value; Based on the actual number of times the value is calculated, a true random number corresponding to the value is determined.
15. The apparatus according to claim 14, characterized in that, With the number sequence in the above sequence The actual number of times corresponding to each value for Integers; Among them, the The number in the sequence of times The number of times a value appears consecutively, the For the sampling magnification, the As a preset value, the The integer, the It is greater than or equal to 0, and less than the total number of values in the sequence of occurrences.
16. The apparatus according to claim 14, characterized in that, The device further includes: a third determining module, used for: Before determining the actual number of occurrences corresponding to the value based on the number of consecutive occurrences of the value and the sampling rate, the reference frequency of the pre-stored true random signal is obtained; The sampling ratio is determined based on the sampling frequency and the reference frequency, wherein the sampling ratio is positively correlated with the sampling frequency and negatively correlated with the reference frequency.
17. The apparatus according to claim 16, characterized in that, The sampling rate satisfy: , wherein For the sampling frequency, the The reference frequency is denoted as .
18. The apparatus according to claim 14, characterized in that, The device further includes: a third determining module, used for: Before determining the actual number of occurrences corresponding to the value based on the number of consecutive occurrences of the value and the sampling rate, the minimum number of occurrences among the first reference number of occurrences in the number sequence is determined; If the minimum number of times is greater than or equal to the threshold of the first number, then the sampling multiplier is determined based on the sum of the minimum number of times and the reference frequency; If the minimum number of times is less than the first number threshold, a prompt message is issued, which prompts the user to increase the sampling frequency.
19. The apparatus according to claim 18, characterized in that, The sampling rate satisfy: , wherein For the minimum number of times, the The reference frequency is [reference frequency].
20. The apparatus according to claim 18, characterized in that, The third determining module is further configured to: After determining that the minimum number of times is greater than or equal to the first number threshold, if the minimum number of times is greater than the second number threshold, then the reciprocal of the minimum number of times is determined as the reference frequency, wherein the second number threshold is greater than the first number threshold; If the minimum number of occurrences is greater than or equal to the first number threshold and less than or equal to the second number threshold, then multiple target values are determined from the previous reference number of values in the number sequence. The difference between the number of consecutive occurrences of each target value and the minimum number of occurrences is greater than or equal to the first difference threshold and less than or equal to the second difference threshold. The probability of the first value occurring among multiple target values is determined as the reference frequency.
21. The apparatus according to any one of claims 14 to 20, characterized in that, The first determining module is used for: For each sampling point, if the sampled value of the sampling point is greater than or equal to the reference value, then the sampled value is converted into a first value. If the sampled value of the sampling point is less than the reference value, then the sampled value is converted into the second value.
22. A true random number acquisition system, characterized in that, include: A true random number signal source and the true random number acquisition device as described in claim 13; The true random number signal source is used to generate true random signals; The true random number acquisition device is used for: Multiple sampling points are collected from the true random signal generated by the true random number signal source according to the sampling frequency; The sampled value of each of the plurality of sampling points is converted into a numerical value to obtain a numerical sequence, the numerical sequence including a first numerical value and a second numerical value; The number of consecutive occurrences of the first value and the second value in the numerical sequence are counted to obtain a frequency sequence, which includes the value and the number of consecutive occurrences of the value. The true random number is determined based on the sampling frequency and the sequence of occurrences.
23. The system according to claim 22, characterized in that, The true random number acquisition device includes: a data acquisition sub-device and a true random number determination sub-device; The data acquisition sub-device is used for: Multiple sampling points are collected from the true random signal generated by the true random number signal source according to the sampling frequency; The sampled value of each of the plurality of sampling points is converted into a numerical value to obtain a numerical sequence, and the numerical sequence is sent to the true random number determination sub-device. The numerical sequence includes a first numerical value and a second numerical value. The true random number determination sub-device is used for: The number of consecutive occurrences of the first value and the second value in the numerical sequence are counted to obtain a frequency sequence, which includes the value and the number of consecutive occurrences of the value. The true random number is determined based on the sampling frequency and the sequence of occurrences.
Citation Information
Patent Citations
Adjustable truly-random number generation system based on time-amplitude conversion
CN107608657A
Random number generating method and device
CN1879080A