High-speed transmission method and device for single-photon time count sequence data
By employing a combination of giant frame packetization, virtual concurrent ports, asynchronous non-blocking I/O, and thread pools in a single-photon communication system, the problem of data packet loss in high-bit-rate single-photon communication systems was solved, achieving efficient single-photon time-counting sequence data transmission and meeting the 10Gbps communication rate requirement.
Patent Information
- Application Number
- CN202510408275.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-02
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2045-04-02
AI Technical Summary
In existing high-code-rate single-photon communication systems, the real-time transmission of single-photon time-count sequence data suffers from packet loss, failing to meet the data transmission requirements of the receiving end at the 10Gbps level.
By employing a combination of methods including jumbo frame packetization, virtual concurrent ports, asynchronous non-blocking I/O, and thread pools, high-speed data transmission between the time counter and the computer is achieved through FPGA boards and 10 Gigabit network cards, enabling efficient data reception and storage.
High-speed transmission of single-photon time-counting sequence data was achieved, significantly reducing the data packet loss rate, improving the real-time performance and accuracy of data transmission, and meeting the 10Gbps communication rate requirement.
Smart Images

Figure CN120186104B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of single-photon communication technology, specifically to a high-speed transmission method and apparatus for single-photon time-counting sequence data. Background Technology
[0002] Underwater communication technology has become an indispensable part of building an integrated information network encompassing air, space, land, and sea. Underwater wireless communication technologies mainly include underwater radio communication, underwater acoustic communication, and underwater wireless optical communication. Compared to underwater acoustic and radio communication, underwater wireless optical communication technology has advantages such as high transmission rate, strong anti-interference capability, and good confidentiality. However, traditional underwater optical communication technology is limited by factors such as underwater channel loss, background light noise, and detector thermal noise, making it difficult to achieve stable information transmission at the single-photon level, and its communication distance is limited. Single-photon communication technology can achieve information detection and extraction at the single-photon level, featuring long communication distance, large communication capacity, and strong noise resistance, and has significant application value in fields such as communication.
[0003] like Figure 1 As 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 optical filter removes stray light to obtain the desired modulated optical signal. The optical signal is transmitted to the single-photon detector via optical fiber. By the time the optical signal reaches the single-photon detector, it has attenuated to the single-photon level. The single-photon detector identifies valid photon signals. For each detected photon, the optical signal is converted into a pulse electrical signal and output to the time counter. The time counter marks the time value for the pulse electrical signal and transmits it to the computer via optical fiber. The computer performs discrete Fourier transform processing on the received single-photon time-counting sequence data, uses the frequency domain quantum statistical characteristics of the modulated optical field to obtain the modulation frequency applied at the transmitting end, and then converts the modulation frequency into corresponding data information and outputs and displays it in the original format. Among these, the lossless reception of single-photon time-series data by the computer is one of the important steps in single-photon communication technology and a basic prerequisite for all subsequent data processing.
[0004] In existing technologies, computers mostly employ synchronous blocking network I / O for receiving single-photon time-counting sequence data. While synchronous blocking network I / O is widely used in low-speed communication scenarios due to its simplicity and ease of understanding, when the code rate of a single-photon communication system reaches the 10 Mbps level, the amount of single-photon time-counting sequence data generated by the time counter can reach several gigabits per second. In such high-speed scenarios, the receiver's network I / O rate must reach the 10 Gbps level to receive all data in real-time and completely without errors. In such high-speed scenarios, due to its inherent characteristics, synchronous blocking network I / O blocks the thread calling the function after each call to the receive function, waiting for data to arrive. The function only returns after data is received, followed by operations such as saving to disk, and then continuing to call the receive function, waiting for the next data packet. The receiving and saving operations are relatively time-consuming, potentially leading to delayed responses to rapidly arriving data, packet loss, and impacting subsequent data processing. This can cause deviations or even errors in the demodulated raw information. Therefore, existing technologies cannot meet the data transmission requirements of high-code-rate single-photon communication systems. Summary of the Invention
[0005] This invention aims to solve the problem of real-time transmission of massive (150,000,000 per second) single-photon time-count sequence data (on the order of 10 Gbps) generated by the receiver of a high-bit-rate (above 10 Mbps) single-photon communication system. Therefore, it provides a new method and apparatus for high-speed transmission of single-photon time-count sequence data.
[0006] This invention is achieved using the following technical solution:
[0007] A high-speed transmission method for single-photon time-counting sequence data includes the following steps: 1) A time counter captures single-photon pulse signals and marks the arrival time of the single-photon pulse signals; 2) The time counter assembles the time-series data into giant frame data packets of a certain size; 3) During the giant frame data packet assembly process, the giant frame data packets are sent in a polling manner through virtual concurrent ports, wherein multiple logical network ports are virtualized on each physical link connecting the time counter and the computer, and each giant frame data packet is sent and received cyclically using a different logical network port; 4) A receive buffer queue and a storage buffer queue are set up 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; 5) A receive thread, a sorting thread, and a storage thread are established to wait for data to arrive. 6) Start asynchronous reception and asynchronously receive jumbo frame data packets using non-blocking asynchronous network I / O methods; 7) When a jumbo frame data 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 packets in the corresponding position of the receiving buffer queue. Then, immediately call the asynchronous read function of the socket of the logical network port to receive, read and store the data again. Repeat this process to form a continuous data receiving process for the logical network port; 8) The sorting thread polls to read 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 to read 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 disk all at once.
[0008] Principle Explanation: The high-speed transmission method described above is used for high-speed transmission of single-photon time-series data between a time counter and a computer. Analysis shows that the main factors affecting the high-speed transmission of single-photon time-counting sequence data are: a) the data packet arrival rate is too fast to be received in time; b) multi-threaded reception causes data out-of-order processing; c) the data storage rate is slower than the data reception rate. Therefore, a combination of jumbo frame packet assembly, virtual concurrent ports, asynchronous non-blocking I / O reception, and a thread pool is used to solve the problem of insufficient reception time. The sorting thread solves the data out-of-order problem by polling the receive buffer queue. The double buffering of the receive buffer queue and the centralized writing method, along with centralized writing, solves the mismatch between the data storage and reception rates.
[0009] Furthermore, the time counter is mainly composed of an FPGA. The FPGA board has a built-in 10 Gigabit Ethernet port, and the computer is equipped with a 10 Gigabit Ethernet card. The network card and the time counter are connected by optical fiber, with a physical link bandwidth of 10 Gbps, which meets the communication rate requirements of the single-photon communication system.
[0010] Furthermore, each giant frame data packet is 9012 bytes.
[0011] Furthermore, the physical link between the time counter and the computer is a single optical fiber, with a unique physical receiving port.
[0012] Furthermore, there are four virtual logical network ports on a single optical fiber, and four buffer columns for the receive buffer queue and the storage buffer queue.
[0013] A high-speed transmission device for single-photon time-counting sequence data includes a giant frame packet assembly module and a virtual development port module located within a time counter, as well as 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 thread module, and a hard disk located within a computer. The giant frame packet assembly module is used to assemble time-series data into giant 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 connecting 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. After receiving data, the operating system arbitrarily selects an idle thread from the receiving thread pool to receive and process the data 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 data from 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 all at once.
[0014] Furthermore, the time counter is mainly composed of an FPGA. The FPGA board has a built-in 10 Gigabit Ethernet port, and the computer is equipped with a 10 Gigabit Ethernet card. The network card and the time counter are connected by optical fiber, with a physical link bandwidth of 10 Gbps, which meets the communication rate requirements of the single-photon communication system.
[0015] Furthermore, each giant frame data packet is 9012 bytes.
[0016] Furthermore, the physical link between the time counter and the computer is a single optical fiber, with a unique physical receiving port.
[0017] The beneficial effects of this invention are as follows: 1) Reducing data transmission frequency through jumbo frame packet assembly: Due to the performance limitations of computer network cards, CPUs, and operating systems, each network data packet needs to undergo multiple data copies before reaching the application layer. During the data copying process, subsequent data arriving later may be discarded due to insufficient processing time, resulting in data packet loss. Therefore, this invention uses a method of assembling multiple 4-byte data packets into a 9012-byte jumbo frame. This allows the same number of bytes of payload to be transmitted with the fewest network data packets, significantly reducing the frequency of data transmission on the communication link and effectively alleviating the data receiving pressure at the receiving end, enabling the computer to process each arriving data packet in time; 2) Proposing a "virtual concurrent" port, scalable network I / O performance: The "virtual concurrent" port has only one physical link, but multiple logical network ports are used on a single physical link to simulate a network communication mode where multiple clients concurrently access the server. This virtual concurrent data transmission mode can effectively utilize the real-time response capability of the computer operating system's IOCP model for high-concurrency data communication. In the FPGA of the time counter device, data is sent out in turn through various logic ports, further reducing the data transmission frequency of each logic port and alleviating the data reception pressure of a single computer port, thus achieving high-speed data communication. In addition, according to actual needs, the number of logic ports can be increased on a single physical link (for example, using eight or more logic network ports on a single optical fiber), or multiple physical links can be expanded (for example, connecting four optical fibers 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: This 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, maximizes the concurrent processing capability of multi-core CPUs, and significantly improves the real-time performance and accuracy of data transmission in high-speed, continuous scenarios. Attached Figure Description
[0018] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a schematic diagram of the overall hardware structure of a single-photon communication system.
[0021] Figure 2 A schematic diagram of the structure for high-speed transmission of single-photon time-counting sequence data;
[0022] Figure 3 This is a flowchart of a method for high-speed transmission of single-photon time-counting sequence data. Detailed Implementation
[0023] To better understand the above-mentioned objectives, features, and advantages of the present invention, the solutions of the present invention will be further described below. It should be noted that, unless otherwise specified, the embodiments of the present invention and the features thereof can be combined with each other.
[0024] In this description, it should be noted that the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance. It should also be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "joint" should be interpreted broadly. For example, they can refer to fixed connections, detachable connections, or integral connections; they can refer to mechanical connections or electrical connections; they can refer to direct connections or indirect connections through an intermediate medium; and they can refer to the internal connection between two components. Those skilled in the art can understand the specific meaning of the above terms according to the specific circumstances.
[0025] Many specific details are set forth in the following description in order to provide a full understanding of the invention, but the invention may also be practiced in other ways different from those described herein; obviously, the embodiments in the specification are only some embodiments of the invention, and not all embodiments.
[0026] The specific embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0027] like Figure 3As shown, a high-speed transmission method for single-photon time-counted sequence data includes the following steps: 1) A time counter captures single-photon pulse signals and marks the arrival time (on the order of picoseconds) of the single-photon pulse signals; 2) The time counter assembles the time-series data (4 bytes per photon) into a 9012-byte giant frame data packet; 3) A computer and the time counter are connected via an optical fiber. During the giant frame data packet assembly process, the giant frame data packets are sent in a polling manner through a virtual concurrent port, where the virtual concurrent port is the time counter... Four logical network ports are virtualized on each physical link connecting the device and the computer (in specific implementation, this step sets the IP address to 192.168.1.100, the port numbers to 1111, 2222, 3333, and 4444 respectively, and extends the logical receiving ports to [192.186.1.100, 1111], [192.186.1.100, 2222], [192.186.1.100, 3333], and [192.186.1.1.100, 3333].[100, 4444]), each giant frame data packet is sent and received cyclically using different logical network ports, four logical network ports (ip_addr, The virtual concurrent port performs concurrent data reception, simulating a network model where multiple clients concurrently access the server. This fully leverages the high-performance IOCP model of the operating system for its fast response to high-concurrency I / O. Due to the physical limitations of hardware and operating system performance, the data transmission rate of a single port is restricted, leading to packet loss in high-speed data communication. The virtual concurrent port addresses this limitation by creating multiple virtual logical network ports and sending data through these ports in a round-robin fashion. This fully utilizes the high real-time response performance of the computer's IOCP model for concurrent network data communication, significantly improving the data transmission rate. 4) A receive buffer queue and a storage buffer queue are set up in the computer, with each queue adapted to multiple logical network ports (a large amount of data continuously and rapidly flows in from the network ports, requiring temporary storage space in the computer memory to accommodate slower data storage and prevent data loss). 5) Receive threads, sorting threads, and storage threads are established, each executing independent data operation steps. The threads cooperate to avoid... The main thread gets stuck, so various threads are started to wait for data to arrive; 6) Asynchronous reception is started, and jumbo frame data packets are received asynchronously using non-blocking asynchronous network I / O methods; 7) When a jumbo frame data packet arrives, any idle thread is immediately called from the receiving thread pool to process the received data. That is, the thread pool is used to store the received network data packets in the corresponding position of the receiving buffer queue. Then, the asynchronous read function of the socket of the logical network port is immediately called to receive, read, and store the data. This process is repeated to form a continuous data receiving process for the logical network port; 8) The sorting thread polls to read the data in the receiving 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 disk storage thread; 9) The storage thread polls to read 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 1G bytes, it is written to disk all at once. The disk operation adopts a centralized write method, which reduces the number of disk read and write operations and improves the disk I / O performance.
[0028] Principle Explanation: The high-speed transmission method described above is used for high-speed transmission of single-photon time-series data between a time counter and a computer. Analysis shows that the main factors affecting the high-speed transmission of single-photon time-counting sequence data are: a) the data packet arrival rate is too fast to be received in time; b) multi-threaded reception causes data out-of-order processing; c) the data storage rate is slower than the data reception rate. Therefore, a combination of jumbo frame packet assembly, virtual concurrent ports, asynchronous non-blocking I / O reception, and a thread pool is used to solve the problem of insufficient reception time. The sorting thread solves the data out-of-order problem by polling the receive buffer queue. The double buffering of the receive buffer queue and the centralized writing method, along with centralized writing, solves the mismatch between the data storage and reception rates.
[0029] Furthermore, through the above steps, this method can achieve high-speed transmission of single-photon time-counting sequence data at a rate close to 10Gbps. Actual measurements show that the data is correct and complete.
[0030] In practice, the time counter is mainly composed of an FPGA. The FPGA board has a built-in 10 Gigabit Ethernet port, and the computer is equipped with a 10 Gigabit Ethernet card. The network card and the time counter are connected by optical fiber, with a physical link bandwidth of 10 Gbps, which meets the communication rate requirements of the single-photon communication system.
[0031] In practice, each giant frame data packet is 9012 bytes.
[0032] In practice, the physical link between the time counter and the computer is a single optical fiber, and the physical receiving port is unique.
[0033] In practice, four virtual logical network ports are created on a single optical fiber, and the number of buffer columns for the receive buffer queue and the storage buffer queue is four.
[0034] like Figure 2As shown, a high-speed transmission device for single-photon time-counting sequence data includes a giant frame packet assembly module and a virtual development port module located within a time counter, as well as 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 thread module, and a hard disk located within a computer. The giant frame packet assembly module is used to assemble time-series data into giant 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 connecting 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. After receiving data, the operating system arbitrarily selects an idle thread from the receiving thread pool to receive and process the data 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 data from 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 all at once.
[0035] In practice, the time counter is mainly composed of an FPGA. The FPGA board has a built-in 10 Gigabit Ethernet port, and the computer is equipped with a 10 Gigabit Ethernet card. The network card and the time counter are connected by optical fiber, with a physical link bandwidth of 10 Gbps, which meets the communication rate requirements of the single-photon communication system.
[0036] In practice, each giant frame data packet is 9012 bytes.
[0037] In practice, the physical link between the time counter and the computer is a single optical fiber, and the physical receiving port is unique.
[0038] The above description is merely a specific embodiment of the present invention, enabling those skilled in the art to understand or implement the present invention. Although detailed descriptions have been provided with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments, and they should all be covered within the protection scope of the claims.
Claims
1. A high-speed transmission method for single-photon time-counting sequence data, characterized in that, The process includes the following steps: 1) A time counter captures a single-photon pulse signal and marks its arrival time; 2) The time counter assembles the time-series data into a giant frame data packet of a certain size; 3) During the giant frame data packet assembly process, the giant frame data packets are sent in a polling manner through virtual concurrent ports. These virtual concurrent ports are multiple logical network ports created on each physical link connecting the time counter and the computer, and each giant frame data packet is sent cyclically using a different logical network port; 4) A receive buffer queue and a storage buffer queue are set up in the computer, and each buffer queue in both queues is adapted to multiple logical network ports; 5) A receive thread, a sorting thread, and a storage thread are established to wait for data arrival; 6) Asynchronous reception is initiated. 7) When a giant frame data packet arrives, any idle thread is immediately called from the receiving thread pool to process the received data. That is, the receiving network data packet is stored in the corresponding position of the receiving buffer queue using the thread pool. Then, the asynchronous read function of the socket of the logical network port is immediately called to receive and store the data again. This process is repeated to form a continuous data receiving process for the logical network port. 8) The sorting thread polls to read 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 to read 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 disk all at once.
2. The high-speed transmission method for single-photon time-counting sequence data according to claim 1, characterized in that, The time counter is mainly composed of an FPGA. The FPGA board has a built-in 10 Gigabit Ethernet port, and the computer is equipped with a 10 Gigabit Ethernet card. The network card and the time counter are connected via optical fiber, with a physical link bandwidth of 10 Gbps.
3. The high-speed transmission method for single-photon time-counting sequence data according to claim 2, characterized in that, Each giant frame data packet is 9012 bytes.
4. The high-speed transmission method for single-photon time-counting sequence data according to claim 3, characterized in that, The physical link between the time counter and the computer is a single optical fiber.
5. The high-speed transmission method for single-photon time-counting sequence data according to claim 4, characterized in that, There are four virtual logical network ports on a single optical fiber, and four buffer columns for the receive buffer queue and the storage buffer queue.
Citation Information
Patent Citations
Socket thread pool design method for multi-terminal wireless communication
CN116755863A
Real-time ordered network packet processing method
CN118158178A