With the development of renewable energy technology and the pursuit of sustainable development in the construction industry, the design of direct-soft photovoltaic systems integrated with buildings has become an important research direction. In this paper, a variety of photovoltaic power generation modules are selected and combined with building roof functions to design a solar photovoltaic building integration system. In addition, this paper constructs a multi-objective optimization configuration model, improves the multi-objective particle swarm algorithm, and analyzes the optimization effect of the improved particle swarm algorithm on the photovoltaic building integration system by using multiple sets of test functions and evaluation indexes, combined with a number of experiments. The improved particle swarm algorithm in this paper converges to the optimal value of 0.21 when iterating to 25 rounds. And with the increase of the number of nodes, the optimized particle swarm algorithm, the distribution of node voltages in the vicinity of the standard voltage. The PV building integrated system designed in this paper still has a generation output efficiency higher than 85% after 20 years, which shows good stability of power generation. And the power generation in its whole life cycle is about 1645710kwh, which greatly reduces the consumption of conventional energy. In conclusion, the PV building integrated system in this paper not only has significant advantages in terms of capacity efficiency, but also shows strong potential for environmental protection.