Since the output of photovoltaic power generation has a strong intermittency and volatility, the access of large-scale photovoltaic power plants will impact the stability of the power grid, so it is crucial to accurately predict the output of photovoltaics. In addition, because some photovoltaic power plants cannot obtain the relevant numerical weather prediction (NWP) information for power prediction, this poses new challenges to the safe and stable operation of the power grid. On this basis, this paper proposes a power prediction model for distributed photovoltaic power plant based on data sharing and grey relation analysis (GRA) weight optimization. Firstly, the K-means algorithm is used to cluster the output spatial correlation of photovoltaic power plants, and GRA is used to optimize the weight of the reference power station, and the output of the target power station with missing NWP data is predicted by one-dimensional convolutional neural network (1DCNN). According to the example analysis of ten distributed photovoltaic power plants in some cities in Hebei Province, the results show that the RMSE of sunny day prediction is 3.34%, and the RMSE of non-sunny day prediction is 9.15%, which has high accuracy and feasibility, and lays a foundation for the stable operation of the power grid.