1. A zonal underground structure detection method based on sun shadow compensation, wherein the method comprises steps of: (1) determining latitude and longitude information of an area to be detected according to a geographic position of the area to be detected, then calculating a latitude step size and a longitude step size according to the resolution of an infrared remote sensing image, acquiring altitude information of the area to be detected according to the latitude and longitude information and the latitude step size and longitude step size of the area to be detected, and finally correcting the obtained altitude information to generate a corrected altitude image; (2) rotating the corrected altitude image by using solar azimuth angle information, calculating a ratio of a mountain body to a mountain shadow according to solar altitude angle information, determining a size and a position of a shadow in the altitude image, and processing the rotated altitude image to obtain a shadow position labeled image; (3) performing dilation processing on the obtained shadow position labeled image, and compensating a dilated shadow area; and (4) performing preliminary detection and identification on the infrared remote sensing image in which the shadow area has been compensated, and then performing a secondary judgment by using position correlation, to detect a zonal underground structure.