To ensure the safety of the massive growth of distributed photovoltaic grid-connected inverters and the security of backhaul data in the context of new power systems, research on anomaly detection has also been put on the agenda. The data of the photovoltaic grid-connected inverter has complex time dependence and uncertainty, and the data security problem is prone to occur in the process of data transmission, and the existing anomaly detection means do not comprehensively consider these factors, and cannot timely find the abnormal phenomena caused by the synthesis of data security and their faults, which leads to the tampering of power data and the increase of operation and maintenance costs. To solve the above problems, an anomaly detection method integrating a long short-term memory network (LSTM) and serial depth autoencoder (DAE) is proposed based on edge computing, characterized by the power and voltage of the device, the length, and the delay of the data. Firstly, the method performed time series transformation processing on the original training dataset through the sliding window. Then, the model was trained using LSTM and DAE. Finally, the decoding error of the test data was compared with the threshold obtained by the training. The example verification shows that the model has achieved good performance in the recall rate, accuracy rate and F1 score, and can effectively detect the equipment that produces its fault or data return abnormality in the photovoltaic inverter. So, the model has good industrial practical value.