A method for optimizing the layout of electronic components of PCB board based on sequence pair representation is proposed. Starting from three aspects of heat conduction, heat convection and heat radiation, the PCB board level thermal analysis is carried out, and combined with the specific action mechanism of the three, the optimization goal of PCB electronic component layout is to set a reasonable number and area of heat dissipation channels, optimize the arrangement and spacing of components, and minimize the role of heat on the PCB board. In the specific optimization stage, the relationship between the high power components and their fins or fans is taken as a sequence pair, the minimum spacing and directionality are taken as constraints, and particle swarm optimization is used to solve the optimal layout. In the test results, although the PCB board temperature also showed a steady upward trend with the increase of continuous operation time, it was always stable within 26.0 ℃, and there was no obvious high temperature.