The invention provides an elastic optical network based resource distribution method in virtual network mapping and mainly solves a problem of resource distribution based on an electric optical network in virtual network mapping. The specific steps include: 1, forming a virtual network; 2, performing general initiation; 3, performing local initiation; 4, mapping virtual network nodes; 5, calculating virtual network node fitness; 6, recording a mapping result; 7, judging whether the number of ants of each generation is 0 or not; 8, updating an information prime matrix; 9, judging whether the ant generation number is 0 or not; 10, obtaining a final mapping result of the virtual network nodes; 11, mapping a virtual network link. According to the invention, by adopting an adaptive method and a continuous contiguity method, influence on physical network nodes by the virtual network link is evaluated comprehensively, network mapping jam rate and the amount of physical network link resource occupied by the virtual network are reduced, and physical network link load balance is improved.