Photovoltaic (PV) is characterized by random and intermittent. As increasing popularity of PV, it makes PV power prediction increasingly significant for efficiency and stability of the power grid. At present, prediction models of PV power based on deep learning show superior performance, but they ignore the interdependent mechanism of prediction error along the input characteristics of the neural network. This paper proposed a self-attention mechanism (SAM)-based hybrid one-dimensional convolutional neural network (1DCNN) and long short-term memory (LSTM) combined method (named 1DCNN-LSTM-SAM). In the proposed model, SAM redistributes the neural weights in 1DCNN-LSTM, and then 1DCNN-LSTM further extracts the space-time information of effective PV power. The polysilicon PV arrays data in Australia are employed to test and verify the proposed model and other five competition models. The results show that the application of SAM to 1DCNN-LSTM improves the ability to capture the global dependence between inputs and outputs in the learning process and the long-distance dependence of its sequence. In addition, mean absolute percentage error of the 1DCNN-LSTM-SAM under sunny day, partially cloudy day, and cloudy day weather types has increased by 24.2%, 14.4%, and 18.3%, respectively, compared with the best model among the five models. Furthermore, the weight distribution mechanism of self-attention to the back end of LSTM was analyzed quantitatively and the superiority of SAM was verified.