Objectives Focusing on the problem of medical network performance bottlenecks in multiple domains, this paper proposes a federation across domain architecture, an inter-domain routing resource-providing method based on software defined networking (SDN) and a multi-controller minimum cost algorithm, and realizes resource optimization for cross-domain services. Methods Particle swarm optimization (PSO) was used to solve the problem of cross-domain medical network minimum cost. In the basic PSO algorithm, the particles are randomly distributed, with each particle representing a possible solution. The basic framework of the particle swarm algorithm shows that in each generation, each individual has a global optimum value and a historical optimum value. The best values found in the search replace the lesser values, and particles in each iteration adjust their flight direction and speed according to the optimum position. After several iterations comparing the particle’s fitness value, the particle’s speed and position are updated according to the formula. Finally, iteration or termination of the algorithm is carried out depending on the fitness value. Results Experimental results show that in the cross-domain medical network, inter-domain resources are the main cause of network blocking. When the number of domains is fixed, the inter-domain resource optimization algorithm decreases the blocking rate by more than 15% compared to a random strategy network, with the average hop count being about 12% less than with a random strategy, showing the proposed algorithm improves the medical network performance. Conclusions The algorithm proposes a multiple domain vertically integrated inter-domain routing architecture, the realization of a cross-domain business domain between resource optimization, thus achieving optimization of all medical network resources. Acknowledgments This research was financially supported by a project grant from the International Science and Technology Cooperation and Exchange Project of China (Grant No. 2013DEF13130).