This application relates to a near-field scanning method, apparatus,
computer device, storage medium, and program product. For each grid point to be divided in a two-dimensional uniform network of an electronic
device under test (EDT), the offset between the grid point to be divided and a preset starting grid point of the two-dimensional uniform network is determined. Based on a preset exponential function, a first exponential function value is determined, with each parameter within a parameter range corresponding to a target threshold as the exponent. A first ratio between the offset and each first exponential function value is determined, and the parameter corresponding to the largest integer first ratio is determined as the target parameter. The grid points to be divided are then divided into a set according to the target parameter and the target threshold. Based on the set obtained after dividing each grid point, a near-field scan of the EDT is performed. The embodiments of this application employ an equivalence class partitioning method to divide the grid points, allowing multiple grid points to be divided to be processed in parallel, thus improving the efficiency of grid point partitioning.