The invention provides a radio astronomical data real-time acquisition and
processing method based on an XDP. Comprising the steps that 1, an XDP program is constructed and compiled into eBPF
byte codes, and the XDP program
byte codes are loaded to a kernel; 2, analyzing a
processing path of a kernel
protocol stack data packet, and establishing a zero-copy and network
protocol stack bypass astronomical data real-time acquisition and
processing mechanism based on an XDP redirection function; step 3, in a
user space data real-time acquisition processing program, creating a socket of an AFXDP type, and constructing a UMEM memory buffer area to capture a UDP sampling data message redirected by an XDP program in real time; and 4, constructing a
memory pool, analyzing the sampling data message, storing the sampling data part in the UDP message into the
memory pool, and reading the
memory pool and carrying out real-
time data processing by the
CUDA thread. According to the invention, a frame for real-time acquisition and processing of radio astronomical data is constructed based on the XDP, the load on memory
copying is reduced, and the processing performance of astronomical
observation data in each key stage is accelerated.