CN116980113A - Method for screening out measurement abnormal value in atmospheric optical channel key extraction - Google Patents
Method for screening out measurement abnormal value in atmospheric optical channel key extraction Download PDFInfo
- Publication number
- CN116980113A CN116980113A CN202211285546.7A CN202211285546A CN116980113A CN 116980113 A CN116980113 A CN 116980113A CN 202211285546 A CN202211285546 A CN 202211285546A CN 116980113 A CN116980113 A CN 116980113A
- Authority
- CN
- China
- Prior art keywords
- array
- queue
- computer
- value
- laser
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 61
- 230000003287 optical effect Effects 0.000 title claims abstract description 47
- 230000002159 abnormal effect Effects 0.000 title claims abstract description 23
- 238000012216 screening Methods 0.000 title claims abstract description 21
- 238000000605 extraction Methods 0.000 title claims abstract description 17
- 238000005259 measurement Methods 0.000 title abstract description 20
- 238000005070 sampling Methods 0.000 claims abstract description 35
- 238000004364 calculation method Methods 0.000 claims description 17
- 241001134453 Lista Species 0.000 claims description 16
- 238000010606 normalization Methods 0.000 claims description 15
- 238000012545 processing Methods 0.000 claims description 11
- 238000013139 quantization Methods 0.000 claims description 11
- 238000005516 engineering process Methods 0.000 claims description 5
- 238000012805 post-processing Methods 0.000 claims description 5
- 239000003550 marker Substances 0.000 claims 1
- 238000001914 filtration Methods 0.000 description 12
- 238000004891 communication Methods 0.000 description 5
- 238000010586 diagram Methods 0.000 description 5
- 238000003491 array Methods 0.000 description 4
- 230000005540 biological transmission Effects 0.000 description 4
- 230000002457 bidirectional effect Effects 0.000 description 3
- 238000012937 correction Methods 0.000 description 1
- 238000012217 deletion Methods 0.000 description 1
- 230000037430 deletion Effects 0.000 description 1
- 238000003780 insertion Methods 0.000 description 1
- 230000037431 insertion Effects 0.000 description 1
- 230000008092 positive effect Effects 0.000 description 1
- 238000011002 quantification Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0816—Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
- H04L9/0852—Quantum cryptography
- H04L9/0858—Details about key distillation or coding, e.g. reconciliation, error correction, privacy amplification, polarisation coding or phase coding
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04B—TRANSMISSION
- H04B10/00—Transmission systems employing electromagnetic waves other than radio-waves, e.g. infrared, visible or ultraviolet light, or employing corpuscular radiation, e.g. quantum communication
- H04B10/07—Arrangements for monitoring or testing transmission systems; Arrangements for fault measurement of transmission systems
- H04B10/075—Arrangements for monitoring or testing transmission systems; Arrangements for fault measurement of transmission systems using an in-service signal
- H04B10/079—Arrangements for monitoring or testing transmission systems; Arrangements for fault measurement of transmission systems using an in-service signal using measurements of the data signal
- H04B10/0795—Performance monitoring; Measurement of transmission parameters
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04B—TRANSMISSION
- H04B10/00—Transmission systems employing electromagnetic waves other than radio-waves, e.g. infrared, visible or ultraviolet light, or employing corpuscular radiation, e.g. quantum communication
- H04B10/50—Transmitters
- H04B10/501—Structural aspects
- H04B10/503—Laser transmitters
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04B—TRANSMISSION
- H04B10/00—Transmission systems employing electromagnetic waves other than radio-waves, e.g. infrared, visible or ultraviolet light, or employing corpuscular radiation, e.g. quantum communication
- H04B10/70—Photonic quantum communication
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0861—Generation of secret information including derivation or calculation of cryptographic keys or passwords
- H04L9/0869—Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Electromagnetism (AREA)
- Computer Security & Cryptography (AREA)
- Optics & Photonics (AREA)
- Theoretical Computer Science (AREA)
- Optical Communication System (AREA)
Abstract
本发明公开一种大气光信道密钥提取中的测量异常值筛除方法。本方法通过比对采集的大气光信道中传输光信号的测量采样值的差分幅值,筛除通信双方采集到的电信号数据中的测量异常值,降低了信道噪声和设备噪声对信道互易性影响,达到了提高信道双方提取原始共享随机比特序列的一致率的目的。
The invention discloses a measurement abnormal value screening method in atmospheric optical channel key extraction. This method compares the differential amplitude of the measured sampling values of the transmitted optical signals collected in the atmospheric optical channel, filters out the measurement abnormal values in the electrical signal data collected by the communicating parties, and reduces the impact of channel noise and equipment noise on channel reciprocity. It achieves the purpose of improving the consistency rate of the original shared random bit sequence extracted by both sides of the channel.
Description
技术领域Technical field
本发明属于信息安全技术领域,涉及一种大气光信道密钥提取中的测量异常值筛除方法。The invention belongs to the technical field of information security and relates to a method for filtering out measurement abnormal values in atmospheric optical channel key extraction.
背景技术Background technique
当今,信息安全备受人们关注。在网络通信中,为了保护通信双方传送的数据,通常需要对传送的数据进行加密。若用传统公钥体制实现共享密钥分配,在量子计算机实用化后,其安全性会受到挑战。量子密钥分配也是一种给合法通信双方分配共享密钥的技术,但是当前量子密钥分配的实施成本太高。如何低成本且安全地为合法通信双方分配共享密钥是一个值得进一步研究的问题。Today, information security has attracted much attention. In network communications, in order to protect the data transmitted by both communicating parties, it is usually necessary to encrypt the transmitted data. If a traditional public key system is used to achieve shared key distribution, its security will be challenged after quantum computers become practical. Quantum key distribution is also a technology that distributes shared keys to legitimate communication parties, but the current implementation cost of quantum key distribution is too high. How to distribute shared keys to legitimate communication parties in a low-cost and secure manner is an issue worthy of further study.
有研究者提出从互易的双向大气湍流光信道的随机光信号中提取共享随机比特的方法,进而用提取的共享随机比特来生成被信道两端的通信双方共享的随机密钥。从随机光信号中提取随机比特时,首先需要对随机光信号进行测量及采样,再对采样值进行阈值化计算。理想状态下,信道互易性良好,测量采样值中也不含噪声,在此基础上信道两端提取的随机比特序列基本相同;但实际上,在地球大气环境中两个通视的激光收发端建立起的双向光传输信道中会出现随机极端情况,减弱信道互易性,导致测量采样值异常,最终降低信道两端提取随机比特序列的一致率。申请号为202011376004.1的中国发明专利指出保证信道两端提取的随机比特序列(称为原始共享随机比特序列)基本相同的前提是双向光传输信道具有良好的互易性,所以在现实密钥提取时有必要在得到随机光信号测量采样值之后,筛除其中的异常值,再进行阈值化计算得到原始共享随机比特序列。通过测量异常值筛除可显著提高信道两端提取原始共享随机比特序列的一致率。本发明公开一种大气光信道密钥提取中的测量异常值筛除方法,本方法通过比对信道两端测量采样值的差分幅值进行测量异常值的筛除,从而提高信道两端提取原始共享随机比特序列的一致率。Some researchers have proposed a method to extract shared random bits from the random optical signals of reciprocal bidirectional atmospheric turbulence optical channels, and then use the extracted shared random bits to generate random keys shared by both communicating parties at both ends of the channel. When extracting random bits from random optical signals, you first need to measure and sample the random optical signals, and then perform threshold calculations on the sampled values. In an ideal state, the channel reciprocity is good, and the measured sample values do not contain noise. On this basis, the random bit sequences extracted at both ends of the channel are basically the same; but in fact, in the earth's atmospheric environment, two laser transceivers with visibility Random extreme situations will occur in the two-way optical transmission channel established by the end, which weakens the reciprocity of the channel, leads to abnormal measurement sampling values, and ultimately reduces the consistency rate of extracting random bit sequences at both ends of the channel. The Chinese invention patent with application number 202011376004.1 points out that the premise to ensure that the random bit sequences extracted at both ends of the channel (called the original shared random bit sequence) are basically the same is that the bidirectional optical transmission channel has good reciprocity, so when extracting the actual key It is necessary to filter out the outliers after obtaining the random optical signal measurement sample values, and then perform threshold calculation to obtain the original shared random bit sequence. Filtering out outliers through measurement can significantly improve the consistency rate of extracting the original shared random bit sequence at both ends of the channel. The invention discloses a method for filtering out measurement abnormal values in atmospheric optical channel key extraction. This method filters out measurement abnormal values by comparing the differential amplitudes of measured sample values at both ends of the channel, thereby improving the extraction of original values at both ends of the channel. Consistency rate of shared random bit sequences.
发明内容Contents of the invention
本发明的目的在于,提供一种大气光信道密钥提取中的测量异常值筛除方法,通过比对大气双向光信道两端测量采样值的差分幅值,筛除测量异常值,在此基础上再进行量化、协商等操作,以提高信道两端提取共享随机比特序列的一致率。The purpose of the present invention is to provide a method for filtering out measurement abnormal values in atmospheric optical channel key extraction. By comparing the differential amplitudes of the measurement sample values at both ends of the atmospheric two-way optical channel, the measurement abnormal values are filtered out. On this basis Then quantization, negotiation and other operations are performed to improve the consistency rate of extracting the shared random bit sequence at both ends of the channel.
本方法的技术方案是这样实现的:大气光信道密钥提取中的测量异常值差分幅值比对筛除方法,其特征在于,所需的硬件系统和执行步骤如下:The technical solution of this method is implemented as follows: a measurement outlier differential amplitude comparison and screening method in atmospheric optical channel key extraction, which is characterized in that the required hardware system and execution steps are as follows:
需要激光收发端机A和激光收发端机B,激光收发端机A和激光收发端机B相互通视。激光收发端机A包括激光器A、收发光学系统A、探测器A和计算机A。激光收发端机B包括激光器B、收发光学系统B、探测器B和计算机B。如图1所示,所述激光器A发出的激光信号A001经收发光学系统A发射到大气湍流信道中,激光信号A001到达收发光学系统B后再入射到探测器B上;所述激光器B发出的激光信号B001经收发光学系统B发射到大气湍流信道中,激光信号B001到达收发光学系统A后再入射到探测器A上;所述计算机A实时采集探测器A输出的电信号,所述计算机B实时采集探测器B输出的电信号。Laser transceiver A and laser transceiver B are required, and laser transceiver A and laser transceiver B can see each other. Laser transceiver A includes laser A, transceiver optical system A, detector A and computer A. Laser transceiver B includes laser B, transceiver optical system B, detector B and computer B. As shown in Figure 1, the laser signal A001 emitted by the laser A is emitted into the atmospheric turbulence channel through the optical transmission system A. The laser signal A001 reaches the optical system B and then is incident on the detector B; the laser signal A001 emitted by the laser B is The laser signal B001 is emitted into the atmospheric turbulence channel through the optical system B. The laser signal B001 reaches the optical system A and then is incident on the detector A. The computer A collects the electrical signal output by the detector A in real time. The computer B Collect the electrical signal output by detector B in real time.
1)本方法的第一部分是使激光收发端机A和激光收发端机B正常工作,具体操作包括:1) The first part of this method is to make laser transceiver A and laser transceiver B work normally. The specific operations include:
步骤Step101:使激光器A和激光器B正常工作,使探测器A和探测器B正常工作,使计算机A和计算机B正常工作,使收发光学系统A和收发光学系统B相互对准并正常工作。Step Step101: Make laser A and laser B work normally, make detector A and detector B work normally, make computer A and computer B work normally, make the receiving and receiving optical system A and the receiving and receiving optical system B align with each other and work normally.
2)本方法的第二部分在激光收发端机A中执行以下操作:2) The second part of this method performs the following operations in laser transceiver A:
步骤Step201:在计算机A中创建一个计数器CounterA,令CounterA=1;令时刻tA=0;在计算机A的存储器中创建一个包含N个元素的一维数组ArrayA,数组ArrayA用于存储探测器A输出的电信号的幅度采样值;在计算机A的存储器中创建一个包含N个元素的一维数组ArrayA_1,数组ArrayA_1用于存储数组ArrayA中采样值进行规范化处理后的结果;在计算机A的存储器中创建一个长度为m的单向队列QueueA,其中m为小于N的偶数,单向队列QueueA用于暂存数组ArrayA_1中相邻元素的差分幅值;在计算机A的存储器中创建一个长度为N的一维数组ArrayAA,数组ArrayAA用于存储不同时刻单向队列QueueA中元素的和;在计算机A的存储器中创建一个一维数组ArrayA_2,数组ArrayA_2用于存储数组ArrayA_1中元素经过异常值筛除后的结果;在计算机A的存储器中创建一个列表ListA,列表ListA用于存储随机比特序列,令列表ListA为空;其中单向队列结构如图2所示;Step Step201: Create a counter CounterA in computer A, let CounterA = 1; let time t A = 0; create a one-dimensional array ArrayA containing N elements in the memory of computer A, and the array ArrayA is used to store the detector A The amplitude sample value of the output electrical signal; create a one-dimensional array ArrayA_1 containing N elements in the memory of computer A. The array ArrayA_1 is used to store the result of normalization processing of the sample values in the array ArrayA; in the memory of computer A Create a one-way queue QueueA with a length of m, where m is an even number less than N. The one-way queue QueueA is used to temporarily store the differential amplitude of adjacent elements in the array ArrayA_1; create a length of N in the memory of computer A One-dimensional array ArrayAA, array ArrayAA is used to store the sum of elements in the one-way queue QueueA at different times; create a one-dimensional array ArrayA_2 in the memory of computer A, and array ArrayA_2 is used to store the elements in array ArrayA_1 after filtering out outliers. Result: Create a list ListA in the memory of computer A. List ListA is used to store random bit sequences, making list ListA empty; the one-way queue structure is shown in Figure 2;
步骤Step202:在时刻tA,激光收发端机A的采集程序对探测器A输出的电信号幅度做一次采样,获得一个采样值C001;把数组ArrayA的第CounterA个元素赋值为采样值C001;Step Step202: At time t A , the collection program of laser transceiver A samples the amplitude of the electrical signal output by detector A and obtains a sampling value C001; assigns the CounterA-th element of the array ArrayA as the sampling value C001;
步骤Step203:令CounterA=CounterA+1;令tA=tA+δt,δt为采样时间间隔;Step Step203: Let CounterA=CounterA+1; let t A =t A + δ t , δ t is the sampling time interval;
步骤Step204:如果CounterA>N,则转步骤Step205,否则转步骤Step202;Step Step204: If CounterA>N, go to Step 205, otherwise go to Step 202;
步骤Step205:在计算机A中,利用程序分别依次针对i=1,2,…,N-1,N做以下操作:对数组ArrayA中的各个采样值做规范化处理:Step Step205: In computer A, use the program to perform the following operations on i=1,2,...,N-1,N: perform normalization processing on each sample value in the array ArrayA:
步骤Step205-1:令IA[i]表示数组ArrayA中第i个采样值;IA_1[i]表示对数组ArrayA中第i个采样值进行规范化处理后的结果;Step Step205-1: Let I A [i] represent the i-th sample value in the array ArrayA; I A_1 [i] represents the result of normalization of the i-th sample value in the array ArrayA;
步骤Step205-2:令将数组ArryaA_1中第i个元素赋值为IA_1[i];其中i'和i”均为正整数;Step Step205-2: Let Assign the i-th element in the array ArryaA_1 to I A_1 [i]; where i' and i" are both positive integers;
步骤Step206:分别依次针对做以下操作:Step Step206: Target the Do the following:
步骤Step206-1:令IA_1[i]表示数组ArrayA_1中第i个元素的值,令VA=|IA_1[i]-IA_1[i+1]|,其中|x|表示取x的绝对值;Step Step206-1: Let I A_1 [i] represent the value of the i-th element in the array ArrayA_1, let V A =|I A_1 [i]-I A_1 [i+1]|, where |x| represents the value of x absolute value;
步骤Step206-2:将VA入队到单向队列QueueA中;Step Step206-2: Enqueue V A into the one-way queue QueueA;
步骤Step207:分别依次针对做以下操作:Step Step207: Target the Do the following:
步骤Step207-1:令IA_1[i]表示数组ArrayA_1中第i个元素的值,令VA=|IA_1[i]-IA_1[i+1]|;Step Step207-1: Let I A_1 [i] represent the value of the i-th element in array ArrayA_1, and let V A =|I A_1 [i]-I A_1 [i+1]|;
步骤Step207-2:将VA入队到单向队列QueueA中,令SA等于当前单向队列QueueA中所有元素值的和,将数组ArrayAA中第个元素赋值为SA;其中当单向队列QueueA队满时,先将其队头元素出队,再将其余元素向队头方向移动一个单位,最后再进行入队操作,如图3所示;Step Step207-2: Enqueue V A into the one-way queue QueueA, let S A equal the sum of all element values in the current one-way queue QueueA, and add the first element in the array ArrayAA Each element is assigned the value S A ; when the one-way queue QueueA is full, the head element of the queue is first dequeued, then the remaining elements are moved one unit toward the head of the queue, and finally the queue operation is performed, as shown in Figure 3 ;
步骤Step208:分别依次针对做以下操作:Step Step208: Target the Do the following:
步骤Step208-1:令QA表示当前单向队列QueueA的队头元素,将QA从单向队列QueueA中出队,其余元素向队头方向移动一个单位;Step Step208-1: Let Q A represent the head element of the current one-way queue QueueA, dequeue Q A from the one-way queue QueueA, and move the remaining elements one unit toward the head of the queue;
步骤Step208-2:令SA等于当前单向队列QueueA中所有元素值的和;将数组ArrayAA中第个元素赋值为SA;Step Step208-2: Let S A be equal to the sum of all element values in the current one-way queue QueueA; elements are assigned the value S A ;
步骤Step209:激光收发端机A将数组ArrayAA发送给激光收发端机B。Step Step209: Laser transceiver A sends the array ArrayAA to laser transceiver B.
3)本方法的第三部分在激光收发端机B中执行以下操作:3) The third part of this method performs the following operations in laser transceiver B:
步骤Step301:在计算机B中创建一个计数器CounterB,令CounterB=1;令时刻tB=0;在计算机B的存储器中创建一个包含N个元素的一维数组ArrayB,数组ArrayB用于存储探测器B输出的电信号的幅度采样值;在计算机B的存储器中创建一个包含N个元素的一维数组ArrayB_1,数组ArrayB_1用于存储数组ArrayB的采样值进行规范化处理后的结果;在计算机B的存储器中创建一个长度为m的单向队列QueueB,其中m为小于N的偶数,单向队列QueueB用于暂存数组ArrayB_1中相邻元素的差分幅值;在计算机B的存储器中创建一个长度为N的一维数组ArrayBB,数组ArrayBB用于存储不同时刻单向队列QueueA中元素的和;在计算机B的存储器中创建一个长度为N的一维数组ArrayBD,数组ArrayBD用于存储第一轮异常值筛选时标记的索引信息;在计算机B的存储器中创建一个长度为n的单向队列QueueBD,其中n为小于N的奇数,单向队列QueueBD用于暂存数组ArrayBD中的数据;在计算机B的存储器中创建一个长度为N的一维数组ArrayBP用于存储第二轮异常值筛选时标记的索引信息;在计算机B的存储器中创建一个一维数组ArrayB_2,数组ArrayB_2用于存储数组ArrayB_1中的元素经过异常值筛除后的结果;在计算机B的存储器中创建一个列表ListB,列表ListB用于存储随机比特序列,令列表ListB为空;其中单向队列结构如图2所示;Step Step 301: Create a counter CounterB in computer B, let CounterB = 1; let time t B = 0; create a one-dimensional array ArrayB containing N elements in the memory of computer B. ArrayB is used to store detector B. The amplitude sampling value of the output electrical signal; create a one-dimensional array ArrayB_1 containing N elements in the memory of computer B. ArrayB_1 is used to store the result of normalization of the sampling value of array ArrayB; in the memory of computer B Create a one-way queue QueueB with a length of m, where m is an even number less than N. The one-way queue QueueB is used to temporarily store the differential amplitude of adjacent elements in the array ArrayB_1; create a length of N in the memory of computer B One-dimensional array ArrayBB. ArrayBB is used to store the sum of elements in the one-way queue QueueA at different times. Create a one-dimensional array ArrayBD with a length of N in the memory of computer B. ArrayBD is used to store the first round of outlier screening. Marked index information; create a one-way queue QueueBD of length n in the memory of computer B, where n is an odd number less than N. The one-way queue QueueBD is used to temporarily store the data in the array ArrayBD; in the memory of computer B Create a one-dimensional array ArrayBP with a length of N to store the index information marked in the second round of outlier screening; create a one-dimensional array ArrayB_2 in the memory of computer B. ArrayB_2 is used to store the elements in array ArrayB_1 after exceptions. The result after value filtering; create a list ListB in the memory of computer B. ListB is used to store random bit sequences, making listB empty; the one-way queue structure is shown in Figure 2;
步骤Step302:在时刻tB,激光收发端机B对探测器B输出的电信号幅度做一次采样,获得一个采样值D001;把数组ArrayB的第CounterB个元素赋值为采样值D001;Step Step302: At time t B , laser transceiver B samples the amplitude of the electrical signal output by detector B and obtains a sampling value D001; assigns the CounterB-th element of the array ArrayB as the sampling value D001;
步骤Step303:令CounterB=CounterB+1;令tB=tB+δt,δt为采样时间间隔;Step Step303: Let CounterB=CounterB+1; let t B =t B + δ t , δ t is the sampling time interval;
步骤Step304:如果CounterB>N,则转步骤Step305,否则转步骤Step302;Step Step304: If CounterB>N, go to Step 305, otherwise go to Step 302;
步骤Step305:在计算机B中,利用程序分别依次针对i=1,2,…,N-1,N做以下操作:对数组ArrayB中的各个采样值做规范化处理:Step Step305: In computer B, use the program to perform the following operations on i=1, 2,..., N-1, N: perform normalization processing on each sample value in the array ArrayB:
步骤Step305-1:令IB[i]表示数组ArrayB中第i个采样值;IB_1[i]表示对数组ArrayB中第i个采样值进行规范化处理后的结果;Step Step305-1: Let I B [i] represent the i-th sample value in the array ArrayB; I B_1 [i] represents the result of normalization of the i-th sample value in the array ArrayB;
步骤Step305-2:令将数组ArryaB_1中第i个元素赋值为IB_1[i];其中i′和i″均为正整数;Step Step305-2: Let Assign the i-th element in the array ArryaB_1 to I B_1 [i]; where i′ and i″ are both positive integers;
步骤Step306:分别依次针对做以下操作:Step Step306: Target the Do the following:
步骤Step306-1:令IB_1[i]表示数组ArrayB_1中第i个元素的值,令VB=|IB_1[i]-IB_1[i+1]|;Step Step306-1: Let I B_1 [i] represent the value of the i-th element in array ArrayB_1, and let V B =|I B_1 [i]-I B_1 [i+1]|;
步骤Step306-2:将VB入队到单向队列QueueB中;Step Step306-2: Enqueue V B into the one-way queue QueueB;
步骤Step307:分别依次针对做以下操作:Step Step307: Target the Do the following:
步骤Step307-1:令IB_1[i]表示数组ArrayB_1中第i个元素的值,令VB=|IB_1[i]-IB_1[i+1]|;Step Step307-1: Let I B_1 [i] represent the value of the i-th element in array ArrayB_1, and let V B =|I B_1 [i]-I B_1 [i+1]|;
步骤Step307-2:将VB入队到单向队列QueueB中,令SB等于当前单向队列QueueB中所有元素值的和,将数组ArrayBB中第个元素赋值为SB;其中当单向队列QueueB队满时,先将其队头元素出队,再将其余元素向队头方向移动一个单位,最后再进行入队操作,如图3所示;Step Step 307-2: Enqueue V B into the one-way queue QueueB. Let S B be equal to the sum of all element values in the current one-way queue QueueB. Add the first element in the array ArrayBB. Each element is assigned a value of S B ; when the one-way queue QueueB is full, the head element of the queue is first dequeued, then the remaining elements are moved one unit toward the head of the queue, and finally the queue operation is performed, as shown in Figure 3 ;
步骤Step308:分别依次针对做以下操作:Step Step308: Target the Do the following:
步骤Step308-1:令QB表示当前单向队列QueueB的队头元素,将QB从单向队列QueueB中出队,其余元素向队头方向移动一个单位;Step Step 308-1: Let Q B represent the head element of the current one-way queue QueueB, dequeue Q B from the one-way queue QueueB, and move the remaining elements one unit toward the head of the team;
步骤Step308-2:令SB等于当前单向队列QueueB中所有元素值的和;将数组ArrayBB中第个元素赋值为SB。Step Step308-2: Let S B be equal to the sum of all element values in the current one-way queue QueueB; elements are assigned the value S B .
4)本方法的第四部分在激光收发端机B接收步骤Step209中激光收发端机A发送的数组ArrayAA后,激光收发端机B的计算机B确定测量异常值索引,具体操作步骤如下:4) In the fourth part of this method, after the laser transceiver B receives the array ArrayAA sent by the laser transceiver A in step 209, the computer B of the laser transceiver B determines the measurement abnormal value index. The specific operation steps are as follows:
步骤Step401:令TB为第一轮异常筛除判决阈值,分别依次针对i=1,2,…,N-1,N做以下操作:Step Step 401: Let T B be the first round of abnormal screening decision threshold, and perform the following operations for i=1, 2,..., N-1, N respectively:
步骤Step401-1:令IAA[i]表示数组ArrayAA中的第i个元素的值,令IBB[i]表示数组ArrayBB中的第i个元素的值;Step Step401-1: Let I AA [i] represent the value of the i-th element in the array ArrayAA, and let I BB [i] represent the value of the i-th element in the array ArrayBB;
步骤Step401-2:令 Step Step401-2: Let
步骤Step401-3:如果PB≥TB,则将数组ArrayBD中的第i个元素赋值为1;Step Step401-3: If P B ≥ T B , assign the i-th element in the array ArrayBD to 1;
步骤Step401-4:如果PB<TB,则将数组ArrayBD中的第i个元素赋值为0;Step Step401-4: If P B <T B , assign the i-th element in the array ArrayBD to 0;
步骤Step402:表示对x向下取整,分别依次针对/>做以下操作:Step Step402: Indicates that x is rounded down to the nearest integer, respectively, for/> Do the following:
步骤Step402-1:令IBD[i]表示数组ArrayBD中第i个元素的值,将IBD[i]入队到单向队列QueueBD中;Step Step402-1: Let I BD [i] represent the value of the i-th element in the array ArrayBD, and enqueue I BD [i] into the one-way queue QueueBD;
步骤Step403:令TBD为第二轮异常筛除判决阈值,表示对x向上取整,分别依次针对/>做以下操作:Step Step 403: Let T BD be the second round of abnormal screening judgment threshold, Indicates that x is rounded up, and each is directed to/> Do the following:
步骤Step403-1:令IBD[i]表示数组ArrayBD中第i个元素的值,将IBD[i]入队到单向队列QueueBD中,令SBD等于当前单向队列QueueBD中所有元素值的和;其中当单向队列QueueBD队满时,先将其队头元素出队,再将其余元素向队头方向移动一个单位,最后再进行入队操作,如图3所示;Step Step403-1: Let I BD [i] represent the value of the i-th element in the array ArrayBD, enqueue I BD [i] into the one-way queue QueueBD, and let S BD equal the value of all elements in the current one-way queue QueueBD and; when the one-way queue QueueBD is full, the head element of the queue is first dequeued, and then the remaining elements are moved one unit toward the head of the queue, and finally the queue operation is performed, as shown in Figure 3;
步骤Step403-2:如果则将数组ArrayBP中的第/>个元素赋值为1;Step Step403-2: If Then the /> in the array ArrayBP elements are assigned a value of 1;
步骤Step403-3:如果则将数组ArrayBP中的第/>个元素赋值为0;Step Step403-3: If Then the /> in the array ArrayBP elements are assigned a value of 0;
步骤Step404:依次针对做以下操作:Step Step404: Target in turn Do the following:
步骤Step404-1:令QBD表示单向队列QueueBD的队头元素,将QBD从单向队列QueueBD中出队,其余元素向队头方向移动一个单位,令SBD等于当前单向队列QueueBD中所有元素值的和;Step Step 404-1: Let Q BD represent the head element of the one-way queue QueueBD, dequeue Q BD from the one-way queue QueueBD, and move the remaining elements one unit toward the head of the team, and let S BD be equal to the current one-way queue QueueBD. The sum of all element values;
步骤Step404-2:如果则将数组ArrayBP中的第/>个元素赋值为1;Step Step404-2: If Then the /> in the array ArrayBP elements are assigned a value of 1;
步骤Step404-3:如果则将数组ArrayBP中的第/>个元素赋值为0;Step Step404-3: If Then the /> in the array ArrayBP elements are assigned a value of 0;
步骤Step405:激光收发端机B将数组ArrayBP发送给激光收发端机A。Step Step 405: Laser transceiver B sends the array ArrayBP to laser transceiver A.
5)本方法的第五部分在激光收发端机A收到步骤Step405中激光收发端机B发送的数组ArrayBP之后,激光收发端机A的计算机A对数组ArrayA_1进行异常值筛除操作和阈值化计算,具体步骤如下:5) In the fifth part of this method, after the laser transceiver A receives the array ArrayBP sent by the laser transceiver B in Step 405, the computer A of the laser transceiver A performs outlier filtering and thresholding operations on the array ArrayA_1. Calculation, the specific steps are as follows:
步骤Step501:令j=1,j总为正整数,分别依次针对i=1,2,…,N-1,N做以下操作:Step Step501: Let j=1, j is always a positive integer, and do the following operations for i=1,2,…,N-1,N respectively:
步骤Step501-1:令IBP[i]表示数组ArrayBP中第i个元素的值,令IA_1[i]表示数组ArrayA_1中第i个元素的值;令IA_2[j]表示数组ArrayA_2中第j个元素的值;Step Step501-1: Let I BP [i] represent the value of the i-th element in the array ArrayBP, let I A_1 [i] represent the value of the i-th element in the array ArrayA_1; let I A_2 [j] represent the value of the i-th element in the array ArrayA_2 The value of j elements;
步骤Step501-2:如果IBP[i]=0,则令IA_2[j]=IA_1[i],令j=j+1;Step Step501-2: If I BP [i]=0, then let I A_2 [j]=I A_1 [i], let j=j+1;
步骤Step501-3:如果IBP[i]=1,则不做任何操作;Step Step501-3: If I BP [i]=1, no operation is performed;
步骤Step502:使用量化算法对数组ArrayA_2中的各个元素进行阈值化计算得到随机比特序列,将该随机比特序列存入列表ListA中;Step Step502: Use the quantization algorithm to perform threshold calculation on each element in the array ArrayA_2 to obtain a random bit sequence, and store the random bit sequence in the list ListA;
步骤Step503:激光收发端机A完成原始共享随机比特序列提取操作。Step Step 503: Laser transceiver A completes the original shared random bit sequence extraction operation.
6)本方法的第六部分中激光收发端机B的计算机B对数组ArrayB_1进行异常值筛除操作和阈值化计算,具体步骤如下:6) In the sixth part of this method, computer B of laser transceiver B performs outlier filtering and threshold calculation on array ArrayB_1. The specific steps are as follows:
步骤Step601:令j=1,分别依次针对i=1,2,…,N-1,N做以下操作:Step Step601: Let j=1, and do the following operations for i=1,2,…,N-1,N respectively:
步骤Step601-1:令IBP[i]表示数组ArrayBP中第i个元素的值,令IB_1[i]表示数组ArrayB_1中第i个元素的值;令IB_2[j]表示数组ArrayB_2中第j个元素的值;Step Step601-1: Let I BP [i] represent the value of the i-th element in the array ArrayBP, let I B_1 [i] represent the value of the i-th element in the array ArrayB_1; let I B_2 [j] represent the value of the i-th element in the array ArrayB_2 The value of j elements;
步骤Step601-2:如果IBP[i]=0,则令IB_2[j]=IB_1[i],令j=j+1;Step Step601-2: If I BP [i]=0, then let I B_2 [j]=I B_1 [i], let j=j+1;
步骤Step601-3:如果IBP[i]=1,则不做任何操作;Step Step601-3: If I BP [i]=1, do not perform any operation;
步骤Step602:使用量化算法对数组ArrayB_2中的各个元素进行阈值化计算得到随机比特序列,将该随机比特序列存入列表ListB中;Step Step602: Use the quantization algorithm to perform threshold calculation on each element in the array ArrayB_2 to obtain a random bit sequence, and store the random bit sequence in the list ListB;
步骤Step603:激光收发端机B完成原始共享随机比特序列提取操作。Step Step 603: Laser transceiver B completes the original shared random bit sequence extraction operation.
7)本方法第七部分对激光收发端机A和激光收发端机B提取的原始共享随机比特序列中的不一致比特进行纠错,具体步骤如下:7) The seventh part of this method corrects the inconsistent bits in the original shared random bit sequence extracted by laser transceiver A and laser transceiver B. The specific steps are as follows:
步骤Step701:使用量子密钥分配后处理中的误码估计、密钥协商、错误校验技术找出并纠正列表ListA和列表ListB中存储的原始共享随机比特序列中的不一致比特,使列表ListA和列表ListB中的随机比特一致,使得所述激光收发端机A和激光收发端机B拥有相同的比特序列。Step Step 701: Use error estimation, key agreement, and error checking technology in quantum key distribution post-processing to find and correct the inconsistent bits in the original shared random bit sequences stored in ListA and ListB, so that ListA and ListB The random bits in the list ListB are consistent, so that the laser transceiver A and the laser transceiver B have the same bit sequence.
在实施本方法时,先执行本方法的第一部分,接着同时开始执行本方法的第二部分和第三部分,然后执行第四部分,再同时执行第五部分和第六部分,最后执行本方法的第七部分。When implementing this method, first execute the first part of this method, then start executing the second and third parts of this method at the same time, then execute the fourth part, then execute the fifth and sixth parts at the same time, and finally execute this method Part VII of.
本发明的积极效果:本发明方法是通过差分幅值比对来筛除大气光信道密钥提取中的测量异常值;使用该方法分别计算通信双方测量采样值的差分幅值,传输该差分幅值,比对大气双向光信道两端测量采样值的差分幅值,实现测量异常值的筛除。将异常值筛除之后再对其做阈值化计算,可显著提高信道双方提取原始共享随机比特序列的一致率。Positive effects of the present invention: The method of the present invention is to filter out measurement abnormal values in atmospheric optical channel key extraction through differential amplitude comparison; use this method to calculate the differential amplitude of the measurement sampling values of both communicating parties respectively, and transmit the differential amplitude value, and compares the differential amplitude of the measured sample values at both ends of the atmospheric bidirectional optical channel to filter out measurement outliers. Screening out outliers and then performing threshold calculations on them can significantly improve the consistency rate of both sides of the channel in extracting the original shared random bit sequence.
附图说明Description of the drawings
图1为系统硬件结构示意图。Figure 1 is a schematic diagram of the system hardware structure.
图2为单向队列结构示意图。Figure 2 is a schematic diagram of the one-way queue structure.
图3为单向队列入队示例图。Figure 3 is an example diagram of one-way queuing.
具体实施方式Detailed ways
为了使本方法的特征和优点更加清楚明白,下面结合具体实施例对本方法作进一步的描述。显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。在本实施例中,激光收发端机A和激光收发端机B分别位于两栋高楼的屋顶,探测器A和探测器B均为PIN光电探测器,激光收发端机A的计算机A和激光收发端机B的计算机B都接入到互联网上,计算机A和计算机B可以通过互联网相互通信,以通过互联网信道执行误码估计、密钥协商、错误校验操作。激光器A和激光器B均输出功率稳定的激光信号,且激光器A输出激光信号的功率等于激光器B输出激光信号的功率。发表在《密码学报》2015年2卷2期113~121页的论文对量子密钥分配后处理中的误码估计、密钥协商、错误校验操作有详细的介绍。借用量子密钥分配后处理中使用的误码估计、密钥协商、错误校验技术可以对两个激光收发端机提取的原始共享随机比特序列进行不一致比特纠错,并确定最终得到的共享随机比特序列变为可以在实际中使用的共享随机比特序列。收发光学系统A和收发光学系统B使用《Optics Express》2018年26卷13期16422~16441页论文描述的方式保证激光收发端机A和激光收发端机B之间的双向信道是互易的。In order to make the features and advantages of this method more clear, this method will be further described below with reference to specific embodiments. Obviously, the described embodiments are only some of the embodiments of the present invention, but not all of the embodiments. In this embodiment, laser transceiver A and laser transceiver B are located on the roofs of two high-rise buildings respectively. Detector A and detector B are both PIN photoelectric detectors. Computer A and laser transceiver of laser transceiver A Computer B of terminal B is connected to the Internet. Computer A and computer B can communicate with each other through the Internet to perform error estimation, key negotiation, and error checking operations through the Internet channel. Both laser A and laser B output laser signals with stable power, and the power of the laser signal output by laser A is equal to the power of the laser signal output by laser B. The paper published in the Journal of Cryptozoology, Volume 2, Issue 2, 2015, pages 113-121, provides a detailed introduction to the error estimation, key negotiation, and error checking operations in quantum key distribution post-processing. By borrowing the error estimation, key negotiation, and error checking technologies used in quantum key distribution post-processing, we can perform inconsistent bit error correction on the original shared random bit sequence extracted by the two laser transceivers, and determine the final shared randomness. The bit sequence becomes a shared random bit sequence that can be used in practice. The receiving and receiving optical system A and the receiving and receiving optical system B use the method described in the paper on pages 16422 to 16441 of "Optics Express", Volume 26, Issue 13, 2018, to ensure that the two-way channel between the laser transceiver A and the laser transceiver B is reciprocal.
本方法的技术方案是这样实现的:大气光信道密钥提取中的测量异常值差分幅值比对筛除方法,其特征在于,所需的硬件系统和执行步骤如下:The technical solution of this method is implemented as follows: a measurement outlier differential amplitude comparison and screening method in atmospheric optical channel key extraction, which is characterized in that the required hardware system and execution steps are as follows:
需要激光收发端机A和激光收发端机B,激光收发端机A和激光收发端机B相互通视。激光收发端机A包括激光器A、收发光学系统A、探测器A和计算机A。激光收发端机B包括激光器B、收发光学系统B、探测器B和计算机B。如图1所示,所述激光器A发出的激光信号A001经收发光学系统A发射到大气湍流信道中,激光信号A001到达收发光学系统B后再入射到探测器B上;所述激光器B发出的激光信号B001经收发光学系统B发射到大气湍流信道中,激光信号B001到达收发光学系统A后再入射到探测器A上;所述计算机A实时采集探测器A输出的电信号,所述计算机B实时采集探测器B输出的电信号。Laser transceiver A and laser transceiver B are required, and laser transceiver A and laser transceiver B can see each other. Laser transceiver A includes laser A, transceiver optical system A, detector A and computer A. Laser transceiver B includes laser B, transceiver optical system B, detector B and computer B. As shown in Figure 1, the laser signal A001 emitted by the laser A is emitted into the atmospheric turbulence channel through the optical transmission system A. The laser signal A001 reaches the optical system B and then is incident on the detector B; the laser signal A001 emitted by the laser B is The laser signal B001 is emitted into the atmospheric turbulence channel through the optical system B. The laser signal B001 reaches the optical system A and then is incident on the detector A. The computer A collects the electrical signal output by the detector A in real time. The computer B Collect the electrical signal output by detector B in real time.
1)本方法的第一部分是使激光收发端机A和激光收发端机B正常工作,具体操作包括:1) The first part of this method is to make laser transceiver A and laser transceiver B work normally. The specific operations include:
步骤Step101:使激光器A和激光器B正常工作,使探测器A和探测器B正常工作,使计算机A和计算机B正常工作,使收发光学系统A和收发光学系统B相互对准并正常工作。Step Step101: Make laser A and laser B work normally, make detector A and detector B work normally, make computer A and computer B work normally, make the receiving and receiving optical system A and the receiving and receiving optical system B align with each other and work normally.
2)本方法的第二部分在激光收发端机A中执行以下操作:2) The second part of this method performs the following operations in laser transceiver A:
步骤Step201:在计算机A中创建一个计数器CounterA,令CounterA=1;令时刻tA=0;在计算机A的存储器中创建一个包含N个元素的一维数组ArrayA,数组ArrayA用于存储探测器A输出的电信号的幅度采样值;在计算机A的存储器中创建一个包含N个元素的一维数组ArrayA_1,数组ArrayA_1用于存储数组ArrayA中采样值进行规范化处理后的结果;在计算机A的存储器中创建一个长度为m的单向队列QueueA,其中m为小于N的偶数,单向队列QueueA用于暂存数组ArrayA_1中相邻元素的差分幅值;在计算机A的存储器中创建一个长度为N的一维数组ArrayAA,数组ArrayAA用于存储不同时刻单向队列QueueA中元素的和;在计算机A的存储器中创建一个一维数组ArrayA_2,数组ArrayA_2用于存储数组ArrayA_1中元素经过异常值筛除后的结果;在计算机A的存储器中创建一个列表ListA,列表ListA用于存储随机比特序列,令列表ListA为空;其中单向队列结构如图2所示;Step Step201: Create a counter CounterA in computer A, let CounterA = 1; let time t A = 0; create a one-dimensional array ArrayA containing N elements in the memory of computer A, and the array ArrayA is used to store the detector A The amplitude sample value of the output electrical signal; create a one-dimensional array ArrayA_1 containing N elements in the memory of computer A. The array ArrayA_1 is used to store the result of normalization processing of the sample values in the array ArrayA; in the memory of computer A Create a one-way queue QueueA with a length of m, where m is an even number less than N. The one-way queue QueueA is used to temporarily store the differential amplitude of adjacent elements in the array ArrayA_1; create a length of N in the memory of computer A One-dimensional array ArrayAA, array ArrayAA is used to store the sum of elements in the one-way queue QueueA at different times; create a one-dimensional array ArrayA_2 in the memory of computer A, and array ArrayA_2 is used to store the elements in array ArrayA_1 after filtering out outliers. Result: Create a list ListA in the memory of computer A. List ListA is used to store random bit sequences, making list ListA empty; the one-way queue structure is shown in Figure 2;
步骤Step202:在时刻tA,激光收发端机A的采集程序对探测器A输出的电信号幅度做一次采样,获得一个采样值C001;把数组ArrayA的第CounterA个元素赋值为采样值C001;Step Step202: At time t A , the collection program of laser transceiver A samples the amplitude of the electrical signal output by detector A and obtains a sampling value C001; assigns the CounterA-th element of the array ArrayA as the sampling value C001;
步骤Step203:令CounterA=CounterA+1;令tA=tA+δt,δt为采样时间间隔;Step Step203: Let CounterA=CounterA+1; let t A =t A + δ t , δ t is the sampling time interval;
步骤Step204:如果CounterA>N,则转步骤Step205,否则转步骤Step202;Step Step204: If CounterA>N, go to Step 205, otherwise go to Step 202;
步骤Step205:在计算机A中,利用程序分别依次针对i=1,2,…,N-1,N做以下操作:对数组ArrayA中的各个采样值做规范化处理:Step Step205: In computer A, use the program to perform the following operations on i=1,2,...,N-1,N: perform normalization processing on each sample value in the array ArrayA:
步骤Step205-1:令IA[i]表示数组ArrayA中第i个采样值;IA_1[i]表示对数组ArrayA中第i个采样值进行规范化处理后的结果;Step Step205-1: Let I A [i] represent the i-th sample value in the array ArrayA; I A_1 [i] represents the result of normalization of the i-th sample value in the array ArrayA;
步骤Step205-2:令将数组ArryaA_1中第i个元素赋值为IA_1[i];其中i'和i”均为正整数;Step Step205-2: Let Assign the i-th element in the array ArryaA_1 to I A_1 [i]; where i' and i" are both positive integers;
步骤Step206:分别依次针对做以下操作:Step Step206: Target the Do the following:
步骤Step206-1:令IA_1[i]表示数组ArrayA_1中第i个元素的值,令VA=|IA_1[i]-IA_1[i+1]|,其中|x|表示取x的绝对值;Step Step206-1: Let I A_1 [i] represent the value of the i-th element in the array ArrayA_1, let V A =|I A_1 [i]-I A_1 [i+1]|, where |x| represents the value of x absolute value;
步骤Step206-2:将VA入队到单向队列QueueA中;Step Step206-2: Enqueue V A into the one-way queue QueueA;
步骤Step207:分别依次针对做以下操作:Step Step207: Target the Do the following:
步骤Step207-1:令IA_1[i]表示数组ArrayA_1中第i个元素的值,令VA=|IA_1[i]-IA_1[i+1]|;Step Step207-1: Let I A_1 [i] represent the value of the i-th element in array ArrayA_1, and let V A =|I A_1 [i]-I A_1 [i+1]|;
步骤Step207-2:将VA入队到单向队列QueueA中,令SA等于当前单向队列QueueA中所有元素值的和,将数组ArrayAA中第个元素赋值为SA;其中当单向队列QueueA队满时,先将其队头元素出队,再将其余元素向队头方向移动一个单位,最后再进行入队操作,如图3所示;Step Step207-2: Enqueue V A into the one-way queue QueueA, let S A equal the sum of all element values in the current one-way queue QueueA, and add the first element in the array ArrayAA Each element is assigned the value S A ; when the one-way queue QueueA is full, the head element of the queue is first dequeued, then the remaining elements are moved one unit toward the head of the queue, and finally the queue operation is performed, as shown in Figure 3 ;
步骤Step208:分别依次针对做以下操作:Step Step208: Target the Do the following:
步骤Step208-1:令QA表示当前单向队列QueueA的队头元素,将QA从单向队列QueueA中出队,其余元素向队头方向移动一个单位;Step Step208-1: Let Q A represent the head element of the current one-way queue QueueA, dequeue Q A from the one-way queue QueueA, and move the remaining elements one unit toward the head of the queue;
步骤Step208-2:令SA等于当前单向队列QueueA中所有元素值的和;将数组ArrayAA中第个元素赋值为SA;Step Step208-2: Let S A be equal to the sum of all element values in the current one-way queue QueueA; elements are assigned the value S A ;
步骤Step209:激光收发端机A将数组ArrayAA发送给激光收发端机B。Step Step209: Laser transceiver A sends the array ArrayAA to laser transceiver B.
3)本方法的第三部分在激光收发端机B中执行以下操作:3) The third part of this method performs the following operations in laser transceiver B:
步骤Step301:在计算机B中创建一个计数器CounterB,令CounterB=1;令时刻tB=0;在计算机B的存储器中创建一个包含N个元素的一维数组ArrayB,数组ArrayB用于存储探测器B输出的电信号的幅度采样值;在计算机B的存储器中创建一个包含N个元素的一维数组ArrayB_1,数组ArrayB_1用于存储数组ArrayB的采样值进行规范化处理后的结果;在计算机B的存储器中创建一个长度为m的单向队列QueueB,其中m为小于N的偶数,单向队列QueueB用于暂存数组ArrayB_1中相邻元素的差分幅值;在计算机B的存储器中创建一个长度为N的一维数组ArrayBB,数组ArrayBB用于存储不同时刻单向队列QueueA中元素的和;在计算机B的存储器中创建一个长度为N的一维数组ArrayBD,数组ArrayBD用于存储第一轮异常值筛选时标记的索引信息;在计算机B的存储器中创建一个长度为n的单向队列QueueBD,其中n为小于N的奇数,单向队列QueueBD用于暂存数组ArrayBD中的数据;在计算机B的存储器中创建一个长度为N的一维数组ArrayBP用于存储第二轮异常值筛选时标记的索引信息;在计算机B的存储器中创建一个一维数组ArrayB_2,数组ArrayB_2用于存储数组ArrayB_1中的元素经过异常值筛除后的结果;在计算机B的存储器中创建一个列表ListB,列表ListB用于存储随机比特序列,令列表ListB为空;其中单向队列结构如图2所示;Step Step 301: Create a counter CounterB in computer B, let CounterB = 1; let time t B = 0; create a one-dimensional array ArrayB containing N elements in the memory of computer B. ArrayB is used to store detector B. The amplitude sampling value of the output electrical signal; create a one-dimensional array ArrayB_1 containing N elements in the memory of computer B. ArrayB_1 is used to store the result of normalization of the sampling value of array ArrayB; in the memory of computer B Create a one-way queue QueueB with a length of m, where m is an even number less than N. The one-way queue QueueB is used to temporarily store the differential amplitude of adjacent elements in the array ArrayB_1; create a length of N in the memory of computer B One-dimensional array ArrayBB. ArrayBB is used to store the sum of elements in the one-way queue QueueA at different times. Create a one-dimensional array ArrayBD with a length of N in the memory of computer B. ArrayBD is used to store the first round of outlier screening. Marked index information; create a one-way queue QueueBD of length n in the memory of computer B, where n is an odd number less than N. The one-way queue QueueBD is used to temporarily store the data in the array ArrayBD; in the memory of computer B Create a one-dimensional array ArrayBP with a length of N to store the index information marked in the second round of outlier screening; create a one-dimensional array ArrayB_2 in the memory of computer B. ArrayB_2 is used to store the elements in array ArrayB_1 after exceptions. The result after value filtering; create a list ListB in the memory of computer B. ListB is used to store random bit sequences, making listB empty; the one-way queue structure is shown in Figure 2;
步骤Step302:在时刻tB,激光收发端机B对探测器B输出的电信号幅度做一次采样,获得一个采样值D001;把数组ArrayB的第CounterB个元素赋值为采样值D001;Step Step302: At time t B , laser transceiver B samples the amplitude of the electrical signal output by detector B and obtains a sampling value D001; assigns the CounterB-th element of the array ArrayB as the sampling value D001;
步骤Step303:令CounterB=CounterB+1;令tB=tB+δt,δt为采样时间间隔;Step Step303: Let CounterB=CounterB+1; let t B =t B + δ t , δ t is the sampling time interval;
步骤Step304:如果CounterB>N,则转步骤Step305,否则转步骤Step302;Step Step304: If CounterB>N, go to Step 305, otherwise go to Step 302;
步骤Step305:在计算机B中,利用程序分别依次针对i=1,2,…,N-1,N做以下操作:对数组ArrayB中的各个采样值做规范化处理:Step Step305: In computer B, use the program to perform the following operations on i=1,2,...,N-1,N: perform normalization processing on each sample value in the array ArrayB:
步骤Step305-1:令IB[i]表示数组ArrayB中第i个采样值;IB_1[i]表示对数组ArrayB中第i个采样值进行规范化处理后的结果;Step Step305-1: Let I B [i] represent the i-th sample value in the array ArrayB; I B_1 [i] represents the result of normalization of the i-th sample value in the array ArrayB;
步骤Step305-2:令将数组ArryaB_1中第i个元素赋值为IB_1[i];其中i'和i”均为正整数;Step Step305-2: Let Assign the i-th element in the array ArryaB_1 to I B_1 [i]; where i' and i" are both positive integers;
步骤Step306:分别依次针对做以下操作:Step Step306: Target the Do the following:
步骤Step306-1:令IB_1[i]表示数组ArrayB_1中第i个元素的值,令VB=|IB_1[i]-IB_1[i+1]|;Step Step306-1: Let I B_1 [i] represent the value of the i-th element in array ArrayB_1, and let V B =|I B_1 [i]-I B_1 [i+1]|;
步骤Step306-2:将VB入队到单向队列QueueB中;Step Step306-2: Enqueue V B into the one-way queue QueueB;
步骤Step307:分别依次针对做以下操作:Step Step307: Target the Do the following:
步骤Step307-1:令IB_1[i]表示数组ArrayB_1中第i个元素的值,令VB=|IB_1[i]-IB_1[i+1]|;Step Step307-1: Let I B_1 [i] represent the value of the i-th element in array ArrayB_1, and let V B =|I B_1 [i]-I B_1 [i+1]|;
步骤Step307-2:将VB入队到单向队列QueueB中,令SB等于当前单向队列QueueB中所有元素值的和,将数组ArrayBB中第个元素赋值为SB;其中当单向队列QueueB队满时,先将其队头元素出队,再将其余元素向队头方向移动一个单位,最后再进行入队操作,如图3所示;Step Step 307-2: Enqueue V B into the one-way queue QueueB. Let S B be equal to the sum of all element values in the current one-way queue QueueB. Add the first element in the array ArrayBB. Each element is assigned a value of S B ; when the one-way queue QueueB is full, the head element of the queue is first dequeued, then the remaining elements are moved one unit toward the head of the queue, and finally the queue operation is performed, as shown in Figure 3 ;
步骤Step308:分别依次针对做以下操作:Step Step308: Target the Do the following:
步骤Step308-1:令QB表示当前单向队列QueueB的队头元素,将QB从单向队列QueueB中出队,其余元素向队头方向移动一个单位;Step Step 308-1: Let Q B represent the head element of the current one-way queue QueueB, dequeue Q B from the one-way queue QueueB, and move the remaining elements one unit toward the head of the team;
步骤Step308-2:令SB等于当前单向队列QueueB中所有元素值的和;将数组ArrayBB中第个元素赋值为SB。Step Step308-2: Let S B be equal to the sum of all element values in the current one-way queue QueueB; elements are assigned the value S B .
4)本方法的第四部分在激光收发端机B接收步骤Step209中激光收发端机A发送的数组ArrayAA后,激光收发端机B的计算机B确定测量异常值索引,具体操作步骤如下:4) In the fourth part of this method, after the laser transceiver B receives the array ArrayAA sent by the laser transceiver A in step 209, the computer B of the laser transceiver B determines the measurement abnormal value index. The specific operation steps are as follows:
步骤Step401:令TB为第一轮异常筛除判决阈值,分别依次针对i=1,2,…,N-1,N做以下操作:Step Step 401: Let T B be the first round of abnormal screening decision threshold, and perform the following operations for i=1, 2,..., N-1, N respectively:
步骤Step401-1:令IAA[i]表示数组ArrayAA中的第i个元素的值,令IBB[i]表示数组ArrayBB中的第i个元素的值;Step Step401-1: Let I AA [i] represent the value of the i-th element in the array ArrayAA, and let I BB [i] represent the value of the i-th element in the array ArrayBB;
步骤Step401-2:令 Step Step401-2: Let
步骤Step401-3:如果PB≥TB,则将数组ArrayBD中的第i个元素赋值为1;Step Step401-3: If P B ≥ T B , assign the i-th element in the array ArrayBD to 1;
步骤Step401-4:如果PB<TB,则将数组ArrayBD中的第i个元素赋值为0;Step Step401-4: If P B <T B , assign the i-th element in the array ArrayBD to 0;
步骤Step402:表示对x向下取整,分别依次针对/>做以下操作:Step Step402: Indicates that x is rounded down to the nearest integer, respectively, for/> Do the following:
步骤Step402-1:令IBD[i]表示数组ArrayBD中第i个元素的值,将IBD[i]入队到单向队列QueueBD中;Step Step402-1: Let I BD [i] represent the value of the i-th element in the array ArrayBD, and enqueue I BD [i] into the one-way queue QueueBD;
步骤Step403:令TBD为第二轮异常筛除判决阈值,表示对x向上取整,分别依次针对/>做以下操作:Step Step 403: Let T BD be the second round of abnormal screening judgment threshold, Indicates that x is rounded up, and each is directed to/> Do the following:
步骤Step403-1:令IBD[i]表示数组ArrayBD中第i个元素的值,将IBD[i]入队到单向队列QueueBD中,令SBD等于当前单向队列QueueBD中所有元素值的和;其中当单向队列QueueBD队满时,先将其队头元素出队,再将其余元素向队头方向移动一个单位,最后再进行入队操作,如图3所示;Step Step403-1: Let I BD [i] represent the value of the i-th element in the array ArrayBD, enqueue I BD [i] into the one-way queue QueueBD, and let S BD equal the value of all elements in the current one-way queue QueueBD and; when the one-way queue QueueBD is full, the head element of the queue is first dequeued, and then the remaining elements are moved one unit toward the head of the queue, and finally the queue operation is performed, as shown in Figure 3;
步骤Step403-2:如果则将数组ArrayBP中的第/>个元素赋值为1;Step Step403-2: If Then the /> in the array ArrayBP elements are assigned a value of 1;
步骤Step403-3:如果则将数组ArrayBP中的第/>个元素赋值为0;Step Step403-3: If Then the /> in the array ArrayBP elements are assigned a value of 0;
步骤Step404:依次针对做以下操作:Step Step404: Target in turn Do the following:
步骤Step404-1:令QBD表示单向队列QueueBD的队头元素,将QBD从单向队列QueueBD中出队,其余元素向队头方向移动一个单位,令SBD等于当前单向队列QueueBD中所有元素值的和;Step Step 404-1: Let Q BD represent the head element of the one-way queue QueueBD, dequeue Q BD from the one-way queue QueueBD, and move the remaining elements one unit toward the head of the team, and let S BD be equal to the current one-way queue QueueBD. The sum of all element values;
步骤Step404-2:如果则将数组ArrayBP中的第/>个元素赋值为1;Step Step404-2: If Then the /> in the array ArrayBP elements are assigned a value of 1;
步骤Step404-3:如果则将数组ArrayBP中的第/>个元素赋值为0;Step Step404-3: If Then the /> in the array ArrayBP elements are assigned a value of 0;
步骤Step405:激光收发端机B将数组ArrayBP发送给激光收发端机A。Step Step 405: Laser transceiver B sends the array ArrayBP to laser transceiver A.
5)本方法的第五部分在激光收发端机A收到步骤Step405中激光收发端机B发送的数组ArrayBP之后,激光收发端机A的计算机A对数组ArrayA_1进行异常值筛除操作和阈值化计算,具体步骤如下:5) In the fifth part of this method, after the laser transceiver A receives the array ArrayBP sent by the laser transceiver B in Step 405, the computer A of the laser transceiver A performs outlier filtering and thresholding operations on the array ArrayA_1. Calculation, the specific steps are as follows:
步骤Step501:令j=1,j总为正整数,分别依次针对i=1,2,…,N-1,N做以下操作:Step Step501: Let j=1, j is always a positive integer, and do the following operations for i=1,2,…,N-1,N respectively:
步骤Step501-1:令IBP[i]表示数组ArrayBP中第i个元素的值,令IA_1[i]表示数组ArrayA_1中第i个元素的值;令IA_2[j]表示数组ArrayA_2中第j个元素的值;Step Step501-1: Let I BP [i] represent the value of the i-th element in the array ArrayBP, let I A_1 [i] represent the value of the i-th element in the array ArrayA_1; let I A_2 [j] represent the value of the i-th element in the array ArrayA_2 The value of j elements;
步骤Step501-2:如果IBP[i]=0,则令IA_2[j]=IA_1[i],令j=j+1;Step Step501-2: If I BP [i]=0, then let I A_2 [j]=I A_1 [i], let j=j+1;
步骤Step501-3:如果IBP[i]=1,则不做任何操作;Step Step501-3: If I BP [i]=1, no operation is performed;
步骤Step502:使用量化算法对数组ArrayA_2中的各个元素进行阈值化计算得到随机比特序列,将该随机比特序列存入列表ListA中;Step Step502: Use the quantization algorithm to perform threshold calculation on each element in the array ArrayA_2 to obtain a random bit sequence, and store the random bit sequence in the list ListA;
步骤Step503:激光收发端机A完成原始共享随机比特序列提取操作。Step Step 503: Laser transceiver A completes the original shared random bit sequence extraction operation.
6)本方法的第六部分中激光收发端机B的计算机B对数组ArrayB_1进行异常值筛除操作和阈值化计算,具体步骤如下:6) In the sixth part of this method, computer B of laser transceiver B performs outlier filtering and threshold calculation on array ArrayB_1. The specific steps are as follows:
步骤Step601:令j=1,分别依次针对i=1,2,…,N-1,N做以下操作:Step Step601: Let j=1, and do the following operations for i=1,2,…,N-1,N respectively:
步骤Step601-1:令IBP[i]表示数组ArrayBP中第i个元素的值,令IB_1[i]表示数组ArrayB_1中第i个元素的值;令IB_2[j]表示数组ArrayB_2中第j个元素的值;Step Step601-1: Let I BP [i] represent the value of the i-th element in the array ArrayBP, let I B_1 [i] represent the value of the i-th element in the array ArrayB_1; let I B_2 [j] represent the value of the i-th element in the array ArrayB_2 The value of j elements;
步骤Step601-2:如果IBP[i]=0,则令IB_2[j]=IB_1[i],令j=j+1;Step Step601-2: If I BP [i]=0, then let I B_2 [j]=I B_1 [i], let j=j+1;
步骤Step601-3:如果IBP[i]=1,则不做任何操作;Step Step601-3: If I BP [i]=1, do not perform any operation;
步骤Step602:使用量化算法对数组ArrayB_2中的各个元素进行阈值化计算得到随机比特序列,将该随机比特序列存入列表ListB中;Step Step602: Use the quantization algorithm to perform threshold calculation on each element in the array ArrayB_2 to obtain a random bit sequence, and store the random bit sequence in the list ListB;
步骤Step603:激光收发端机B完成原始共享随机比特序列提取操作。Step Step 603: Laser transceiver B completes the original shared random bit sequence extraction operation.
7)本方法第七部分对激光收发端机A和激光收发端机B提取的原始共享随机比特序列中的不一致比特进行纠错,具体步骤如下:7) The seventh part of this method corrects the inconsistent bits in the original shared random bit sequence extracted by laser transceiver A and laser transceiver B. The specific steps are as follows:
步骤Step701:使用量子密钥分配后处理中的误码估计、密钥协商、错误校验技术找出并纠正列表ListA和列表ListB中存储的原始共享随机比特序列中的不一致比特,使列表ListA和列表ListB中的随机比特一致,使得所述激光收发端机A和激光收发端机B拥有相同的比特序列。Step Step 701: Use error estimation, key agreement, and error checking technology in quantum key distribution post-processing to find and correct the inconsistent bits in the original shared random bit sequences stored in ListA and ListB, so that ListA and ListB The random bits in the list ListB are consistent, so that the laser transceiver A and the laser transceiver B have the same bit sequence.
在实施本方法时,先执行本方法的第一部分,接着同时开始执行本方法的第二部分和第三部分,然后执行第四部分,再同时执行第五部分和第六部分,最后执行本方法的第七部分。When implementing this method, first execute the first part of this method, then start executing the second and third parts of this method at the same time, then execute the fourth part, then execute the fifth and sixth parts at the same time, and finally execute this method Part VII of.
在本实施例中,N=20000;δt=0.2毫秒;m=4;n=5;TB=0.9;TBD=0.5;激光器A和激光器B输出光强在时间上是稳定的。激光器A和激光器B输出的光强大小相同。In this embodiment, N = 20000; δ t = 0.2 milliseconds; m = 4; n = 5; TB = 0.9; T BD = 0.5; the output light intensities of laser A and laser B are stable in time. The light intensity output by laser A and laser B is the same.
本领域内的技术人员应明白,数组和列表是计算机程序设计中的概念,它们都是由一系列元素按照从前到后的顺序排列组成的集合,是存储数据的容器。队列是一种先进先出的线性表,它只允许在表的一端进行插入,而在另一端删除元素。关于列表,在清华大学出版社出版的ISBN号为978-7-302-14751-0、由严蔚敏、吴伟民编著的《数据结构(C语言版)》一书中第二章的2.1有详细叙述;关于数组,在清华大学出版社出版的ISBN号为978-7-302-14751-0、由严蔚敏、吴伟民编著的《数据结构(C语言版)》一书中第五章的5.1和5.2有详细叙述;在本实施例中,数组和列表的元素都是从1开始编号,对于包含N个元素的数组或列表,最先被存入的元素被称为第1个元素,最后被存入的元素被称为第N个元素;数组ArrayBD、数组ArrayBP为标记测量异常值索引信息的数组,数组ArrayBD、数组ArrayBP中元素值为1则表示数组ArrayA_1、数组ArrayB_1中与该元素索引相同的元素为异常值;差分幅值是相邻两个元素值之差的绝对值,计算过程如步骤Step206-1及步骤Step306-1所示;关于单向队列的定义及操作问题,在清华大学出版社出版的ISBN号为978-7-302-14751-0、由严蔚敏、吴伟民编著的《数据结构(C语言版)》一书中第三章的3.4有详细叙述;单向队列结构如图2所示;单向队列入队过程示例如图3所示。在步骤Step209和步骤Step405中涉及数组传递,可使用激光通信或者网络通信进行传递。在步骤Step502和步骤Step602中,使用到了量化算法,本发明申请中步骤Step502和步骤Step602的量化算法是指,对数组ArrayA_2和数组ArrayB_2的各个元素的值进行阈值化计算,以得到0、1比特序列,例如,本实施例中使用《IEEE Transactions on Mobile Computing》第10卷第2期205-215页论文中的CQA量化算法进行阈值化计算,以得到0、1比特序列,也可以使用其他论文中相应的量化算法进行阈值化计算。图3为单向队列入队示例图,以图3为例对单向队列入队出队过程做简要描述,在此示例中,单向队列长度为4,其中DA1、DA2…等表示进行入队出队操作的元素,在该示例图中,当队列中元素个数达到4个,仍然需要再入队时,需要先将队头元素出队,其余元素向队头方向移动一个单位,再进行下一个元素的入队操作。本发明中通过两轮异常筛除判定最终得到需要被删除的元素的索引,将异常元素逐一删除,在此基础上再对序列中剩余的元素进行量化、信息协商等操作。Those skilled in the art should understand that arrays and lists are concepts in computer programming. They are both collections composed of a series of elements arranged in order from front to back, and are containers for storing data. A queue is a first-in, first-out linear list that only allows insertions at one end of the list and deletion of elements at the other end. Regarding the list, there is a detailed description in 2.1 of Chapter 2 of the book "Data Structure (C Language Edition)" published by Tsinghua University Press with ISBN number 978-7-302-14751-0 and edited by Yan Weimin and Wu Weimin; Regarding arrays, there are details in Chapter 5.1 and 5.2 of Chapter 5 of the book "Data Structure (C Language Edition)" published by Tsinghua University Press with ISBN number 978-7-302-14751-0 and edited by Yan Weimin and Wu Weimin. Description: In this embodiment, the elements of arrays and lists are numbered starting from 1. For an array or list containing N elements, the first element stored is called the first element, and the last element stored is called the first element. The element is called the Nth element; array ArrayBD and array ArrayBP are arrays that mark the index information of measurement outliers. If the element value in array ArrayBD and array ArrayBP is 1, it means that the element in array ArrayA_1 and array ArrayB_1 with the same index as the element is Outliers; the difference amplitude is the absolute value of the difference between two adjacent element values. The calculation process is as shown in Step 206-1 and Step 306-1; Regarding the definition and operation of one-way queues, published by Tsinghua University Press The ISBN number is 978-7-302-14751-0 and is described in detail in Chapter 3.4 of Chapter 3 of the book "Data Structure (C Language Edition)" edited by Yan Weimin and Wu Weimin; the one-way queue structure is shown in Figure 2 ; An example of the one-way queuing process is shown in Figure 3. Array transfer is involved in Step 209 and Step 405, which can be transferred using laser communication or network communication. In step Step502 and step Step602, a quantization algorithm is used. The quantization algorithm of step Step502 and step602 in the application of the present invention refers to performing threshold calculation on the value of each element of array ArrayA_2 and array ArrayB_2 to obtain 0 and 1 bits. Sequence, for example, in this embodiment, the CQA quantization algorithm in the paper "IEEE Transactions on Mobile Computing", Volume 10, Issue 2, pages 205-215 is used for threshold calculation to obtain the 0 and 1 bit sequence. Other papers can also be used. The corresponding quantization algorithm is used for threshold calculation. Figure 3 is an example diagram of one-way queue enqueuing. Take Figure 3 as an example to briefly describe the one-way queue enqueuing and dequeuing process. In this example, the one-way queue length is 4, where D A1 , D A2 ..., etc. represent Elements that perform enqueue and dequeue operations. In this example diagram, when the number of elements in the queue reaches 4 and still needs to be re-entered, the head element of the queue needs to be dequeued first, and the remaining elements move one unit towards the head of the queue. , and then perform the enqueuing operation of the next element. In the present invention, the index of the elements that need to be deleted is finally obtained through two rounds of abnormal screening and determination, and the abnormal elements are deleted one by one. On this basis, operations such as quantification and information negotiation are performed on the remaining elements in the sequence.
Claims (1)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211285546.7A CN116980113A (en) | 2022-10-20 | 2022-10-20 | Method for screening out measurement abnormal value in atmospheric optical channel key extraction |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211285546.7A CN116980113A (en) | 2022-10-20 | 2022-10-20 | Method for screening out measurement abnormal value in atmospheric optical channel key extraction |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116980113A true CN116980113A (en) | 2023-10-31 |
Family
ID=88480272
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211285546.7A Pending CN116980113A (en) | 2022-10-20 | 2022-10-20 | Method for screening out measurement abnormal value in atmospheric optical channel key extraction |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116980113A (en) |
-
2022
- 2022-10-20 CN CN202211285546.7A patent/CN116980113A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113705712B (en) | Network traffic classification method and system based on federal semi-supervised learning | |
CN106302522B (en) | A network security situation analysis method and system based on neural network and big data | |
CN112039919B (en) | Atmospheric turbulence optical channel shared random bit extraction method based on frequency equalization | |
CN108199863B (en) | Network traffic classification method and system based on two-stage sequence feature learning | |
CN107786388B (en) | Anomaly detection system based on large-scale network flow data | |
CN113364787A (en) | Botnet flow detection method based on parallel neural network | |
CN108804731A (en) | Based on the dual evaluation points time series trend feature extracting method of vital point | |
CN115296862B (en) | Network data safety transmission method based on data coding | |
CN114422119B (en) | Atmospheric optical channel key extraction method for realizing decorrelation of measurement samples based on random modulation | |
CN114330583A (en) | Abnormal electricity utilization identification method and abnormal electricity utilization identification system | |
CN113726561A (en) | Business type recognition method for training convolutional neural network by using federal learning | |
CN109067678A (en) | Based on Higher Order Cumulants WFRFT signal cascade Modulation Identification method, wireless communication system | |
CN116980113A (en) | Method for screening out measurement abnormal value in atmospheric optical channel key extraction | |
CN113347175B (en) | A method and system for fingerprint feature extraction and device identity recognition of optical communication equipment | |
CN115361195A (en) | A multi-classification method for large-scale Internet of Things traffic based on space-time cost | |
CN113098624B (en) | Quantum state measurement method, device, equipment, storage medium and system | |
CN114301587B (en) | Measurement outlier differential amplitude comparison and screening method in atmospheric optical channel key extraction | |
CN114285569B (en) | Atmospheric optical channel shared key extraction method based on random grouping vector quantization | |
CN111865848A (en) | Signal modulation format identification method and system | |
Ma et al. | Bi-ETC: A Bidirectional Encrypted Traffic Classification Model Based on BERT and BiLSTM | |
CN116318645A (en) | A method for extracting shared random bits from the amplitude of optical fading variation at both ends of the channel | |
CN111065098B (en) | Key generation method and system under fast frequency hopping communication system | |
CN115174167A (en) | Malicious encrypted flow detection method based on layered attention | |
CN118468321B (en) | Basic research data encryption storage method based on block chain technology | |
CN115795523B (en) | Loan information encryption management platform based on financial big data |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |