High-speed transmission method and device for single photon time counting sequence data
By adopting a combination method of jumbo frame packets, virtual concurrency ports, asynchronous non-blocking I/O reception and thread pool in a single photon communication system, the real-time and accuracy of data transmission of single photon time counting sequences in a high-code rate single photon communication system is solved, and high-speed and error-free data transmission is achieved.
Patent Information
- Application Number
- CN202510408275.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-02
- Publication Date
- 2025-06-20
- Estimated Expiration
- 2045-04-02
AI Technical Summary
The prior art cannot meet the data transmission requirements of the receiving end of the single-photon communication system with high code rate (above 10Mbps), especially when the data volume of a single-photon time counting sequence is large (the order of 10Gbps), it is easy to cause data packet loss and demodulation errors.
The combination of jumbo frame packets, virtual concurrency ports, asynchronous non-blocking I/O reception and thread pool is adopted to realize high-speed transmission of single-photon time series data between the time counter and the computer. The specific steps include: the time counter captures a single-photon pulse signal and forms a jumbo frame data packet, polls and sends through a virtual concurrency port, sets a receiving buffer queue and a storage buffer queue in the computer, and processes data through non-blocking asynchronous network I/O and thread pool.
It significantly reduces the frequency of data transmission on the communication link, alleviates the data reception pressure at the receiving end, improves the real-time and accuracy of data transmission, and ensures the correct data transmission of high-code rate single-photon communication systems.
Smart Images

Figure CN120186104A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of single - photon communication, and specifically to a high - speed transmission method and device for single - photon time - counting sequence data. Background Technique
[0002] Underwater communication technology has become an indispensable part of constructing an integrated information network of air, space, ground, and sea. Underwater wireless communication technologies mainly include underwater radio communication, underwater acoustic communication, and underwater wireless optical communication. Compared with underwater acoustic communication and underwater radio communication, underwater wireless optical communication technology has advantages such as high transmission rate, strong anti - interference ability, and good confidentiality. However, due to factors such as underwater channel loss, background light noise, and detector thermal noise, traditional underwater optical communication technology is difficult to achieve stable information transmission at the single - photon level, and the communication distance is limited. Single - photon communication technology can detect and extract information at the single - photon level, has characteristics such as long communication distance, large communication capacity, and strong anti - noise ability, and has important application value in fields such as communication.
[0003] As Figure 1 shown, a single - photon communication system includes a receiving antenna, an optical filter, a single - photon detector, a time counter, and a computer. The receiving antenna receives single - photon signals, and the stray light is removed by the optical filter to obtain the required modulated optical signal. The optical signal is transmitted to the single - photon detector through an optical fiber. After the optical signal reaches the single - photon detector, it has been attenuated to the single - photon level. The single - photon detector identifies valid photon signals. Every time a photon is detected, the optical signal is converted into a pulsed electrical signal and output to the time counter. The time counter marks a time value for the pulsed electrical signal and transmits it to the computer through an optical fiber. The computer performs discrete Fourier transform processing on the received single - photon time - counting sequence data, obtains the modulation frequency loaded at the transmitting end by using the frequency - domain quantum statistical characteristics of the modulated optical field, and then converts the modulation frequency into corresponding data information and outputs and displays it in the original format. Among them, the lossless reception of single - photon time - sequence data by the computer is one of the important steps in single - photon communication technology and is also the basic premise for all subsequent data processing.
[0004] In the prior art, most computers use synchronous blocking network I / O to receive single-photon time counting sequence data. In scenarios with relatively low communication rates, synchronous blocking network I / O is widely used because of its simple programming and easy understanding. However, when the code rate of a single-photon communication system reaches the order of 10 Mbps, the amount of single-photon time counting sequence data generated by the time counter can reach several Gbit per second. At this time, the network I / O rate of the receiving end must reach the order of 10 Gbps to receive all data in real time and completely without error. In such a high-rate scenario, due to its inherent characteristics, synchronous blocking network I / O will block the thread that calls the receive function every time the receive function is called, waiting for data to arrive. The function will not return until data is received, and then operations such as disk storage will be performed. After that, the receive function will be called again, waiting for the next packet of data to arrive. The operations such as receiving and disk storage take relatively long time, and may not be able to respond to the subsequent quickly arriving data in time, easily resulting in data packet loss, affecting the subsequent data processing process, and causing deviations or even errors in the original information after demodulation. Therefore, the prior art cannot meet the data transmission requirements of the receiving end of a high-code-rate single-photon communication system. Summary of the Invention
[0005] The present invention aims to solve the real-time transmission problem of the massive (150,000,000 per second) single-photon time counting sequence data (order of 10 Gbps) generated at the receiving end of a high-code-rate (above 10 Mbps) single-photon communication system, and thus provides a new high-speed transmission method and device for single-photon time counting sequence data.
[0006] The present invention is implemented by adopting the following technical solutions: A high-speed transmission method for single-photon time-counting sequence data includes the following steps: 1) A time counter captures a single-photon pulse signal and marks the arrival time of the single-photon pulse signal; 2) The time counter forms a large-frame data packet of a certain size from the time-series data; 3) During the process of packetizing the large-frame data packet, the large-frame data packet is polled and sent through a virtual concurrent port, where the virtual concurrent port is to virtualize multiple logical network ports on each physical link connected between the time counter and the computer, and each large-frame data packet is circularly sent and received using a different logical network port; 4) A receiving buffer queue and a storage buffer queue are set in the computer, and the buffer columns of the receiving buffer queue and the storage buffer queue are respectively adapted to multiple logical network ports; 5) A receiving thread, a sorting thread, and a storage thread are established to wait for the data to arrive; 6) Asynchronous reception is started, and the large-frame data packet is asynchronously received through a non-blocking asynchronous network I / O method; 7) When a large-frame data packet arrives, any idle thread is immediately called from the receiving thread pool to process the received data, that is, the received network data packet is stored in the corresponding position of the receiving buffer queue using the thread pool, and then, the asynchronous read function of the logical network port socket is immediately called to receive, read, and store the data again, and so on in a loop, forming a continuous data reception process for the logical network port; 8) The sorting thread polls and reads the data in the receiving buffer queue and stores the data in the corresponding position of the storage buffer queue; 9) The storage thread polls and reads the data in the storage buffer queue and temporarily stores the data in the storage thread, and when the amount of data in the storage thread reaches a certain size, it is written to the disk in a one-time centralized manner.
[0007] Principle description: The above high-speed transmission method is used for the high-speed transmission of single-photon time-series data between the time counter and the computer. After analysis, the main factors affecting the high-speed transmission of single-photon time-counting sequence data are: a. The arrival rate of data packets is too fast to be received in time; b. Multi-threaded reception causes data disorder; c. The data disk writing rate is slower than the data reception rate. Therefore, the method combination of large-frame packetizing + virtual concurrent port + asynchronous non-blocking I / O reception + thread pool is adopted to solve the problem of not being able to receive in time, and the sorting thread solves the data disorder problem by polling and reading the receiving buffer queue; the double buffering of the receiving buffer queue + storage buffer queue and the centralized writing method solve the problem of mismatch between data disk writing and reception rates.
[0008] Furthermore, the time counter is mainly composed of an FPGA. The FPGA board comes with a 10 Gigabit Ethernet port, and the computer is equipped with a 10 Gigabit network card. The network card and the time counter are connected by an optical fiber, and the physical link bandwidth is 10 Gbps, meeting the communication rate requirements of the single-photon communication system.
[0009] Furthermore, each large-frame data packet is 9012 bytes.
[0010] Further, the physical link between the time counter and the computer is an optical fiber, and the physical receiving port is unique.
[0011] Further, there are four virtual logical network ports on one optical fiber, and the number of buffer columns of the receive buffer queue and the storage buffer queue is four.
[0012] A high-speed transmission device for single-photon time-counting sequence data includes a jumbo frame packet assembly module, a virtual development port module provided in the time counter, and a non-blocking asynchronous network I / O module, a receive thread pool module, a receive buffer queue module, a sorting thread module, a storage buffer queue module, a storage buffer queue module, a storage thread module, and a hard disk provided in the computer. The jumbo frame packet assembly module is used to assemble time-sequence data into jumbo frame data packets of a certain size. The virtual development port module is used to virtualize multiple logical network ports on a single physical link connected between the time counter and the computer. The non-blocking asynchronous network I / O module calls the data reception function in an asynchronous non-blocking manner. After receiving the data, the operating system randomly selects an idle thread from the receive thread pool to perform the reception completion processing and put it into the receive buffer queue. The sorting thread polls and retrieves the data from the receive buffer queue and puts it into the storage buffer queue. The storage thread polls and reads the data in the storage buffer queue and temporarily stores the data in the storage thread. When the amount of data in the storage thread reaches a certain size, it is then written to the hard disk in one go.
[0013] Further, the time counter is mainly composed of an FPGA. The FPGA board comes with a 10 Gigabit Ethernet port. The computer is equipped with a 10 Gigabit Ethernet card. The network card and the time counter are connected by an optical fiber. The physical link bandwidth is 10 Gbps, meeting the communication rate requirements of the single-photon communication system.
[0014] Further, each jumbo frame data packet is 9012 bytes.
[0015] Further, the physical link between the time counter and the computer is an optical fiber, and the physical receiving port is unique.
[0016] The beneficial effects of the present invention are as follows: 1) Jumbo frame grouping reduces the frequency of data transmission: Due to the performance limitations of the computer network card, CPU and other hardware and the operating system, each network data packet needs to undergo multiple data copies before it can reach the application layer after arriving at the computer. During the data copy process, the data that arrives later will be discarded because it is not processed in time, resulting in data packet loss. Therefore, the present invention adopts a method of grouping multiple 4-byte data into a 9012-byte giant data frame, so that the same number of bytes of payload can be transmitted with the least network data packets, which significantly reduces the frequency of data transmission on the communication link, effectively alleviates the data receiving pressure at the receiving end, and enables the computer to process each packet of data in time; 2) A "virtual concurrent" port is proposed, and the network I / O performance can be expanded: the "virtual concurrent" port has only one physical link, but multiple logical network ports are used on a single physical link to simulate the network communication mode of multiple clients concurrently accessing the server. The use of this virtual concurrent data transmission mode can effectively utilize the real-time response capability of the IOCP model of the computer operating system to high concurrent data communication. In the FPGA of the time counter device, data is sent out in turn through each logical port, which further reduces the frequency of data transmission of each logical port, further alleviates the data receiving pressure of a single port of the computer, and realizes high-speed data communication. In addition, according to actual needs, the number of logical ports can be increased on a single physical link (for example, eight or more logical network ports can be used on a single optical fiber), and multiple physical links can be expanded (for example, four optical fibers are connected between the time counter and the computer) to achieve a higher degree of concurrent I / O and further improve the overall communication rate; 3) Asynchronous non-blocking network I / O + thread pool to achieve high-performance reception: The present invention breaks through the traditional single-threaded blocking synchronous I / O data transmission and reception method, adopts non-blocking asynchronous network I / O and thread pool, and maximizes the concurrent processing capabilities of multi-core CPUs, significantly improving the real-time and accuracy of data transmission in high-speed and continuous scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0018] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0019] Figure 1 It is a schematic diagram of the overall hardware structure of the single-photon communication system; Figure 2Schematic diagram of high-speed transmission of single-photon time-counting sequence data; Figure 3 Flowchart of high-speed transmission method for single-photon time-counting sequence data. Detailed implementation manners
[0020] In order to more clearly understand the above objects, features and advantages of the present invention, the solutions of the present invention will be further described below. It should be noted that, without conflict, the embodiments of the present invention and the features in the embodiments can be combined with each other.
[0021] In the description, it should be noted that the terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. It should be noted that unless otherwise clearly defined and limited, the terms "installed", "connected" and "connected" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection or an integral connection; it can be a mechanical connection or an electrical connection; it can be directly connected or indirectly connected through an intermediate medium, and it can be the communication inside two elements. For those of ordinary skill in the art, the specific meanings of the above terms can be understood according to specific situations.
[0022] Many specific details are set forth in the following description in order to provide a thorough understanding of the present invention, but the present invention may be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only a part of the embodiments of the present invention, rather than all of the embodiments.
[0023] The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0024] Such as Figure 3As shown, a high-speed transmission method for single-photon time-counting sequence data includes the following steps: 1) A time counter captures a single-photon pulse signal and marks the arrival time of the single-photon pulse signal (picosecond level); 2) The time counter forms a 9012-byte superframe data packet from the time-series data (4 bytes per photon); 3) A fiber optic cable is used to connect the computer and the time counter. During the process of assembling the superframe data packet, the superframe data packet is polled and sent through a virtual concurrent port. The virtual concurrent port means that four logical network ports are virtualized on each physical link connected between the time counter and the computer (specifically in implementation, the IP address is set to 192.168.1.100, and the port numbers are set to 1111, 2222, 3333, and 4444 respectively. The logical receiving ports are extended to [192.186.1.100, 1111], [192.186.1.100, 2222], [192.186.1.100, 3333], [192.186.1.100, 4444]), each large-frame data packet is cyclically sent and received using different logical network ports. Four logical network ports (ip_addr, port) concurrently execute data reception to simulate a network model where multiple clients concurrently access the server, making full use of the high-performance IOCP model of the operating system for the fast response characteristics of high-concurrency I / O. Due to factors such as the hardware performance and operating system performance of the computer, there are physical limitations on the data transfer rate of a single port, and packet loss may occur in high-rate data communication. In response to this limitation, virtual concurrent ports virtualize multiple logical network ports and send data pollingly through these logical ports, which can make full use of the high real-time response performance of the computer's IOCP model for concurrent network data communication and can significantly improve the data transfer rate. 4) Set up a receive buffer queue and a storage buffer queue in the computer, and the buffer columns of the receive buffer queue and the storage buffer queue are respectively adapted to multiple logical network ports (a large amount of data continuously pours in at high speed from the network ports, and it is necessary to provide a temporary storage space in the computer's memory to leave room for the relatively slow data storage to the hard disk to prevent data loss). 5) Establish a receive thread, a sorting thread, and a storage thread. Each thread executes independent data operation steps, and the threads cooperate with each other to avoid blocking the main thread. Start each thread and wait for the data to arrive. 6) Start asynchronous reception and asynchronously receive large-frame data packets through the non-blocking asynchronous network I / O method. 7) When a large-frame data packet arrives, immediately call any idle thread from the receive thread pool to process the received data, that is, use the thread pool to store the received network data packet in the corresponding position of the receive buffer queue. Subsequently, immediately call the asynchronous read function of the socket of this logical network port to receive, read, and store the data, and so on in a loop, forming a continuous data reception process for this logical network port. 8) The sorting thread pollingly reads the data in the receive buffer queue and stores the data in the corresponding position of the storage buffer queue. This step ensures the sequence consistency of the data at the receiving end and the data at the sending end, and also provides a double buffer space for the storage thread. 9) The storage thread pollingly reads the data in the storage buffer queue and temporarily stores the data in the storage thread. When the data volume in the storage thread reaches 1 G byte, it is written to the hard disk in one go. The hard disk operation adopts the method of centralized writing, reducing the number of read and write operations of the hard disk and improving the I / O performance of the hard disk.
[0025] Principle description: The above high-speed transmission method is used for the high-speed transmission of single-photon time series data between a time counter and a computer. After analysis, the main factors affecting the high-speed transmission of single-photon time counting sequence data are as follows: a. The packet arrival rate is too fast to be received in time; b. Multi-threaded reception causes data disorder; c. The data disk writing rate is slower than the data reception rate. Therefore, a method combination of jumbo frame packetization + virtual concurrent ports + asynchronous non-blocking I / O reception + thread pool is adopted to solve the problem of not being able to receive in time. The sorting thread solves the data disorder problem by polling and reading the receive buffer queue; the double buffering of the receive buffer queue + storage buffer queue and the method of centralized writing solve the problem of mismatching between data disk writing and reception rates.
[0026] In addition, after the above steps, this method can achieve the high-speed transmission of single-photon time counting sequence data at a rate close to 10 Gbps. After actual measurement, the data is correct and complete.
[0027] In specific implementation, the time counter is mainly composed of an FPGA. The FPGA board comes with a 10 Gigabit Ethernet port, and the computer is equipped with a 10 Gigabit network card. The network card and the time counter are connected by an optical fiber, and the physical link bandwidth is 10 Gbps, meeting the communication rate requirements of the single-photon communication system.
[0028] In specific implementation, each jumbo frame data packet is 9012 bytes.
[0029] In specific implementation, the physical link between the time counter and the computer is an optical fiber, and the physical reception port is unique.
[0030] In specific implementation, the number of logical network ports virtualized on an optical fiber is four, and the number of buffer columns of the receive buffer queue and the storage buffer queue is four.
[0031] Such as Figure 2As shown in the figure, a high-speed transmission device for single-photon time-counting sequence data includes a jumbo-frame packet assembly module, a virtual development port module provided in a time counter, and a non-blocking asynchronous network I / O module, a receiving thread pool module, a receiving buffer queue module, a sorting thread module, a storage buffer queue module, a storage buffer queue module, a storage thread module, and a hard disk provided in a computer. The jumbo-frame packet assembly module is used to assemble time-sequence data into jumbo-frame data packets of a certain size. The virtual development port module is used to virtualize multiple logical network ports on a single physical link connected between the time counter and the computer. The non-blocking asynchronous network I / O module calls a data receiving function in an asynchronous non-blocking manner. After receiving the data, the operating system randomly selects an idle thread from the receiving thread pool to perform receiving completion processing and put it into the receiving buffer queue. The sorting thread polls and retrieves data from the receiving buffer queue and puts it into the storage buffer queue. The storage thread polls and reads the data in the storage buffer queue and temporarily stores the data in the storage thread. When the amount of data in the storage thread reaches a certain size, it is written to the hard disk at one time in a centralized manner.
[0032] In specific implementation, the time counter is mainly composed of an FPGA. The FPGA board is equipped with a 10 Gigabit Ethernet port. The computer is equipped with a 10 Gigabit network card. The network card and the time counter are connected by an optical fiber. The physical link bandwidth is 10 Gbps, which meets the communication rate requirements of the single-photon communication system.
[0033] In specific implementation, each jumbo-frame data packet is 9012 bytes.
[0034] In specific implementation, the physical link between the time counter and the computer is an optical fiber, and the physical receiving port is unique.
[0035] The above are only specific implementation manners of the present invention, enabling those skilled in the art to understand or implement the present invention. Although the foregoing embodiments have been described in detail, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some or all of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the respective embodiments, and they should all be covered by the protection scope of the claims.
Claims
1. A high-speed transmission method for single-photon time counting sequence data, characterized in that: The method comprises the following steps: 1) a time counter captures a single-photon pulse signal and marks the arrival time of the single-photon pulse signal; 2) the time counter assembles the time series data into a jumbo frame data packet of a certain size; 3) in the process of assembling the jumbo frame data packet, the jumbo frame data packet is polled and sent through a virtual concurrent port, wherein the virtual concurrent port is to virtualize multiple logical network ports on each physical link connected between the time counter and the computer, and each jumbo frame data packet is cyclically sent using a different logical network port; 4) a receiving buffer queue and a storage buffer queue are set in the computer, and the buffer columns of the receiving buffer queue and the storage buffer queue are respectively adapted to multiple logical network ports; 5) a receiving thread, a sorting thread, and a storage thread are established to wait for data to arrive; 6) asynchronous reception is started, and the receiving thread, the sorting thread, and the storage thread are connected to the receiving thread, and the receiving thread is connected to the storage ... Asynchronously receive jumbo frame packets through non-blocking asynchronous network I / O methods; 7) When a jumbo frame packet arrives, immediately call any idle thread from the receiving thread pool to process the received data, that is, use the thread pool to store the received network data packet to the corresponding position of the receiving buffer queue, and then immediately call the asynchronous read function of the logical network port socket to receive, read and store the data again, and repeat this cycle to form a continuous data receiving process for the logical network port; 8) The sorting thread polls and reads the data in the receiving buffer queue and stores the data in the corresponding position of the storage buffer queue; 9) The storage thread polls and reads the data in the storage buffer queue and temporarily stores the data in the storage thread. When the amount of data in the storage thread reaches a certain size, it is written to the disk at one time.
2. The high-speed transmission method of single-photon time counting sequence data according to claim 1, characterized in that: The time counter is mainly composed of FPGA. The FPGA board has a 10 Gigabit network port. The computer is equipped with a 10 Gigabit network card. The network card and the time counter are connected via optical fiber, and the physical link bandwidth is 10 Gbps.
3. The high-speed transmission method of single-photon time counting sequence data according to claim 2, characterized in that: Each jumbo frame packet is 9012 bytes.
4. The high-speed transmission method of single-photon time counting sequence data according to claim 3, characterized in that: The physical link between the time counter and the computer is an optical fiber.
5. The high-speed transmission method of single-photon time counting sequence data according to claim 4, characterized in that: The number of virtualized logical network ports on one optical fiber is four, and the number of buffer columns of the receiving buffer queue and the storage buffer queue is four.
6. A high-speed transmission device for single-photon time counting sequence data, characterized in that: It includes a jumbo frame packaging module and a virtual development port module arranged in a time counter, and a non-blocking asynchronous network I / O module, a receiving thread pool module, a receiving buffer queue module, a sorting thread module, a storage buffer queue module, a storage buffer queue module, a storage thread module, and a hard disk arranged in a computer; the jumbo frame packaging module is used to realize the formation of jumbo frame data packets of a certain size by time series data; the virtual development port module is used to realize the virtualization of multiple logical network ports on a single physical link connected between the time counter and the computer; the non-blocking asynchronous network I / O module calls the data receiving function in an asynchronous and non-blocking manner, and after receiving the data, the operating system selects an idle thread from the receiving thread pool at random to complete the receiving processing and put it into the receiving buffer queue, the sorting thread polls and takes out the data from the receiving buffer queue and puts it into the storage buffer queue, the storage thread polls and reads the data in the storage buffer queue and temporarily stores the data in the storage thread, and when the amount of data in the storage thread reaches a certain size, it is written to the hard disk in one go.
7. The high-speed transmission device for single-photon time counting sequence data according to claim 6, characterized in that: The time counter is mainly composed of FPGA. The FPGA board has a 10 Gigabit network port. The computer is equipped with a 10 Gigabit network card. The network card and the time counter are connected via optical fiber, and the physical link bandwidth is 10 Gbps.
8. The high-speed transmission device for single-photon time counting sequence data according to claim 7, characterized in that: Each jumbo frame packet is 9012 bytes.
9. The high-speed transmission device for single-photon time counting sequence data according to claim 8, characterized in that: The physical link between the time counter and the computer is an optical fiber.
Citation Information
Patent Citations
Socket thread pool design method for multi-terminal wireless communication
CN116755863A
Vibration test quantum optical system and signal processing method
CN116929536A
Real-time ordered network packet processing method
CN118158178A
Multi-channel time correlation single photon counter
CN217546053U
Mapped FIFO buffering
US20120155256A1
Cited By
WAMS master station-oriented mass broadband data high-speed acquisition and processing method and system
CN121302074A