Equipment host indicator light state identification method and system, equipment and storage medium

By detecting the image data of the device host indicator light image data and comparing the brightness, identifying the status of the device host indicator light, solving the problem of low accuracy of indicator light status recognition in the prior art, and achieving higher recognition accuracy.

CN119723440APending Publication Date: 2025-03-28GUANGZHOU THINKER TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411695225.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-25
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

The prior art has low accuracy when acquiring the indicator light status of the device host, especially in the field environment changes such as light changes and camera jitters, resulting in low accuracy of image recognition.

Method used

By obtaining the host indicator image data, object detection is performed to identify the indicator area and brightness, corresponding indicator objects are determined based on the indicator area, and indicator lights that are mutually exclusive to their status are found, and the brightness of the mutually exclusive pair is compared to determine the indicator light status.

Benefits of technology

The accuracy of the device host indicator light status recognition is improved, and the indicator light status can be determined more accurately than the method of directly judging the brightness threshold.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119723440A_ABST
    Figure CN119723440A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an equipment host indicator light state identification method, system and equipment and a storage medium, and belongs to the technical field of computers. According to the method, target detection is carried out on host indicator lamp image data to obtain an indicator lamp identification result, the indicator lamp identification result comprises an indicator lamp area and the brightness of the indicator lamp area, and then a corresponding indicator lamp object is determined according to the indicator lamp area. And then, according to the indicator light object, searching the indicator light mutually exclusive to the indicator light object to obtain a mutually exclusive object, and when the mutually exclusive object is found, comparing the brightness of the indicator light area of the mutually exclusive light pair according to the indicator light identification result, and determining the indicator light states of the indicator light object and the mutually exclusive object. The state of the indicator lamp is judged by comparing the brightness of the mutually exclusive lamp pairs with mutually exclusive states, and compared with a mode of judging directly through the brightness threshold value, the accuracy of state recognition of the indicator lamp can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, system, device and storage medium for identifying the status of an indicator light of a device host. Background Art

[0002] The indicator light of the device host is used to indicate the working status of the device host. Generally, the panel of the device host indicator light is marked with various states of the device host, such as on, off, fault and other states. Each state corresponds to an indicator light. If the device is in a certain state, the corresponding indicator light is on. Exemplarily, the gas fire extinguishing host can display the current fire alarm, fault, startup, feedback, manual, automatic, shielding and other states through the status light. For some old or special equipment, it is impossible to perform online status monitoring through the network or other forms, and the equipment operation status can only be obtained by obtaining the host indicator light. In the related art, most of the methods for obtaining the device indicator light are to modify the circuit of the indicator light module and obtain the indicator light status through the serial port acquisition method, but this method requires the indicator light circuit to be modified, the line layout cost is high, and the indicator light module may be damaged.

[0003] With the development of Internet of Things and artificial intelligence technologies, image recognition is also used to obtain the status of indicator lights. However, due to changes in the on-site environment where the host indicator lights are located, such as light changes, camera shaking, etc., the accuracy of the indicator light status recognized by image recognition may be low. Summary of the invention

[0004] The main purpose of the embodiments of the present application is to propose a method, system, device and storage medium for identifying the status of an indicator light of a device host, aiming to improve the accuracy of image recognition of the indicator light status.

[0005] To achieve the above purpose, an embodiment of the present application provides a method for identifying the status of a device host indicator light, comprising the following steps:

[0006] Get the host indicator light image data;

[0007] Performing target detection on the host indicator light image data to obtain an indicator light recognition result, wherein the indicator light recognition result includes an indicator light area and the brightness of the indicator light area;

[0008] Determine a corresponding indicator light object according to the indicator light area;

[0009] According to the indicator light object, search for an indicator light whose state is mutually exclusive with the indicator light object to obtain a mutually exclusive object;

[0010] When the mutually exclusive object is found, the brightness of the indicator light area of ​​the mutually exclusive light pair is compared according to the indicator light recognition result to determine the indicator light state of the mutually exclusive light pair, wherein the mutually exclusive light pair includes the indicator light object and the mutually exclusive object.

[0011] In some embodiments, the device host indicator light status identification method further includes the following steps:

[0012] When the mutually exclusive object is not found, obtaining a second expected threshold;

[0013] The brightness of the indicator light area of ​​the indicator light object is compared with the second expected threshold to obtain the indicator light state of the indicator light object.

[0014] In some embodiments, the performing target detection on the host indicator light image data to obtain the indicator light recognition result includes the following steps:

[0015] Identifying the actual reference positioning point position on the host panel in the host indicator light image data;

[0016] Determine the indicator light position offset in the host indicator light image data according to the actual reference positioning point position and the preset reference positioning point position;

[0017] Determine the indicator light area in the host indicator light image data according to the indicator light position offset and the preset indicator light position;

[0018] The brightness of the indicator light area is determined according to the pixel value of the indicator light area.

[0019] In some embodiments, the step of identifying the actual reference positioning point position on the host panel in the host indicator light image data comprises the following steps:

[0020] Performing a preprocessing operation on the host indicator light image data to obtain preprocessed image data, wherein the preprocessing operation includes a reference positioning point preset area interception process and an image filtering process;

[0021] Using an edge detection algorithm to identify edge features in the preprocessed image data to obtain edge image data;

[0022] Identify edge lines in the edge features according to gradient values ​​of pixel points in the edge image data;

[0023] The position of the reference positioning point on the host panel is determined according to the intersection of the two edge straight lines.

[0024] In some embodiments, the step of identifying edge lines in the edge features according to the gradient values ​​of the pixels in the edge image data comprises the following steps:

[0025] Constructing a gradient plane according to the gradient values ​​of the pixel points in the edge image data;

[0026] According to the preset length and the plurality of preset angles, a plurality of preset straight line arrays are constructed in the gradient plane with the starting point of the gradient plane as the origin, wherein the preset straight line arrays include a plurality of pixel points constituting the preset straight lines on the gradient plane;

[0027] Select any point on the edge line in the gradient plane as the target pixel point;

[0028] Matching a preset straight line array with a minimum angle difference according to the tangent angle of the target pixel point;

[0029] When the tangent angle of the expected number of pixel points in the preset straight line array and the tangent angle of the target pixel point are less than an angle threshold, the edge line where the target pixel point is located is determined to be a straight line, and an edge straight line is obtained.

[0030] In some embodiments, searching for an indicator light whose state is mutually exclusive with that of the indicator light object according to the indicator light object to obtain a mutually exclusive object comprises the following steps:

[0031] Obtaining a mutually exclusive light configuration table, wherein the mutually exclusive light configuration table is used to associate mutually exclusive state indicator lights on a host panel of a storage device;

[0032] According to the indicator light object, the indicator light whose state is mutually exclusive with the indicator light object is searched in the mutually exclusive light configuration table to obtain a mutually exclusive object.

[0033] In some embodiments, comparing the brightness of the indicator light areas of the mutually exclusive light pair according to the indicator light identification result to determine the indicator light state of the mutually exclusive light pair includes the following steps:

[0034] Acquire, from the indicator light recognition result, a first brightness of the area where the indicator light object in the mutually exclusive light pair is located and a second brightness of the area where the mutually exclusive object is located;

[0035] Subtract the second brightness from the first brightness to obtain a brightness difference;

[0036] When the brightness difference is greater than zero and the absolute value of the brightness difference is greater than a first expected threshold, the indicator light state of the mutually exclusive light pair is that the indicator light object is on and the mutually exclusive light object is off;

[0037] When the brightness difference is less than zero and the absolute value of the brightness difference is greater than a first expected threshold, the indicator light state of the mutually exclusive light pair is that the indicator light object is off and the mutually exclusive light object is on.

[0038] To achieve the above-mentioned purpose, another aspect of the embodiment of the present application provides a device host indicator light status recognition system, comprising:

[0039] The first module is used to obtain the image data of the host indicator light;

[0040] The second module is used to perform target detection on the host indicator light image data to obtain an indicator light recognition result, wherein the indicator light recognition result includes an indicator light area and a brightness of the indicator light area;

[0041] A third module is used to determine a corresponding indicator light object according to the indicator light area;

[0042] A fourth module is used to search for an indicator light whose state is mutually exclusive with the indicator light object according to the indicator light object, and obtain a mutually exclusive object;

[0043] The fifth module is used to compare the brightness of the indicator light area of ​​the mutually exclusive light pair according to the indicator light identification result when the mutually exclusive object is found, and determine the indicator light state of the mutually exclusive light pair, wherein the mutually exclusive light pair includes the indicator light object and the mutually exclusive object.

[0044] To achieve the above-mentioned purpose, another aspect of an embodiment of the present application proposes an electronic device, which includes a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for realizing connection and communication between the processor and the memory, and the program implements the method described in the above embodiment when executed by the processor.

[0045] To achieve the above-mentioned purpose, another aspect of an embodiment of the present application proposes a storage medium, which is a computer-readable storage medium used for computer-readable storage, and the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the method described in the above embodiment.

[0046] The device host indicator light status recognition method, system, device and storage medium proposed in the present application obtain the indicator light recognition result by performing target detection on the host indicator light image data. The indicator light recognition result includes the indicator light area and the brightness of the indicator light area. Then the corresponding indicator light object is determined according to the indicator light area. Then, according to the indicator light object, the indicator light that is mutually exclusive with the indicator light object state is searched to obtain the mutually exclusive object. When the mutually exclusive object is found, the brightness of the indicator light area of ​​the mutually exclusive light pair is compared according to the indicator light recognition result to determine the indicator light state of the indicator light object and the mutually exclusive object. The present application determines the indicator light state by comparing the brightness of mutually exclusive light pairs whose states are mutually exclusive. Compared with the method of directly judging by the brightness threshold, it can improve the accuracy of indicator light state recognition. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 It is a flow chart of a method for identifying the status of a device host indicator light provided in an embodiment of the present application;

[0048] Figure 2 This is a schematic diagram of host indicator light image data provided by an embodiment of the present application;

[0049] Figure 3 It is a schematic diagram of the position offset of the indicator light in the host indicator light image data provided by an embodiment of the present application;

[0050] Figure 4 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION

[0051] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0052] It should be noted that, although the functional modules are divided in the system and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the system or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0053] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0054] The embodiments of the present application provide a method, system, device and storage medium for identifying the status of an indicator light of a device host, aiming to improve the accuracy of image recognition of the indicator light status.

[0055] The device host indicator light status recognition method, system, device and storage medium provided in the embodiments of the present application are specifically described through the following embodiments. First, the device host indicator light status recognition method in the embodiments of the present application is described.

[0056] The device host indicator light status identification method provided in the embodiment of the present application relates to the field of computer technology. The device host indicator light status identification method provided in the embodiment of the present application can be applied to a terminal, can also be applied to a server side, and can also be software running in a terminal or a server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the device host indicator light status identification method, etc., but is not limited to the above forms.

[0057] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0058] Figure 1 is an optional flow chart of a method for identifying the status of a device host indicator light provided in an embodiment of the present application. Figure 1 The method may include but is not limited to steps S101 to S105.

[0059] Step S101, obtaining host indicator light image data;

[0060] Step S102, performing target detection on the host indicator light image data to obtain an indicator light recognition result, wherein the indicator light recognition result includes an indicator light area and the brightness of the indicator light area;

[0061] Step S103, determining the corresponding indicator light object according to the indicator light area;

[0062] Step S104, searching for an indicator light whose state is mutually exclusive with the indicator light object according to the indicator light object, and obtaining a mutually exclusive object;

[0063] Step S105, when a mutually exclusive object is found, the brightness of the indicator light area of ​​the mutually exclusive light pair is compared according to the indicator light recognition result to determine the indicator light state of the mutually exclusive light pair, wherein the mutually exclusive light pair includes the indicator light object and the mutually exclusive object.

[0064] In the steps S101 to S105 shown in the embodiment of the present application, target detection is performed on the host indicator light image data to obtain the indicator light recognition result, and the indicator light recognition result includes the indicator light area and the brightness of the indicator light area, and then the corresponding indicator light object is determined according to the indicator light area, and then the indicator light object is searched for the indicator light object that is mutually exclusive with the indicator light object state to obtain the mutually exclusive object. When the mutually exclusive object is found, the brightness of the indicator light area of ​​the mutually exclusive light pair is compared according to the indicator light recognition result to determine the indicator light state of the indicator light object and the indicator light state of the mutually exclusive object. The present application determines the indicator light state by comparing the brightness of mutually exclusive light pairs with mutually exclusive states, which can improve the accuracy of indicator light state recognition compared to the method of directly judging by the brightness threshold.

[0065] In step S101 of some embodiments, a camera may be fixedly arranged at a position facing the host indicator light panel, and the camera takes pictures at a certain sampling frequency to obtain host indicator light image data. For example, the host indicator light image data of the gas fire extinguishing host captured by the camera is as follows: Figure 2 shown.

[0066] In step S102 of some embodiments, target detection is performed on the collected host indicator light image data to obtain an indicator light recognition result, and the indicator light recognition result includes the indicator light area of ​​each indicator light on the panel and the brightness of the indicator light area. Target detection on the host indicator light image data refers to identifying the indicator light area in the image. For example, the indicator light area refers to Figure 2 The target detection method for the host indicator light image data may be a target detection model method based on deep learning, that is, by marking the indicator light areas of a large number of host indicator light images, training a convolutional neural network with the marked images to obtain a target detection model, and then using the target detection model to perform target detection on the host indicator light image data to identify the indicator light area. In some other embodiments, the pixel position of the indicator light area may also be pre-stored, and after the host indicator light image data is collected, the pixel position of the pre-stored indicator light area is used to identify the indicator light area from the host indicator light image data. The brightness of the indicator light area may be represented by the brightness value of the central pixel of the indicator light area, or by the average brightness value of all pixels in the indicator light area.

[0067] In some embodiments, step S102 may include but is not limited to steps S201 to S203:

[0068] Step S201, identifying the actual reference positioning point position on the host panel in the host indicator light image data;

[0069] Step S202, determining the indicator light position offset in the host indicator light image data according to the actual reference positioning point position and the preset reference positioning point position;

[0070] Step S203, determining the indicator light area in the host indicator light image data according to the indicator light position offset and the preset indicator light position;

[0071] Step S204: determining the brightness of the indicator light area according to the pixel value of the indicator light area.

[0072] In this embodiment, in the method of identifying the indicator light area from the host indicator light image data using the pre-stored pixel position of the indicator light area, considering that the host indicator light is relatively small and the shooting distance is far, the camera shake will affect the recognition of the indicator light area. For example, the indicator light of the gas fire extinguishing host is generally small, and the camera generally needs to be installed far away from the gas fire extinguishing host, so a long-focus camera will be used in the project, which results in the indicator light pixel being very small, generally 15*15, or even smaller. Due to the use of a long-focus camera, the position of the indicator light is greatly affected by the environment. For example: many factors such as the change in the earth's gravity during a day will cause the camera position to change, so that the picture taken is usually moved up and down, resulting in the position of the indicator light marked on the picture based on the preset stored pixel position of the indicator light area will be offset, such as Figure 3 As shown. If the position of the indicator light cannot be accurately identified, the state of the indicator light cannot be identified. Based on this, the present embodiment first identifies the reference positioning point on the host panel in the host indicator light image data, for example, identifies the position of the upper right corner on the host panel as the reference positioning point, and uses the identified reference positioning point position minus the originally configured position to obtain the offset of the overall image, which can also represent the offset of the indicator light position on the image, and then uses the offset plus the position of the originally configured indicator light area (i.e., the preset indicator light position) to obtain the actual position of the indicator light area. In another example, the relative position relationship between each indicator light position and the reference positioning point is pre-stored in the system. After identifying the reference positioning point of the host panel in the image, the position of the indicator light area in the image can be accurately determined in combination with the position of the reference positioning point and the pre-stored relative position of the indicator light, and then the brightness of the indicator light area can be extracted based on the pixel value of the accurately identified indicator light area.

[0073] In some embodiments, step S201 may include but is not limited to steps S301 to S304:

[0074] Step S301, preprocessing the image data of the host indicator light to obtain preprocessed image data, wherein the preprocessing operation includes reference positioning point preset area interception processing and image filtering processing;

[0075] Step S302, using an edge detection algorithm to identify edge features in the preprocessed image data to obtain edge image data;

[0076] Step S303, identifying edge lines in edge features according to the gradient values ​​of the pixels in the edge image data;

[0077] Step S304: determining the position of the reference positioning point on the host panel according to the intersection of the two edge lines.

[0078] In this embodiment, the process of identifying the reference positioning point in the image is as follows:

[0079] First, the host indicator light image data is preprocessed by recognition range segmentation and image filtering to obtain preprocessed image data. In actual scenarios, the camera generally moves slightly, so a certain area around the actual reference positioning point (such as the upper right corner of the host panel) can be selected as the recognition range. The recognition range is an image used to find the pixel position of the reference positioning point. Edge detection and line detection are performed within the recognition range to determine the accurate reference positioning point within the recognition range in the image. Compared with the method of using the entire image as the recognition range, the amount of calculation can be reduced by selecting a certain area around the reference positioning point as the recognition range. By filtering the image, image features can be preliminarily extracted, the information carried by the image can be simplified, and the amount of calculation in the subsequent edge detection process can be reduced. In addition, filtering eliminates the noise mixed in when the image is digitized, thereby improving the accuracy of edge detection.

[0080] In some examples, the pixels within the recognition range can be filtered to remove interference, and alternating operations using 3×3 and 5×5 convolution kernels have better effects. For example, if the upper right corner of the chassis is selected as the reference point, a square area with a side length of 100 pixels centered on the upper right corner can be intercepted as the recognition range. The recognition range is an image used to find the pixel position of the reference positioning point. Due to environmental influences, the reference positioning point in the upper right corner of the chassis moves up and down in the selected picture. In order to find the pixel position of the reference positioning point in the recognition range, the image of the recognition range can be convolved multiple times to filter out interference. The convolution kernel selected in the filtering process of this embodiment can be as follows:

[0081] 5×5 convolution kernel (need to be divided by 273 after convolution):

[0082] {1,4,7,4,1},

[0083] {4,16,26,16,4},

[0084] {7,26,41,26,7},

[0085] {4,16,26,16,4},

[0086] {1,4,7,4,1}

[0087] 3×3 convolution kernel (need to be divided by 16 after convolution):

[0088] {1,2,1},

[0089] {2,4,2},

[0090] {1,2,1}

[0091] The specific process of image filtering is to first use a 5×5 convolution kernel for convolution, then use a 3×3 convolution kernel for convolution, then use a 5×5 convolution kernel for convolution again, and then use a 3×3 convolution kernel for convolution again. After these four convolutions, a lot of interference in the image will be filtered out.

[0092] Second, after filtering the image in the recognition range, edge detection algorithm is used to identify edge features in the preprocessed image data to obtain edge image data. The edge detection algorithm is used to identify edge features in the image, and edge features refer to places where the values ​​of pixels in the image have a sudden change, such as the edge of the host panel. Edge image data can be obtained by extracting edge features in the image. The edge detection algorithm can be a Canny algorithm, a Sobel algorithm, a Prewitt algorithm, a Roberts algorithm, etc. Exemplarily, a gradient operation is performed on the filtered image, that is, a horizontal differential value dx and a vertical differential value dy are calculated, and the sum of the square of dx and the square of dy is compared with the gradient value of each pixel (that is, the sum of the square of dx and the square of dy of the pixel, indicating the edge strength at the pixel) and a preset threshold. If it is less than this threshold, the gradient value of the pixel is set to zero to remove the weaker edge, thereby obtaining the edge feature.

[0093] Third, after obtaining the edge image data, the edge straight line in the edge feature is identified according to the gradient value of the pixel point in the edge image data. The edge straight line can be identified by a straight line detection algorithm, which can be a gradient phase method, a Hough transform method, or a phase grouping method. The gradient phase method obtains the straight line information in different directions in the image by calculating the gradient phase, thereby realizing the recognition of the straight line; the Hough transform method detects the straight line by mapping the points in the image space to the parameter space and searching for the peak value in the parameter space; the phase grouping method realizes the recognition of the straight line by grouping pixels with similar and close gradient directions into a straight line support area.

[0094] Fourth, after identifying the straight lines in the recognition range, the reference positioning point on the host panel can be determined based on the intersection of two edge straight lines at preset positions. For example, the reference positioning point at the upper right corner of the host panel in the image can be determined based on the intersection of the horizontal straight line on the upper side and the vertical straight line on the right side.

[0095] In some embodiments, step S303 may include but is not limited to steps S401 to S405:

[0096] Step S401, constructing a gradient plane according to the gradient values ​​of the pixel points in the edge image data;

[0097] Step S402, constructing a plurality of preset straight line arrays in the gradient plane according to a preset length and a plurality of preset angles with a starting point of the gradient plane as an origin, wherein the preset straight line array includes a plurality of pixel points constituting the preset straight lines on the gradient plane;

[0098] Step S403, selecting any point on the edge line in the gradient plane as the target pixel point;

[0099] Step S404, matching a preset straight line array with a minimum angle difference according to the tangent angle of the target pixel point;

[0100] Step S405 , when the tangent angle of the expected number of pixels in the preset straight line array and the tangent angle of the target pixel are less than the angle threshold, the edge line where the target pixel is located is determined to be a straight line, and the edge line is obtained.

[0101] According to some embodiments of the present application, after performing a gradient operation on the recognition range and setting the pixel gradient values ​​less than the set threshold to zero to obtain edge features, the gradient value is then used to calculate the normal angle and tangent angle of the pixel point to obtain a gradient plane. Subsequently, a gradient plane with only straight lines is calculated based on the gradient plane, as follows:

[0102] First, multiple preset straight line arrays are constructed according to the preset length and multiple preset angles, and each array stores the relative coordinates of a straight line. For example, an array set G with a preset length of L (7 can be selected) and an angle range of [0,180) degrees is calculated, and the array set includes multiple arrays A (i.e., preset straight line arrays). Array A is used to record the positions of the horizontal and vertical coordinates in a corresponding preset straight line on the gradient plane. For example, the array of the preset straight line with a length of L of 7 and an angle of 0 on the gradient plane is [{-3,0},{-2,0},{-1,0},{0,0},{1,0},{2,0},{3,0}]; the array of the preset straight line with an angle of 45 is [{-3,-3},{-2,-2},{-1,-1},{0,0},{1,1},{2,2},{3,3}]. The array of preset lines with an angle of 90 is [{0,-3},{0,-2},{0,-1},{0,0},{0,1},{0,2},{0,3}].

[0103] Then, the gradient tangent angle of any pixel point on the edge line in the gradient plane is obtained, and the straight line array that best matches the gradient tangent angle of the pixel point is found. The coordinates of the pixel point plus the relative coordinates of the straight line array can obtain all the pixel points passing through the pixel point and on the straight line; the angle between the gradient tangent angle of the pixel point and the gradient tangent angles of all pixel points is calculated to obtain the angle array; when the number of angles in the angle array that are less than the preset angle threshold is greater than the preset threshold, it is determined that the pixel point is on the straight line, and the pixel point is added to a new gradient plane; vertical and horizontal scanning of the new gradient plane can obtain the horizontal straight line on the upper side and the vertical straight line on the right side. Exemplarily, take any point P from the gradient plane, reset the counter C, read the tangent angle T0 of the target pixel point P, and then use T0 to find the array A with the smallest angle difference from the array set G. Use the relative coordinate values ​​in array A to find the 7 points P0 to P6 relative to point P in the gradient plane. If the angle between the tangent angles of these points and P does not exceed the preset angle threshold, then the counter C is increased by 1. When the counter C is greater than L / 2 (such as 7 / 2=3), it is considered that the target pixel point P is on the straight line, and then the target pixel point P is copied to a new gradient plane. Then a new target pixel point is selected from the original gradient plane, and the above steps are repeated to determine whether it is on the straight line, until the target pixel point on the original gradient plane that is on the straight line is copied to the same gradient plane. This embodiment can use an array to filter the non-linear gradient values ​​of the gradient plane to obtain a gradient plane whose gradient values ​​are all on the straight line. Further, the intersection point of the two straight lines is calculated, and the position of the intersection point is the position of the positioning reference point.

[0104] In step S103 of some embodiments, there are multiple indicator lights on the host panel that represent different host states. After identifying each indicator light area in the image, the indicator light object (for example, an indicator light object representing that the host is turned on, an indicator light object representing that the host is turned off, or an indicator light object representing a host failure, etc.) can be determined by searching the object mapping table. The object mapping table stores the mapping relationship between the relative position of the indicator light and the reference positioning point and the indicator light object name. The corresponding indicator light object can be determined by searching the object mapping table according to the relative position of each indicator light area in the image and the reference positioning point.

[0105] In step S104 of some embodiments, the states of indicator lights on some host panels are mutually exclusive. For example, the indicator light object representing the host being turned on and the indicator light object representing the host being turned off are mutually exclusive, that is, the two lights are both in a state of one on and one off at the same time. The system can store in advance the mutually exclusive light pair configuration of the host being in a mutually exclusive state. In the actual indicator light state recognition process, after determining the indicator light object on the image, the indicator light (i.e., the mutually exclusive object) that is mutually exclusive with the indicator light object state is determined by searching the configuration.

[0106] In some embodiments, step S104 may include but is not limited to steps S501 to S502:

[0107] Step S501, obtaining a mutually exclusive light configuration table, wherein the mutually exclusive light configuration table is used to associate mutually exclusive state indicator lights on a host panel of a storage device;

[0108] Step S502: searching for an indicator light whose state is mutually exclusive with the indicator light object from a mutually exclusive light configuration table according to the indicator light object, and obtaining a mutually exclusive object.

[0109] For example, the states of the manual indicator light and the automatic indicator light of most gas fire extinguishing hosts are mutually exclusive, that is, when the manual indicator light is on, the automatic indicator light is off, and vice versa, when the manual indicator light is off, the automatic light is on. In the embodiment of the present application, mutually exclusive light pairs with mutually exclusive states can be configured in advance in the system according to the states of the host indicator lights, that is, a mutually exclusive light configuration table. When it is necessary to determine the mutually exclusive object of the currently identified indicator light object, the indicator light mutually exclusive with the indicator light object state can be searched in the mutually exclusive light configuration table according to the indicator light object to obtain the mutually exclusive object.

[0110] In step S105 of some embodiments, it is determined whether there is a mutually exclusive object for the currently identified indicator light object through a mutually exclusive light configuration table. If there is a mutually exclusive object, the brightness of the indicator light area corresponding to the current designated light object is compared with the brightness of the indicator light area corresponding to the mutually exclusive object. The brighter indicator light determines that the indicator light is on, and the darker indicator light determines that the indicator light is off. This implementation takes into account that the brightness of the host indicator light is relatively low or the brightness difference of the indicator lights in different states in the pictures taken during the day is small, so the indicator light state can be accurately determined by comparing the brightness of the two indicator lights with mutually exclusive states.

[0111] In some embodiments, the step of comparing the brightness of the indicator light areas of the mutually exclusive light pair according to the indicator light identification result in step S105 to determine the indicator light status of the mutually exclusive light pair includes but is not limited to steps S601 to S604:

[0112] Step S601, obtaining the first brightness of the area where the indicator light object in the mutually exclusive light pair is located and the second brightness of the area where the mutually exclusive object is located from the indicator light recognition result;

[0113] Step S602, subtracting the second brightness from the first brightness to obtain a brightness difference;

[0114] Step S603, when the brightness difference is greater than zero and the absolute value of the brightness difference is greater than the first expected threshold, the indicator light state of the mutually exclusive light pair is that the indicator light object is on and the mutually exclusive light object is off;

[0115] Step S604: when the brightness difference is less than zero and the absolute value of the brightness difference is greater than the first expected threshold, the indicator light state of the mutually exclusive light pair is that the indicator light object is off and the mutually exclusive light object is on.

[0116] In this embodiment, when comparing the brightness of mutually exclusive light pairs, the brightness difference between the first brightness of the indicator light object and the second brightness of the mutually exclusive object can be calculated. For example, the brightness difference can be obtained by subtracting the second brightness from the first brightness. If the brightness difference between the two indicator lights is relatively small, it means that the two lights may be on or off at the same time, and a fault alarm can be issued at this time. If the difference between the two indicator lights is greater than the first expected threshold and the first brightness is large, it is determined that the indicator light state of the mutually exclusive light pair is that the indicator light object is on and the mutually exclusive light object is off; if the difference between the two indicator lights is greater than the first expected threshold and the second brightness is large, it is determined that the indicator light state of the mutually exclusive light pair is that the indicator light object is off and the mutually exclusive light object is on.

[0117] In some embodiments, the method for identifying the status of the indicator light of the device host in the embodiment of the present application may also include but is not limited to steps S701 to S702:

[0118] Step S701, when no mutually exclusive object is found, obtaining a second expected threshold;

[0119] Step S702: Compare the brightness of the indicator light area of ​​the indicator light object with a second expected threshold value to obtain the indicator light state of the indicator light object.

[0120] In this embodiment, not all indicator lights have mutually exclusive states. For these indicator lights, their states can be directly identified by means of thresholds. Specifically, a mutually exclusive light configuration table is used to determine whether the currently identified indicator light object has a mutually exclusive object. If there is no mutually exclusive object, the brightness of the indicator light area of ​​the indicator light object can be compared with a second expected threshold value pre-stored in the system. If it is greater than the second expected threshold value, the indicator light state of the indicator light object is on; if it is less than the second expected threshold value, the indicator light state of the indicator light object is off.

[0121] The present application also provides a device host indicator light status recognition system, including:

[0122] The first module is used to obtain the image data of the host indicator light;

[0123] The second module is used to perform target detection on the host indicator light image data to obtain the indicator light recognition result, wherein the indicator light recognition result includes the indicator light area and the brightness of the indicator light area;

[0124] The third module is used to determine the corresponding indicator light object according to the indicator light area;

[0125] The fourth module is used to search for an indicator light whose state is mutually exclusive with the indicator light object according to the indicator light object, and obtain a mutually exclusive object;

[0126] The fifth module is used to compare the brightness of the indicator light area of ​​the mutually exclusive light pair according to the indicator light recognition result when a mutually exclusive object is found, and determine the indicator light state of the mutually exclusive light pair, wherein the mutually exclusive light pair includes an indicator light object and a mutually exclusive object.

[0127] It can be understood that the contents of the above-mentioned device host indicator light status identification method embodiment are all applicable to the present system embodiment, the functions specifically implemented by the present system embodiment are the same as those in the above-mentioned device host indicator light status identification method embodiment, and the beneficial effects achieved are also the same as those achieved by the above-mentioned device host indicator light status identification method embodiment.

[0128] The embodiment of the present application also provides an electronic device, the electronic device comprising: a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for realizing connection and communication between the processor and the memory, and the program is executed by the processor to realize the above-mentioned device host indicator light state recognition method. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.

[0129] See also Figure 4 , Figure 4 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:

[0130] The processor 401 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application.

[0131] The memory 402 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 402 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 402, and the processor 401 calls and executes the device host indicator light state recognition method of the embodiment of this application;

[0132] Input / output interface 403, used to implement information input and output;

[0133] Communication interface 404, used to realize communication interaction between the device and other devices, which can be realized through wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WI FI, Bluetooth, etc.);

[0134] Bus 405 , which transmits information between various components of the device (e.g., processor 401 , memory 402 , input / output interface 403 , and communication interface 404 );

[0135] The processor 401 , the memory 402 , the input / output interface 403 and the communication interface 404 are connected to each other in communication within the device via the bus 405 .

[0136] An embodiment of the present application also provides a storage medium, which is a computer-readable storage medium used for computer-readable storage. The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the above-mentioned device host indicator light status identification method.

[0137] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0138] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0139] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.

[0140] The system embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.

[0141] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.

[0142] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0143] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0144] In the several embodiments provided in the present application, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of systems or units, which can be electrical, mechanical or other forms.

[0145] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0146] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0147] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.

[0148] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.

Claims

1. A method for identifying the status of an indicator light of a device host, characterized in that: The following steps are involved: Get the host indicator light image data; Performing target detection on the host indicator light image data to obtain an indicator light recognition result, wherein the indicator light recognition result includes an indicator light area and the brightness of the indicator light area; Determine a corresponding indicator light object according to the indicator light area; According to the indicator light object, search for an indicator light whose state is mutually exclusive with the indicator light object to obtain a mutually exclusive object; When the mutually exclusive object is found, the brightness of the indicator light area of ​​the mutually exclusive light pair is compared according to the indicator light recognition result to determine the indicator light state of the mutually exclusive light pair, wherein the mutually exclusive light pair includes the indicator light object and the mutually exclusive object.

2. The method for identifying the status of a device host indicator light according to claim 1, characterized in that: The device host indicator light status identification method also includes the following steps: When the mutually exclusive object is not found, obtaining a second expected threshold; The brightness of the indicator light area of ​​the indicator light object is compared with the second expected threshold to obtain the indicator light state of the indicator light object.

3. The device host indicator light status identification method according to claim 1, characterized in that: The target detection is performed on the host indicator light image data to obtain the indicator light recognition result, including the following steps: Identifying the actual reference positioning point position on the host panel in the host indicator light image data; Determine the indicator light position offset in the host indicator light image data according to the actual reference positioning point position and the preset reference positioning point position; Determine the indicator light area in the host indicator light image data according to the indicator light position offset and the preset indicator light position; The brightness of the indicator light area is determined according to the pixel value of the indicator light area.

4. The method for identifying the status of a device host indicator light according to claim 3, characterized in that: The identifying of the actual reference positioning point position on the host panel in the host indicator light image data comprises the following steps: Performing a preprocessing operation on the host indicator light image data to obtain preprocessed image data, wherein the preprocessing operation includes a reference positioning point preset area interception process and an image filtering process; Using an edge detection algorithm to identify edge features in the preprocessed image data to obtain edge image data; Identify edge lines in the edge features according to gradient values ​​of pixel points in the edge image data; The position of the reference positioning point on the host panel is determined according to the intersection of the two edge straight lines.

5. The method for identifying the status of an indicator light of a device host according to claim 4, characterized in that: The step of identifying edge lines in the edge features according to the gradient values ​​of the pixels in the edge image data comprises the following steps: Constructing a gradient plane according to the gradient values ​​of the pixel points in the edge image data; According to the preset length and the plurality of preset angles, a plurality of preset straight line arrays are constructed in the gradient plane with the starting point of the gradient plane as the origin, wherein the preset straight line arrays include a plurality of pixel points constituting the preset straight lines on the gradient plane; Select any point on the edge line in the gradient plane as the target pixel point; Matching a preset straight line array with a minimum angle difference according to the tangent angle of the target pixel point; When the tangent angle of the expected number of pixel points in the preset straight line array and the tangent angle of the target pixel point are less than an angle threshold, the edge line where the target pixel point is located is determined to be a straight line, and an edge straight line is obtained.

6. The method for identifying the status of a device host indicator light according to claim 3, characterized in that: The step of searching for an indicator light whose state is mutually exclusive with the indicator light object according to the indicator light object to obtain a mutually exclusive object comprises the following steps: Obtaining a mutually exclusive light configuration table, wherein the mutually exclusive light configuration table is used to associate mutually exclusive state indicator lights on a host panel of a storage device; According to the indicator light object, the indicator light whose state is mutually exclusive with the indicator light object is searched in the mutually exclusive light configuration table to obtain a mutually exclusive object.

7. The method for identifying the status of an indicator light of a device host according to claim 1, characterized in that: The step of comparing the brightness of the indicator light areas of the mutually exclusive light pair according to the indicator light recognition result to determine the indicator light state of the mutually exclusive light pair comprises the following steps: Acquire, from the indicator light recognition result, a first brightness of the area where the indicator light object in the mutually exclusive light pair is located and a second brightness of the area where the mutually exclusive object is located; Subtract the second brightness from the first brightness to obtain a brightness difference; When the brightness difference is greater than zero and the absolute value of the brightness difference is greater than a first expected threshold, the indicator light state of the mutually exclusive light pair is that the indicator light object is on and the mutually exclusive light object is off; When the brightness difference is less than zero and the absolute value of the brightness difference is greater than a first expected threshold, the indicator light state of the mutually exclusive light pair is that the indicator light object is off and the mutually exclusive light object is on.

8. A device host indicator light status recognition system, characterized in that: include: The first module is used to obtain the image data of the host indicator light; The second module is used to perform target detection on the host indicator light image data to obtain an indicator light recognition result, wherein the indicator light recognition result includes an indicator light area and a brightness of the indicator light area; A third module is used to determine a corresponding indicator light object according to the indicator light area; A fourth module is used to search for an indicator light whose state is mutually exclusive with the indicator light object according to the indicator light object, and obtain a mutually exclusive object; The fifth module is used to compare the brightness of the indicator light area of ​​the mutually exclusive light pair according to the indicator light identification result when the mutually exclusive object is found, and determine the indicator light state of the mutually exclusive light pair, wherein the mutually exclusive light pair includes the indicator light object and the mutually exclusive object.

9. An electronic device, characterized in that: The electronic device includes a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for realizing connection and communication between the processor and the memory. When the program is executed by the processor, the steps of the method described in any one of claims 1 to 7 are realized.

10. A storage medium, the storage medium being a computer-readable storage medium, used for computer-readable storage, characterized in that: The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of any one of claims 1 to 7.