






技术领域technical field
本发明涉及电力技术领域,尤其涉及一种基于神经网络的配电网线路向量化方法及装置。The invention relates to the field of electric power technology, in particular to a method and device for line vectorization of a distribution network based on a neural network.
背景技术Background technique
智能电网是目前电力领域的发展方向,但目前仍处于概念、起步阶段。智能电网是建立在集成的、高速双向通信网络的基础上,通过先进的传感和测量技术、先进的设备技术、先进的控制方法以及先进的决策支持系统技术的应用,实现电网的可靠、安全、经济、高效、环境友好和使用安全的目标,其主要特征包括自愈、激励和保护用户、抵御攻击、提供满足用户需求的电能质量、容许各种不同发电形式的接入。而要实现智能电网的部分功能,发电形式的接入、传输风险的分析、电力转供的分析等,均需要对配电网进行数据化;而目前存在的一些配电网建模方式往往都是单纯的针对配电网中某一特定的问题进行建模分析;获得的电网数据化特征难以对配电网的整体特征进行有效的表达,即难以准确的表示配电网的特征信息,从而使得不能得到准确的分析结果。Smart grid is the current development direction of the electric power field, but it is still in the concept and initial stage. Smart grid is built on the basis of integrated, high-speed two-way communication network. Through the application of advanced sensing and measurement technology, advanced equipment technology, advanced control method and advanced decision support system technology, the reliability and safety of the power grid can be realized. , economical, efficient, environmentally friendly and safe to use, and its main characteristics include self-healing, motivating and protecting users, resisting attacks, providing power quality that meets user needs, and allowing access to various forms of power generation. In order to realize some functions of the smart grid, the access of power generation, the analysis of transmission risks, the analysis of power transfer, etc., all need to digitize the distribution network; and some existing distribution network modeling methods are often It is purely for modeling and analysis of a specific problem in the distribution network; the obtained power grid data features are difficult to effectively express the overall characteristics of the distribution network, that is, it is difficult to accurately represent the characteristic information of the distribution network. Makes it impossible to obtain accurate analysis results.
因此,目前仍缺乏一种能够准确表示配电网特征数据化方法。Therefore, there is still a lack of a data-based method that can accurately represent the characteristics of the distribution network.
发明内容SUMMARY OF THE INVENTION
鉴于上述问题,本发明提出了一种基于神经网络的配电网线路向量化方法及装置,能够对准确的表示配电网的特征信息,从而提高配电网数据分析或故障预测的结果。In view of the above problems, the present invention proposes a method and device for quantizing distribution network lines based on neural network, which can accurately represent the characteristic information of the distribution network, thereby improving the results of distribution network data analysis or fault prediction.
第一方面,本申请通过本申请的一实施例提供如下技术方案:In the first aspect, the present application provides the following technical solutions through an embodiment of the present application:
一种基于神经网络的配电网线路向量化方法,包括:A neural network-based distribution network line vectorization method, comprising:
基于配电网的传输线以及电气设备之间的连接关系,构建图模型;其中,所述传输线作为所述图模型中的节点,所述传输线的连接作为所述图模型的边,所述电气设备作为所述图模型的注入;A graph model is constructed based on the connection relationship between transmission lines of the distribution network and electrical equipment; wherein, the transmission line is used as a node in the graph model, the connection of the transmission line is used as an edge of the graph model, and the electrical equipment as an injection of the graph model;
基于所述图模型,获取目标传输线分别对应的注入特征向量、线路邻接矩阵以及注入邻接矩阵;其中,所述目标传输线为任一节点对应的传输线;所述注入特征向量表示所述目标传输线的属性以及对应的注入;所述线路邻接矩阵表示所述目标传输线与相邻传输线之间的连接关系;所述注入邻接矩阵表示注入与所述目标传输线之间的连接关系;Based on the graph model, the injection eigenvector, line adjacency matrix and injection adjacency matrix corresponding to the target transmission line are obtained respectively; wherein, the target transmission line is the transmission line corresponding to any node; the injection eigenvector represents the attribute of the target transmission line and the corresponding injection; the line adjacency matrix represents the connection relationship between the target transmission line and the adjacent transmission line; the injection adjacency matrix represents the connection relationship between the injection and the target transmission line;
基于神经网络,将所述注入特征向量以及所述注入邻接矩阵在所述图模型的节点进行特征嵌入,获得所述目标传输线的第一线路特征向量;其中,所述第一线路特征向量包含所述目标传输线与所述注入的连接关系;Based on a neural network, feature embedding is performed on the injected feature vector and the injected adjacency matrix at the nodes of the graph model to obtain the first line feature vector of the target transmission line; wherein, the first line feature vector includes the the connection relationship between the target transmission line and the injection;
基于所述线路邻接矩阵对所述第一线路特征向量进行更新,获得所述目标传输线的第二线路特征向量。The first line eigenvector is updated based on the line adjacency matrix to obtain a second line eigenvector of the target transmission line.
优选地,所述注入特征向量的获取,包括:Preferably, the acquisition of the injection feature vector includes:
基于所述注入的类型,获得所述注入的消耗和所述注入的生产;其中,所述注入的消耗为消耗电能的电气设备,所述注入的生成为生产电能的电气设备;Based on the type of the injection, the consumption of the injection and the production of the injection are obtained; wherein the consumption of the injection is an electrical device that consumes electrical energy and the generation of the injection is an electrical device that produces electrical energy;
将所述目标传输线的属性、所述注入的消耗和所述注入的生产均表示为二维信息;Representing the properties of the target transmission line, the consumption of the injection, and the production of the injection as two-dimensional information;
基于所述目标传输线的属性、所述注入的消耗和所述注入的生产对应的二维信息,获得所述注入特征向量。The injection feature vector is obtained based on the properties of the target transmission line, the consumption of the injection, and the two-dimensional information corresponding to the production of the injection.
优选地,所述线路邻接矩阵包括起点邻接矩阵和终点邻接矩阵;所述线路邻接矩阵的获取,包括:Preferably, the line adjacency matrix includes a start point adjacency matrix and an end point adjacency matrix; the acquisition of the line adjacency matrix includes:
基于所述图模型,将所述目标传输线确定为双极对象;其中,所述双极对象表示所述目标传输线具有起点和终点;Based on the graphical model, the target transmission line is determined as a bipolar object; wherein, the bipolar object indicates that the target transmission line has a start point and an end point;
基于所述目标传输线的起点的第一连接信息,获得所述起点邻接矩阵;其中,所述第一连接信息包括:所述目标传输线的起点与相邻传输线的起点连接,以及所述目标传输线的起点与相邻传输线的终点连接;Based on the first connection information of the starting point of the target transmission line, the starting point adjacency matrix is obtained; wherein, the first connection information includes: the starting point of the target transmission line is connected with the starting point of the adjacent transmission line, and the starting point of the target transmission line is connected. The start point is connected with the end point of the adjacent transmission line;
基于所述目标传输线的终点的第二连接信息,获得所述终点邻接矩阵;其中,所述第二连接信息包括:所述目标传输线的终点与相邻传输线的起点连接,以及所述目标传输线的终点与相邻传输线的终点连接。The end point adjacency matrix is obtained based on the second connection information of the end point of the target transmission line; wherein the second connection information includes: the end point of the target transmission line is connected with the start point of the adjacent transmission line, and the end point of the target transmission line is connected The end point is connected to the end point of the adjacent transmission line.
优选地,所述注入邻接矩阵的获取,包括:Preferably, the acquisition of the injected adjacency matrix includes:
基于所述目标传输线与所述注入的第三连接信息,获得所述注入邻接矩阵;其中,所述第三连接信息包括:所述注入与所述目标传输线的起点连接,以及所述注入与所述目标传输线的终点连接。The injection adjacency matrix is obtained based on third connection information between the target transmission line and the injection; wherein the third connection information includes: the injection is connected to the starting point of the target transmission line, and the injection is connected to the injection. the destination connection of the target transmission line.
优选地,所述基于所述线路邻接矩阵对所述第一线路特征向量进行更新,获得所述目标传输线的第二线路特征向量,包括:Preferably, the updating of the first line eigenvector based on the line adjacency matrix to obtain the second line eigenvector of the target transmission line includes:
基于所述起点邻接矩阵和所述终点邻接矩阵分别与第一保留信息的乘积的和,获得第一传播信息;其中,所述第一保留信息为所述第一线路特征向量;First propagation information is obtained based on the sum of the products of the start point adjacency matrix and the end point adjacency matrix respectively and the first reserved information; wherein, the first reserved information is the first line feature vector;
基于所述第一传播信息和所述第一保留信息的和,获得第二保留信息;obtaining second reserved information based on the sum of the first broadcast information and the first reserved information;
基于所述起点邻接矩阵和所述终点邻接矩阵分别与所述第二保留信息的乘积的和,获得第二传播信息;Obtain second propagation information based on the sum of the products of the start point adjacency matrix and the end point adjacency matrix respectively and the second reserved information;
基于所述第二传播信息和所述第二保留信息的和继续对所述第二保留信息进行迭代更新,直至获得所述第二线路特征向量。Iteratively update the second reserved information based on the sum of the second propagation information and the second reserved information until the second line feature vector is obtained.
优选地,所述基于神经网络,将所述注入特征向量以及所述注入邻接矩阵在所述图模型的节点进行特征嵌入,获得所述目标传输线的第一线路特征向量,包括:Preferably, based on the neural network, feature embedding is performed on the injected feature vector and the injected adjacency matrix at the nodes of the graph model to obtain the first line feature vector of the target transmission line, including:
基于神经网络,将所述注入特征向量映射到d维空间中,获得d维向量;其中,d为大于2的整数;Based on the neural network, the injected feature vector is mapped into the d-dimensional space to obtain a d-dimensional vector; wherein, d is an integer greater than 2;
将所述d维向量右乘于所述注入邻接矩阵,获得所述第一线路特征向量。The first line feature vector is obtained by right multiplying the d-dimensional vector by the injection adjacency matrix.
优选地,所述基于神经网络,将所述注入特征向量映射到d维空间中,获得d维向量,包括:Preferably, based on the neural network, the injected feature vector is mapped into a d-dimensional space to obtain a d-dimensional vector, including:
基于神经元个数分别为(din,10,d)的三层神经网络,将所述注入特征向量映射到d维空间中,获得d维向量;其中,din为所述注入特征向量的维数。Based on the three-layer neural network with the number of neurons (din , 10, d), the injected feature vector is mapped to the d-dimensional space to obtain a d-dimensional vector; wherein,din is the injected feature vector of dimension.
第二方面,基于同一发明构思,本申请通过本申请的一实施例提供如下技术方案:In the second aspect, based on the same inventive concept, the present application provides the following technical solutions through an embodiment of the present application:
一种基于神经网络的配电网线路向量化装置,包括:A neural network-based distribution network line vectorization device, comprising:
图模型构建模块,用于基于配电网的传输线以及电气设备之间的连接关系,构建图模型;其中,所述传输线作为所述图模型中的节点,所述传输线的连接作为所述图模型的边,所述电气设备作为所述图模型的注入;A graph model building module is used to build a graph model based on the connection relationship between transmission lines of the distribution network and electrical equipment; wherein, the transmission line is used as a node in the graph model, and the connection of the transmission line is used as the graph model the edge of the electrical device as the injection of the graph model;
特征获取模块,用于基于所述图模型,获取目标传输线分别对应的注入特征向量、线路邻接矩阵以及注入邻接矩阵;其中,所述目标传输线为任一节点对应的传输线;所述注入特征向量表示所述目标传输线的属性以及对应的注入;所述线路邻接矩阵表示所述目标传输线与相邻传输线之间的连接关系;所述注入邻接矩阵表示注入与所述目标传输线之间的连接关系;The feature acquisition module is used to obtain the injection eigenvector, line adjacency matrix and injection adjacency matrix corresponding to the target transmission line respectively based on the graph model; wherein, the target transmission line is the transmission line corresponding to any node; the injection eigenvector represents The properties of the target transmission line and the corresponding injection; the line adjacency matrix represents the connection relationship between the target transmission line and the adjacent transmission line; the injection adjacency matrix represents the connection relationship between the injection and the target transmission line;
注入嵌入模块,用于基于神经网络,将所述注入特征向量以及所述注入邻接矩阵在所述图模型的节点进行特征嵌入,获得所述目标传输线的第一线路特征向量;其中,所述第一线路特征向量包含所述目标传输线与所述注入的连接关系;The injection embedding module is used for embedding the injection feature vector and the injection adjacency matrix at the nodes of the graph model based on the neural network to obtain the first line feature vector of the target transmission line; A line feature vector includes the connection relationship between the target transmission line and the injection;
特征向量获取模块,用于基于所述线路邻接矩阵对所述第一线路特征向量进行更新,获得所述目标传输线的第二线路特征向量。A feature vector obtaining module, configured to update the first line feature vector based on the line adjacency matrix to obtain a second line feature vector of the target transmission line.
优选地,所述特征获取模块,具体用于:Preferably, the feature acquisition module is specifically used for:
基于所述注入的类型,获得所述注入的消耗和所述注入的生产;其中,所述注入的消耗为消耗电能的电气设备,所述注入的生成为生产电能的电气设备;Based on the type of the injection, the consumption of the injection and the production of the injection are obtained; wherein the consumption of the injection is an electrical device that consumes electrical energy and the generation of the injection is an electrical device that produces electrical energy;
将所述目标传输线的属性、所述注入的消耗和所述注入的生产均表示为二维信息;Representing the properties of the target transmission line, the consumption of the injection, and the production of the injection as two-dimensional information;
基于所述目标传输线的属性、所述注入的消耗和所述注入的生产对应的二维信息,获得所述注入特征向量。The injection feature vector is obtained based on the properties of the target transmission line, the consumption of the injection, and the two-dimensional information corresponding to the production of the injection.
第三方面,基于同一发明构思,本申请通过本申请的一实施例提供如下技术方案:In the third aspect, based on the same inventive concept, the present application provides the following technical solutions through an embodiment of the present application:
一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现上述第一方面中任一项所述方法的步骤。A computer-readable storage medium having a computer program stored thereon, when the program is executed by a processor, implements the steps of the method in any one of the above-mentioned first aspects.
本发明实施例提供的一种基于神经网络的配电网线路向量化方法,通过对配电网的传输线以及电气设备之间的连接关系构建为图模型;并且将传输线作为图模型中的节点,传输线的连接作为图模型的边,电气设备作为图模型的注入,从而将配电网中的传输线以及传输线的连接关系进行了抽象表达;进一步的,基于图模型,获取目标传输线分别对应的注入特征向量、线路邻接矩阵以及注入邻接矩阵,通过注入特征向量、线路邻接矩阵以及注入邻接矩阵就可将目标传输线对应的属性,对应连接的注入以及邻接的传输线进行抽象,数据化;最后,基于神经网络,将注入特征向量以及注入邻接矩阵在所述图模型的节点进行特征嵌入,获得目标传输线的第一线路特征向量,使得第一线路特征向量中包含目标传输线对应的属性、对应连接的注入相关的特征,并且由于采用神经网络的方式进行的特征嵌入,使得获取的数据具有更好的稳定性,不易失真;最后基于线路邻接矩阵对第一线路特征向量进行更新,获得目标传输线的第二线路特征向量,在第二线路特征向量中不仅包含了目标传输线的属性特征、注入和目标传输线的连接信息,还包含了目标传输线与相邻传输线的邻接信息;因此,使用第二线路特征向量就可对配电网的细节特征进行加准确的表示,并且充分考虑了配电网中传输线特征的复杂性,使得配电网可数据化后得到的第二线路特征向量可广泛的应用于线路故障、电力转供等场景下的数据分析与预测,并且具备更高的准确度。A neural network-based distribution network line vectorization method provided by the embodiment of the present invention constructs a graph model by constructing the connection relationship between transmission lines of the distribution network and electrical equipment; and uses the transmission line as a node in the graph model, The connection of the transmission line is used as the edge of the graph model, and the electrical equipment is used as the injection of the graph model, so that the transmission line in the distribution network and the connection relationship of the transmission line are abstractly expressed; further, based on the graph model, the injection characteristics corresponding to the target transmission lines are obtained. Vector, line adjacency matrix and injection adjacency matrix. By injecting eigenvectors, line adjacency matrix and injection adjacency matrix, the corresponding attributes of the target transmission line, the injection of the corresponding connection and the adjacent transmission lines can be abstracted and digitized; finally, based on neural network , perform feature embedding on the node of the graph model with the injection eigenvector and the injection adjacency matrix to obtain the first line eigenvector of the target transmission line, so that the first line eigenvector includes the attributes corresponding to the target transmission line and the injection-related properties of the corresponding connection. And because of the feature embedding in the way of neural network, the obtained data has better stability and is not easy to be distorted; finally, the first line feature vector is updated based on the line adjacency matrix, and the second line feature of the target transmission line is obtained. Vector, in the second line feature vector, not only the attribute characteristics of the target transmission line, the injection and connection information of the target transmission line, but also the adjacency information of the target transmission line and the adjacent transmission line; therefore, using the second line feature vector can The detailed characteristics of the distribution network are accurately represented, and the complexity of the transmission line characteristics in the distribution network is fully considered, so that the second line feature vector obtained after the distribution network can be digitized can be widely used in line faults, power Data analysis and prediction in scenarios such as transfer, and have higher accuracy.
上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。The above description is only an overview of the technical solutions of the present invention, in order to be able to understand the technical means of the present invention more clearly, it can be implemented according to the content of the description, and in order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand , the following specific embodiments of the present invention are given.
附图说明Description of drawings
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本发明的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are for the purpose of illustrating preferred embodiments only and are not to be considered limiting of the invention. Also, the same components are denoted by the same reference numerals throughout the drawings. In the attached image:
图1示出了本发明第一实施例提供的一种基于神经网络的配电网线路向量化方法的流程图;1 shows a flowchart of a method for quantizing distribution network lines based on a neural network provided by the first embodiment of the present invention;
图2示出了本发明第二实施例提供的一种基于神经网络的配电网线路向量化装置的功能模块框图;2 shows a functional block diagram of a neural network-based distribution network line vectorization device provided by the second embodiment of the present invention;
图3示出了本发明第三实施例提供的一种配电网线路故障定位方法的流程图;3 shows a flowchart of a method for locating a line fault in a distribution network provided by a third embodiment of the present invention;
图4示出了本发明第三实施例中示例性的配电网的图模型构建过程示意图;FIG. 4 shows a schematic diagram of a graph model building process of an exemplary distribution network in the third embodiment of the present invention;
图5示出了本发明第三实施例中示例性的特征嵌入过程示意图;FIG. 5 shows a schematic diagram of an exemplary feature embedding process in the third embodiment of the present invention;
图6示出了本发明第三实施例中示例性的线路特征向量迭代更新的示意图;6 shows a schematic diagram of an exemplary iterative update of the line feature vector in the third embodiment of the present invention;
图7示出了本发明第四实施例提供的一种一种配电网线路故障定位装置的功能模块框图。FIG. 7 shows a functional block diagram of a power distribution network line fault location device provided by the fourth embodiment of the present invention.
具体实施方式Detailed ways
下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided so that the present disclosure will be more thoroughly understood, and will fully convey the scope of the present disclosure to those skilled in the art.
第一实施例first embodiment
请参见图1,本发明第一实施例提供了一种基于神经网络的配电网线路向量化方法,图1示出了该基于神经网络的配电网线路向量化方法的流程图。Referring to FIG. 1 , a first embodiment of the present invention provides a method for quantizing distribution network lines based on a neural network, and FIG. 1 shows a flowchart of the method for quantizing distribution network lines based on neural networks.
具体的,该方法包括如下步骤:Specifically, the method includes the following steps:
步骤S10:基于配电网的传输线以及电气设备之间的连接关系,构建图模型;其中,所述传输线作为所述图模型中的节点,所述传输线的连接作为所述图模型的边,所述电气设备作为所述图模型的注入;Step S10: Construct a graph model based on the connection relationship between the transmission lines of the distribution network and the electrical equipment; wherein, the transmission lines are used as nodes in the graph model, and the connections of the transmission lines are used as the edges of the graph model. the electrical equipment as an injection of the graph model;
步骤S20:基于所述图模型,获取目标传输线分别对应的注入特征向量、线路邻接矩阵以及注入邻接矩阵;其中,所述目标传输线为任一节点对应的传输线;所述注入特征向量表示所述目标传输线的属性以及对应的注入;所述线路邻接矩阵表示所述目标传输线与相邻传输线之间的连接关系;所述注入邻接矩阵表示注入与所述目标传输线之间的连接关系;Step S20: Based on the graph model, obtain the injection eigenvector, line adjacency matrix and injection adjacency matrix corresponding to the target transmission line respectively; wherein, the target transmission line is the transmission line corresponding to any node; the injection eigenvector represents the target The properties of the transmission line and the corresponding injection; the line adjacency matrix represents the connection relationship between the target transmission line and the adjacent transmission line; the injection adjacency matrix represents the connection relationship between the injection and the target transmission line;
步骤S30:基于神经网络,将所述注入特征向量以及所述注入邻接矩阵在所述图模型的节点进行特征嵌入,获得所述目标传输线的第一线路特征向量;其中,所述第一线路特征向量包含所述目标传输线与所述注入的连接关系;Step S30: Based on the neural network, feature embedding is performed on the injected feature vector and the injected adjacency matrix at the nodes of the graph model to obtain a first line feature vector of the target transmission line; wherein, the first line feature a vector containing the connection relationship between the target transmission line and the injection;
步骤S40:基于所述线路邻接矩阵对所述第一线路特征向量进行更新,获得所述目标传输线的第二线路特征向量。Step S40: Update the first line feature vector based on the line adjacency matrix to obtain a second line feature vector of the target transmission line.
在步骤S10中,配电网中采用传输线(即电力传输线)进行电力的传输,与传输线相连的有电力系统中的负载、变电站、发电站、开关等电气设备。具体的,可以配电网的电气图确定传输线的相互连接关系构建拓扑连接图,形成图模型。其中的每条传输线的属性可包含导线的数量以及导线的物理属性,例如,导线的电阻率、直径、长度等。传输线的属性可采用向量化表示,例如二维向量表示。In step S10 , transmission lines (ie, power transmission lines) are used in the distribution network to transmit power, and electrical equipment such as loads, substations, power stations, and switches in the power system are connected to the transmission lines. Specifically, the interconnection relationship of transmission lines can be determined from the electrical diagram of the distribution network to construct a topological connection diagram to form a graph model. The properties of each transmission line therein may include the number of wires and physical properties of the wires, such as the resistivity, diameter, length, etc. of the wires. The properties of the transmission line can be represented by a vectorized representation, such as a two-dimensional vector representation.
注入包括负载、变电站、发电站、开关等处于线路末端的电气设备。具体的,专用变压器和公用变压器等消耗电力资源的抽象为注入的消耗,一个消耗由一个有功功耗和一个无功功耗定义;将电网中的发电机、变电站等生产电力资源的电气设备抽象为注入的生产,每个生产由有功输入和输入电压定义。注入的总数为注入的消耗数量与注入的生产数量之和。每个注入都可采用一个二维信息进行表示。Injection includes loads, substations, power stations, switches and other electrical equipment at the end of the line. Specifically, the abstraction of consuming power resources such as dedicated transformers and public transformers is the consumption of injection, and a consumption is defined by an active power consumption and a reactive power consumption; the electrical equipment that produces power resources such as generators and substations in the power grid is abstracted For injected production, each production is defined by active input and input voltage. The total number of injections is the sum of the injected consumption quantity and the injected production quantity. Each injection can be represented by a two-dimensional information.
在步骤S20中,目标传输线为任一节点对应的传输线,即在配电网中每条传输线均可进行步骤S20-S40,从而获得传输线的第二特征向量。In step S20, the target transmission line is a transmission line corresponding to any node, that is, steps S20-S40 can be performed for each transmission line in the power distribution network, so as to obtain the second eigenvector of the transmission line.
进一步的,对于目标传输线而言,注入特征向量的获取,包括如下过程:Further, for the target transmission line, the acquisition of the injection feature vector includes the following processes:
1、基于注入的类型,获得注入的消耗和注入的生产;其中,注入的消耗为消耗电能的电气设备,注入的生成为生产电能的电气设备;1. Based on the type of injection, the consumption of injection and the production of injection are obtained; wherein, the consumption of injection is the electrical equipment that consumes electricity, and the generation of injection is the electrical equipment that produces electricity;
2、将目标传输线的属性、注入的消耗和注入的生产均表示为二维信息;2. The properties of the target transmission line, the consumption of injection and the production of injection are represented as two-dimensional information;
3、基于目标传输线的属性、注入的消耗和注入的生产对应的二维信息,获得注入特征向量。3. Based on the properties of the target transmission line, the two-dimensional information corresponding to the consumption of the injection and the production of the injection, the injection feature vector is obtained.
从而通过注入特征向量就可将目标传输线的属性信息以及与注入的连接信息进行数据化表示,便于后续的处理过程。Therefore, by injecting the feature vector, the attribute information of the target transmission line and the injected connection information can be represented digitally, which is convenient for subsequent processing.
进一步的,对于目标传输线的线路邻接矩阵包括:起点邻接矩阵和终点邻接矩阵;具体的,线路邻接矩阵的获取包括如下步骤:Further, the line adjacency matrix for the target transmission line includes: a start point adjacency matrix and an end point adjacency matrix; specifically, the acquisition of the line adjacency matrix includes the following steps:
1、基于图模型,将目标传输线确定为双极对象;其中,双极对象表示目标传输线具有起点和终点;1. Based on the graph model, the target transmission line is determined as a bipolar object; wherein, the bipolar object indicates that the target transmission line has a starting point and an end point;
2、基于目标传输线的起点的第一连接信息,获得起点邻接矩阵;其中,第一连接信息包括:目标传输线的起点与相邻传输线的起点连接,以及目标传输线的起点与相邻传输线的终点连接;2. Based on the first connection information of the starting point of the target transmission line, obtain the starting point adjacency matrix; wherein, the first connection information includes: the starting point of the target transmission line is connected with the starting point of the adjacent transmission line, and the starting point of the target transmission line is connected with the end point of the adjacent transmission line. ;
3、基于目标传输线的终点的第二连接信息,获得终点邻接矩阵;其中,第二连接信息包括:目标传输线的终点与相邻传输线的起点连接,以及目标传输线的终点与相邻传输线的终点连接。3. Based on the second connection information of the end point of the target transmission line, obtain the end point adjacency matrix; wherein, the second connection information includes: the end point of the target transmission line is connected with the start point of the adjacent transmission line, and the end point of the target transmission line is connected with the end point of the adjacent transmission line .
起点邻接矩阵可以将与目标传输线的起点相邻接的传输线信息进行数据化表示,终点邻接矩阵可以将与目标传输线的终点相邻接的传输线信息进行数据化表示;从而将目标传输线的至少四种邻接信息进行保留(起点连接起点、起点连接终点、终点连接起点、终点连接终点),提高准确性。The start point adjacency matrix can digitally represent the information of the transmission line adjacent to the start point of the target transmission line, and the end point adjacency matrix can digitally represent the information of the transmission line adjacent to the end point of the target transmission line; The adjacency information is retained (the starting point is connected to the starting point, the starting point is connected to the end point, the end point is connected to the start point, and the end point is connected to the end point) to improve the accuracy.
进一步的,目标传输线的注入邻接矩阵的获取,包括:Further, the acquisition of the injection adjacency matrix of the target transmission line includes:
基于目标传输线与注入的第三连接信息,获得注入邻接矩阵;其中,第三连接信息包括:注入与目标传输线的起点连接,以及注入与目标传输线的终点连接。Based on the third connection information between the target transmission line and the injection, an injection adjacency matrix is obtained; wherein the third connection information includes: the start point connection between the injection and the target transmission line, and the connection between the injection and the end point of the target transmission line.
在步骤S20中,通过目标传输线对应的注入特征向量、线路邻接矩阵以及注入邻接矩阵的获取,就可将目标传输线的线路邻接关系、以及注入连接关系进行表征,保证目标传输线在向量化后能够包含配电网的多种特征,避免特征单一化,提高了数据的准确性。In step S20, the line adjacency relationship and the injection connection relationship of the target transmission line can be characterized by obtaining the injection eigenvector, line adjacency matrix and injection adjacency matrix corresponding to the target transmission line, so as to ensure that the target transmission line can contain The various characteristics of the distribution network avoid the simplification of characteristics and improve the accuracy of the data.
由于在步骤S20中获取了配电网的多个特征,因此需要在步骤S30中进行特征融合以获取一个能够对目标传输线进行综合表达的数据。步骤S30的特征嵌入具体包括:Since multiple features of the power distribution network are acquired in step S20, it is necessary to perform feature fusion in step S30 to obtain data that can comprehensively express the target transmission line. The feature embedding of step S30 specifically includes:
1、基于神经网络,将注入特征向量映射到d维空间中,获得d维向量;其中,d为大于2的整数;具体的一种实施方式为:基于神经元个数分别为(din,10,d)的三层神经网络,将注入特征向量映射到d维空间中,获得d维向量;其中,din为注入特征向量的维数。din可为二维、三维等,应当保证d大于din,可提高数据的鲁棒性,很好的抵抗噪声,避免数据局部污染造成数据严重失真。1. Based on the neural network, the injected feature vector is mapped to the d-dimensional space to obtain a d-dimensional vector; wherein, d is an integer greater than 2; a specific implementation is: based on the number of neurons, respectively (din , 10, d) of the three-layer neural network, the injected feature vector is mapped to the d-dimensional space, and the d-dimensional vector is obtained; wherein,din is the dimension of the injected feature vector. din can be two-dimensional, three-dimensional, etc., and it should be ensured that d is greater than din , which can improve the robustness of the data, resist noise well, and avoid serious data distortion caused by local data pollution.
2、将d维向量右乘于注入邻接矩阵,获得第一线路特征向量;从而使得第一线路特征向量中包含了目标传输线的属性特征,以及注入和目标传输线的连接信息。2. Multiply the d-dimensional vector by the injection adjacency matrix to the right to obtain the first line feature vector; thus, the first line feature vector includes the attribute characteristics of the target transmission line and the connection information between the injection and the target transmission line.
在步骤S40中,进一步的对线路邻接矩阵进行了融合,具体包括:In step S40, the line adjacency matrix is further fused, which specifically includes:
1、基于起点邻接矩阵和终点邻接矩阵分别与第一保留信息的乘积的和,获得第一传播信息;其中,第一保留信息为第一线路特征向量;1. Obtain the first propagation information based on the sum of the products of the start point adjacency matrix and the end point adjacency matrix and the first reserved information respectively; wherein, the first reserved information is the first line feature vector;
2、基于第一传播信息和第一保留信息的和,获得第二保留信息;2. Based on the sum of the first broadcast information and the first reserved information, obtain the second reserved information;
3、基于起点邻接矩阵和终点邻接矩阵分别与第二保留信息的乘积的和,获得第二传播信息;3. Based on the sum of the products of the start point adjacency matrix and the end point adjacency matrix and the second reserved information respectively, obtain the second propagation information;
4、基于第二传播信息和第二保留信息的和继续对第二保留信息进行迭代更新,直至获得所述第二线路特征向量。4. Continue to iteratively update the second reserved information based on the sum of the second propagation information and the second reserved information, until the second line feature vector is obtained.
在步骤S40的具体执行过程中,迭代更新的次数可更具经验进行设置,例如可为1次、5次、10次、50次、100次、1000次、等等,不作限制。在迭代1次时,第二保留信息即为第二线路特征向量,不再执行3、4步骤。最终获得的第二线路特征向量不仅包含了目标传输线的属性特征、注入和目标传输线的连接信息,还包含了目标传输线与相邻传输线的邻接信息。从而使得第二线路特征向量可以更加准确的对配电网中的传输线的特征进行表示,使得配电网可数据化后广泛的应用于线路故障、电力转供等场景下的数据分析与预测。In the specific execution process of step S40, the number of iterative updates can be set more empirically, for example, it can be 1 time, 5 times, 10 times, 50 times, 100 times, 1000 times, etc., without limitation. In one iteration, the second reserved information is the second line feature vector, and steps 3 and 4 are no longer performed. The finally obtained second line feature vector not only includes the attribute characteristics of the target transmission line, injection and connection information of the target transmission line, but also includes the adjacency information of the target transmission line and the adjacent transmission line. Therefore, the second line feature vector can more accurately represent the characteristics of the transmission line in the distribution network, so that the distribution network can be digitized and widely used in data analysis and prediction in scenarios such as line faults and power transfer.
本实施例提供的一种基于神经网络的配电网线路向量化方法,通过对配电网的传输线以及电气设备之间的连接关系构建为图模型;并且将传输线作为图模型中的节点,传输线的连接作为图模型的边,电气设备作为图模型的注入,从而将配电网中的传输线以及传输线的连接关系进行了抽象表达;进一步的,基于图模型,获取目标传输线分别对应的注入特征向量、线路邻接矩阵以及注入邻接矩阵,通过注入特征向量、线路邻接矩阵以及注入邻接矩阵就可将目标传输线对应的属性,对应连接的注入以及邻接的传输线进行抽象,数据化;最后,基于神经网络,将注入特征向量以及注入邻接矩阵在所述图模型的节点进行特征嵌入,获得目标传输线的第一线路特征向量,使得第一线路特征向量中包含目标传输线对应的属性、对应连接的注入相关的特征,并且由于采用神经网络的方式进行的特征嵌入,使得获取的数据具有更好的稳定性,不易失真;最后基于线路邻接矩阵对第一线路特征向量进行更新,获得目标传输线的第二线路特征向量,在第二线路特征向量中不仅包含了目标传输线的属性特征、注入和目标传输线的连接信息,还包含了目标传输线与相邻传输线的邻接信息;因此,使用第二线路特征向量就可对配电网的细节特征进行加准确的表示,并且充分考虑了配电网中传输线特征的复杂性,使得配电网可数据化后得到的第二线路特征向量可广泛的应用于线路故障、电力转供等场景下的数据分析与预测,并且具备更高的准确度。A neural network-based distribution network line vectorization method provided by this embodiment is constructed by constructing a graph model for the connection relationship between transmission lines of the distribution network and electrical equipment; and the transmission line is used as a node in the graph model, and the The connection of the graph model is used as the edge of the graph model, and the electrical equipment is used as the injection of the graph model, so that the transmission line in the distribution network and the connection relationship of the transmission line are abstractly expressed; further, based on the graph model, the injection feature vector corresponding to the target transmission line is obtained. , line adjacency matrix and injection adjacency matrix, by injecting eigenvectors, line adjacency matrix and injection adjacency matrix, the corresponding attributes of the target transmission line, the injection of the corresponding connection and the adjacent transmission lines can be abstracted and digitized; finally, based on the neural network, Embedding the injection feature vector and the injection adjacency matrix at the nodes of the graph model to obtain the first line feature vector of the target transmission line, so that the first line feature vector contains the attributes corresponding to the target transmission line and the injection-related features of the corresponding connection , and because of the feature embedding in the way of neural network, the obtained data has better stability and is not easy to be distorted; finally, the first line feature vector is updated based on the line adjacency matrix, and the second line feature vector of the target transmission line is obtained. , the second line feature vector contains not only the attribute characteristics of the target transmission line, injection and connection information of the target transmission line, but also the adjacency information of the target transmission line and the adjacent transmission line; therefore, the second line feature vector can be used to match The detailed characteristics of the power grid are accurately represented, and the complexity of the transmission line characteristics in the distribution network is fully considered, so that the second line feature vector obtained after the distribution network can be digitized can be widely used in line faults, power transfer. It can provide data analysis and prediction in other scenarios, and has higher accuracy.
第二实施例Second Embodiment
基于同一发明构思,本发明第二实施例提供了一种基于神经网络的配电网线路向量化装置300。图2示出了本发明第二实施例提供的基于神经网络的配电网线路向量化装置300的功能模块框图。Based on the same inventive concept, the second embodiment of the present invention provides a neural network-based distribution network
具体的,所述基于神经网络的配电网线路向量化装置300包括:Specifically, the neural network-based distribution network
图模型构建模块301,用于基于配电网的传输线以及电气设备之间的连接关系,构建图模型;其中,所述传输线作为所述图模型中的节点,所述传输线的连接作为所述图模型的边,所述电气设备作为所述图模型的注入;The graph
特征获取模块302,用于基于所述图模型,获取目标传输线分别对应的注入特征向量、线路邻接矩阵以及注入邻接矩阵;其中,所述目标传输线为任一节点对应的传输线;所述注入特征向量表示所述目标传输线的属性以及对应的注入;所述线路邻接矩阵表示所述目标传输线与相邻传输线之间的连接关系;所述注入邻接矩阵表示注入与所述目标传输线之间的连接关系;The
注入嵌入模块303,用于基于神经网络,将所述注入特征向量以及所述注入邻接矩阵在所述图模型的节点进行特征嵌入,获得所述目标传输线的第一线路特征向量;其中,所述第一线路特征向量包含所述目标传输线与所述注入的连接关系;The
特征向量获取模块304,用于基于所述线路邻接矩阵对所述第一线路特征向量进行更新,获得所述目标传输线的第二线路特征向量。A feature
作为一种可选的实施方式,所述特征获取模块302,具体用于:As an optional implementation manner, the
基于所述注入的类型,获得所述注入的消耗和所述注入的生产;其中,所述注入的消耗为消耗电能的电气设备,所述注入的生成为生产电能的电气设备;Based on the type of the injection, the consumption of the injection and the production of the injection are obtained; wherein the consumption of the injection is an electrical device that consumes electrical energy and the generation of the injection is an electrical device that produces electrical energy;
将所述目标传输线的属性、所述注入的消耗和所述注入的生产均表示为二维信息;Representing the properties of the target transmission line, the consumption of the injection, and the production of the injection as two-dimensional information;
基于所述目标传输线的属性、所述注入的消耗和所述注入的生产对应的二维信息,获得所述注入特征向量。The injection feature vector is obtained based on the properties of the target transmission line, the consumption of the injection, and the two-dimensional information corresponding to the production of the injection.
需要说明的是,本发明实施例所提供的基于神经网络的配电网线路向量化装置300,其具体实现及产生的技术效果和前述方法实施例相同,为简要描述,装置实施例部分未提及之处,可参考前述方法实施例中相应内容。It should be noted that the neural network-based distribution network
第三实施例Third Embodiment
请参见图3,本发明第三实施例提供了一种配电网线路故障定位方法的方法,图1示出了该配电网线路故障定位方法的流程图。Referring to FIG. 3 , a third embodiment of the present invention provides a method for locating a line fault in a distribution network, and FIG. 1 shows a flowchart of the method for locating a line fault in a distribution network.
具体的,该方法包括如下步骤:Specifically, the method includes the following steps:
步骤S100:基于配电网的传输线以及电气设备之间的连接关系,构建图模型;其中,所述传输线作为所述图模型中的节点,所述传输线的连接作为所述图模型的边,所述电气设备作为所述图模型的注入;Step S100: Construct a graph model based on the connection relationship between transmission lines of the power distribution network and electrical equipment; wherein, the transmission lines are used as nodes in the graph model, and the connections of the transmission lines are used as edges of the graph model. the electrical equipment as an injection of the graph model;
步骤S200:基于所述图模型将所述配电网的目标传输线向量化,并嵌入所述目标传输线与相邻传输线、所述目标传输线与所述注入之间的连接关系,获得所述目标传输线的线路特征向量;其中,所述目标传输线为任一节点对应的传输线;Step S200: Quantize the target transmission line of the power distribution network based on the graph model, and embed the connection relationship between the target transmission line and adjacent transmission lines, the target transmission line and the injection to obtain the target transmission line The line feature vector of ; wherein, the target transmission line is the transmission line corresponding to any node;
步骤S300:将所述线路特征向量输入到训练完成的预测模型中,获得所述目标传输线的故障概率。Step S300: Input the line feature vector into the trained prediction model to obtain the failure probability of the target transmission line.
步骤S100的详细阐述可参照第一实施例步骤S10的阐述,不再赘述。具体的以一实例进行说明(后续对该实例进行继续沿用),可用li表示第i条总线,s和e分别表示总线的起点和终点,传输线抽象为图模型中的节点,将传输线对应的起点和终点连接情况抽象为边,将电力系统中的负载、变电站、发电站、开关等处于传输线末端的电气设备抽象为注入,inj表示第j个注入。如图4所示,其中示出了4个节点,3个注入(in1、in2、in3),以及4条边(l1、l2、l3、l4)。For the detailed description of step S100, reference may be made to the description of step S10 in the first embodiment, and details are not repeated here. Specifically, an example is used to illustrate (the example will continue to be used in the future), and li can be used to represent theith bus, s and e respectively represent the start and end points of the bus, and the transmission line is abstracted as a node in the graph model. The connection between the starting point and the end point is abstracted as an edge, and the electrical equipment at the end of the transmission line such as loads, substations, power stations, switches, etc. in the power system is abstracted as injection, and inj represents the jth injection. As shown in Figure 4, which shows 4 nodes, 3 injections (in1 , in2 , in3 ), and 4 edges (l1 , I2 , I3 , I4 ).
在步骤S200中,具体包括:In step S200, it specifically includes:
步骤S210:基于所述图模型,获取目标传输线分别对应的注入特征向量、线路邻接矩阵以及注入邻接矩阵;其中,所述注入特征向量表示所述目标传输线的属性以及对应的注入;所述线路邻接矩阵表示所述目标传输线与相邻传输线之间的连接关系;所述注入邻接矩阵表示注入与所述目标传输线之间的连接关系;Step S210: Based on the graph model, obtain the injection eigenvector, line adjacency matrix and injection adjacency matrix corresponding to the target transmission line respectively; wherein, the injection eigenvector represents the attribute of the target transmission line and the corresponding injection; the line adjacency The matrix represents the connection relationship between the target transmission line and the adjacent transmission line; the injection adjacency matrix represents the connection relationship between the injection and the target transmission line;
步骤S220:基于神经网络,将所述注入特征向量以及所述注入邻接矩阵在所述图模型的节点进行特征嵌入,获得所述目标传输线的第一线路特征向量;其中,所述第一线路特征向量包含所述目标传输线与所述注入的连接关系;Step S220: Based on the neural network, feature embedding is performed on the injected feature vector and the injected adjacency matrix at the nodes of the graph model to obtain a first line feature vector of the target transmission line; wherein, the first line feature a vector containing the connection relationship between the target transmission line and the injection;
步骤S230:基于所述线路邻接矩阵对所述第一线路特征向量进行更新,获得所述目标传输线的第二线路特征向量。Step S230: Update the first line feature vector based on the line adjacency matrix to obtain a second line feature vector of the target transmission line.
本实施例中步骤S210-S230的详细阐述可参照第一实施例中的步骤S20-S40的说明,不再赘述。For the detailed description of steps S210-S230 in this embodiment, reference may be made to the description of steps S20-S40 in the first embodiment, which will not be repeated.
沿用本实施例中的上述实例对步骤S210-S230进行说明,将电网中的专用变压器和公用变压器等消耗电能的抽象为注入的消耗,一个消耗c∈C,由一个有功功耗Pc(兆瓦)和一个无功功耗Qc(兆伏特-安培无功)定义;将电网中的发电机、变电站等生产电能的抽象为注入的生产,每个生产p∈P由有功输入Pp(以兆瓦为单位)和输入电压Vp(以伏特为单位)定义。用nin表示注入的总数:nin=|P|+|C|,其中,|P|表示生产的数量,|C|表示消耗的数量,P为生产的集合,C为消耗的集合。每个传输线的属性或注入都有一个din=2维的信息。则采用表示所有注入的特征向量。The steps S210-S230 will be described by following the above examples in this embodiment, and abstracting the power consumption of special transformers and public transformers in the power grid into the consumption of injection, one consumption c ∈ C, and one active power consumption Pc (megabytes). Watts) and a reactive power consumption Qc (megavolt-ampere reactive) definition; abstracting the electrical energy produced by generators, substations, etc. in the grid as injected production, each productionp∈P is defined by the active input Pp( defined in megawatts) and input voltageVp (in volts). Let nin represent the total number of injections: nin = |P|+|C|, where |P| represents the quantity produced, |C| represents the quantity consumed, P is the set of production, and C is the set of consumption. Each transmission line property or injection has adin = 2-dimensional information. then use Represents all injected eigenvectors.
进一步的,将传输线建模为双极对象,所以需要区分每条传输线的起点和终点。因此,两条传输线之间的每个连接可以有四种不同的类型:(si,sj)、(si,ej)、(ei,sj)、(ei,ej),其中,si和ei分别为传输线i的起点和终点,sj和ej分别为传输线j的起点和终点,如图4所示。进一步的,各传输线的起点和终点的邻接矩阵和表示如下:Further, the transmission lines are modeled as bipolar objects, so it is necessary to distinguish the start and end points of each transmission line. Therefore, each connection between two transmission lines can be of four different types: (si , sj ), (si , ej ), (ei ,sj ), (ei , ej ) , where si and ei are the start and end points of transmission line i, respectively, and sj and ej are the start and end points of transmission line j, respectively, as shown in Figure 4. Further, the adjacency matrix of the start and end points of each transmission line and It is expressed as follows:
进一步的,用矩阵表示注入(注入的生产和注入的消耗)与传输线的起点和终点的连接方式,具体为:Further, using the matrix Indicates how the injection (production of injection and consumption of injection) is connected to the start and end points of the transmission line, specifically:
进一步的,进行注入特征向量以及所述注入邻接矩阵的融合。特征嵌入目的是将传输线的属性信息和注入(din维)中包含的特征信息嵌入到d维空间中。对每一个传输线的属性信息和注入均可采用一个神经元个数分别为(din,10,d)的三层神经网络E:为了将注入与线路的连接信息考虑进去,将获得的d维空间中的注入的特征向量E(X)右乘于注入的邻接矩阵Ain后,即可得到第一线路特征向量,即:Further, fusion of the injected feature vector and the injected adjacency matrix is performed. The purpose of feature embedding is to embed the attribute information of the transmission line and the feature information contained in the injection (din dimension) into the d-dimensional space. For the attribute information and injection of each transmission line, a three-layer neural network E with the number of neurons (din , 10, d) can be used: In order to take into account the connection information between the injection and the line, the first line eigenvector can be obtained by multiplying the injected eigenvector E(X) in the obtained d-dimensional space by the injected adjacency matrix Ain , namely:
H(0)=Ain°E(X)H(0) =Ain °E(X)
H(0)即为第一线路特征向量,最终结果就是一个n×d的结果,n为传输线的数量,每条传输线用一个d维向量表示,具体可参阅图5所示的嵌入过程。H(0) is the first line feature vector, and the final result is an n×d result, where n is the number of transmission lines, and each transmission line is represented by a d-dimensional vector. For details, please refer to the embedding process shown in Figure 5.
进一步的,基于线路邻接矩阵对第一线路特征向量进行更新,以融合。通过传输线之间的邻接关系进行传输线特征信息的迭代地更新。可设置迭代次数为K,采用As和Ae分别与当前时间步所学到的特征向量H(k)(保留信息)相乘然后相加,得到图模型中的k次迭代的传播信息info(k),用以更新传输线的特征向量,及第一线路特征向量,具体为:Further, the first line feature vector is updated based on the line adjacency matrix for fusion. The iterative updating of transmission line feature information is performed through the adjacency relationship between transmission lines. The number of iterations can be set to K, and As and Ae are used to multiply and add the feature vector H(k) (retained information) learned at the current time step, respectively, to obtain the propagation information info of k iterations in the graphical model.(k) , which is used to update the eigenvector of the transmission line and the eigenvector of the first line, specifically:
info(k)=sum(AsH(k),AeH(k))info(k) = sum(As H(k) , Ae H(k) )
具体迭代中间过程如图6所示。将保留信息H(k)和传播信息info(k)进行相加,表示当前时间步所学习到的特征信息H(k+1),如下所示:The specific iterative intermediate process is shown in Figure 6. The retained information H(k) and the propagation information info(k) are added to represent the feature information H(k+1) learned at the current time step, as shown below:
H(k+1)=H(k)+sum(AsH(k),AeH(k))=(I+sum(As,Ae))(H(k))H(k+1) =H(k) +sum(As H(k) , Ae H(k) )=(I+sum(As , Ae ))(H(k) )
其中,对于k∈{0,...,K-1},其中I为恒等函数,迭代结束后获得第二线路特征向量。Among them, for k∈{0,...,K-1}, where I is the identity function, the second line feature vector is obtained after the iteration.
在步骤S300中,以预测模型为逻辑回归模型为例进行说明,该逻辑回归模型的训练包括:In step S300, the prediction model is taken as an example of a logistic regression model. The training of the logistic regression model includes:
1、基于所述配电网的历史数据,获得训练样本;其中,所述训练样本包括所述目标传输线的故障情况,以及所述目标传输的历史线路特征向量;1. Obtain a training sample based on the historical data of the power distribution network; wherein, the training sample includes the fault condition of the target transmission line and the historical line feature vector of the target transmission;
2、基于所述训练样本和预设的损失函数对所述逻辑回归模型进行训练,获得所述逻辑回归模型的模型参数;其中,损失函数为交叉熵函数;2. The logistic regression model is trained based on the training samples and a preset loss function to obtain model parameters of the logistic regression model; wherein the loss function is a cross-entropy function;
3、基于所述逻辑回归模型的模型参数,获得训练完成的逻辑回归模型。3. Obtain a trained logistic regression model based on the model parameters of the logistic regression model.
具体的,本实施例中采用的逻辑回归模型基本式子为:Specifically, the basic formula of the logistic regression model adopted in this embodiment is:
其中,x为线路特征向量(第二线路特征向量),θ为模型参数,hθ(x)为所述目标传输线的故障概率。利用交叉熵函数作为模型的损失函数,具体形式如下: Wherein, x is the line eigenvector (the second line eigenvector), θ is the model parameter, and hθ (x) is the failure probability of the target transmission line. Using the cross entropy function as the loss function of the model, the specific form is as follows:
其中,y(i)表示第i条线路的故障真实情况,1表示故障,0表示非故障。Among them, y(i) represents the real fault condition of the i-th line, 1 represents the fault, and 0 represents the non-fault.
进一步的,对模型中的参数进行优化,可通过梯度下降法进行参数的优化,如下式:Further, to optimize the parameters in the model, the gradient descent method can be used to optimize the parameters, as follows:
最终确定模型参数,获得训练完成的逻辑回归模型,该模型即可应用在实际场景中对传输线的故障情况进行预测,由于训练样本为传输线对应的历史情况的线路特征向量表示,因此可得到更加准确的预测模型,实现更高的预测效果。Finally, the model parameters are determined, and the trained logistic regression model is obtained. The model can be used to predict the fault condition of the transmission line in the actual scene. Since the training sample is the line feature vector representation of the historical situation corresponding to the transmission line, it can be more accurate. Prediction model to achieve higher prediction effect.
在步骤S400中,根据已经训练好的预测模型,在现实场景中的配电网线路故障中,用向量表示n条线路的故障情况,其中1表示故障,0表示非故障。本实施例的预测模型所构成的预测系统可表示为Y=S(X,As,Ae,Ainj)。In step S400, according to the trained prediction model, in the distribution network line fault in the real scene, use the vector Indicates the fault condition of n lines, where 1 means fault and 0 means non-fault. The prediction system constituted by the prediction model of this embodiment can be expressed as Y=S (X, As , Ae , Ainj ).
本实施例中提供的一种配电网线路故障定位方法,通过配电网的传输线以及电气设备之间的连接关系,构建图模型;并且将传输线作为图模型中的节点,传输线的连接作为图模型的边,电气设备作为图模型的注入,从而将配电网中的传输线以及传输线的连接关系进行了抽象表达;进一步的,基于图模型将所述配电网的目标传输线向量化,并嵌入目标传输线与相邻传输线、目标传输线与注入之间的连接关系,从而获得目标传输线的线路特征向量,该线路特征向量包含了目标传输线在配电网中所存在的特征信息,充分考虑了配电网中传输线连接的复杂性;进一步的,基于该线路特征向量进行预测模型的训练和故障预测,就可准确、快速的定位配电网中故障的传输线。In a method for locating faults in a distribution network line provided in this embodiment, a graph model is constructed through the connection relationship between transmission lines of the distribution network and electrical equipment; and the transmission lines are used as nodes in the graph model, and the connections of the transmission lines are used as graph At the edge of the model, electrical equipment is injected as a graph model, so as to abstractly express the transmission lines in the distribution network and the connection relationship of the transmission lines; further, based on the graph model, the target transmission line of the distribution network is vectorized and embedded The connection relationship between the target transmission line and the adjacent transmission line, the target transmission line and the injection, so as to obtain the line eigenvector of the target transmission line, which contains the characteristic information of the target transmission line in the distribution network, and fully considers the distribution of power distribution. The complexity of the transmission line connection in the network; further, based on the line feature vector training of the prediction model and fault prediction, the faulty transmission line in the distribution network can be located accurately and quickly.
另外本实施例所提供的方法中部分未提及之处,其实施过程以及实施效果,可参考前述方法实施例中相应内容。In addition, for parts not mentioned in the method provided in this embodiment, for the implementation process and implementation effect, reference may be made to the corresponding content in the foregoing method embodiment.
第四实施例Fourth Embodiment
基于同一发明构思,本发明第二实施例提供了一种配电网线路故障定位装置400。图7示出了本发明第二实施例提供的一种配电网线路故障定位装置400的功能模块框图。Based on the same inventive concept, the second embodiment of the present invention provides a distribution network line
所述配电网线路故障定位装置400,包括:The distribution network line
图模型构建模块401,用于基于配电网的传输线以及电气设备之间的连接关系,构建图模型;其中,所述传输线作为所述图模型中的节点,所述传输线的连接作为所述图模型的边,所述电气设备作为所述图模型的注入;The graph
特征向量获取模块402,用于基于所述图模型将所述配电网的目标传输线向量化,并嵌入所述目标传输线与相邻传输线、所述目标传输线与所述注入之间的连接关系,获得所述目标传输线的线路特征向量;其中,所述目标传输线为任一节点对应的传输线;A feature
故障定位模块403,用于将所述线路特征向量输入到训练完成的预测模型中,获得所述目标传输线的故障概率。The
作为一种可选的实施方式,所述预测模型为逻辑回归模型;所述装置还包括模型训练模块,用于:As an optional embodiment, the prediction model is a logistic regression model; the device further includes a model training module for:
基于所述配电网的历史数据,获得训练样本;其中,所述训练样本包括所述目标传输线的故障情况,以及所述目标传输的历史线路特征向量;Based on the historical data of the power distribution network, a training sample is obtained; wherein, the training sample includes the fault condition of the target transmission line and the historical line feature vector of the target transmission;
基于所述训练样本和预设的损失函数对所述逻辑回归模型进行训练,获得所述逻辑回归模型的模型参数;其中,损失函数为交叉熵函数;The logistic regression model is trained based on the training samples and a preset loss function to obtain model parameters of the logistic regression model; wherein the loss function is a cross entropy function;
基于所述逻辑回归模型的模型参数,获得训练完成的逻辑回归模型。Based on the model parameters of the logistic regression model, a trained logistic regression model is obtained.
需要说明的是,本发明实施例所提供的一种配电网线路故障定位装置400,其具体实现及产生的技术效果和前述方法实施例相同,为简要描述,装置实施例部分未提及之处,可参考前述方法实施例中相应内容。It should be noted that, the specific implementation and technical effects of a power distribution network line
本发明提供的装置集成的功能模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明实现上述实施例的方法中的全部或部分流程,也可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一计算机可读存储介质中,该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。其中,所述计算机程序包括计算机程序代码,所述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质等。需要说明的是,所述计算机可读介质包含的内容可以根据司法管辖区内立法和专利实践的要求进行适当的增减,例如在某些司法管辖区,根据立法和专利实践,计算机可读介质不包括电载波信号和电信信号。If the functional modules integrated in the device provided by the present invention are implemented in the form of software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the method for implementing the above embodiments of the present invention can also be completed by instructing relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above method embodiments can be implemented. Wherein, the computer program includes computer program code, and the computer program code may be in the form of source code, object code, executable file or some intermediate form, and the like. The computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM, Read-Only Memory) , Random Access Memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable media may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction, for example, in some jurisdictions, according to legislation and patent practice, the computer-readable media Electric carrier signals and telecommunication signals are not included.
在此提供的算法和显示不与任何特定计算机、虚拟系统或者其它设备固有相关。各种通用系统也可以与基于在此的示教一起使用。根据上面的描述,构造这类系统所要求的结构是显而易见的。此外,本发明也不针对任何特定编程语言。应当明白,可以利用各种编程语言实现在此描述的本发明的内容,并且上面对特定语言所做的描述是为了披露本发明的最佳实施方式。The algorithms and displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems can also be used with teaching based on this. The structure required to construct such a system is apparent from the above description. Furthermore, the present invention is not directed to any particular programming language. It is to be understood that various programming languages may be used to implement the inventions described herein, and that the descriptions of specific languages above are intended to disclose the best mode for carrying out the invention.
在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本发明的实施例可以在没有这些具体细节的情况下实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。In the description provided herein, numerous specific details are set forth. It will be understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
类似地,应当理解,为了精简本公开并帮助理解各个发明方面中的一个或多个,在上面对本发明的示例性实施例的描述中,本发明的各个特征有时被一起分组到单个实施例、图、或者对其的描述中。然而,并不应将该公开的方法解释成反映如下意图:即所要求保护的本发明要求比在每个权利要求中所明确记载的特征更多的特征。更确切地说,如下面的权利要求书所反映的那样,发明方面在于少于前面公开的单个实施例的所有特征。因此,遵循具体实施方式的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身都作为本发明的单独实施例。Similarly, it is to be understood that in the above description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together into a single embodiment, figure, or its description. This disclosure, however, should not be construed as reflecting an intention that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the Detailed Description are hereby expressly incorporated into this Detailed Description, with each claim standing on its own as a separate embodiment of this invention.
本领域那些技术人员可以理解,可以对实施例中的设备中的模块进行自适应性地改变并且把它们设置在与该实施例不同的一个或多个设备中。可以把实施例中的模块或单元或组件组合成一个模块或单元或组件,以及此外可以把它们分成多个子模块或子单元或子组件。除了这样的特征和/或过程或者单元中的至少一些是相互排斥之外,可以采用任何组合对本说明书(包括伴随的权利要求、摘要和附图)中公开的所有特征以及如此公开的任何方法或者设备的所有过程或单元进行组合。除非另外明确陈述,本说明书(包括伴随的权利要求、摘要和附图)中公开的每个特征可以由提供相同、等同或相似目的的替代特征来代替。Those skilled in the art will understand that the modules in the device in the embodiment can be adaptively changed and arranged in one or more devices different from the embodiment. The modules or units or components in the embodiments may be combined into one module or unit or component, and further they may be divided into multiple sub-modules or sub-units or sub-assemblies. All features disclosed in this specification (including accompanying claims, abstract and drawings) and any method so disclosed may be employed in any combination, unless at least some of such features and/or procedures or elements are mutually exclusive. All processes or units of equipment are combined. Each feature disclosed in this specification (including accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
此外,本领域的技术人员能够理解,尽管在此的一些实施例包括其它实施例中所包括的某些特征而不是其它特征,但是不同实施例的特征的组合意味着处于本发明的范围之内并且形成不同的实施例。例如,在下面的权利要求书中,所要求保护的实施例的任意之一都可以以任意的组合方式来使用。Furthermore, it will be understood by those skilled in the art that although some of the embodiments herein include certain features, but not others, included in other embodiments, that combinations of features of the different embodiments are intended to be within the scope of the present invention And form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的装置中的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本发明的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。Various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art should understand that a microprocessor or a digital signal processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components in the apparatus according to the embodiments of the present invention. The present invention can also be implemented as apparatus or apparatus programs (eg, computer programs and computer program products) for performing part or all of the methods described herein. Such a program implementing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals. Such signals may be downloaded from Internet sites, or provided on carrier signals, or in any other form.
应该注意的是上述实施例对本发明进行说明而不是对本发明进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本发明可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。It should be noted that the above-described embodiments illustrate rather than limit the invention, and that alternative embodiments may be devised by those skilled in the art without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means may be embodied by one and the same item of hardware. The use of the words first, second, and third, etc. do not denote any order. These words can be interpreted as names.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010251558.2ACN111598123B (en) | 2020-04-01 | 2020-04-01 | Power distribution network line vectorization method and device based on neural network |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010251558.2ACN111598123B (en) | 2020-04-01 | 2020-04-01 | Power distribution network line vectorization method and device based on neural network |
| Publication Number | Publication Date |
|---|---|
| CN111598123Atrue CN111598123A (en) | 2020-08-28 |
| CN111598123B CN111598123B (en) | 2022-09-02 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202010251558.2AActiveCN111598123B (en) | 2020-04-01 | 2020-04-01 | Power distribution network line vectorization method and device based on neural network |
| Country | Link |
|---|---|
| CN (1) | CN111598123B (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111537831A (en)* | 2020-04-01 | 2020-08-14 | 华中科技大学鄂州工业技术研究院 | A kind of distribution network line fault location method and device |
| CN112214775A (en)* | 2020-10-09 | 2021-01-12 | 平安国际智慧城市科技股份有限公司 | Injection type attack method and device for graph data, medium and electronic equipment |
| CN112666423A (en)* | 2020-12-03 | 2021-04-16 | 广州电力通信网络有限公司 | Testing device for power communication network |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20100114890A1 (en)* | 2008-10-31 | 2010-05-06 | Purediscovery Corporation | System and Method for Discovering Latent Relationships in Data |
| US20100217577A1 (en)* | 2009-02-24 | 2010-08-26 | Sun Microsystems, Inc. | Parallel power grid analysis |
| WO2016004361A1 (en)* | 2014-07-02 | 2016-01-07 | North Carolina A&T State University | System and method for assessing smart power grid networks |
| CN106384302A (en)* | 2016-09-30 | 2017-02-08 | 南方电网科学研究院有限责任公司 | Power distribution network reliability evaluation method and system |
| CN108280574A (en)* | 2018-01-19 | 2018-07-13 | 国家电网公司 | A kind of evaluation method and device of distribution net work structure maturity |
| WO2019001071A1 (en)* | 2017-06-28 | 2019-01-03 | 浙江大学 | Adjacency matrix-based graph feature extraction system and graph classification system and method |
| US20190005384A1 (en)* | 2017-06-29 | 2019-01-03 | General Electric Company | Topology aware graph neural nets |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20100114890A1 (en)* | 2008-10-31 | 2010-05-06 | Purediscovery Corporation | System and Method for Discovering Latent Relationships in Data |
| US20100217577A1 (en)* | 2009-02-24 | 2010-08-26 | Sun Microsystems, Inc. | Parallel power grid analysis |
| WO2016004361A1 (en)* | 2014-07-02 | 2016-01-07 | North Carolina A&T State University | System and method for assessing smart power grid networks |
| CN106384302A (en)* | 2016-09-30 | 2017-02-08 | 南方电网科学研究院有限责任公司 | Power distribution network reliability evaluation method and system |
| WO2019001071A1 (en)* | 2017-06-28 | 2019-01-03 | 浙江大学 | Adjacency matrix-based graph feature extraction system and graph classification system and method |
| US20190005384A1 (en)* | 2017-06-29 | 2019-01-03 | General Electric Company | Topology aware graph neural nets |
| CN108280574A (en)* | 2018-01-19 | 2018-07-13 | 国家电网公司 | A kind of evaluation method and device of distribution net work structure maturity |
| Title |
|---|
| JIAXUAN YOU ET AL: "GraphRNN: Generating Realistic Graphs with Deep Auto-regressive Models", 《PROCEEDINGS OF THE 35TH INTERNATIONAL CONFERENCE ON MACHINE LEARNING》* |
| RAFAEL ESPEJO ET AL: "A Complex-Network Approach to the Generation of Synthetic Power Transmission Networks", 《IEEE SYSTEMS JOURNAL》* |
| 王昌照: "含分布式电源配电网故障恢复与可靠性评估研究", 《中国博士学位论文数据库》* |
| 马帅: "基于有序二叉决策图的电网主动解列策略搜索方法研究", 《中国硕士学位论文全文数据库》* |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111537831A (en)* | 2020-04-01 | 2020-08-14 | 华中科技大学鄂州工业技术研究院 | A kind of distribution network line fault location method and device |
| CN111537831B (en)* | 2020-04-01 | 2022-06-24 | 华中科技大学鄂州工业技术研究院 | A kind of distribution network line fault location method and device |
| CN112214775A (en)* | 2020-10-09 | 2021-01-12 | 平安国际智慧城市科技股份有限公司 | Injection type attack method and device for graph data, medium and electronic equipment |
| CN112214775B (en)* | 2020-10-09 | 2024-04-05 | 深圳赛安特技术服务有限公司 | Injection attack method, device, medium and electronic equipment for preventing third party from acquiring key diagram data information and diagram data |
| CN112666423A (en)* | 2020-12-03 | 2021-04-16 | 广州电力通信网络有限公司 | Testing device for power communication network |
| Publication number | Publication date |
|---|---|
| CN111598123B (en) | 2022-09-02 |
| Publication | Publication Date | Title |
|---|---|---|
| CN111537831B (en) | A kind of distribution network line fault location method and device | |
| CN111598123B (en) | Power distribution network line vectorization method and device based on neural network | |
| CN113238740B (en) | Code generation method, code generation device, storage medium and electronic device | |
| CN114329232A (en) | A method and system for constructing user portrait based on scientific research network | |
| Zhu et al. | Robust registration of partially overlapping point sets via genetic algorithm with growth operator | |
| CN116187723B (en) | Resource scheduling method and device applied to distribution line loss reduction scene | |
| CN111159897A (en) | Target optimization method and device based on system modeling application | |
| CN115240048A (en) | Image classification-oriented deep learning operator positioning fusion method and device | |
| CN115001937A (en) | Fault prediction method and device for smart city Internet of things | |
| CN113962163A (en) | An optimization method, device and equipment for realizing efficient design of passive microwave devices | |
| CN118228093A (en) | Passenger flow prediction model training method, passenger flow prediction method, medium and equipment | |
| CN117272195A (en) | Block chain abnormal node detection method and system based on graph convolution attention network | |
| CN112764807A (en) | Code abstract generation method and system based on multi-scale AST and feature fusion | |
| CN118211196A (en) | A data set asset protection method and device based on sample watermark | |
| CN118798326A (en) | Transformer fault diagnosis method, terminal and medium based on personalized federated learning | |
| CN111126607B (en) | Data processing method, device and system for model training | |
| WO2024155788A1 (en) | Machine learning models for electrical power simulations | |
| CN115442229B (en) | Communication core network networking method, equipment, storage medium and device | |
| CN109038569A (en) | Power distribution network reconstruction method, device and system and computer readable storage medium | |
| CN112668797B (en) | Long-short-period traffic prediction method | |
| CN115984025A (en) | Influence propagation estimation method and system based on deep learning graph network model | |
| CN114528973A (en) | Method for generating business processing model, business processing method and device | |
| Nauck et al. | Prediction of power grid vulnerabilities using machine learning | |
| CN120256468B (en) | Power equipment topological graph generation and query method based on graph neural network | |
| CN114708013B (en) | Click rate prediction method, system, computer and readable storage medium |
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |