CN-116561558-B - Power distribution system abnormality detection method and device, storage medium and computer equipment
Abstract
The invention discloses a power distribution system abnormality detection method, a device, a storage medium and computer equipment. The method comprises the steps of determining input vectors according to time sequence data of a power distribution system in a time window, wherein the length of the time window is seven days, the input vectors respectively correspond to one day of seven days, inputting the input vectors into corresponding day-level attention networks to obtain day-level time feature vectors, wherein the day-level attention networks respectively correspond to one day of seven days, inputting partial vectors in the day-level time feature vectors into a week-level attention network to obtain week-level time feature vectors, wherein the partial vectors are respectively output by different networks in the day-level attention network, and predicting the abnormal probability of the power distribution system at target time according to the day-level time feature vectors and the week-level time feature vectors, wherein the time window comprises target time. The invention solves the technical problem of inaccurate abnormal sensing in the medium-low voltage power distribution system.
Inventors
- JIA DONGQIANG
- XU CHONGCHONG
- WANG JINGHUI
- YANG CHEN
- LI HONGCHUAN
- YAN YUAN
- MA YILAN
- ZHANG CHENQI
- YU DONGXIAO
- ZHENG YANWEI
- CHEN ZEXI
- YANG LIN
- JIN WENJIE
- SUN YUSHU
- YU YANG
- LI YANG
- LIU BOWEN
- SONG XINYU
Assignees
- 国网北京市电力公司
- 国家电网有限公司
- 山东大学
- 中国科学院电工研究所
Dates
- Publication Date
- 20260512
- Application Date
- 20230505
Claims (9)
- 1. A method for detecting anomalies in a power distribution system, comprising: determining an input vector according to time sequence data of a power distribution system in a time window, wherein the length of the time window is seven days, and the input vector corresponds to one day in the seven days; inputting the input vector into a corresponding day-level attention network to obtain a day-level time feature vector, wherein the day-level attention network corresponds to one day of the seven days respectively; inputting part of the daily-level time feature vectors into a week-level attention network to obtain week-level time feature vectors, wherein the part of the daily-level time feature vectors are respectively output by different networks in the daily-level attention network; Predicting the abnormal probability of the power distribution system at a target moment according to the daily time feature vector and the week time feature vector, wherein the time window comprises the target moment; The method comprises the steps of inputting the input vector into a corresponding daily attention network to obtain daily time feature vectors, dividing the input vector into seven groups of vectors according to corresponding dates, wherein each group of vectors in the seven groups of vectors corresponds to one network in the daily attention network, the daily attention network is a multi-head self-attention network, inputting the seven groups of vectors into the corresponding daily attention network respectively, and outputting seven groups of daily vectors corresponding to the seven groups of vectors one by the daily attention network respectively, wherein the daily time feature vectors comprise the seven groups of daily vectors.
- 2. The method of claim 1, wherein inputting a portion of the daily time feature vectors into a weekly level attention network to obtain a weekly level time feature vector, comprising: Selecting a daily time feature vector from each of the seven groups of daily time feature vectors to obtain the partial vector, wherein the partial vector comprises a target daily time feature vector corresponding to the target moment; Constructing a peripheral network input matrix of the Zhou Ji attention network according to the partial vector, wherein the Zhou Ji attention network is the multi-head self-attention network; And inputting the week level network input matrix into the Zhou Ji attention network to obtain the week level time feature vector, wherein the week level time feature vector comprises a target week level time feature vector corresponding to the target day level time feature vector.
- 3. The method of claim 2, wherein inputting the peri-network input matrix into the Zhou Ji attention network results in the peri-temporal feature vector, comprising: projecting the peripherical network input matrix to queries, keys and values; Executing an attention function and applying a scaled dot product method based on the query, the key and the value, resulting in respective multi-headed outputs of the Zhou Ji attention network; and determining the cycle time feature vector according to the multi-head output of each of the Zhou Ji attention networks.
- 4. The method of claim 2, wherein predicting the probability of anomaly of the power distribution system at the target time instant from the day-level time feature vector and the week-level time feature vector, wherein the time window includes the target time instant, comprises: Constructing a joint feature vector corresponding to the target moment according to the target daily time feature vector and the target week time feature vector; and predicting the abnormal probability of the power distribution system at the target moment according to the joint feature vector.
- 5. The method of claim 4, wherein predicting the probability of anomaly of the power distribution system at the target time based on the joint feature vector comprises: and inputting the joint feature vector into a pre-trained multi-layer perceptron network to obtain the anomaly probability, wherein the multi-layer perceptron network comprises a sigmoid activation function.
- 6. The method of any one of claims 1 to 5, wherein determining the input vector from time series data of the power distribution system over a time window comprises: acquiring the time sequence data and data sequence information corresponding to the time sequence data; Determining an input embedded vector according to the time sequence data; determining a position coding vector according to the data sequence information, wherein the position coding vector is the same as the dimension of the input embedded vector; And determining the input vector according to the input embedded vector and the position coding vector.
- 7. An abnormality detection device for a power distribution system, comprising: The input module is used for determining input vectors according to time sequence data of the power distribution system in a time window, wherein the length of the time window is seven days, and the input vectors respectively correspond to one day of the seven days; The first feature extraction module is used for inputting the input vector into a corresponding daily attention network to obtain daily time feature vectors, wherein the daily attention network corresponds to one day of the seven days; The second feature extraction module is used for inputting part of vectors in the daily-level time feature vector into a week-level attention network to obtain a week-level time feature vector, wherein the part of vectors are respectively output by different networks in the daily-level attention network; The prediction module is used for predicting the abnormal probability of the power distribution system at a target moment according to the daily time feature vector and the weekly time feature vector, wherein the time window comprises the target moment; The first feature extraction module is further configured to divide the input vector into seven groups of vectors according to corresponding dates, where each group of vectors in the seven groups of vectors corresponds to one network in the daily level attention network, the daily level attention network is a multi-head self-attention network, the seven groups of vectors are respectively input into the corresponding daily level attention network, and the daily level attention network respectively outputs seven groups of daily level vectors corresponding to the seven groups of vectors one to one, where the daily level time feature vectors include the seven groups of daily level vectors.
- 8. A nonvolatile storage medium, characterized in that the nonvolatile storage medium includes a stored program, wherein the program, when run, controls a device in which the nonvolatile storage medium is located to execute the power distribution system abnormality detection method according to any one of claims 1 to 6.
- 9. A computer device comprising a memory for storing a program and a processor for executing the program stored in the memory, wherein the program executes the power distribution system abnormality detection method according to any one of claims 1 to 6.
Description
Power distribution system abnormality detection method and device, storage medium and computer equipment Technical Field The invention relates to the field of power distribution detection, in particular to a power distribution system abnormality detection method, a device, a storage medium and computer equipment. Background In order to support the perception and defense of the running risk of the medium-low voltage power distribution system, the time series data generated by the medium-low voltage power distribution system can be subjected to data mining, and real-time anomaly detection is carried out on the time series data so as to discover the anomaly condition in time and early warn. Among other key challenges for univariate time series anomaly detection is how to model complex nonlinear time dependencies. However, the modeling scheme proposed in the related art cannot well predict anomalies in the medium-low voltage distribution system, and often has a problem of anomaly identification errors. In view of the above problems, no effective solution has been proposed at present. Disclosure of Invention The embodiment of the invention provides a power distribution system abnormality detection method, a device, a storage medium and computer equipment, which are used for at least solving the technical problem of inaccurate abnormality sensing in a medium-low voltage power distribution system. According to one aspect of the embodiment of the invention, an abnormality detection method of a power distribution system is provided, which comprises the steps of determining input vectors according to time sequence data of the power distribution system in a time window, wherein the length of the time window is seven days, the input vectors respectively correspond to one day of the seven days, inputting the input vectors into corresponding day-level attention networks to obtain day-level time feature vectors, wherein the day-level attention networks respectively correspond to one day of the seven days, inputting partial vectors in the day-level time feature vectors into a week-level attention network to obtain week-level time feature vectors, wherein the partial vectors are respectively output by different networks in the day-level attention networks, and predicting abnormality probability of the power distribution system at a target moment according to the day-level time feature vectors and the week-level time feature vectors, wherein the time window comprises the target moment. Optionally, inputting the input vector into a corresponding daily attention network to obtain a daily time feature vector, wherein the input vector is divided into seven groups of vectors according to corresponding dates, each group of vectors in the seven groups of vectors corresponds to one network in the daily attention network, the daily attention network is a multi-head self-attention network, the seven groups of vectors are respectively input into the corresponding daily attention network, and seven groups of daily vectors which are respectively output by the daily attention network and are in one-to-one correspondence with the seven groups of vectors are respectively output, wherein the daily time feature vector comprises the seven groups of daily vectors. Optionally, inputting part of the daily time feature vectors into a cycle attention network to obtain cycle time feature vectors, wherein the cycle time feature vectors are obtained by selecting one daily time feature vector from the seven groups of daily time feature vectors respectively, the part of the daily time feature vectors comprise target daily time feature vectors corresponding to the target time, constructing a cycle network input matrix of the Zhou Ji attention network according to the part of the daily time feature vectors, wherein the Zhou Ji attention network is the multi-head self-attention network, inputting the cycle network input matrix into the Zhou Ji attention network to obtain cycle time feature vectors, and the cycle time feature vectors comprise target cycle time feature vectors corresponding to the target daily time feature vectors. Optionally, inputting the week level network input matrix into the Zhou Ji attention network to obtain the week level time feature vector comprises projecting the week level network input matrix to a query Q ', a key K' and a value V ', executing an attention function according to the query Q', the key K 'and the value V' and applying a scaling dot product method to obtain respective multi-headed output heads h 'of the Zhou Ji attention network, and determining the week level time feature vector according to respective multi-headed output heads h' of the Zhou Ji attention network. Optionally, according to the daily time feature vector and the weekly time feature vector, the abnormal probability of the power distribution system at the target moment is predicted, wherein the time window comprises the target moment, a joint feature v