KNN classifier-based medium-voltage line topology identification method and related device

Through a KNN classifier-based method, the useful signal power is calculated using signal power and noise power. Combined with frequency information and shunt data, the model is trained to identify the medium-voltage line topology, which solves the shunt phenomenon in medium-voltage line topology identification and improves the recognition accuracy.

CN120801892APending Publication Date: 2025-10-17STATE GRID HUBEI ELECTRIC POWER RES INST +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510883347.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-28
Publication Date
2025-10-17

AI Technical Summary

Technical Problem

There is a shunting phenomenon in the existing medium-voltage line topology identification technology, which leads to identification errors. The existing technology is difficult to effectively solve the problem of micro-current signal interference between the load-side and power-side topology identification devices.

Method used

A KNN classifier-based method is adopted to collect on-site characteristic microcurrent information, train the KNN model, calculate the useful signal power using signal power and noise power, combine frequency information and shunt data, adaptively identify the topological relationship of the line, and improve the recognition accuracy.

Benefits of technology

It effectively solves the shunting phenomenon, improves the accuracy of medium-voltage line topology identification, reduces identification errors, and enhances the reliability of topology identification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120801892A_ABST
    Figure CN120801892A_ABST
Patent Text Reader

Abstract

The invention provides a medium-voltage line topology identification method based on a KNN classifier and a related device, and the method comprises the steps: collecting the signal power and noise power of topology identification equipment under different frequencies, and calculating the useful signal power of a self-transmitting and self-receiving micro-current and a self-transmitting and self-receiving micro-current; thirdly, in combination with an actual field shunting condition, taking frequency information, two types of useful signal power and shunting data as input, and training a KNN model; and finally, inputting frequency information of actual operation and two types of useful signal power into the model, adaptively outputting shunt judgment, and fusing non-shunt data to obtain actual topological information. According to the invention, through data training learning, the line shunting phenomenon is effectively identified, and the topology identification accuracy is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the field of power distribution network topology identification, and particularly relates to a medium-voltage line topology identification method based on a KNN classifier and related devices. BACKGROUND

[0002] With the rapid development of current distribution network traveling wave distance measurement technology, the topology relationship information of medium-voltage lines becomes a prerequisite for accurate fault positioning and investigation, so in order to reduce the complexity of account information management, many scholars have begun to study the topology identification technology of medium-voltage lines. The early low-voltage topology identification technology is relatively mature, mainly including the following three types of technologies:

[0003] (1) Topology identification technology based on characteristic micro-current, which uses the principle that the impedance on the power side is small and the current mainly flows to the power side, detects the characteristic micro-current corresponding to the sending frequency and coding information, and identifies the topology relationship of the line. This technology has been popularized, but in actual engineering, with the size of the line load and the complexity of the topology relationship structure, there are many shunt phenomena, that is, the load side also receives a small characteristic micro-current, which leads to identification errors.

[0004] (2) Topology identification technology based on big data analysis, which uses a large amount of multi-terminal synchronous acquisition of three remote information, and uses an information fusion strategy to analyze the data to obtain the identified topology relationship. However, this method has a high synchronization requirement and requires a large amount of information, and most of the current market products do not support it.

[0005] (3) Topology identification technology based on carrier distance measurement, which uses carrier distance measurement to realize the association of the line length of each terminal and obtains the actual topology information of each terminal. This technology requires high-precision carrier distance measurement capability, and the current engineering application level of carrier distance measurement is not sufficient to support it. In addition, at least 3 points or more distance relationships are required for positioning, and the carrier needs to measure sufficient accurate distance information.

[0006] In the actual field application process of the topology identification technology based on characteristic micro-current, when the topology identification devices are installed relatively close, the power side topology identification device not only can identify the micro-current signal sent by the load side topology identification device, but also the load side topology identification device can receive a weaker micro-current signal sent by the power side topology identification device, and the branch line can also receive the micro-current signal sent by the upstream topology identification device, thereby causing topology relationship identification errors. The above phenomenon is called shunt phenomenon in the patent. SUMMARY

[0007] To solve the above problems of the prior art, the application provides a medium-voltage line topology identification method based on a KNN classifier and related devices, which collects feature micro-current information on site, trains the KNN classifier, and thus adaptively identifies a small amount of shunt problems that may occur in the line, so as to improve the identification accuracy of topology identification.

[0008] To achieve the above object, the application provides a medium-voltage line topology identification method based on a KNN classifier, which comprises the following steps:

[0009] Step 1: Collect signal power and noise power received by each topology identification device at different frequencies on site, calculate useful signal power based on the signal power and the noise power, and the useful signal power comprises useful signal power of self-generating and self-receiving micro-current and useful signal power of self-generating and other-receiving micro-current.

[0010] Step 2: Train a KNN model by taking frequency information of the transmitted micro-current, useful signal power of self-generating and self-receiving micro-current, useful signal power of self-generating and other-receiving micro-current, and shunt data as input.

[0011] Step 3: Input frequency information of actual operation, useful signal power of self-generating and self-receiving, and useful signal power of self-generating and other-receiving collected on site into the trained KNN model, adaptively give a shunt judgment result, fuse data of no shunt, and obtain actual topology information of the line.

[0012] Further, the step 1 calculates useful signal power S based on signal power and noise power, and the calculation method is as follows:

[0013]

[0014] wherein R is signal power, is noise power, , , are respectively represented as follows:

[0015] R = [ R 1 , 1 f 1 R 1 , 2 f 1 ⋯ R 1 , N f 1 R 1 , 1 f 2 ⋯ R 1 , N f M ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ R N , 1 f 1 R N , 2 f 1 ⋯ R N , N f 1 R N , 1 f 2 ⋯ R N , N f M ]

[0016] W = [ W 1 , 1 f 1 W 1 , 2 f 1 ⋯ W 1 , N f 1 W 1 , 1 f 2 ⋯ W 1 , N f M ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ W N , 1 f 1 W N , 2 f 1 ⋯ W N , N f 1 W N , 1 f 2 ⋯ W N , N f M ]

[0017] S = [ S 1 , 1 f 1 S 1 , 2 f 1 ⋯ S 1 , N f 1 S 1 , 1 f 2 ⋯ S 1 , N f M ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ S N , 1 f 1 S N , 2 f 1 ⋯ S N , N f 1 S N , 1 f 2 ⋯ S N , N f M ]

[0018] wherein, represents signal power transmitted by the node topology identification device at the frequency, signal power received by the node topology identification device, when ,​​ , , when , the signal power representing the spontaneous self-receiving micro-current; representing the noise power received by the node topology identification device at frequency, sent by the node topology identification device at frequency, representing the useful signal power received by the node topology identification device at frequency, sent by the node topology identification device at frequency,

[0019] wherein the topology identification device on the load side can only receive the micro-current signal shunted from the power supply side, and the current amplitude accounts for less than 30% of the total amplitude; the topology identification device on the power supply side can receive the micro-current signal sent by the topology identification device on the load side.

[0020] Further, the training data format of the step 2 KNN model training is as follows:

[0021] data = [ f 1 S 1 , 1 f 1 S 1 , 2 f 1 f 1 S 1 , 1 f 1 S 1 , 3 f 1 ⋮ ⋮ ⋮ f 1 S 1 , 1 f 1 S 1 , N f 1 f 1 S 2 , 2 f 1 S 2 , 1 f 1 f 1 S 2 , 2 f 1 S 2 , 3 f 1 ⋮ ⋮ ⋮ f 1 S N , N f 1 S N , N − 1 f 1 f 2 S 1 , 1 f 2 S 1 , 2 f 2 ⋮ ⋮ ⋮ f M S N , N f M S N , N − 1 f M ] label = [ result 1 result 2 ⋮ result N − 1 result N result N + 1 ⋮ result N ( N − 1 ) result N ( N − 1 ) + 1 ⋮ result NM ( N − 1 ) ]

[0022] wherein, represents the training label, represents the label result of the first group of data, and is assigned a value of 1 when shunt phenomenon occurs and a value of 0 when no shunt phenomenon occurs, ; represents the training data, the first column ( ) represents frequency information, the second column represents ( ) the useful signal power information of the spontaneous self-receiving micro-current of the node at frequency, the third column represents the useful signal power information of the spontaneous self-receiving micro-current received by the node topology identification device at ( ) frequency, and the and data are assigned to the KNN classifier for learning to obtain the trained KNN model.

[0023] Further, the step 3 fusion processing of the non-shunt data includes: performing topology identification processing on the results of the shunt identification processing, and forming a topology relationship diagram by using the received principle on the transmitted power supply side.

[0024] A medium-voltage line topology identification device based on a KNN classifier, comprising:

[0025] A data acquisition module configured to collect signal power and noise power received by each topology identification device at different frequencies, and calculate useful signal power based on the signal power and the noise power, wherein the useful signal power includes useful signal power of self-generated self-received micro-current and useful signal power of self-generated other-received micro-current;

[0026] A KNN model training module configured to take frequency information of transmitted micro-current, useful signal power of self-generated self-received micro-current, useful signal power of self-generated other-received micro-current, and shunt data as input to train a KNN model;

[0027] A topology identification module configured to input frequency information of actual operation, useful signal power of self-generated self-received micro-current, and useful signal power of self-generated other-received micro-current collected in the field into the trained KNN model, to adaptively give a shunt decision result, and to fuse data of non-shunt to obtain actual topology information of the line.

[0028] Further, the data acquisition module calculates the useful signal power based on the signal power and the noise power, and the calculation method is as follows:

[0029]

[0030] wherein R is the signal power, is the noise power, , , are respectively represented as follows:

[0031] R = [ R 1 , 1 f 1 R 1 , 2 f 1 ⋯ R 1 , N f 1 R 1 , 1 f 2 ⋯ R 1 , N f M ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ R N , 1 f 1 R N , 2 f 1 ⋯ R N , N f 1 R N , 1 f 2 ⋯ R N , N f M ]

[0032] W = [ W 1 , 1 f 1 W 1 , 2 f 1 ⋯ W 1 , N f 1 W 1 , 1 f 2 ⋯ W 1 , N f M ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ W N , 1 f 1 W N , 2 f 1 ⋯ W N , N f 1 W N , 1 f 2 ⋯ W N , N f M ]

[0033] S = [ S 1 , 1 f 1 S 1 , 2 f 1 ⋯ S 1 , N f 1 S 1 , 1 f 2 ⋯ S 1 , N f M ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ S N , 1 f 1 S N , 2 f 1 ⋯ S N , N f 1 S N , 1 f 2 ⋯ S N , N f M ]

[0034] wherein, represents signal power of self-generated self-received micro-current at frequency, transmitted by the node topology identification device, received by the node topology identification device, when , , when , represents signal power of self-generated other-received micro-current at frequency, Node topology identification device sends, Noise power received by the node topology identification device; Representatives in frequency, Node topology identification device sends, The useful signal power received by the node topology identification device;

[0035] Among them, the topology identification device on the load side can only receive the micro-current signal diverted from the power supply side, and the current amplitude accounts for less than 30% of the total amplitude; the topology identification device on the power supply side can receive the micro-current signal sent by the topology identification device on the load side.

[0036] Furthermore, the training data format of the KNN model training module for KNN model training is as follows:

[0037] data = [ f 1 S 1 , 1 f 1 S 1 , 2 f 1 f 1 S 1 , 1 f 1 S 1 , 3 f 1 ⋮ ⋮ ⋮ f 1 S 1 , 1 f 1 S 1 , N f 1 f 1 S 2 , 2 f 1 S 2 , 1 f 1 f 1 S 2 , 2 f 1 S 2 , 3 f 1 ⋮ ⋮ ⋮ f 1 S N , N f 1 S N , N − 1 f 1 f 2 S 1 , 1 f 2 S 1 , 2 f 2 ⋮ ⋮ ⋮ f M S N , N f M S N , N − 1 f M ] label = [ result 1 result 2 ⋮ result N − 1 result N result N + 1 ⋮ result N ( N − 1 ) result N ( N − 1 ) + 1 ⋮ result NM ( N − 1 ) ]

[0038] in, represents the training label, Representative The label result of the group data is assigned a value of 1 when there is a diversion phenomenon, and a value of 0 when there is no diversion phenomenon. ; Represents training data, the first column ( ) represents frequency information, the second column represent ( ) node in Useful signal power information of the self-generated and self-received micro-current at the frequency, the third column represent Node topology identification device sends, ( ) The node topology identification device receives the useful signal power information of the spontaneous micro-current, and The data is assigned to the KNN classifier for learning to obtain a trained KNN model.

[0039] Furthermore, the topology identification module performs fusion processing on the non-divided data, including: performing topology identification processing on the result after the diversion identification processing, and forming a topology relationship diagram using the principle of the power supply side of the received data on the sending side.

[0040] An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the medium-voltage line topology identification method based on the KNN classifier is implemented.

[0041] A non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the KNN classifier-based medium-voltage line topology identification method.

[0042] The present application has the beneficial effect that by collecting feature micro-current information and shunt conditions on site, training a KNN classifier, and thus adaptively identifying a small number of shunt problems that may occur on the line, the results identified as shunts are eliminated before line topology relationship identification, further improving the identification accuracy of topology identification. BRIEF DESCRIPTION OF DRAWINGS

[0043] Figure 1 A flowchart of a KNN classifier-based medium-voltage line topology identification method according to an embodiment of the present application.

[0044] Figure 2 A topology structure diagram according to an embodiment of the present application. DETAILED DESCRIPTION

[0045] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without making creative efforts fall within the scope of protection of the present application.

[0046] As shown in Figure 1 , the present application provides a KNN classifier-based medium-voltage line topology identification method, comprising the following steps:

[0047] Step 1: Collecting signal power and noise power received by each topology identification device at different frequencies on site;

[0048] Step 2: According to the actual shunt conditions on site, performing KNN model training on the frequency information of the transmitted micro-current, the useful signal power of the self-generated and self-received micro-current, the useful signal power of the self-generated and other-received micro-current, and the shunt conditions;

[0049] Step 3: Embedding the trained KNN model into the topology identification program, adaptively giving a shunt judgment result according to the collected signal power and noise power on site, and performing fusion processing on the data without shunt to obtain the actual topology information of the line.

[0050] The collected signal power and noise power information received by each node at different frequencies on site in step 1 is calculated by the received signal power and noise power to calculate the useful signal power , and the calculation method is as follows:

[0051]

[0052] wherein, , , The representation methods of the above are as follows, respectively:

[0053] R = [ R 1 , 1 f 1 R 1 , 2 f 1 ⋯ R 1 , N f 1 R 1 , 1 f 2 ⋯ R 1 , N f M ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ R N , 1 f 1 R N , 2 f 1 ⋯ R N , N f 1 R N , 1 f 2 ⋯ R N , N f M ]

[0054] W = [ W 1 , 1 f 1 W 1 , 2 f 1 ⋯ W 1 , N f 1 W 1 , 1 f 2 ⋯ W 1 , N f M ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ W N , 1 f 1 W N , 2 f 1 ⋯ W N , N f 1 W N , 1 f 2 ⋯ W N , N f M ]

[0055] S = [ S 1 , 1 f 1 S 1 , 2 f 1 ⋯ S 1 , N f 1 S 1 , 1 f 2 ⋯ S 1 , N f M ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ S N , 1 f 1 S N , 2 f 1 ⋯ S N , N f 1 S N , 1 f 2 ⋯ S N , N f M ]

[0056] wherein, represents the signal power of the self-receiving micro-current when frequency, , the node topology identification device sends, , the signal power received by the node topology identification device, , when represents the signal power of the self-receiving micro-current; represents the noise power received by the node topology identification device when frequency, the node topology identification device sends, the signal power received by the node topology identification device; represents the useful signal power received by the node topology identification device when frequency, the node topology identification device sends, the signal power received by the node topology identification device;

[0057] wherein, the topology identification device on the load side can only receive the micro-current signal shunted from the power side, and the current amplitude accounts for less than 30% of the total amplitude; the topology identification device on the power side can receive the micro-current signal sent by the topology identification device on the load side.

[0058] The training data format of the step 2 is as follows:

[0059] data = [ f 1 S 1 , 1 f 1 S 1 , 2 f 1 f 1 S 1 , 1 f 1 S 1 , 3 f 1 ⋮ ⋮ ⋮ f 1 S 1 , 1 f 1 S 1 , N f 1 f 1 S 2 , 2 f 1 S 2 , 1 f 1 f 1 S 2 , 2 f 1 S 2 , 3 f 1 ⋮ ⋮ ⋮ f 1 S N , N f 1 S N , N − 1 f 1 f 2 S 1 , 1 f 2 S 1 , 2 f 2 ⋮ ⋮ ⋮ f M S N , N f M S N , N − 1 f M ] label = [ result 1 result 2 ⋮ result N − 1 result N result N + 1 ⋮ result N ( N − 1 ) result N ( N − 1 ) + 1 ⋮ result NM ( N − 1 ) ]

[0060] wherein, represents the training label, represents the label result of the first group of data, and is valued as 1 when the shunt phenomenon occurs, and is valued as 0 when the shunt phenomenon does not occur, ; represents the training data, and the first column represent frequency information, the second column represent node at frequency of spontaneous self-receiving micro-current useful signal power information, the third column represent Node topology identification device sends, node topology identification device receives the spontaneous self-receiving micro-current useful signal power information, and and data is given to KNN classifier for learning, and the trained KNN model, namely the shunt decision model.

[0061] The step 3 adaptively gives the shunt decision result according to the information collected on site, that is, the frequency information, the spontaneous self-receiving useful signal power information and the spontaneous self-receiving useful signal power information of the actual operation on site are input into the shunt decision model, and the identification result of the shunt is obtained.

[0062] The step 3 fuses the data without shunt, that is, the results after shunt identification processing are processed by topology identification processing, and the topology relationship diagram is formed by using the principle of receiving the power supply side. As Figure 2 shown, the 40# topology identification device and the 23#-1 topology identification device are both end branch points, and when the 40# topology identification device sends the micro-current signal, the 23#-1 topology identification device receives the micro-current information sent by the device. At the same time, when the 23#-1 topology identification device sends the micro-current signal, the 40# topology identification device also receives the micro-current information sent by the device.

[0063] Table 1 40# topology device sends micro-current receiving condition of each device

[0064]

[0065] Table 2 23#-1 topology device sends micro-current receiving condition of each device

[0066]

[0067] Table 3 22# topology device sends micro-current receiving condition of each device

[0068]

[0069] Table 4 2# topology device sends micro-current receiving condition of each device

[0070] ​​​

[0071] As shown in Table 1, in this embodiment, by inputting the signal strength of 40# into the shunt decision model, the identification result is as shown in Table 1, so that 22# and 2# are upstream of 40#;

[0072] As shown in Table 2, in this embodiment, by inputting the signal strength of 23#-1 into the shunt decision model, the identification result is as shown in Table 2, so that 23#-1 and 2# are upstream of 40#, and 40# and 23#-1 are two branches;

[0073] As shown in Table 3, in this embodiment, by inputting the signal strength of 22# into the shunt decision model, the identification result is as shown in Table 3, so that 2# is upstream of 22#;

[0074] As shown in Table 4, in this embodiment, by inputting the signal strength of 2# into the shunt decision model, the identification result is as shown in Table 4, so that 2# is the most upstream node, and thus the topology result as shown in Table 4 can be drawn. Figure 2

[0075] The embodiment of the present application also provides a medium-voltage line topology identification device based on a KNN classifier, comprising:

[0076] a data acquisition module, configured to collect signal power and noise power received by each topology identification device at different frequencies on site, and calculate useful signal power based on the signal power and the noise power, wherein the useful signal power comprises useful signal power of self-generated and self-received micro-current and useful signal power of self-generated and other-received micro-current;

[0077] a KNN model training module, configured to take frequency information of sent micro-current, useful signal power of self-generated and self-received micro-current, useful signal power of self-generated and other-received micro-current, and shunt data as input, and train a KNN model;

[0078] a topology identification module, configured to input frequency information of actual operation, useful signal power of self-generated and self-received micro-current, and useful signal power of self-generated and other-received micro-current collected on site into the trained KNN model, adaptively give a shunt decision result, and fuse data without shunt to obtain actual topology information of the line.

[0079] Another embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the medium-voltage line topology identification method based on the KNN classifier when executing the computer program.

[0080] ​Another embodiment of the present application provides a non-transitory computer readable storage medium, having stored thereon a computer program, which, when executed by a processor, implements the KNN classifier based medium voltage line topology identification method.

[0081] Those skilled in the art will appreciate that embodiments of the present application can be supplied as a method, a system, or a computer program product. Accordingly, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application can take the form of a computer program product on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage devices, etc.) embodying computer readable program code thereon.

[0082] The present application is described in reference to the flowchart illustrations and / or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the present application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processing device or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart illustrations and / or block diagrams block or blocks. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams block or blocks. Figure 1 means for performing the function specified by the flowchart illustrations and / or block diagrams block or blocks.

[0083] These computer program instructions can also be stored in a computer- readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the flowchart illustrations and / or block diagrams block or blocks. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams block or blocks. Figure 1 means for performing the function specified by the flowchart illustrations and / or block diagrams block or blocks.

[0084] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the flowchart illustrations and / or block diagrams block or blocks. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams block or blocks. Figure 1 means for performing the function specified by the flowchart illustrations and / or block diagrams block or blocks.

[0085] It should be pointed out finally that the above embodiments are only used to illustrate the technical solutions of the present application but not to limit it. Although the present application has been described in detail with reference to the above embodiments, it should be understood by those skilled in the art that the specific embodiments of the present application can be modified or replaced equivalently without departing from the spirit and scope of the present application, and any modification or equivalent replacement should be covered in the protection scope of the claims of the present application.

Claims

1. A medium voltage line topology identification method based on KNN classifier, characterized in that: The following steps are involved: Step 1: Collect the signal power and noise power received by each topology identification device at different frequencies on site, and calculate the useful signal power based on the signal power and noise power. The useful signal power includes the useful signal power of the self-generated and self-received microcurrent and the useful signal power of the self-generated and other-received microcurrent; Step 2: Train the KNN model using the frequency information of the transmitted microcurrent, the useful signal power of the self-generated and self-received microcurrent, the useful signal power of the spontaneous and other-received microcurrent, and the diversion data as input; Step 3: Input the actual operating frequency information, the self-transmitted and self-received useful signal power, and the self-transmitted and other-received useful signal power collected on-site into the trained KNN model. Adaptively determine the diversion decision and fuse the non-diverted data to obtain the actual line topology information.

2. The method for identifying medium voltage line topology based on KNN classifier according to claim 1, characterized in that: In step 1, the useful signal power S is calculated based on the signal power and the noise power. The calculation method is as follows: ; Where R is the signal power, is the noise power, 、 、 are represented as follows: ; ; ; in, Representatives in frequency, Node topology identification device sends, The signal power received by the node topology identification device is , , ,when When , it represents the signal power of the self-generated and self-received microcurrent; Representatives in frequency, Node topology identification device sends, Noise power received by the node topology identification device; Representatives in frequency, Node topology identification device sends, The useful signal power received by the node topology identification device; Among them, the topology identification device on the load side can only receive the micro-current signal diverted from the power supply side, and the current amplitude accounts for less than 30% of the total amplitude; the topology identification device on the power supply side can receive the micro-current signal sent by the topology identification device on the load side.

3. The method for identifying medium voltage line topology based on KNN classifier according to claim 1, characterized in that: The training data format for KNN model training in step 2 is as follows: ; in, represents the training label, Representative The label result of the group data is assigned a value of 1 when there is a diversion phenomenon, and a value of 0 when there is no diversion phenomenon. ; Represents training data, the first column ( ) represents frequency information, the second column represent ( ) node in Useful signal power information of the self-generated and self-received micro-current at the frequency, the third column represent Node topology identification device sends, ( ) The node topology identification device receives the useful signal power information of the spontaneous micro-current, and The data is assigned to the KNN classifier for learning to obtain a trained KNN model.

4. The method for identifying medium voltage line topology based on KNN classifier according to claim 1, characterized in that: In step 3, the non-divided data is fused and processed, including: performing topology identification processing on the result after the diversion identification processing, and forming a topology relationship diagram using the principle of the power supply side of the receiving and sending.

5. A medium voltage line topology identification device based on KNN classifier, characterized in that: include: A data acquisition module is used to collect the signal power and noise power received by each topology identification device at different frequencies on site, and calculate the useful signal power based on the signal power and noise power. The useful signal power includes the useful signal power of the self-generated and self-received microcurrent and the useful signal power of the self-generated and other-received microcurrent; The KNN model training module is used to train the KNN model using the frequency information of the transmitted microcurrent, the useful signal power of the spontaneous and self-received microcurrent, the useful signal power of the spontaneous and other-received microcurrent, and the diversion data as input; The topology recognition module is used to input the actual operating frequency information, the self-transmitted and self-received useful signal power, and the self-transmitted and other-received useful signal power collected on-site into the trained KNN model, adaptively give the diversion judgment result, and fuse the non-diverted data to obtain the actual topology information of the line.

6. The medium voltage line topology identification device based on KNN classifier according to claim 5, characterized in that: The data acquisition module calculates the useful signal power based on the signal power and the noise power, and the calculation method is as follows: ; Where R is the signal power, is the noise power, 、 、 are represented as follows: ; ; ; in, Representatives in frequency, Node topology identification device sends, The signal power received by the node topology identification device is , , ,when When , it represents the signal power of the self-generated and self-received microcurrent; Representatives in frequency, Node topology identification device sends, Noise power received by the node topology identification device; Representatives in frequency, Node topology identification device sends, The useful signal power received by the node topology identification device; Among them, the topology identification device on the load side can only receive the micro-current signal diverted from the power supply side, and the current amplitude accounts for less than 30% of the total amplitude; the topology identification device on the power supply side can receive the micro-current signal sent by the topology identification device on the load side.

7. The medium voltage line topology identification device based on KNN classifier according to claim 5, characterized in that: The training data format for the KNN model training module is as follows: ; in, represents the training label, Representative The label result of the group data is assigned a value of 1 when there is a diversion phenomenon, and a value of 0 when there is no diversion phenomenon. ; Represents training data, the first column ( ) represents frequency information, the second column represent ( ) node in Useful signal power information of the self-generated and self-received micro-current at the frequency, the third column represent Node topology identification device sends, ( ) The node topology identification device receives the useful signal power information of the spontaneous micro-current, and The data is assigned to the KNN classifier for learning to obtain a trained KNN model.

8. A medium voltage line topology identification device based on KNN classifier according to claim 5 It is characterized by The topology identification module performs fusion processing on the non-divided data, including: performing topology identification processing on the result of the diversion identification processing, and forming a topology relationship diagram using the principle of the power supply side of the received data being sent.

9. An electronic device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method for identifying medium voltage line topology based on a KNN classifier as claimed in any one of claims 1 to 4 is implemented.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the method for identifying medium voltage line topology based on a KNN classifier according to any one of claims 1 to 4 is implemented.