A dual attention mechanism distribution station flooding identification method and system

The dual-attention mechanism enhances detection accuracy and adaptability in power distribution stations by filtering redundant frames and updating the network with cloud feedback, addressing real-time response and detection challenges under flooding conditions.

CN114677584BActive Publication Date: 2025-01-03ZHONGSHAN POWER SUPPLY BUREAU OF GUANGDONG POWER GRID +3
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111641799.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-29
Publication Date
2025-01-03
Estimated Expiration
2041-12-29

AI Technical Summary

Technical Problem

Existing power distribution station monitoring systems face challenges in real-time response and detection accuracy, especially under flooding conditions, due to network bottlenecks and insufficient computing power at the edge end, making it difficult to adapt to complex scenes.

Method used

A dual-attention mechanism-based method and system that includes collecting and labeling image data, training a detection network with a dual-attention mechanism, quantizing and encrypting it for edge deployment, filtering redundant frames, and updating the network with cloud feedback to enhance detection accuracy and adaptability.

Benefits of technology

Enhances detection capability and adaptability to complex scenarios by filtering redundant frames, reducing network load, and improving accuracy through real-time updates, enabling efficient real-time business response.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114677584B_ABST
    Figure CN114677584B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and system for identifying flooding in distribution stations with a dual-attention mechanism, wherein the identification method collects flooding scene picture sets, constructs a detection network with a dual-attention mechanism based on Yolov4‑tiny, trains the detection network using the flooding scene picture sets, obtains a detection network with high detection accuracy and flooding recognition capability, and finally deploys the detection network to an edge agent; at the same time, the edge agent obtains the surrounding environment image and uploads it to the cloud platform, updates the flooding scene picture set, and optimizes the detection network, so that the edge agent can adapt to complex scenes. The present invention aims to solve the technical problems that the existing distribution station edge end cannot meet the real-time response under the flooding environment, and the detection accuracy is poor and cannot adapt to complex scenes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power distribution station identification, and in particular to a method and system for identifying water immersion in power distribution stations using a dual attention mechanism. Background Art

[0002] For a long time, the maintenance and management of distribution rooms or switchgears has been one of the weak links in the reliability of power system operation. At present, the monitoring of abnormal conditions in distribution stations mainly adopts cloud computing or edge computing. However, cloud computing has network transmission problems in the processing process, and edge computing has insufficient computing power and local storage redundancy. Both cannot adapt to the environment and continuously improve performance. Although cloud computing can use its super computing power to process and analyze data collected from the device layer and uploaded to the cloud platform in terms of big data, the surge in the number of devices has led to a surge in the amount of data generated by the devices. However, the growth rate of network loans is far less than the growth rate of data, making network bandwidth a bottleneck, and the increasingly complex network environment makes the network delay problem more obvious.

[0003] Most parts of my country are rainy and cloudy, and some areas are even suffering from severe flooding. In addition, some high and low voltage distribution rooms are built in low-lying areas, resulting in varying degrees of flooding in many distribution rooms. It is difficult to detect abnormal conditions in distribution stations under flooding conditions. At the same time, distribution stations are mostly located in remote environments, and network conditions are unstable. Only by processing unstructured data such as video images in a structured manner at the nearest object or data source can the pressure on network bandwidth, back-end computing and storage be effectively reduced, and the overall analysis efficiency be improved to meet the requirements of business implementation response. Summary of the invention

[0004] The main purpose of the present invention is to provide a dual-attention mechanism distribution station flooding identification method and system, aiming to solve the technical problems that the existing distribution station edge end flooding environment cannot meet real-time response, and the detection accuracy is poor and cannot adapt to complex scenes.

[0005] To achieve the above object, the present invention provides a dual attention mechanism distribution substation flooding identification method and system, wherein the method comprises the following steps:

[0006] S1. Collect water-immersion scene picture set X, select part of picture set X q Mark to get the label data set Y q , the remaining picture set is the unlabeled picture set X p ={XX q};

[0007] S2. Build the first network Q with dual attention mechanism based on Yolov4-tiny, using part of the image set X q And the label dataset Yq The training data set D q ={X q ,Y q}Train the first network Q to obtain a second network Q′;

[0008] S3, according to the second network Q', the unlabeled picture set X p ={XX q} Mark to get the label data set Y p , and update the training data set D q , the updated training dataset D q ={X = X q +X p ,Y=Y q +Y p}; Use the updated training data set to train the second network Q′ to obtain a detection network Q″;

[0009] S4, uploading the detection network Q″ to the cloud platform, and sending it to the edge agent after quantization and encryption;

[0010] S5, the edge agent obtains the surrounding environment image through the camera, and filters the redundant frames to obtain the key frames;

[0011] S6, input the key frame into the quantized detection network to obtain the target confidence c, if the confidence is abnormal, save it locally, make a decision and report it; otherwise, execute step S7;

[0012] S7. The edge agent selects some images according to the confidence level, marks them and uploads them to the cloud platform. The cloud platform updates the uploaded images to the water immersion scene picture set X.

[0013] Preferably, the step of constructing the first network Q of the dual attention mechanism based on Yolov4-tiny includes:

[0014] A dual attention mechanism is added at the exit of Yolov4-tiny’s backbone network and the fusion of the feature network to obtain the first network Q with a dual attention mechanism.

[0015] Preferably, the backbone network of Yolov4-tiny is Darknet53-tiny, including a first convolution unit, a second convolution unit, a first residual unit, a second residual unit, a third residual unit and a fourth residual unit; a dual attention mechanism is added to the second residual unit and the fourth residual unit respectively.

[0016] Preferably, the feature network of Yolov4-tiny includes a third convolution unit, a fourth convolution unit, an upsampling unit and a channel splicing unit, and a dual attention mechanism is added to the upsampling unit.

[0017] Preferably, the dual attention mechanism includes a channel attention module and a spatial attention module.

[0018] Preferably, the use of training data set D q ={X q ,Y q Before the step of training the first network Q, it includes:

[0019] Load Yolov4-tiny's imagenet pre-trained weights into the first network Q according to the network layer.

[0020] Preferably, the step of uploading the detection network Q″ to the cloud platform and sending it to the edge agent after quantization and encryption includes:

[0021] The detection network Q″ is uploaded to the cloud platform, and the cloud platform quantifies the detection network Q″ to obtain the quantized detection network Q″ int8 ;

[0022] The quantized detection network Q″ int8 The data is encrypted using AES and then sent to the edge proxy.

[0023] Preferably, before the step of uploading the detection network Q″ to the cloud platform and sending it to the edge agent after quantization and encryption, the following steps are included:

[0024] The cloud platform initializes the edge proxy sum tree.

[0025] Preferably, the step S6 is specifically:

[0026] like The image is saved according to the predicted category and uploaded to the cloud platform. To save the threshold value, the is the reporting threshold;

[0027] like Then it enters the alarm mode and uploads the abnormal images to the cloud platform;

[0028] like Then execute step S5.

[0029] Preferably, the step of filtering redundant frames to obtain key frames comprises:

[0030] S51, using the camera to obtain four consecutive frames of images Pic = [P0, P1, P2, P3];

[0031] S52, grayscale processing is performed on the image, and Gaussian filtering is performed to obtain a filtered image

[0032] S53, filtering the image Make a difference and get the grayscale feature map dif 1 ,dif 2 ;

[0033] S54, the grayscale feature map dif 1 ,dif 2 Fill and calculate dif 1 ,dif 2 The correlation coefficient corr;

[0034] S55, the camera obtains the next frame image P4, P3 gray =P4;

[0035] S56, judging whether the correlation coefficient corr is greater than a threshold value Thr corr , if corr>Thr corr , then output key frame P key =P4; otherwise return to step S52.

[0036] Preferably, the step of marking the uploaded image by the cloud platform includes:

[0037] When the number of flooded scene images reaches V, the edge agent selects m images according to the confidence level and marks them, and uploads the marked m images to the cloud platform. The cloud platform recombine the received m images with the existing flooded scene image set in a ratio of 3:1 to obtain a new flooded scene image set X.

[0038] The present invention also provides a dual-attention mechanism distribution station flooding identification system, including a cloud platform, an edge agent and a camera;

[0039] The camera is connected to the edge proxy to obtain the surrounding environment image and transmit it to the edge proxy;

[0040] The edge proxy is connected to the cloud platform and is used to process the image and upload it to the cloud platform;

[0041] The cloud platform is used to update the water immersion scene image set with the uploaded images, and use the updated data for training, thereby updating and optimizing the detection network.

[0042] In the above technical solution of the present invention, the dual-attention mechanism distribution station flooding identification method includes: collecting a flooded scene picture set X; constructing a first network Q with a dual-attention mechanism based on Yolov4-tiny, and training the first network Q using the collected flooded scene picture set X to obtain a detection network Q″; uploading the detection network Q″ to the cloud platform, and sending it to the edge agent after quantization and encryption; the edge agent obtains the surrounding environment image through the camera, and filters the redundant frames to obtain key frames; the key frames are input into the quantized detection network to obtain the target confidence c, and if the confidence is abnormal, the decision is made on the spot and reported; the cloud platform marks the uploaded image and updates the picture set X. The present invention solves the technical problems that the existing distribution station edge end cannot meet the real-time response in the flooded environment, and the detection accuracy is poor and cannot adapt to complex scenes.

[0043] In the present invention, the detection capability of easily confusing target images is enhanced by introducing a dual attention mechanism in the detection network.

[0044] In the present invention, real-time update data is updated through the cloud platform, so that real-time update of the detection network can be achieved. The edge agent can better adapt to complex scenarios and improve edge detection accuracy by updating and optimizing the detection network.

[0045] In the present invention, redundant frames are filtered at the edge to obtain key frames, which reduces the processing burden and communication bandwidth of the cloud platform, reduces redundant data at the edge, reduces storage pressure and storage energy consumption, improves overall analysis efficiency, and meets requirements such as real-time business response. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying any creative work.

[0047] Figure 1 A schematic diagram of a flow chart of a method for identifying flooding in a power distribution station using a dual attention mechanism according to an embodiment of the present invention;

[0048] Figure 2 Schematic diagram of a channel attention module according to an embodiment of the present invention;

[0049] Figure 3 is a schematic diagram of a spatial attention module according to an embodiment of the present invention;

[0050] Figure 4 Schematic diagram of a dual attention mechanism according to an embodiment of the present invention;

[0051] Figure 5 This is a schematic diagram of the network structure of the dual attention mechanism based on yolov4-tiny in an embodiment of the present invention;

[0052] Figure 6 A schematic diagram of the encryption and decryption process of an embodiment of the present invention;

[0053] Figure 7 This is a schematic diagram of the overall operation process of the cloud platform according to an embodiment of the present invention;

[0054] Figure 8 This is a schematic diagram of the process of updating within a cloud platform container according to an embodiment of the present invention;

[0055] Fig. 9 A schematic diagram of the process of edge proxy deployment and update according to an embodiment of the present invention;

[0056] Fig.10 This is a structural schematic diagram of a dual-attention mechanism distribution station flooding identification system according to an embodiment of the present invention.

[0057] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with the implementation methods and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0058] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0059] It should be noted that all directional indications (such as up, down, etc.) in the embodiments of the present invention are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.

[0060] In addition, in the present invention, the descriptions such as "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" or "second" may explicitly or implicitly include at least one of the features.

[0061] Furthermore, the technical solutions between the various embodiments of the present invention may be combined with each other, but this must be based on the fact that they can be implemented by ordinary technicians in the field. When the combination of technical solutions is mutually contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by the present invention.

[0062] Embodiment 1:

[0063] See also Figure 1-Figure 9 According to one aspect of the present invention, the present invention provides a dual-attention mechanism distribution station flooding identification method and system, wherein the dual-attention mechanism distribution station flooding identification method specifically includes the following steps:

[0064] S1. Collect water-immersion scene picture set X, select part of picture set X q Mark to get the label data set Y q , the remaining picture set is the unlabeled picture set X p ={XX q};

[0065] S2. Build the first network Q with dual attention mechanism based on Yolov4-tiny, using part of the image set X q And the label dataset Y q The training data set D q ={X q ,Y q}Train the first network Q to obtain a second network Q′;

[0066] S3, according to the second network Q', the unlabeled picture set X p ={XX q} Mark to get the label data set Y p , and update the training data set D q , the updated training dataset D q ={X = X q +X p ,Y=Y q +Y p}; Use the updated training data set to train the second network Q′ to obtain a detection network Q″;

[0067] S4, uploading the detection network Q″ to the cloud platform, and sending it to the edge agent after quantization and encryption;

[0068] S5, the edge agent obtains the surrounding environment image through the camera, and filters the redundant frames to obtain the key frames;

[0069] S6, input the key frame into the quantized detection network to obtain the target confidence c, if the confidence is abnormal, save it locally, make a decision and report it; otherwise, execute step S7;

[0070] S7. The edge agent selects some images according to the confidence level, marks them and uploads them to the cloud platform. The cloud platform updates the uploaded images to the water immersion scene picture set X.

[0071] Specifically, in this embodiment, a water immersion scene picture set X={x1, x2, ..., x q ,...,x N}, select 20% of the image X q Mark to get the label data set Y q ={y1,y2,...,y q}, using the image X q And the label dataset Y q ={y1,y2,...,y q}Form a training data set D q ={X q ,Y q}, the remaining image set is the unlabeled image set X p ={XX q}.

[0072] Specifically, in this embodiment, a dual attention mechanism is added at the extraction of the Yolov4-tiny backbone network and the fusion of the feature network to construct a first network Q with a dual attention mechanism. The backbone network is Darknet53-tiny, including a first convolution unit, a second convolution unit, a first residual unit, a second residual unit, a third residual unit and a fourth residual unit; a dual attention mechanism is added to the second residual unit and the fourth residual unit respectively to strengthen the main effective channels and spaces of the feature map extracted from the backbone network, and the primary features of the image are extracted through the first convolution unit, the second convolution unit and the first residual unit, and then the dual attention mechanism is added to the second residual unit and the fourth residual unit to ensure that the local important information of the image is obtained on the basis of the primary feature extraction of the image; if the attention mechanism is added before obtaining the global information, part of the global information of the image will be missed, making the image information acquisition incomplete. The feature network includes a third convolution unit, a fourth convolution unit, an upsampling unit and a channel splicing unit. A double attention mechanism is added at the upsampling unit. Since the feature map is convolved before upsampling, a double attention mechanism is added after the upsampling module to prevent missing some global information and local important information of the image.

[0073] Specifically, in this embodiment, the dual attention mechanism includes a channel attention module and a spatial attention module; the spatial attention module reduces the dimension of the data in the feature map by introducing mean pooling and maximum pooling to include global information and local important information, and finally uses convolution to extract and assign different weights, thereby increasing the weight of effective information by extracting global information and local important information. After the feature map is mean pooled and maximum pooled in the channel dimension, the results of mean pooling and maximum pooling are channel spliced, and then a 7*7 convolution activation is performed to obtain the spatial attention mechanism module Ms, which is expressed as follows:

[0074]

[0075] σ is the sigmoid activation function, expressed as follows:

[0076]

[0077] Specifically, in the present embodiment, in the channel attention module, a picture will get a feature matrix after passing through several convolution layers. The number of channels of the feature matrix is ​​the number of convolution layer kernels. The number of existing convolution layer kernels is 1024 or 2048. Not every channel is useful for information transmission. Therefore, by filtering these channels, an optimized feature matrix can be obtained, mainly by increasing the weight of valid channels and reducing the weight of invalid channels. Two-dimensional mean pooling and two-dimensional maximum pooling are performed on the feature map respectively. In order to be deployed at the edge, the number of parameters needs to be reduced. Here, two consecutive 1*1 convolutions are used to simulate the fully connected layer to convolve the results of the two-dimensional mean pooling and two-dimensional maximum pooling obtained in the previous step. Finally, the addition is activated by the sigmoid function to obtain the channel attention mechanism module Mc. The formula is as follows:

[0078]

[0079] Among them, W0 is the weight of the first 1*1 convolution kernel, and W1 is the weight of the second 1*1 convolution kernel. is the result of mean pooling of the feature map in the channel dimension. It is the result of the feature map being max-pooled in the channel dimension.

[0080] After the feature map F is input into the channel attention mechanism module Mc, it is multiplied with the feature map F to obtain the feature map F′ that integrates the channel attention. After F′ is input into the spatial attention mechanism module Ms, it is multiplied with the feature map F′ to obtain the feature map F″ that integrates the channel and spatial attention.

[0081] The formula is as follows:

[0082]

[0083]

[0084] Specifically, in this embodiment, the imagenet pre-trained weights of Yolov4-tiny are loaded into the first network Q according to the network layer, and the partial image set X is used. q And the label dataset Y q The training data set D q ={X q ,Y q} Train the first network Q to obtain a second network Q′; use the second network Q′ to train the unlabeled image set X p ={XX q} Mark to get the label data set Y p ={y1,y2,...,y p}, and update the training data set D q , update the training data set D q The training data set D can be updated automatically by the system, manually, or by the system and manually updating each other. q , the updated training dataset D q ={X = X q +X p ,Y=Y q +Y p}; Use the updated training data set to train the second network Q′ to obtain a detection network Q″; upload the detection network Q″ to the cloud platform, and the cloud platform quantizes the detection network Q″ to obtain a quantized detection network Q″ int8 , encrypted and packaged into an application and sent to the edge agent, the quantized detection network Q″ int8 Encryption is performed using AES, which is a symmetric encryption method that uses the same password for encryption and decryption. The AES encryption function takes the application and the secret key as parameters of the encryption function and outputs the ciphertext, which represents the data processed by the encryption function. The AES decoding function takes the ciphertext and the secret key as input and outputs the decrypted application. At the same time, the edge proxy sum tree is initialized through the cloud platform. The priority p of the V leaf nodes of the sum tree is V =1, V=128, and the sum tree has 6 layers in total.

[0085] Specifically, in this embodiment, the edge agent downloads the quantized detection network Q″ from the cloud platform. int8 To perform a flood monitoring task, a camera is used to obtain an image of the surrounding environment, and an edge agent filters the image to obtain a key frame through a redundant frame filter, wherein a method for filtering the key frame through the redundant frame filter includes the following steps:

[0086] S51, using the camera to obtain four consecutive frames of images Pic = [P0, P1, P2, P3];

[0087] S52, scaling the image to a suitable size and then grayscale processing to obtain a grayscale image, and performing Gaussian filtering on the grayscale image to obtain a filtered image The Gaussian filter convolution kernel formula is as follows:

[0088]

[0089] Among them, (x c ,y c ) is the coordinate of the current center point of the convolution kernel, and σ is the variance corresponding to the convolution kernel.

[0090] S53, filtering the image Make a difference and get the grayscale feature map dif 1 ,dif 2 ; The difference formula is as follows:

[0091]

[0092] Among them, dif 1 ,dif 2 It is the grayscale feature map obtained by subtracting the grayscale image.

[0093] S54, the grayscale feature map dif 1 ,dif 2 Fill in the following way:

[0094]

[0095] Among them, Thr s is the color difference dif 1 ,dif 2 The color difference threshold Thr s Can be set to 5.

[0096] After the grayscale feature map is automatically filled, the filled dif 1 ,dif 2 Adjust to a one-dimensional vector and calculate dif 1 ,dif 2 The correlation coefficient corr is as follows:

[0097]

[0098] in, for dif 1 ,dif 2 The component of 1 ,dif 2The total number of components.

[0099] S55, the camera obtains the next frame image P4, P3 gray =P4;

[0100] S56, judging whether the correlation coefficient corr is greater than a threshold value Thr corr , if corr>Thr corr , then output key frame P key = P4; otherwise return to step S52; the correlation coefficient threshold Thr corr Can be set to 0.26.

[0101] Specifically, in this embodiment, the key frame is input into the quantized detection network Q″ int8 In, perform anomaly monitoring and obtain the target confidence c;

[0102] like The image is saved according to the predicted category and uploaded to the cloud platform. To save the threshold value, the is the reporting threshold;

[0103] like Then enter the alarm mode and upload the abnormal image to the cloud platform, where c is the target confidence of the abnormal image detected by the detection network;

[0104] like The edge agent continues to monitor through the camera;

[0105] The reporting threshold value Can be set to 0.9; the saving threshold Can be set to 0.6.

[0106] Specifically, in this embodiment, when the number of uploaded images reaches V, V can be set to 128, the edge agent selects m images according to the confidence level and marks them, m can be set to 64, the edge agent uploads the marked m images to the cloud platform, and the cloud platform recombines the received m images with the existing water immersion scene picture set at a ratio of 3:1 to obtain a new water immersion scene picture set X. The cloud platform sample data is stored as follows:

[0107] S71, if i=1, j=1, the priority of the root node is obtained by summing all leaf nodes in the summation tree, and the value is L 1,1 , the sum tree has Floor=1+log2V layers;

[0108] S72, set the root node priority L 1,1 The average is intervals, randomly select a number in each interval, and get t=[t1,...,t i ,...,t y ];

[0109] S73, according to t i Start the search from the topmost root node;

[0110] S74, set the priority of the left leaf node to left, and the priority of the right leaf node to right; if left>t i , then enter the left leaf node, otherwise, enter the right leaf node; if it enters the right leaf node, then t i =t i -left, j=j+1; repeat the above steps until j>Floor. At this time, t i The image stored in the corresponding leaf node is Sam i , update the priority p of the corresponding image i =1-c i , where c i For the imageSam i Confidence in the neural network output;

[0111] S75, repeat step S74, select Sam=[Sam1,...,Sam m ], a total of m sample images;

[0112] S76, remove the selected sample data Sam from the sum tree = [Sam1, ..., Sam m ].

[0113] The new flooding scene picture set is combined with the existing network weights for migration training. After the training is completed, the training weights are updated in a soft update manner to obtain a new detection network. The new detection network is quantized and encrypted and then sent to the edge agent. The training weight soft update method is: w'=w'(1-τ ratio )+w*τ ratio ;

[0114] Among them, w' is the network weight of the edge proxy, w is the network weight of the cloud platform, τ ratio is the soft update ratio.

[0115] Specifically, in this embodiment, the cloud platform is divided into three layers from top to bottom, from the cloud side, to the edge side, to the device side. The control of the terminal is achieved through cloud testing or edge-side operation and maintenance instructions to the services running on the end side, and the security of communication is ensured through security signatures and encryption authentication methods. The edge side uniformly configures the deployment method and operating parameters of the edge application to achieve different deployment requirements for the application. The cloud platform manages application packages, edge applications, and edge agents, and configures the relationship between them. The overall operation process includes: managing application packages, uploading written application packages to the system; building application packages into images and placing them in the container image repository; directly registering application packages as edge components or registering built container images as edge applications for edge agents to use; device registration, creating digital edge agents, and configuring the edge components that need to run in them, storing the application list and configuration running in the edge agent on the server side; sending the configured edge application list to the edge agent, and the edge agent is deployed and updated according to the configuration: when the component is a native application component, it is deployed and updated on the host or attached to the container for deployment and update; when the component is a mirror component, it is deployed and updated in a container; the management platform monitors the edge agent and the applications running in it.

[0116] Specifically, in this embodiment, after the construction of the network application package to be detected is completed, the system can automatically build an image or manually build an image, and then register it as an application component or an image component, and deploy and issue it in the configuration to the edge node, supporting multiple deployment methods, container deployment, attached to container deployment and host deployment. After uploading the application package to the management, it is registered as an edge component, and then added to the edge agent for deployment. After receiving the request, the edge agent performs the deployment operation. The deployment request does not contain the actual file stream, but it will bring the download address of the file and the temporary authorization code for downloading the file. The edge agent will use the temporary authorization code to download the application compression package. The deployment progress is processed asynchronously. After the front end sends a deployment request, the edge end asynchronously returns the processing status, and then the edge end reports the deployment / update progress, and the front end polls to obtain the deployment progress information. The deployment and update in the container includes the following steps: A. The front end of the management platform sends a deployment request attached to the container to the back end of the management platform. The deployment request contains the download address of the file and the temporary authorization code for the download file, but does not contain the actual file stream; B. The back end of the management platform assembles parameters and forwards the deployment request attached to the container to the edge agent via the file server; C. The edge agent returns the processing status to the front end of the management platform, and sends an application and configuration file download request to the file server; D. The file server returns the application and configuration file stream to the edge agent, which includes: a. The edge agent reads the downloaded temporary file and obtains the number of bytes downloaded; b. The edge agent requests the file server to download the file at the starting position; c. The file server transmits the file stream to the edge agent module from the specified starting position; d. The edge agent module saves the file stream to a temporary file; e. If the file stream download is interrupted, return to step a, otherwise rename the temporary file after the download is completed. E. The edge agent saves the application and configuration files to the specified directory, performs file signature verification, and reports the processing status to the management platform backend; F. The edge agent module prepares the application execution environment, including: a. If it is not hot loading, merge the application container operation parameters, back up the original application and data in the container, and rebuild the container, otherwise directly execute the next step; b. Generate the container configuration file of the application; c. Copy all applications and their container configuration files including the original application and data files in the container to the container; d. If it is an update in the application component container, notify the management program in the container to stop and delete the old application, otherwise execute the next step; e. The management program in the container reloads the application configuration; f. If the hot loading described in a is to load the application and only involves environment variables, resource restrictions and CMD parameters, the application can be deployed and updated without rebuilding the host container.G. The edge proxy module starts / restarts the application process and records the progress; H. The edge proxy module polls and requests deployment progress information and reports the deployment progress to the file server, and the file server forwards the deployment progress to the management platform backend; I. The management platform backend records the progress; J. The management platform frontend polls the management platform backend for deployment progress, and the management platform backend returns the deployment progress information to the management platform frontend. The edge agent deployment and update includes the following steps: A. The management platform front end sends an edge agent deployment request to the management platform back end, and the deployment request includes the download address of the file and the temporary authorization code for downloading the file, but does not include the actual file stream; B. The management platform back end assembles parameters and forwards the edge agent deployment request to the edge agent module via the file server; C. The edge agent module returns the processing status to the management platform front end, and sends an application and configuration file download request to the file server; D. The file server returns the application and configuration file stream to the edge agent module, which specifically includes: a. The edge agent module reads the downloaded temporary file and obtains the number of bytes downloaded; b. The edge agent module requests the file server to download the file with the download starting position; c. The file server transmits the file stream to the edge agent module starting from the specified starting position; d. The edge agent module saves the file stream to a temporary file; e. If the file stream download is interrupted, return to step a, otherwise rename the temporary file after the download is completed. E. The edge proxy module saves the application and configuration files to the specified directory; F. If the MD5 value of the application compression package has not changed, the configuration file needs to be updated and then the application needs to be restarted in step H. Otherwise, the file signature verification is performed and the processing status is reported to the management platform backend; G. The edge proxy module prepares the application execution environment, and the management platform backend records the progress, specifically: a. Decompress to the specified directory; b. If the host machine is updated, the original application is stopped and deleted. H. The edge proxy module starts / restarts the application and records the progress; I. The edge proxy module polls for deployment progress information and reports the deployment progress to the management platform backend, and the management platform backend records the progress; J. The management platform frontend polls the management platform backend for deployment progress, and the management platform backend returns the deployment progress information to the management platform frontend.

[0117] Embodiment 2:

[0118] See also Fig.10 According to the above-mentioned dual-attention mechanism distribution station flooding identification method, a dual-attention mechanism distribution station flooding identification system is also included, and the system includes:

[0119] Cloud platform, edge agent and camera;

[0120] The camera is connected to the edge proxy to obtain the surrounding environment image and transmit it to the edge proxy;

[0121] The edge proxy is connected to the cloud platform and is used to process the image and upload it to the cloud platform;

[0122] The cloud platform is used to update the water immersion scene image set with the uploaded images, and use the updated data for training, thereby updating and optimizing the detection network.

[0123] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. All equivalent structural changes made using the contents of the present invention's specification and drawings, or directly / indirectly applied in other related technical fields, are included in the patent protection scope of the present invention.

Claims

1. A dual attention mechanism distribution station flooding identification method, characterized in that: The following steps are involved: S1. Collect water-immersion scene picture set X, select part of picture set X q Mark to get the label data set Y q , the remaining picture set is the unlabeled picture set X p ={XX q }; S2. Build the first network Q with dual attention mechanism based on Yolov4-tiny, using part of the image set X q And the label dataset Y q The training data set D q ={X q ,Y q }Train the first network Q to obtain a second network Q′; The steps of constructing the first network Q of the dual attention mechanism based on Yolov4-tiny include: Add a dual attention mechanism at the exit of Yolov4-tiny's backbone network and at the fusion of the feature network to obtain the first network Q with a dual attention mechanism; S3, according to the second network Q', the unlabeled picture set X p ={XX q } Mark to get the label data set Y p , and update the training data set Dq, the updated training data set D q ={X = X q +X p ,Y=Y q +Y p }; Use the updated training data set to train the second network Q′ to obtain a detection network Q″; S4, the cloud platform initializes the edge proxy sum tree, uploads the detection network Q″ to the cloud platform, and sends it to the edge proxy after quantization and encryption; the step of uploading the detection network Q″ to the cloud platform, and sending it to the edge proxy after quantization and encryption includes: The detection network Q″ is uploaded to the cloud platform, and the cloud platform quantifies the detection network Q″ to obtain the quantized detection network Q i ” nt8 ; The quantized detection network Q i ” nt8 The data is encrypted using AES and then sent to the edge proxy. S5, the edge agent obtains the surrounding environment image through the camera, and filters the redundant frames to obtain the key frames; S6, input the key frame into the quantized detection network to obtain the target confidence c, if the confidence is abnormal, save it locally, make a decision and report it; otherwise, execute step S7; S7, the edge agent selects some images according to the confidence level, marks them and uploads them to the cloud platform, and the cloud platform updates the uploaded images to the flooding scene picture set X; specifically: When the number of flooded scene images reaches V, the edge agent selects m images according to the confidence level and marks them, and uploads the marked m images to the cloud platform. The cloud platform recombine the received m images with the existing flooded scene image set in a ratio of 3:1 to obtain a new flooded scene image set X.

2. According to the dual attention mechanism distribution station flooding identification method of claim 1, it is characterized in that: The dual attention mechanism includes a channel attention module and a spatial attention module.

3. According to the dual attention mechanism distribution station flooding identification method of claim 1, it is characterized in that: The training data set D q ={X q ,Y q Before the step of training the first network Q, it includes: Load Yolov4-tiny's imagenet pre-trained weights into the first network Q according to the network layer.

4. According to the dual attention mechanism distribution station flooding identification method of claim 1, it is characterized in that: The step S6 is specifically as follows: like The image is saved according to the predicted category and uploaded to the cloud platform. To save the threshold value, the is the reporting threshold; like Then it enters the alarm mode and uploads the abnormal images to the cloud platform; like Then execute step S5.

5. According to the dual attention mechanism distribution station flooding identification method of claim 1, it is characterized in that: The step of filtering the redundant frames to obtain the key frames comprises: S51, using the camera to obtain four consecutive frames of images Pic = [P0, P1, P2, P3]; S52, grayscale processing is performed on the image, and Gaussian filtering is performed to obtain a filtered image S53, filtering the image Make a difference and get the grayscale feature map dif 1 ,dif 2 ; S54, the grayscale feature map dif 1 ,dif 2 Fill and calculate dif 1 ,dif 2 The correlation coefficient corr; S55, the camera obtains the next frame image P4, S56, judging whether the correlation coefficient corr is greater than a threshold value Thr corr , if corr>Thr corr , then output key frame P key =P4; otherwise return to step S52.

6. A recognition system for a dual attention mechanism distribution station flooding recognition method as claimed in any one of claims 1 to 5, characterized in that: Includes cloud platform, edge agent and camera; The camera is connected to the edge proxy to obtain the surrounding environment image and transmit it to the edge proxy; The edge proxy is connected to the cloud platform and is used to process the image and upload it to the cloud platform; The cloud platform is used to update the water immersion scene image set with the uploaded images, and use the updated data for training, thereby updating and optimizing the detection network.

Citation Information

Patent Citations

  • Air conditioner outdoor unit image intelligent detection method and device based on Attention + YOLOv3 and medium

    CN113139945A

  • Cloud-side collaborative power distribution station flame intelligent monitoring method and system

    CN113657207A