A method and system for fast image retrieval in power distribution networks
By using multiple feature indicators to determine similarity and establish index mapping relationships in the power distribution network image database, the problem of redundant image storage is solved, and fast and efficient image retrieval and analysis are achieved.
Patent Information
- Application Number
- CN202311226641.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-21
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2043-09-21
AI Technical Summary
There are a large number of similar images in the distribution network image database, which leads to high storage cost and low analysis efficiency.
By acquiring distribution network inspection image data, similarity is judged using multiple feature indicators such as gray-scale distribution histogram, peak signal-to-noise ratio, and structural similarity. Redundant images are removed, and the image feature information is associated with the naming method to establish an index mapping relationship for fast retrieval.
It effectively saves database space, reduces storage costs, improves image analysis efficiency, and enables fast and accurate image retrieval.
Smart Images

Figure CN117251591B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of information processing, and in particular relates to a method and system for rapid image retrieval in power distribution networks. Background Technology
[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.
[0003] As the number of images in a distribution network image database increases, improving the retrieval efficiency becomes a major challenge. If a large number of similar images exist within the distribution network image database, storing all of them would consume significant database space and increase storage costs. Furthermore, a large amount of redundant data would increase the cost of image analysis and reduce its efficiency. Therefore, it is essential to perform redundancy analysis on the imported distribution network images. Summary of the Invention
[0004] To address at least one of the technical problems mentioned above, this invention provides a method and system for rapid image retrieval in a power distribution network. After removing redundant information from the power distribution network data, the method combines the image's feature information with its naming convention. This ensures both rapid image retrieval and that images with high similarity have similar names and numbers, while images with low similarity have more distant names and numbers, further improving retrieval efficiency.
[0005] In order to achieve the above object, the present invention adopts the following technical solutions:
[0006] The first aspect of the present invention provides a method for fast retrieval of power distribution network images, comprising the following steps:
[0007] Acquire image data of power distribution network inspection;
[0008] Based on the weighted average of multiple feature indicators of the distribution network inspection images and the images in the database, a similarity judgment is made. If the similarity exceeds the set threshold, the image is a redundant image and is not stored in the database; otherwise, it is stored in the database.
[0009] By associating the feature information of images in the database with the naming convention, the image storage name of the image in the database is obtained. An index mapping relationship between the original name of the image and the storage name is established, and the target image is retrieved based on the index mapping relationship.
[0010] A second aspect of the present invention provides a fast image retrieval system for power distribution networks, comprising:
[0011] The data acquisition module is configured to acquire distribution network inspection image data.
[0012] The redundant information removal module is configured to: perform similarity judgment based on multiple feature indicators of the distribution network inspection image and the image in the database. If the similarity exceeds the set threshold, the image is a redundant image and will not be stored in the database; otherwise, it will be stored in the database.
[0013] The image retrieval module is configured to: associate and combine the feature information of the image with the naming method to obtain the image storage name of the image in the database, establish an index mapping relationship between the original name of the image and the storage name, and retrieve the target image based on the index mapping relationship.
[0014] A third aspect of the present invention provides a computer-readable storage medium.
[0015] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the fast image retrieval method for a power distribution network as described above.
[0016] A fourth aspect of the present invention provides a computer device.
[0017] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the fast image retrieval method for power distribution networks as described above.
[0018] Compared with the prior art, the present invention has the following beneficial effects:
[0019] 1. An innovative method for judging similar images based on weighted evaluation of multiple signal-to-noise features is proposed. The gray-level distribution histogram, peak signal-to-noise ratio, and structural similarity of the images are weighted and calculated to achieve effective judgment of image similarity.
[0020] 2. An innovative image fast filtering and retrieval method combining feature detection and naming is proposed. By associating image feature information with naming methods, it can not only ensure fast image retrieval, but also ensure that images with high similarity have similar names and numbers, while images with low similarity have more distant names and numbers, thus further improving retrieval efficiency.
[0021] Advantages of additional aspects of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. Attached Figure Description
[0022] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.
[0023] Figure 1This is a flowchart of a fast image retrieval method for power distribution networks provided in an embodiment of the present invention;
[0024] Figure 2 This is the target detection algorithm structure provided in the embodiments of the present invention. Detailed Implementation
[0025] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0026] It should be noted that the following detailed descriptions are illustrative and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.
[0027] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of exemplary embodiments according to the invention. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.
[0028] Example 1
[0029] like Figure 1 As shown, this embodiment provides a method for fast retrieval of power distribution network images, including the following steps:
[0030] S101: Acquire image data of power distribution network inspection;
[0031] S102: Based on multiple feature indicators of the distribution network inspection images and the images in the database, a similarity judgment is made. If the similarity exceeds the set threshold, the image is a redundant image and is not stored in the database; otherwise, it is stored in the database.
[0032] S103: Combine the image's feature information with the naming method to obtain the image storage name of the database image, establish an index mapping relationship between the original name and the storage name of the image, and retrieve the target image based on the index mapping relationship.
[0033] In S102, the distribution network image and the images in the database have multiple feature indicators, including gray-level distribution histogram, peak signal-to-noise ratio of the image, and structural similarity index of the image. Similarity is judged based on the weighted value of multiple indicators.
[0034] The gray-level distribution histogram is calculated as follows: First, count the number of times each pixel appears in an image. Then, divide the number of times each pixel appears by the total number of pixels to get the frequency of that pixel. Finally, represent the pixel and its frequency in a graph to obtain the gray-level histogram.
[0035] The peak signal-to-noise ratio (PSNR) of an image is calculated as follows:
[0036] Peak signal-to-noise ratio (PSNR) is one of the metrics used to measure image quality.
[0037] For grayscale images, the definition is based on MSE (mean squared error):
[0038]
[0039] In the formula, I(i,j) is the original image, K(i,j) is the noisy image after adding noise to it; m is the length of the original image, and n is the width of the original image;
[0040] Then PSNR can be defined as:
[0041]
[0042] In the formula, MAX I PSNR is the maximum pixel value of the image, and its unit is dB. If each pixel is represented by 8 bits, its value is 2^8 - 1 = 255.
[0043] For color images, the following methods can be used for calculation:
[0044] Method 1: Calculate the MSE value of each of the three channels of the RGB image, then average the values, and finally calculate the PSNR;
[0045] Method 2: Directly use MATLAB's built-in function psnr();
[0046] Method 3: Convert the image to YCbCr format and calculate only the PSNR of the Y component, i.e., the luminance component.
[0047] The calculation process for the structural similarity index of the images is as follows:
[0048] The structural similarity index measure (SSIM) is a metric used to measure the similarity between two digital images. When one image is undistorted and the other is distorted, their structural similarity can be considered a measure of the distorted image's quality. Humans are not sensitive to the absolute brightness / color of pixels, but are very sensitive to the location of edges and textures. Compared to traditional image quality metrics such as PSNR, SSIM mimics human perception by focusing primarily on edge and texture similarity, thus better aligning with human visual judgment of image quality.
[0049] SSIM compares the two images in three aspects: brightness, contrast, and structure. The calculation method is as follows:
[0050]
[0051] Where l(x,y), c(x,y), and s(x,y) represent the brightness, contrast, and structural similarity of the two images, respectively, and μ x μ y σ x σ y C1 and C2 are the pixel mean and standard deviation of image x and image y, respectively. C1 and C2 are positive constants used to prevent division by zero in the formula.
[0052] The advantage of the above scheme is that by analyzing the similarity of features between the current image and the images in the database, similar images in the power distribution network images are removed, saving database space and reducing storage costs; at the same time, it improves the efficiency of image analysis.
[0053] S103 specifically includes:
[0054] S301: Use deep learning target detection algorithms to identify targets in power distribution network images. Employ one-stage or two-stage deep learning target detection algorithms and use convolutional neural networks for image traversal analysis. By traversing the image through a gridded rectangular box, predict the target probability of each rectangular box, and then obtain the target's location and type to acquire relevant information.
[0055] For example, YOLOv5 is a single-stage object detection algorithm, such as... Figure 2The diagram shows the overall block diagram of YOLOv5 object detection. This algorithm adds new improvements to YOLOv4, resulting in significant performance gains in both speed and accuracy. YOLO's advantage lies in achieving image object detection in real-time video with minimal accuracy differences, thus improving processing speed. S302: Divide the target region of the image into multiple equal-area image blocks. Select image blocks corresponding to the sub-regions within each target region block, calculate the peak signal-to-noise ratio and structural similarity index values for each sub-region image block, convert them to binary, and then concatenate them sequentially to obtain a binary string.
[0056] In this embodiment, the target region of the image is divided into 9 image blocks of equal area. Image blocks of five sub-regions (top, bottom, left, right, and center) in the target region block are selected respectively, and the corresponding peak signal-to-noise ratio and structural similarity index values are calculated respectively, and then converted into binary.
[0057] The binary values of the five regional features are concatenated in the order of top, bottom, left, right, and center. Finally, this string of binary numbers is appended to the binary representation of the target category number in the image.
[0058] S303: Append the string of binary numbers after the binary number of the target category number in the image;
[0059] The method for obtaining the image target category number is as follows: establish a binary code correspondence table for equipment targets in the power distribution network field, complete image target recognition, and name the image according to the correspondence table.
[0060] S304: Establish a naming mapping between source files and image storage;
[0061] This name is used as the image storage name for the image, and an index mapping between the original name and the new name of the inspection image is established to achieve fast retrieval.
[0062] The advantage of the above scheme is that by associating image feature information with naming methods, it can not only ensure fast image retrieval, but also ensure that images with high similarity have similar names and numbers, while images with low similarity have more distant names and numbers, thus further improving retrieval efficiency.
[0063] Example 2
[0064] This embodiment provides a fast image retrieval system for power distribution networks, including:
[0065] The data acquisition module is configured to acquire distribution network inspection image data.
[0066] The redundant information removal module is configured to: perform similarity judgment based on multiple feature indicators of the distribution network inspection image and the image in the database. If the similarity exceeds the set threshold, the image is a redundant image and will not be stored in the database; otherwise, it will be stored in the database.
[0067] The image retrieval module is configured to: associate and combine the feature information of the image with the naming method to obtain the image storage name of the image in the database, establish an index mapping relationship between the original name of the image and the storage name, and retrieve the target image based on the index mapping relationship.
[0068] Example 3
[0069] This embodiment provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of a fast power distribution network image retrieval method as described in Embodiment 1.
[0070] Example 4
[0071] This embodiment provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps in the fast image retrieval method for power distribution networks as described in Embodiment 1.
[0072] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage and optical storage, etc.) containing computer-usable program code.
[0073] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts 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, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0074] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0075] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0076] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing related hardware through a computer program. The program can be stored in a computer-readable storage medium, and when executed, the program can include the processes in the above-described method embodiments. The storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0077] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for fast image retrieval in a power distribution network, characterized in that, Includes the following steps: Acquire image data of power distribution network inspection; Based on the weighted average of multiple feature indicators of the distribution network inspection images and the images in the database, a similarity judgment is made. If the similarity exceeds the set threshold, the image is a redundant image and is not stored in the database; otherwise, it is stored in the database. By associating the feature information of images in the database with the naming method, the image storage name of the image in the database is obtained. An index mapping relationship between the original name and the storage name of the image is established, and the target image is retrieved based on the index mapping relationship. The step of associating image feature information with naming conventions to obtain the image storage name in the database specifically includes: The target detection algorithm is used to detect the location and type of the target image and obtain relevant information; Based on the location and type of the target image, relevant information is obtained, the target region of the image is divided into multiple image blocks of equal area, and image blocks of corresponding sub-regions in the target region blocks are selected respectively. The peak signal-to-noise ratio and structural similarity index value of the image blocks of corresponding sub-regions are calculated and converted into binary. The image storage name is obtained based on the binary representation of the image and the binary representation of the image target category number. After being converted to binary, the binary numbers are sequentially concatenated to obtain a binary string. This binary string is then appended to the binary representation of the image target category number. The image target category number is obtained by establishing a binary encoding correspondence table for equipment targets in the power distribution network field, completing image target recognition, and naming the image based on the correspondence table.
2. The fast image retrieval method for power distribution networks as described in claim 1, characterized in that, The method of using a target detection algorithm to detect the location and type of a target image and obtain relevant information includes: using a one-stage or two-stage deep learning target detection algorithm, using a convolutional neural network to perform image traversal analysis, traversing the image by gridding it into rectangular boxes, predicting the target recognition probability of each rectangular box, and then obtaining the target's location and type to obtain relevant information.
3. The fast image retrieval method for power distribution networks as described in claim 1, characterized in that, The process of dividing the target region of the image into multiple image blocks of equal area, and selecting image blocks corresponding to sub-regions within each target region block, specifically includes: The target region of the image is divided into 9 equal-area image blocks, and image blocks of five sub-regions (top, bottom, left, right, and center) are selected from each target region block.
4. The fast image retrieval method for power distribution networks as described in claim 1, characterized in that, The image storage name obtained based on the binary representation of the image and the binary representation of the image target category number includes: The binary values based on the features of each region are concatenated in the order of top, bottom, left, right, and center to obtain a binary string. This binary string is then appended to the binary representation of the target category number in the image to obtain the image storage name.
5. The fast image retrieval method for power distribution networks as described in claim 1, characterized in that, The multiple feature indicators include: gray-level distribution histogram, peak signal-to-noise ratio of the image, and structural similarity index of the image.
6. The fast image retrieval method for power distribution networks as described in claim 5, characterized in that, When calculating the grayscale distribution histogram, any two images are divided into image blocks of equal area according to the same size, and an equal number of image blocks are randomly selected for grayscale distribution histogram similarity comparison. When calculating the peak signal-to-noise ratio of the image, different signal-to-noise ratio calculation methods are used for grayscale images and color images; When calculating the structural similarity index of the images, any two images are compared in terms of brightness, contrast, and structure.
7. A fast image retrieval system for power distribution networks using the method described in claim 1, characterized in that, include: The data acquisition module is configured to acquire distribution network inspection image data. The redundant information removal module is configured to: perform similarity judgment based on multiple feature indicators of the distribution network inspection image and the image in the database. If the similarity exceeds the set threshold, the image is a redundant image and will not be stored in the database; otherwise, it will be stored in the database. The image retrieval module is configured to: associate and combine the feature information of the image with the naming method to obtain the image storage name of the image in the database, establish an index mapping relationship between the original name of the image and the storage name, and retrieve the target image based on the index mapping relationship.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps in the fast image retrieval method for power distribution networks as described in any one of claims 1-6.
9. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps in the fast image retrieval method for power distribution networks as described in any one of claims 1-6.
Citation Information
Patent Citations
Image comparison method and device
CN107844803A
Picture retrieval method and device and picture retrieval system
CN110399515A
Binary coding organization algorithm based on image features
CN111461147A
Hidden danger image processing method and system fusing Gaussian algorithm and Hash algorithm
CN115017347A