A communication device indicator light recognition method and system based on general feature comparison

CN118865241BActive Publication Date: 2025-11-18QUANZHOU POWER SUPPLY COMPANY OF STATE GRID FUJIAN ELECTRIC POWER +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202410874043.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-02
Publication Date
2025-11-18
Estimated Expiration
2044-07-02

AI Technical Summary

Benefits of technology

[0032]与现有技术相比,本发明具有以下有益效果:本发明提供了一种基于通用特征比对的通信设备指示灯识别方法及系统,该方法通过构建通用特征比对模型,能够通过需求描述适应不同的特征比对场景;且该方法易于实施,模型一旦完成训练,就能直接使用;此外,新设备特征只需要一次训练就可以通过配置方式保存到特征库,即可以对新设备进行比对;因此,本发明泛化性和鲁棒性强,具有很强的实用性和广阔的应用前景。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118865241B_ABST
    Figure CN118865241B_ABST
Patent Text Reader

Abstract

The application relates to a communication equipment indicator light recognition method and system based on general feature comparison, which comprises the following steps: S1, obtaining a picture of a field indicator light, i.e. an original picture, and then converting the original picture into a general picture; S2, obtaining a differentiated description of the field indicator light, i.e. an original description, and then converting the original description into a general description; S3, inputting the general picture and the general description generated in steps S1 and S2 into a trained general feature comparison model M to obtain a feature vector F, comparing the obtained feature vector F with features in a feature database FL, and selecting a feature in the feature database FL that is closest to the feature vector F, wherein a classification label C corresponding to the feature is a classification label corresponding to the picture of the field indicator light. The method and system have strong generalization and robustness, and can effectively recognize different equipment indicator lights.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and specifically to a method and system for identifying indicator lights on communication devices based on general feature comparison. Background Technology

[0002] Chinese patent CN117726866A discloses a device indicator light recognition method based on an improved Yolov5 algorithm. This method enhances small target detection capabilities by adding a small target detection head; it also simulates different brightness and contrast conditions and poor image quality in the actual operating environment of device indicator lights through targeted data augmentation, reducing the workload of initial data collection and greatly increasing the model's adaptability to different environments and image quality conditions with limited samples. Chinese patent CN117934920A discloses an end-to-end power distribution cabinet status monitoring method and device. The method includes: acquiring images of the target power distribution cabinet; inputting the images of the target power distribution cabinet into a trained deep learning model to obtain the power distribution cabinet serial number, indicator light status, switch status, and meter text content output by the deep learning model; and monitoring the target power distribution cabinet based on the power distribution cabinet serial number, indicator light status, switch status, and meter text content. This invention provides an end-to-end power distribution cabinet status monitoring method and device. Utilizing industrial vision technology, it achieves efficient monitoring of the power distribution cabinet status without affecting the operation of existing distribution boxes, and improves the safety and reliability of the distribution cabinets. Chinese Patent CN117975057A discloses a factory environment anomaly detection method based on feature comparison, including the following steps: acquiring images via camera video; pre-generating a feature library for normal conditions; extracting features from the detection area; comparing the features with those of the detection area under normal conditions; and determining whether an anomaly has occurred based on the comparison results. This invention is designed to acquire normal and real-time images. Only simple preprocessing is needed to obtain highly matched comparison and detection images, ensuring sufficient robustness and generalization of the images, reducing workload, and increasing speed. The presence of anomalies in the detection image can be determined directly by comparing the distance between the features of the detection image and the feature library under normal conditions to see if it exceeds a preset threshold. Using computer vision technology, anomalies in images are identified by comparing image features, enabling the handling of complex factory environments, with strong adaptability, high accuracy, and low false alarm rate. However, in patents CN117726866A and CN117934920A, the model construction requires training data and various enhancements to adapt to the comparison of indicator lights in new scenarios. Once a new indicator light device appears, retraining is required, resulting in high training costs. In patent CN117975057A, although a feature comparison method is used, it cannot compare the features of indicator lights from different devices, or it cannot well represent devices that have never been trained on. Summary of the Invention

[0003] The purpose of this invention is to provide a method and system for identifying indicator lights of communication devices based on general feature comparison. This method and system have strong generalization and robustness and can effectively identify indicator lights of different devices.

[0004] To achieve the above objectives, the technical solution adopted by the present invention is: a method for identifying indicator lights of communication devices based on general feature comparison, comprising:

[0005] S1. Obtain images of the on-site indicator lights, i.e., the original images, and then convert the original images into general images;

[0006] S2. Obtain the differentiated descriptions of the field indicator lights, i.e., the original descriptions, and then convert the original descriptions into general descriptions;

[0007] S3. Input the general image and general description generated in steps S1 and S2 into the trained general feature comparison model M to obtain the feature vector F. Compare the obtained feature vector F with the features in the feature database FL, and select the feature in the feature database FL that is closest to the feature vector F. The corresponding classification label C is the classification label of the on-site indicator light image.

[0008] Further, in step S1, the original image is converted into a general image using the following formula (1):

[0009]

[0010] Where i,j represent the pixel coordinates in the original image, pixel i,j The pixel value representing coordinate (i,j) is a three-channel value [R,G,B], piexel_new i,j This represents the new pixel value obtained after conversion; Formula (1) reduces the combination depth of the data after processing, realizes the internal quantization distribution of the data, and thus improves the universality of the data.

[0011] Further, in step S2, the original description is converted into a general description as follows:

[0012] 201) Define the descriptive paradigm: device, shape, color, purpose, status;

[0013] 202) Call GPT4.0 to batch convert the original descriptions into general descriptions using the above description paradigm.

[0014] Furthermore, in step S3, a feature database FL is pre-constructed, specifically as follows:

[0015] Obtain indicator light images and corresponding indicator light descriptions for different scenarios, input them into the general feature comparison model M to obtain the corresponding feature vectors F', label the classification of each indicator light image, and save them to the database to obtain the feature database FL.

[0016] Furthermore, in step S3, the general feature comparison model M adopts a multi-head attention transfactor model.

[0017] Furthermore, in step S3, the training method for the general feature comparison model M is as follows:

[0018] 301) Construct a general representation dataset from the original data; the original data includes original images and original descriptions, and the general representation dataset includes general images and general descriptions. Convert the original images into general images, and the original descriptions into general descriptions, to obtain the general representation dataset D = [Image, Text]. n Where [Image, Text] represents a data sample, Image represents a general image, Text represents a general descriptive text, and n represents the number of data samples;

[0019] 302) Randomly sample prime numbers from dataset D and randomly generate 4 prime numbers Z. i , i∈[0,1,2,3], calculate Four data items D[c] are sampled from dataset D. i ];

[0020] 303) D[c i The input is fed into a general feature comparison model M, and the output feature o is... i ;

[0021] 304) Take out o i Calculate the distance with each output:

[0022] d i_j =distance(o i ,o j )

[0023] Where i∈[0,1,2,3], j∈[0,1,2,3];

[0024] 305) Calculate the loss function, which is the distance error between the four data samples:

[0025]

[0026] Based on the calculated loss function, the model parameters are updated using gradient descent and backpropagation algorithms. The above steps are repeated until the value of the loss function converges or the preset number of training iterations are reached, thus completing the training of the general feature comparison model M.

[0027] Furthermore, in step 301), the original data comes from the Visual Genome dataset and images and corresponding descriptions of various equipment in the power distribution station collected from some internal power sources.

[0028] Further, in step 304), the distance between features is calculated using the following formula (2):

[0029]

[0030] Where α and β are the set weights, α = 0.9 and β = 0.1.

[0031] The present invention also provides a communication device indicator light recognition system based on general feature comparison, including a memory, a processor, and computer program instructions stored in the memory and executable by the processor. When the processor executes the computer program instructions, it can implement the above-mentioned method.

[0032] Compared with the prior art, the present invention has the following advantages: The present invention provides a method and system for identifying indicator lights of communication devices based on general feature comparison. This method, by constructing a general feature comparison model, can adapt to different feature comparison scenarios according to the requirements description; moreover, the method is easy to implement, and the model can be used directly once it has been trained; in addition, new device features only need to be trained once and can be saved to the feature library through configuration, so that new devices can be compared; therefore, the present invention has strong generalization and robustness, and has strong practicality and broad application prospects. Attached Figure Description

[0033] Figure 1 This is a schematic diagram illustrating the implementation principle of the method according to an embodiment of the present invention;

[0034] Figure 2 This is an architecture diagram of the general feature comparison model M in this embodiment of the invention. Detailed Implementation

[0035] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0036] It should be noted that the following detailed descriptions are exemplary and intended to provide further explanation of this application. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains.

[0037] 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 exemplary embodiments according to this application. 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.

[0038] like Figure 1 As shown, this embodiment provides a method for identifying indicator lights on communication devices based on general feature comparison, including:

[0039] S1. Obtain images of the on-site indicator lights, i.e., the original images, then convert the original images into generic images and save the image mapping pair G = [original image, generic image]. These mappings will be saved to the database.

[0040] S2. Obtain the differentiated description of the field indicator lights, i.e., the original description, and then convert the original description into a general description, and save the description mapping pair N = [original description, general description].

[0041] S3. Input the general image and general description generated in steps S1 and S2 into the trained general feature comparison model M in an embedded manner to obtain the feature vector F. Compare the obtained feature vector F with the features in the feature database FL, and select the feature in the feature database FL that is closest to the feature vector F (the distance between features is calculated using the following formula (2)). The corresponding classification label C is the classification label corresponding to the image of the on-site indicator light.

[0042] In step S1, the original image is converted into a general image using the following formula (1):

[0043]

[0044] Where i,j represent the pixel coordinates in the original image, pixel i,j The pixel value representing coordinate (i,j) is a three-channel value [R,G,B], piexel_new i,j This represents the new pixel value obtained after conversion; Formula (1) reduces the combination depth of the data after processing, realizes the internal quantization distribution of the data, and thus improves the universality of the data.

[0045] In step S2, the original description is converted into a general description as follows:

[0046] 201) Define the descriptive paradigm: device, shape, color, purpose, status;

[0047] 202) Call the GPT4.0 API to convert the original descriptions into general descriptions using the above description paradigm in batches. The result returned by the API is the general description.

[0048] In step S3, the feature database FL is pre-constructed, specifically as follows:

[0049] Obtain indicator light images and corresponding indicator light descriptions for different scenarios, input them into the general feature comparison model M to obtain the corresponding feature vectors F', label the classification of each indicator light image, and save them to the database to obtain the feature database FL.

[0050] like Figure 2 As shown, the general feature comparison model M adopts a conventional multi-head attention transformer model. Its last layer is a 20-dimensional feature output. The image is divided into 32*32 small blocks and embedded into the path model. The text is converted into the corresponding index value of the dictionary and then embedded into model M.

[0051] The training method for the general feature comparison model M is as follows:

[0052] 301) Construct a general representation dataset from the original data; the original data includes original images and original descriptions, and the general representation dataset includes general images and general descriptions. Convert the original images into general images, and the original descriptions into general descriptions, to obtain the general representation dataset D = [Image, Text]. n Where [Image, Text] represents a data sample, Image represents a general image, Text represents a general descriptive text, and n represents the number of data samples.

[0053] The original data comes from the Visual Genome dataset (a dataset related to the semantic information of images and image content, which currently contains 108,249 images, 4.2 million region content descriptions, 1.7 million image content questions and answers, 2.1 million object cases, 1.8 million attributes and 1.8 million relationships) and 10,000 images of various equipment in power substations and their corresponding descriptions collected from within the power industry.

[0054] 302) Randomly sample prime numbers from dataset D and randomly generate 4 prime numbers Z. i , i∈[0,1,2,3], calculate Four data items D[c] are sampled from dataset D. i ].

[0055] 303) D[c i The input is fed into a general feature comparison model M, and the output feature o is... i.

[0056] 304) Take out o i Calculate the distance with each output:

[0057] d i_j =distance(o i ,o j )

[0058] Where i∈[0,1,2,3], j∈[0,1,2,3].

[0059] The distance between features is calculated using the following formula (2):

[0060]

[0061] Where α and β are the set weights, α = 0.9 and β = 0.1.

[0062] 305) Calculate the loss function, which is the distance error between the four data samples:

[0063]

[0064] Based on the calculated loss function, the model parameters are updated using gradient descent and backpropagation algorithms. The above steps are repeated until the value of the loss function converges or the preset number of training iterations are reached, thus completing the training of the general feature comparison model M.

[0065] This embodiment also provides a communication device indicator light recognition system based on general feature comparison, including a memory, a processor, and computer program instructions stored in the memory and executable by the processor. When the processor executes the computer program instructions, it can implement the above-described method.

[0066] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0067] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this 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 processor, 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, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0068] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0069] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0070] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention in any other way. Any person skilled in the art may make changes or modifications to the above-disclosed technical content to create equivalent embodiments. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the protection scope of the present invention.

Claims

1. A method for identifying indicator lights on communication devices based on general feature comparison, characterized in that, include: S1. Obtain images of the on-site indicator lights, i.e., the original images, and then convert the original images into general images; S2. Obtain the differentiated descriptions of the field indicator lights, i.e., the original descriptions, and then convert the original descriptions into general descriptions; S3. Input the general image and general description generated in steps S1 and S2 into the trained general feature comparison model M to obtain the feature vector F. Compare the obtained feature vector F with the features in the feature database FL, and select the feature in the feature database FL that is closest to the feature vector F. The corresponding classification label C is the classification label corresponding to the image of the on-site indicator light. In step S3, the training method for the general feature comparison model M is as follows: 301) Construct general representation data from raw data; the raw data includes raw images and raw descriptions, and the general representation data includes general images and general descriptions. Convert the raw images into general images, and the raw descriptions into general descriptions, and then organize them to obtain the general representation dataset D= ,in, Represents a data sample. This represents a general-purpose image. Represents a general descriptive text, Indicates that there is One data sample; In step 301), the raw data comes from the Visual Genome dataset and images and corresponding descriptions of various equipment in power distribution substations collected from internal power systems. 302) Randomly sample prime numbers from dataset D to generate 4 prime numbers. , ,calculate , Four data items were sampled from dataset D. ; 303) will Input to a general feature comparison model M, output features ; 304) Remove Calculate the distance with each output: in, , ; 305) Calculate the loss function, which is the distance error between the four data samples: Based on the calculated loss function, the model parameters are updated using gradient descent and backpropagation algorithms. The above steps are repeated until the value of the loss function converges or the preset number of training iterations are reached, thus completing the training of the general feature comparison model M.

2. The method for identifying indicator lights of communication devices based on general feature comparison according to claim 1, characterized in that, In step S1, the original image is converted into a general image using the following formula (1): (1) Where i,j represent the pixel coordinates in the original image. The pixel value representing the coordinates (i, j) is a three-channel value [R, G, B]. This represents the new pixel value obtained after conversion; Formula (1) reduces the combination depth of the data after processing, realizes the internal quantization distribution of the data, and thus improves the versatility of the data.

3. The method for identifying indicator lights of communication devices based on general feature comparison according to claim 1, characterized in that, In step S2, the original description is converted into a general description as follows: 201) Define the descriptive paradigm: device, shape, color, purpose, status; 202) Call GPT4.0 to batch convert the original descriptions into general descriptions using the above description paradigm.

4. The method for identifying indicator lights of communication devices based on general feature comparison according to claim 1, characterized in that, In step S3, the feature database FL is pre-constructed, specifically as follows: Obtain indicator light images and corresponding indicator light descriptions for different scenarios, input them into the general feature comparison model M to obtain the corresponding feature vectors F', label the classification of each indicator light image, and save them to the database to obtain the feature database FL.

5. The method for identifying indicator lights of communication devices based on general feature comparison according to claim 1, characterized in that, In step S3, the general feature comparison model M adopts a multi-head attention transfactor model.

6. The method for identifying indicator lights of communication devices based on general feature comparison according to claim 1, characterized in that, In step 304), the distance between features is calculated using the following formula (2): (2) in, , For the set weights, , .

7. A communication device indicator light recognition system based on universal feature comparison, characterized in that, It includes a memory, a processor, and computer program instructions stored in the memory and executable by the processor, wherein when the processor executes the computer program instructions, it can implement the method as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Equipment indicating lamp identification method based on improved Yolov5 algorithm

    CN117726866A

  • End-to-end power distribution cabinet state monitoring method and device

    CN117934920A

  • Factory environment anomaly detection method based on feature comparison

    CN117975057A

  • Multi-modal model training method, device and equipment and readable storage medium

    CN116561570A

  • Multi-modal image classification method based on ViT fusion LPOM optimization method

    CN117689940A