The invention relates to the technical field of IP positioning, and discloses a multi-target
anycast IP positioning method. The method comprises the following steps: determining an
anycast IP address to be positioned and a total detection resource number; generating an ordered probe set; allocating the same number of detection resources for each
anycast IP address, selecting a corresponding number of probes for detection, obtaining RTT values, and obtaining a coordinate pair set through a positioning
algorithm; fitting a utility curve according to the coordinate pair set, and calculating a corresponding
gradient function and a utility gradient value of the
gradient function under the quantity of allocated detection resources in the previous round; based on the utility gradient value, allocating the rest to-be-allocated resources to obtain an allocation scheme; based on the allocation scheme, the anycast
IP address is located. According to the method, the detection resources can be dynamically allocated in batches, the multiple anycast IP addresses are positioned based on the positioning
algorithm, the consumed detection resources are few, the
utilization rate of the detection resources and the positioning efficiency of the anycast IP are high, and the detection cost and time consumption are low.