Fully exploiting the reactive power support capability of the distributed photovoltaic power supply is helpful to solve the problems of voltage fluctuation, voltage overlimit and new energy consumption in the distribution network. However, the reactive power output of the photovoltaic power supply will seriously threaten the reliable operation of the photovoltaic inverter. Therefore, this paper proposes a data-driven voltage-reactive optimization control strategy considering the reliability of the photovoltaic inverter. Firstly, the data-driven model is used to calculate the insulated gate bipolar transistor junction temperature, which improves the calculation efficiency of the insulated gate bipolar transistor junction temperature and reduces the dependence of the evaluation accuracy on the insulated gate bipolar transistor parameters. Then, the voltage-reactive optimization control model of the distribution network considering the reliability of the photovoltaic inverter is established, and the average junction temperature and junction temperature fluctuation of the insulated gate bipolar transistor are introduced into the model optimization goal. The optimization model is transformed into the reinforcement learning task, and then the deep deterministic policy gradient algorithm is used to realize voltage-reactive control. According to the simulation of IEEE 33 node distribution system, the proposed strategy can increase the minimum and average insulated gate bipolar transistor lifetime of all nodes by 6 years and 4 years. At the same time, it can reduce the minimum and average levelized cost of energy of all nodes by 0.1095 $/W and 0.0318 $/W.