In response to the suboptimal efficiency observed in the network configuration and administration of 5G photovoltaic base stations (PVBSs), as well as the inherent limitations in accurately forecasting photovoltaic power during inclement weather conditions, this research article introduces a concise and effective method for short‐term power prediction of PVBSs when subjected to non‐sunny weather conditions, leveraging the paradigm of software defined networking. This method ingeniously amalgamates the improved Northern Goshawk optimized back propagation neural network (INGO‐BP) and recurrent generative adversarial networks (RGAN). The investigation commences by delineating a comprehensive PVBS system framework underpinned by SDN principles. Subsequently, it employs the Pearson correlation coefficient technique and principal component analysis for the judicious selection of pertinent features from the PVBS photovoltaic dataset, thereby ameliorating the issue of multicollinearity within the predictive model. To culminate the research endeavour, the INGO algorithm is enlisted to optimize the weightings and bias parameters of the BP neural network, while RGAN is harnessed for the acquisition of distinctive distribution patterns in photovoltaic data across diverse meteorological conditions. This augmentation enhances the model's capacity to discern the intricate long‐term mappings between photovoltaic power and meteorological data. The empirical findings substantiate the elevated accuracy of the INGO‐BP prediction model across sunny, cloudy, and rainy weather conditions, with a discernible enhancement in predictive accuracy for PVBS performance under non‐sunny weather conditions facilitated by data augmentation via RGAN.