WO2021051409A1 - 一种随机数生成方法及生成装置 - Google Patents

一种随机数生成方法及生成装置 Download PDF

Info

Publication number
WO2021051409A1
WO2021051409A1 PCT/CN2019/107094 CN2019107094W WO2021051409A1 WO 2021051409 A1 WO2021051409 A1 WO 2021051409A1 CN 2019107094 W CN2019107094 W CN 2019107094W WO 2021051409 A1 WO2021051409 A1 WO 2021051409A1
Authority
WO
WIPO (PCT)
Prior art keywords
signal
processed
random number
independent source
distributed independent
Prior art date
Application number
PCT/CN2019/107094
Other languages
English (en)
French (fr)
Inventor
焦旭
Original Assignee
北京微动数联科技有限公司
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 北京微动数联科技有限公司 filed Critical 北京微动数联科技有限公司
Priority to PCT/CN2019/107094 priority Critical patent/WO2021051409A1/zh
Priority to CN201980001924.4A priority patent/CN110832452A/zh
Priority to TW109103703A priority patent/TWI734369B/zh
Publication of WO2021051409A1 publication Critical patent/WO2021051409A1/zh

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/588Random number generators, i.e. based on natural stochastic processes

Definitions

  • This application belongs to the field of computers, and particularly relates to a method and device for generating random numbers.
  • An embodiment of the present application provides a random number generation method based on distributed independent sources.
  • the method specifically includes: acquiring a first distributed independent source quasi-periodic signal; determining a first signal to be processed based on the first distributed independent source quasi-periodic signal; collecting the phase of the first signal to be processed; The phase of the signal to be processed determines the first random number.
  • An embodiment of the present application provides a random number generation device, which includes: a sensor for collecting a first distributed independent source quasi-periodic signal; a memory, which stores a computer random number generation program; and a processor, and The sensor is connected to the memory, and when the computer random number generation program is executed by the processor, the processor is caused to execute any one of the aforementioned methods.
  • An embodiment of the present application also provides an electronic device, including: a processor; and a memory, storing computer instructions, when the computer instructions are executed by the processor, the processor is caused to execute any of the foregoing method.
  • An embodiment of the present application also provides a non-transitory computer storage medium that stores a computer program, and when the computer program is executed by one or more processors, the processor executes any of the foregoing methods.
  • the programs contained in the above-mentioned random number generation methods, devices, electronic equipment, and non-transient computer storage media all use distributed independent source quasi-periodic signals as signal sources to generate random numbers.
  • the signal has the following characteristics: the signal quality can be checked; the specific structure details of the signal source cannot be copied; when the signal sources have sufficient time and space independence, there will be no synchronization interference with other information; the signal source can confirm the independence; the signal The history of the source experience cannot be copied, and the difference is huge; there is no need to build a dedicated system independently; the signal source signal changes are unpredictable, so using the methods, devices, electronic equipment and non-transitory computer storage media in the embodiments of this application can generate truly random number.
  • FIG. 1a is a schematic flowchart of a random number generation method 1000 according to an embodiment of the application.
  • FIG. 1b is an embodiment of the application, a schematic flow chart of the decomposition steps of step S110 of the random number generation method 1000.
  • FIG. 1c is an embodiment of the application, a schematic flowchart of the decomposition steps of step S130 of the random number generation method 1000.
  • FIG. 1d is an embodiment of the present application, and a schematic flowchart of the decomposition steps of step S132 of the random number generation method 1000.
  • Figure 1e is an embodiment of the application, a schematic diagram of the waveforms of the signal f 1 (t), the signal f 1 ′(t), and the signal g 1 (t) of the random number generation method 1000.
  • FIG. 1f is an embodiment of the application, a schematic flowchart of the decomposition steps of step S136 of the random number generation method 1000.
  • FIG. 1g is a schematic diagram of the waveform of the signal p(t) of the random number generation method 1000 according to an embodiment of the application.
  • FIG. 2 is a schematic flowchart of a random number generation method 2000 according to an embodiment of the application.
  • FIG. 3 is a schematic flowchart of a random number generation method 3000 according to an embodiment of the application.
  • FIG. 4a is a schematic diagram of the composition of a random number generating device 4000 according to an embodiment of the application.
  • FIG. 4b is a schematic diagram of a composition of a random number generating device 4000 according to an embodiment of the application.
  • the collected source signals are generally quasi-periodic signals, such as biometric signals such as human breathing and heartbeat. Even if these signals are not strictly periodic signals, they can be classified as they are close to periodic signals.
  • the class is a quasi-periodic signal.
  • These signals can come from widely used devices such as real-time exercise monitoring and sleep monitoring. Since these devices are usually distributed in hospitals and users' homes, they are distributed devices, so the signals obtained are distributed signals.
  • the objects collected by each device are independent and unrelated to each other, so they belong to independent sources.
  • random number candidates are generated from the collected signals by the phase extraction method, and then the required random number sequence is selected according to certain rules. Different from the traditional random number generation method based on a single data source, this new technology takes advantage of the independent and uncorrelated characteristics of distributed multiple data sources, thus generating truly independent uncorrelated random numbers.
  • Fig. 1a shows an embodiment of this application. This embodiment is suitable for the case where there is only a single frequency component in the quasi-periodic signal.
  • the method 1000 includes: step S110, step S120, step S130, and step S140. among them:
  • Step S110 Obtain a set of distributed independent source quasi-periodic signals ⁇ f i (t) ⁇ , and take a signal of an independent source (denoted as f 0 (t)) as an example to introduce the subsequent processing method.
  • Step S120 Determine a first signal f 1 (t) to be processed based on the signal f 0 (t).
  • Step S130 extract the phase Ph1 of the first signal to be processed f 1 (t).
  • Step S140 Normalize the phase Ph1 of the first signal to be processed f 1 (t) so that Ph1 is in the range of [0, 1), that is, greater than or equal to 0 and less than 1.
  • the independent source quasi-periodic signal f 0 (t) may be a biological sign signal.
  • the independent source quasi-periodic signal f 0 (t) may be a human body's respiration signal, an electrocardiogram signal, a pulse signal, and the like. It can also be the breathing signal, electrocardiogram signal, pulse signal and so on of other animals.
  • step S110 may include step S112 and step S114. among them:
  • Step S112 collecting an independent source quasi-periodic signal f 0 (t).
  • Step S114 it is judged whether the independent source quasi-periodic signal f 0 (t) is stable. If the judgment result is no, return to step S112 to continue collecting.
  • step S120 may be to use the quasi-periodic signal f 0 (t) as the first to-be-processed signal f 1 (t).
  • step S130 may be to determine the first to-be-processed signal f 1 (t) according to the zero-crossing time of the first to-be-processed signal f 1 (t) or the peak time of the first to-be-processed signal f 1 (t) The phase Ph1.
  • step S130 may further include:
  • Step S132 determining a first packet signal to be processed f 1 (t) of the complex g 1 (t).
  • Step S136 Determine the phase Ph1 of the first signal f 1 (t) to be processed according to the envelope g 1 (t) and the first signal f 1 (t) to be processed.
  • step S132 may include step S133 and step S134. among them:
  • Step S133 Hilbert transform is performed on the first signal f 1 (t) to be processed to obtain the signal f 1 ′(t).
  • Step S134 the signal to be processed in accordance with the first f 1 (t) and the transform result of f 1 '(t), using the formula (1), determining a first signal to be processed f 1 (t) the envelope of g 1 (t).
  • step S136 may include step S137 and step S138. among them:
  • Step S137 according to the waveform g 1 (t) and the first signal to be processed f 1 (t), the phase function p(t) is determined according to formula (2).
  • step S137 may also be: determining the phase function p(t) according to the inverse cosine function according to the waveform g 1 (t) and the signal f 1 ′(t).
  • step S137 may also be: determining the phase function p(t) according to the arc sine function according to the waveform g 1 (t) and the first signal to be processed f 1 (t).
  • step S137 may also be: determining the phase function p(t) according to the arc sine function according to the waveform g 1 (t) and the signal f 1 ′(t).
  • step S137 may also be: according to the first signal to be processed f 1 (t) and its Hilbert transform f 1 '(t), the phase function p(t) is determined according to the arctangent function or the arccotangent function. ).
  • step S210 As shown in FIG. 2, which is an embodiment of this application, this embodiment is applicable to the case where a human respiratory signal is used as a data source, and a schematic flowchart of a random number generation method 2000.
  • the method 2000 includes step S210, step S220, step S230, and step S240. Wherein, step S210, step S230, and step S240 are respectively similar to steps S110, S130, and S140 in the method 1000, and will not be repeated here.
  • Step S220 Perform a DC removal and/or low-pass filtering operation on the collected independent source quasi-periodic signal f 0 (t) to determine the first signal to be processed f 1 (t).
  • f 1 (t) can be low-pass filtered, and its cut-off frequency can be 40 Hz to filter out high-frequency components or other high-frequency interference components in the respiratory signal.
  • step S310 As shown in FIG. 3, which is an embodiment of this application, this embodiment is suitable for the situation where the quasi-periodic signal has obvious high-order harmonics and direct current components, and a schematic flow diagram of the random number generation method 3000.
  • the method 3000 includes step S310, step S320, step S323, step S326, step S330, and step S340.
  • step S310, step S330, and step S340 are similar to the steps of the same name in the method 1000, and will not be repeated here.
  • Step S320 Determine a second signal to be processed f 2 (t) according to the quasi-periodic signal f 0 (t).
  • Step S323 extract the fundamental frequency f b of the quasi-periodic signal f 0 (t).
  • Step S327 Filter the second signal f 2 (t) to be processed according to the fundamental frequency f b to obtain the first single frequency signal f 21 (t) as the first signal f 1 (t) to be processed.
  • step S320 may be: S320A, using the quasi-periodic signal f 0 (t) directly as the second to-be-processed signal f 2 (t).
  • step S320 may be: S320B, aligning the periodic signal f 0 (t) with DC filtering to determine the second signal to be processed f 2 (t).
  • step S320A is similar to step S220 in method 2000, and will not be repeated here.
  • step S323 may be to determine the frequency f 2 (t) signal to be processed in accordance with a second interval between zero f 2 (t) over a second signal to be processed. May also be a step S323, it is determined to be the second processed signal f 2 (t) of frequency f b The interval between the second signal to be processed f 2 (t) of the extreme point.
  • step S323 may include:
  • Step S324 Perform a sliding autocorrelation operation on the second signal to be processed f 2 (t) to obtain a correlation value function c t ( ⁇ ).
  • step S325 the peak position of the correlation value function c t ( ⁇ ) is collected.
  • Step S326 Determine the frequency f b of the second signal to be processed f 2 (t) according to the peak position of the correlation value function c t ( ⁇ ).
  • the sliding autocorrelation operation performed on the second signal to be processed f 2 (t) in step 324 can be calculated according to formula (3).
  • T S is the length of the sliding window.
  • T c is the sliding length.
  • Tc can be set to 10 seconds, and Ts can be set to 20 seconds.
  • Tc can be set to 3 seconds, and Ts can be set to 6 seconds.
  • step S326 may be that the reciprocal of the independent variable corresponding to the maximum value of the correlation function c t ( ⁇ ) is used as the frequency f b of the second signal to be processed f 2 (t).
  • step S327 may include: step S327A, performing low-pass filtering on the second to-be-processed signal f 2 (t) according to the frequency f b.
  • step S327A is 1.5f b .
  • the symbol "[]” is a rounding symbol, that is, [x] represents a maximum integer less than or equal to x.
  • the random number sequence generated at time t is K is the preset sequence length.
  • the signal has the following characteristics: the signal quality can be checked; the specific structure details of the signal source cannot be copied; when the signal sources have sufficient time and space independence, there will be no synchronization interference with other information; the signal source can confirm the independence; the signal The history of the source experience cannot be copied, and the difference is huge; there is no need to build a dedicated system independently; the signal source signal change is unpredictable, so the method can generate a true random number.
  • FIG. 4a is a schematic diagram of the composition of a random number generating device 4000 according to an embodiment of the application.
  • the random number generating device 4000 includes a processor 401, a memory 411, and a sensor 421. among them:
  • the sensor 421 is used to collect quasi-periodic signals from distributed independent sources.
  • the memory 411 stores a computer random number generation program. as well as
  • the processor 401 is connected to the sensor and the memory, and when the computer random number generation program is executed by the processor, the processor is made to execute any of the foregoing methods.
  • the memory 411 may be a non-volatile memory such as a hard disk and a flash memory, or a random memory such as a dynamic memory and a static memory.
  • the processor 401 may be connected to the memory 411 through a bus.
  • the processor 401 may be electrically connected to the sensor 421, or may be communicatively connected.
  • the random number generating device 4000 may also include a network interface unit and a data transmission system.
  • the processor 401 is connected to the sensor 421 by network communication through the network interface unit.
  • the processor 401 may control the sensor to collect distributed independent source quasi-periodic signals of at least one distributed independent source through the network and the data transmission system, and transmit the collected data to the processor 401.
  • the processor 401 may be connected to the sensor 421 through a wired network or through a wireless network.
  • the random number generating apparatus 4000 may include at least two processors and at least two memories.
  • the at least two processors and at least two memories may be installed in the same computer or in multiple computers. Further, the at least two processors and the at least two memories may be provided with a distributed computer (inside the server).
  • the random number generating device 4000 may further include at least two sensors, which respectively collect at least two distributed independent source quasi-periodic signals. Further, the at least two sensors can form a sensor array.
  • the present application also provides an electronic device, including: a processor; and a memory, which stores computer instructions, and when the computer instructions are executed by the processor, the processor is caused to execute any of the foregoing methods.
  • the present application also provides a non-transitory computer storage medium that stores a computer program, and when the computer program is executed by one or more processors, the processor executes any of the foregoing methods.
  • the programs in the above-mentioned random number generating device, electronic equipment and non-transient computer storage medium all use distributed independent source quasi-periodic signals as signal sources to generate random numbers. Because the signal has the following characteristics: the signal quality can be checked; the specific structure details of the signal source cannot be copied; when the signal sources have sufficient time and space independence, there will be no synchronization interference with other information; the signal source can confirm the independence; the signal The history of the source experience cannot be replicated, and the differences are huge; there is no need to build a dedicated system independently; the signal source signal changes are unpredictable. Therefore, the random number generated by this method is closer to the true random number.
  • These computer program instructions can also be stored in a computer-readable medium that can instruct a computer or other programmable data processing device to implement functions in a specific manner, so that the instructions stored in the computer-readable medium can be generated including implementing flowcharts and/or An instruction device for a function/action specified in one or more blocks in the block diagram.
  • Computer program instructions can also be loaded on a computer or other programmable data processing device to cause a series of operation steps to be executed on the computer or other programmable device to produce a computer-implemented process, so that the computer or other programmable device
  • the instructions executed above provide a process for implementing the function/action specified in one or more blocks in the flowchart and/or block diagram.
  • each block in the flowchart or block diagram may represent a module, section, or part of code, which includes one or more executable instructions for implementing specific logic functions.
  • the functions noted in the block may occur out of the order noted in the drawings. For example, depending on the functionality involved, two blocks shown in succession may actually be executed approximately simultaneously, or the blocks may sometimes be executed in the reverse order.
  • each block in the block diagrams and/or flowchart diagrams, as well as the block diagrams and/or the block diagrams and/or flow diagrams, can be implemented by a dedicated hardware-based system that performs specific functions or actions, or a combination of dedicated hardware and computer instructions
  • the flow diagram is a combination of multiple boxes in the diagram.

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)
  • Measurement And Recording Of Electrical Phenomena And Electrical Characteristics Of The Living Body (AREA)
  • Measuring Pulse, Heart Rate, Blood Pressure Or Blood Flow (AREA)

Abstract

一种随机数的生成方法,包括:获取独立源分布式准周期自然信号f 0(t)(S110);确定第一待处理信号f 1(t)(S120);获取第一待处理信号f 1(t)的相位ph1(S130);生成随机数(S140)。

Description

一种随机数生成方法及生成装置 技术领域
本申请属于计算机领域,特别涉及一种随机数的生成方法及生成装置。
背景技术
目前密码学、区域链、计算机仿真等技术领域大量依赖随机数的生成,人们已经研发了众多方法来生成随机数。然而,这些方法所生成的随机数大多为伪随机数,当伪随机数生成一定数量时,最终会出现重复序列;而且将会有一些序列无法产生。
现有方案大多利用单点准随机现象进行时序物理特征采样来实现随机数生成。单一物理系统必然存在内在相关性,而且,由于采样率稳定,单一物理系统的“源”的构成也相对稳定,因此,产生的数据分布一定具有某种特征,为伪随机数。
随着传感和通信技术的发展,以及互联网和物联网相关产业的成熟,分布式大数据采集已在很多应用场景中得到推广,成为一种常见的数据采集模式。这种采集模式往往针对在地域上分布广泛且相互独立的数据源采集海量信息数据,通过有线或无线通信网络将采集到的数据传输到后台进行集中处理。但是如何将分布式大数据采集与随机数的生成很好地结合,生成真正的独立不相关的随机数,目前还是一个问题。
发明内容
本申请的一个实施例,提供了一种基于分布式独立源的随机数生成方法。
方法具体包括:获取第一分布式独立源准周期信号;基于所述第一分布式独立源准周期信号确定第一待处理信号;采集所述第一待处理信号的相位;根据所述第一待处理信号的相位确定第一随机数。
本申请的一个实施例,提供了一种随机数生成装置,其中,包括:传感器,用于采集第一分布式独立源准周期信号;存储器,存储有计算机随机数生成程序;以及处理器,与所述传感器和存储器连接,当所述计算机随机数生成程序被所述处理器执行时,使得所述处理器执行如前述任意一种方法。
本申请的一个实施例还提供了一种电子设备,包括:处理器;以及存储器,存储有计算机指令,当所述计算机指令被所述处理器执行时,使得所述处理器执行前述任一种方法。
本申请的一个实施例还提供了一种非瞬时性计算机存储介质,存储有计算机程序,当所述计算机程序被一个或多个处理器执行时,使得所述处理器执行前述任意一种方法。
由于在上述随机数生成方法、装置、电子设备和非瞬时性计算机存储介质中所包含的程序均采用分布式独立源准周期信号作为信号源,生成随机数。由于该信号具有以下特征:信号质量可检查;信号源具体构造细节不可复制;当信号源之间具有足够的时空独立性时,不会有其它信息的同步干扰;信号源可确认独立性;信号源经历的历史无法复制,且差异巨大;无需独立建设专用系统;信号源信号变化不可预测,所以利用本申请的实施例中的方法、装置、电子设备和非瞬时性计算机存储介质可以产生真随机数。
附图说明
图1a为本申请的一个实施例,随机数生成方法1000的流程示意图。
图1b为本申请的一个实施例,随机数生成方法1000的步骤S110的分解步骤流程示意图。
图1c为本申请的一个实施例,随机数生成方法1000的步骤S130的分解步骤流程示意图。
图1d为本申请的一个实施例,随机数生成方法1000的步骤S132的分解步骤流程示意图。
图1e为本申请的一个实施例,随机数生成方法1000的信号f 1(t)、信号f 1’(t)和信号g 1(t)的波形示意图。
图1f为本申请的一个实施例,随机数生成方法1000的步骤S136的分解步骤流程示意图。
图1g为本申请的一个实施例,随机数生成方法1000的信号p(t)的波形示意图。
图2为本申请的一个实施例,随机数生成方法2000的流程示意图。
图3为本申请的一个实施例,随机数生成方法3000的流程示意图。
图4a为本申请的一个实施例,随机数生成装置4000的组成示意图。
图4b为本申请的一个实施例,随机数生成装置4000的一种组成示意图。
具体实施方式
以下通过特定的具体实施例来说明本发明所公开的实施方式,本领域技术人员可由本说明书所公开的内容了解本发明的优点与效果。本发明可通过其他不同的具体实施例加以施行或应用,本说明书中的各项细节也可基于不同观点与应用,在不偏离本发明的精神下进行各种修饰与变更。另外,本发明的附图仅为简单示意说明,并非依实际尺寸的描绘,予以声明。以下的实施方式将进一步详细说明本发明的相关技术内容,但所公开的内容并非用以限制本发明的技术范围。
本申请的实施例中,所采集的源信号一般是准周期信号,例如人的呼吸、心跳等生物特征信号,这些信号即使不是严格地属于周期信号,但是由于其接近于周期信号,故可以归类为准周期信号。这些信号可来自于目前广泛应用的实时运动监测、睡眠监测等设备,由于这些设备通常分布于医院、用户家中,因此其属于分布式的设备,因此得到的信号是分布式信号。各设备采集的对象各自独立,互不相关,因此属于独立源。本申请的多个实施例通过相位提取的方法从采集的信号中产生随机数候选,再以一定规则选取出所需的随机数序列。区别于传统的基于单一数据源的随机数生成方法,这种新的技术利用了分布式多数据源之间相互独立不相关的特点,因此产生真正的独立不相关随机数。下面对本申请的各个实施例进行详细介绍。
如图1a所示为本申请的一个实施例,该实施例适用于准周期信号中 只具有单一频率成分的情况,随机数生成方法1000的流程示意图。方法1000包括:步骤S110、步骤S120、步骤S130和步骤S140。其中:
步骤S110,获取分布式独立源准周期信号集合{f i(t)},以其中某一独立源的信号(记为f 0(t))为例介绍后续处理方法。
步骤S120,基于信号f 0(t)确定第一待处理信号f 1(t)。
步骤S130,提取第一待处理信号f 1(t)的相位Ph1。
步骤S140,对第一待处理信号f 1(t)的相位Ph1进行归一化,使Ph1在[0,1)即大于等于0且小于1范围内。
可选地,独立源准周期信号f 0(t)可以是生物体征信号。进一步地,独立源准周期信号f 0(t)可以是人体的呼吸信号、心电信号、脉搏信号等。也可以是其他动物的呼吸信号、心电信号、脉搏信号等。
如图1b所示可选地,步骤S110可以包括,步骤S112和步骤S114。其中:
步骤S112,采集独立源准周期信号f 0(t)。
步骤S114,判断独立源准周期信号f 0(t)是否稳定。如果判断结果为否,则返回步骤S112继续采集。
可选地,步骤S120可以是,把准周期信号f 0(t)作为第一待处理信号f 1(t)。
可选地,步骤S130可以是,根据第一待处理信号f 1(t)的过零点时刻或者第一待处理信号f 1(t)的峰值时刻,确定第一待处理信号f 1(t)的相位Ph1。
如图1c所示,作为一种可选方案,步骤S130还可以包括:
步骤S132,确定第一待处理信号f 1(t)的包络g 1(t)。
步骤S136,根据包络g 1(t)和第一待处理信号f 1(t),确定第一待处理信号f 1(t)的相位Ph1。
如图1d和图1e所示,进一步地,步骤S132可以包括步骤S133和步骤S134。其中:
步骤S133,对第一待处理信号f 1(t)进行希尔伯特变换,得到信号f 1’(t)。
步骤S134,根据第一待处理信号f 1(t)和变换结果f 1’(t),利用式(1),确定第一待处理信号f 1(t)的包络g 1(t)。
Figure PCTCN2019107094-appb-000001
如图1f和图1g所示,进一步地,步骤S136可以包括步骤S137和步骤S138。其中:
步骤S137,根据波形g 1(t)和第一待处理信号f 1(t),依据式(2)确定相位函数p(t)。
步骤S138,根据相位函数p(t)在t 0时刻的取值确定第一待处理信号f 1(t)的相位Ph1=p(t 0),其中,t 0可以是一个预设的,不小于零常数。
p(t)=arccos(f 1(t)/g 1(t))     (2)
可选地,步骤S137还可以是:根据波形g 1(t)和信号f 1’(t),依据反余弦函数确定相位函数p(t)。
可选地,步骤S137还可以是:根据波形g 1(t)和第一待处理信号f 1(t),依据反正弦函数确定相位函数p(t)。
可选地,步骤S137还可以是:根据波形g 1(t)和信号f 1’(t),依据反正弦函数确定相位函数p(t)。
可选地,步骤S137也可以是:根据第一待处理信号f 1(t)及其希尔伯特变换f 1’(t),依据反正切函数或者反余切函数确定相位函数p(t)。
如图2所示,为本申请的一个实施例,该实施例适用于以人体呼吸信号作为数据源的情况,随机数生成方法2000的流程示意图。方法2000包括步骤S210、步骤S220、步骤S230和步骤S240。其中,步骤S210、步骤S230和步骤S240分别与方法1000中的步骤S110、S130、S140相似,在此不做赘述。
步骤S220,对所采集的独立源准周期信号f 0(t)进行去直流和/或低通滤波运算确定第一待处理信号f 1(t)。
可选地,步骤S220可以是:步骤S220A,对准周期信号f 0(t)进行移动平均计算,得到第一均值信号f 01(t)。再从f 0(t)中减去f 01(t),得到第一待处理信号f 1(t),即f 1(t)=f 0(t)-f 01(t)。
进一步地,可以对f 1(t)进行低通滤波,其截止频率可以为40Hz,以滤除呼吸信号中的高频成分或其它高频干扰成分。
如图3所示,为本申请的一个实施例,该实施例适用于准周期信号中具有明显的高次谐波和直流分量的情况,随机数生成方法3000的流程 示意图。方法3000包括步骤S310、步骤S320、步骤S323、步骤S326、步骤S330和步骤S340。其中,步骤S310、步骤S330和步骤S340与方法1000中的同名步骤相似,在此不做赘述。
步骤S320,根据准周期信号f 0(t)确定第二待处理信号f 2(t)。
步骤S323,提取准周期信号f 0(t)的基频f b
步骤S327,根据基频f b,对第二待处理信号f 2(t)进行滤波,得到第一单频信号f 21(t),作为第一待处理信号f 1(t)。
可选地,步骤S320可以是:S320A,将准周期信号f 0(t)直接作为第二待处理信号f 2(t)。
作为一种选择方案,步骤S320可以是:S320B,对准周期信号f 0(t)进行去直流滤波确定第二待处理信号f 2(t)。
其中,步骤S320A与方法2000中的步骤S220相似,在此不做赘述。
可选地,步骤S323可以是,根据第二待处理信号f 2(t)的过零点之间的间隔确定第二待处理信号f 2(t)的频率。步骤S323也可以是,根据第二待处理信号f 2(t)的极值点之间的间隔确定第二待处理信号f 2(t)的频率f b
作为一种选择方案,步骤S323可以包括:
步骤S324,对第二待处理信号f 2(t)进行滑动自相关运算,得到相关值函数c t(τ)。
步骤S325,采集相关值函数c t(τ)的峰值位置。
步骤S326,根据相关值函数c t(τ)的峰值位置,确定第二待处理信号f 2(t)的频率f b
其中步骤324,中对第二待处理信号f 2(t)进行的滑动自相关运算可以根据式(3)计算。
Figure PCTCN2019107094-appb-000002
其中,T S为滑动窗口长度。T c为滑动长度。
进一步地,如果所采集的是呼吸信号,Tc可以设为10秒,Ts可以设为20秒。
如果所采集的是心跳信号,Tc可以设为3秒,Ts可以设为6秒。
可选地,步骤S326可以是,相关函数c t(τ)最大值所对应的自变量的倒数作为第二待处理信号f 2(t)的频率f b
可选地,步骤S327可以包括:步骤S327A,根据频率f b,对第二待处理信号f 2(t)进行低通滤波。
进一步地,步骤S327A的低通截止频率为1.5f b
利用以上方法,对分布式独立源准周期信号集合{f i(t)}中的所有信号提取相位,将时刻t 0得到相位集合{Ph i}。将该集合分为两个子集A={Ph m}(m=1-M),B={Ph’ n}(n=1-N)。其中子集A用于产生随机数候选,形成集合{R m}(m=1-M),其中每一个候选值R m是根据随机数取值范围由子集A中的相位数值经线性变换得到的,如果随机数取值范围也是0-1,则R m=Ph m。子集B用于产生索引序列,形成集合{D n}(n=1-N),其中每一个索引值D n是由Ph’ n经线性变换和取整得到,公式如下:
D n=[Ph′ n×M]
其中,符号“[]”为取整符号,即[x]表示一个小于或等于x的最大整数。由此在时刻t产生的随机数序列为
Figure PCTCN2019107094-appb-000003
K为预设序列长度。
由于该信号具有以下特征:信号质量可检查;信号源具体构造细节不可复制;当信号源之间具有足够的时空独立性时,不会有其它信息的同步干扰;信号源可确认独立性;信号源经历的历史无法复制,且差异巨大;无需独立建设专用系统;信号源信号变化不可预测,所以利用本方法可以产生真随机数。
图4a为本申请的一个实施例,随机数生成装置4000的组成示意图。如图4a所示,随机数生成装置4000,包括:处理器401、存储器411和传感器421。其中:
传感器421,用于采集分布式独立源准周期信号。
存储器411,存储有计算机随机数生成程序。以及
处理器401,与所述传感器和存储器连接,当所述计算机随机数生成程序被所述处理器执行时,使得所述处理器执行前述任一种方法。
可选地,存储器411可以是硬盘、闪存等非易失性存储器,也可以是动态内存静态内存等随机存储器。
可选地,处理器401可以通过总线与存储器411连接。
可选地,处理器401可以与传感器421电连接,也可以通信连接。
进一步地,随机数生成装置4000还可以包括网络接口单元,以及数据传输系统。处理器401通过该网络接口单元与传感器421通过网络通 信连接。处理器401可以通过该网络以及数据传输系统,控制传感器采集至少一个分布式独立源的分布式独立源准周期信号,并把采集到的数据传输到处理器401。处理器401可以与传感器421通过有线网络连接也可以通过无线网络连接。
如图4b所示,可选地,随机数生成装置4000可以包括至少两个处理器和至少两个存储器。该至少两个处理器和至少两个存储器可以设置于同一台计算机内也可以设置于多台计算机内。进一步的,该至少两个处理器和至少两个存储器可以设置分布式计算机(服务器内部)。
可选地,随机数生成装置4000还可以包括至少两个传感器,分别采集至少两路分布式独立源准周期信号。进一步地,该至少两个传感器可以组成一个传感器阵列。
本申请还提供了一种电子设备,包括:处理器;以及存储器,存储有计算机指令,当所述计算机指令被所述处理器执行时,使得所述处理器执行前述任意一种方法。
本申请还提供了一种非瞬时性计算机存储介质,存储有计算机程序,当所述计算机程序被一个或多个处理器执行时,使得所述处理器执行前述任意一种方法。
由于在上述随机数生成装置、电子设备和非瞬时性计算机存储介质中的程序均采用分布式独立源准周期信号作为信号源生成随机数。由于该信号具有以下特征:信号质量可检查;信号源具体构造细节不可复制;当信号源之间具有足够的时空独立性时,不会有其它信息的同步干扰;信号源可确认独立性;信号源经历的历史无法复制,且差异巨大;无需独立建设专用系统;信号源信号变化不可预测,。所以利用本方法产生的随机数更接近于真随机数。
本领域技术人员可以理解,本申请的技术方案可实施为系统、方法或计算机程序产品。因此,本申请可表现为完全硬件的实施例、完全软件的实施例(包括固件、常驻软件、微码等)或将软件和硬件相结合的实施例的形式,它们一般可被称为“电路”、“模块”或“系统”。此外,本申请可表现为计算机程序产品的形式,所述计算机程序产品嵌入到任何有形的表达介质中,所述有形的表达介质具有嵌入到所述介质中的计算机可用程序代码。
参照根据本申请实施例的方法、装置(系统)和计算机程序产品的流程图和/或框图来描述本申请。可以理解的是,可由计算机程序指令执行流程图和/或框图中的每个框、以及流程图和/或框图中的多个框的组合。这些计算机程序指令可提供给通用目的计算机、专用目的计算机或其它可编程数据处理装置的处理器,以使通过计算机或其它可编程数据处理装置的处理器执行的指令创建用于实现流程图和/或框图的一个框或多个框中指明的功能/动作的装置。
这些计算机程序指令还可存储于能够指导计算机或其它可编程数据处理装置以特定的方式实现功能的计算机可读介质中,以使存储于计算机可读介质中的指令产生包括实现流程图和/或框图中的一个框或多个框中指明的功能/动作的指令装置。
计算机程序指令还可加载到计算机或其它可编程数据处理装置上,以引起在计算机上或其它可编程装置上执行一连串的操作步骤,以产生计算机实现的过程,从而使在计算机或其它可编程装置上执行的指令提供用于实现流程图和/或框图中的一个框或多个框中指明的功能/动作的过程。
附图中的流程图和框图示出根据本申请的多个实施例的系统、方法和计算机程序产品的可能实现的体系结构、功能和操作。在这点上,流程图或框图中的每个框可表示一个模块、区段或代码的一部分,其包括一个或多个用于实现特定逻辑功能的可执行指令。还应注意,在一些可替代性实施中,框中标注的功能可以不按照附图中标注的顺序发生。例如,根据所涉及的功能性,连续示出的两个框实际上可大致同时地执行,或者这些框有时以相反的顺序执行。还可注意到,可由执行特定功能或动作的专用目的的基于硬件的系统、或专用目的硬件与计算机指令的组合来实现框图和/或流程图示图中的每个框、以及框图和/或流程图示图中的多个框的组合。
需要说明的是,以上参照附图所描述的各个实施例仅用以说明本发明而非限制本发明的范围,本领域的普通技术人员应当理解,在不脱离本发明的精神和范围的前提下对本发明进行的修改或者等同替换,均应涵盖在本发明的范围之内。此外,除上下文另有所指外,以单数形式出 现的词包括复数形式,反之亦然。另外,除非特别说明,那么任何实施例的全部或一部分可结合任何其它实施例的全部或一部分来使用。

Claims (19)

  1. 一种随机数的生成方法,包括:
    获取第一分布式独立源准周期信号;
    基于所述第一分布式独立源准周期信号确定第一待处理信号;
    采集所述第一待处理信号的相位;
    根据所述第一待处理信号的相位确定第一随机数。
  2. 根据权利要求1所述的方法,其中,所述基于所述第一分布式独立源准周期信号确定第一待处理信号包括:
    将所述第一分布式独立源准周期信号直接用作为所述第一待处理信号。
  3. 根据权利要求1所述的方法,其中,所述基于所述第一分布式独立源准周期信号确定第一待处理信号,包括:
    对所述第一分布式独立源准周期信号进行移动平均计算和/或带通滤波处理,得到所述第一待处理信号。
  4. 根据权利要求3所述的方法,其中,所述对所述第一分布式独立源准周期信号进行移动平均计算和/或带通滤波处理,得到所述第一待处理信号,包括:
    对所述第一分布式独立源准周期信号进行移动平均计算,得到第一均值信号;
    对所述第一均值信号进行带通滤波处理,得到第二滤波信号,作为所述第一待处理信号。
  5. 根据权利要求3所述的方法,其中,所述对所述第一分布式独立源准周期信号进行移动平均计算和/或带通滤波处理,得到所述第一待处理信号,包括:
    对所述第一分布式独立源准周期信号进行带通滤波处理,得到第一 滤波信号;
    对所述第一滤波信号进行移动平均计算,得到第二均值信号,作为所述第一待处理信号。
  6. 根据权利要求1所述的方法,其中,所述基于所述第一分布式独立源准周期信号确定第一待处理信号包括:
    基于所述第一分布式独立源准周期信号确定第二待处理信号;
    采集所述第二待处理信号的频率;
    根据所述第二待处理信号的频率对所述第二待处理信号进行带通滤波,得到第一单频信号,作为第一待处理信号。
  7. 根据权利要求6所述的方法,其中,所述基于所述第一分布式独立源准周期信号确定第二待处理信号,包括:
    将所述第一分布式独立源准周期信号直接用作为第二待处理信号。
  8. 根据权利要求6所述的方法,其中,所述基于所述第一分布式独立源准周期信号确定第二待处理信号,包括:
    对所述第一分布式独立源准周期信号进行移动平均计算和/或带通滤波处理,得到所述第二待处理信号。
  9. 根据权利要求6所述的方法,其中,所述采集所述第二待处理信号的频率,包括:
    平移所述第二待处理信号,得到第一平移信号;
    对所述第二待处理信号做滑动自相关运算,得到相关值函数;
    采集所述相关值函数的峰值位置;
    根据所述相关值函数的峰值位置,确定所述第二待处理信号的频率。
  10. 根据权利要求1所述的方法,其中,所述根据所述第一待处理信号的相位确定所述第一随机数,包括:
    对所述第一待处理信号的相位进行线性变换得到所述第一随机数。
  11. 根据权利要求1所述的方法,其中,所述采集所述第一待处理信号的相位,包括:
    计算所述第一待处理信号的包络信号;
    根据所述第一待处理信号的幅值和所述第一待处理信号的包络信号的幅值确定所述第一待处理信号的相位。
  12. 根据权利要求1所述的方法,其中,所述第一分布式独立源准周期信号包括生物体征信号。
  13. 根据权利要求12所述的方法,其中,所述生物体征信号包括呼吸信号、心电信号、脉搏信号中的至少一种。
  14. 根据权利要求1-13之任一项所述的方法,其中,根据所述第一待处理信号的相位确定所述第一随机数,包括:根据所述第一待处理信号的相位生成随机数序列;
    从所述随机数序列中顺序提取或者随机提取随机数。
  15. 根据权利要求14所述的方法,其中,从所述随机数序列中随机提取随机数,包括:
    生成索引序列;
    根据所述索引序列在所述随机数序列中提取随机数。
  16. 根据权利要求15所述的方法,所述生成索引序列,包括:
    在所述随机数序列中提取部分随机数形成第一随机数序列子集,以所述第一随机数序列子集作为所述索引序列,以余下的随机数作为第二随机数序列子集;
    以所述索引序列中的随机数作为索引,从第二随机数序列子集中提取随机数。
  17. 一种随机数生成装置,包括:
    传感器,用于采集第一分布式独立源准周期信号;
    存储器,存储有计算机随机数生成程序;以及
    处理器,与所述传感器和存储器连接,当所述计算机随机数生成程序被所述处理器执行时,使得所述处理器执行如权利要求1-16中任一项所述的方法。
  18. 一种电子设备,包括:
    处理器;以及
    存储器,存储有计算机指令,当所述计算机指令被所述处理器执行时,使得所述处理器执行如权利要求1-16中任一项所述的方法。
  19. 一种非瞬时性计算机存储介质,存储有计算机程序,当所述计算机程序被一个或多个处理器执行时,使得所述处理器执行如权利要求1-16中任一项所述的方法。
PCT/CN2019/107094 2019-09-20 2019-09-20 一种随机数生成方法及生成装置 WO2021051409A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
PCT/CN2019/107094 WO2021051409A1 (zh) 2019-09-20 2019-09-20 一种随机数生成方法及生成装置
CN201980001924.4A CN110832452A (zh) 2019-09-20 2019-09-20 一种随机数生成方法及生成装置
TW109103703A TWI734369B (zh) 2019-09-20 2020-02-06 一種亂數產生方法、裝置、電子設備及非暫態性電腦存儲介質

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2019/107094 WO2021051409A1 (zh) 2019-09-20 2019-09-20 一种随机数生成方法及生成装置

Publications (1)

Publication Number Publication Date
WO2021051409A1 true WO2021051409A1 (zh) 2021-03-25

Family

ID=69546626

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/107094 WO2021051409A1 (zh) 2019-09-20 2019-09-20 一种随机数生成方法及生成装置

Country Status (3)

Country Link
CN (1) CN110832452A (zh)
TW (1) TWI734369B (zh)
WO (1) WO2021051409A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102662625A (zh) * 2012-04-06 2012-09-12 国网电力科学研究院 一种真随机数发生器及其实现方法
US20160291936A1 (en) * 2015-03-31 2016-10-06 Ocz Storage Solutions, Inc. Entropy source for random number generator
CN106445465A (zh) * 2016-11-21 2017-02-22 北京大学 一种基于相位噪声的真随机数产生装置
CN106843804A (zh) * 2016-12-22 2017-06-13 清华大学 一种量子随机数发生器及量子随机数生成方法

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3539870B2 (ja) * 1998-07-14 2004-07-07 株式会社日立製作所 乱数生成システム及び乱数生成方法
CN101083474B (zh) * 2006-05-30 2010-11-03 富士通株式会社 使用滤波模式对施加给信号的补偿进行调节的系统及方法
US8717463B2 (en) * 2010-08-11 2014-05-06 Inview Technology Corporation Adaptively filtering compressive imaging measurements to attenuate noise
US8570405B2 (en) * 2010-08-11 2013-10-29 Inview Technology Corporation Determining light level variation in compressive imaging by injecting calibration patterns into pattern sequence
WO2013131965A1 (en) * 2012-03-07 2013-09-12 Actiwave Ab Signal conversion system and method
US10036667B2 (en) * 2013-07-14 2018-07-31 B. G. Negev Technologies And Applications Ltd., At Ben-Gurion University Thin-layered devices in compressive sensing spectroscopy
CN104107037A (zh) * 2014-07-15 2014-10-22 北京博实联创科技有限公司 生理信息采集和处理系统

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102662625A (zh) * 2012-04-06 2012-09-12 国网电力科学研究院 一种真随机数发生器及其实现方法
US20160291936A1 (en) * 2015-03-31 2016-10-06 Ocz Storage Solutions, Inc. Entropy source for random number generator
CN106445465A (zh) * 2016-11-21 2017-02-22 北京大学 一种基于相位噪声的真随机数产生装置
CN106843804A (zh) * 2016-12-22 2017-06-13 清华大学 一种量子随机数发生器及量子随机数生成方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
CAMARA CARMEN, PERIS-LOPEZ PEDRO, MARTÍN HONORIO, ALDALAIEN MU’AWYA: "ECG-RNG: A Random Number Generator Based on ECG Signals and Suitable for Securing Wireless Sensor Networks", SENSORS, vol. 18, no. 9, pages 2747, XP055793246, DOI: 10.3390/s18092747 *

Also Published As

Publication number Publication date
TW202113585A (zh) 2021-04-01
CN110832452A (zh) 2020-02-21
TWI734369B (zh) 2021-07-21

Similar Documents

Publication Publication Date Title
CN109902703B (zh) 一种时间序列异常检测方法及装置
Rapp et al. Filtered noise can mimic low-dimensional chaotic attractors
Schouten et al. Maximum-likelihood estimation of the entropy of an attractor
Chen et al. An improved Hurst parameter estimator based on fractional Fourier transform
MY195917A (en) Blockchain-Based Data Processing Method And Device
EP3136297A1 (en) System and method for determining information and outliers from sensor data
Üstündağ et al. Denoising of weak ECG signals by using wavelet analysis and fuzzy thresholding
CN106537168A (zh) 用于磁共振指纹识别中的自适应字典匹配的系统和方法
Ma et al. Detection of time delays and directional interactions based on time series from complex dynamical systems
CN109598175B (zh) 一种基于多小波基函数和超正交前向回归的时频分析方法
CN104320144B (zh) 稀疏度自适应信号重构方法
JM Data wrangling and data leakage in machine learning for healthcare
AU2016204093A1 (en) System and method for detecting outliers in real-time for a univariate time-series signal
Luo et al. Single‐index varying coefficient model for functional responses
Clemson et al. Inverse approach to chronotaxic systems for single-variable time series
Kovács et al. RAIT: the rational approximation and interpolation toolbox for Matlab, with experiments on ECG signals
Soltani et al. Periodically correlated autoregressive Hilbertian processes
WO2021051409A1 (zh) 一种随机数生成方法及生成装置
Pavlov et al. Quantifying chaotic dynamics from integrate-and-fire processes
Schelter et al. Overarching framework for data-based modelling
Mi et al. A comparative study and improvement of two ICA using reference signal methods
Yi et al. High precision computation of morlet wavelet transform for multi-period analysis of climate data
Leng Modelling and analysis on noisy financial time series
Brown et al. Comparison of modelled pursuits with ESPRIT and the matrix pencil method in the modelling of medical percussion signals
Songhorzadeh et al. Two step transfer entropy–An estimator of delayed directional couplings between multivariate EEG time series

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19946031

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19946031

Country of ref document: EP

Kind code of ref document: A1